Time Exceeded
Code
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n, q;
cin >> n;
vector<int> vl(n);
for (auto &u:vl) {
cin >> u;
}
cin >> q;
while (q--) {
int x;
cin >> x;
int mn = vl[0];
int ind = 0;
for (int i = 1; i < n; i++) {
if (vl[i] < mn) {
mn = vl[i];
ind = i;
}
}
cout << (ind + 1) << endl;
vl[ind] = x;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1086 KuZ the Position
- Contest
- Bangladesh 2.0
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-08-16 15:41:50
- Judged At
- 2024-11-11 03:17:58
- Judged By
- Score
- 60
- Total Time
- ≥1088ms
- Peak Memory
- ≥1.328 MiB