Time Exceeded
Code
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {
int n;
cin>>n;
vector<int> arr(n);
for (int i = 0; i < n; ++i)cin>>arr[i];
int q;
cin>>q;
while(q--){
int x;
cin>>x;
int minPos = min_element(arr.begin(),arr.end())-arr.begin();
cout << minPos + 1 << endl;
arr[minPos] = x;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1086 KuZ the Position
- Contest
- Bangladesh 2.0
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-08-16 16:02:04
- Judged At
- 2024-11-11 03:16:25
- Judged By
- Score
- 60
- Total Time
- ≥1095ms
- Peak Memory
- ≥952.0 KiB