Time Exceeded
Code
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; ++i)
{
cin >> a[i];
}
int q;
cin >> q;
for (int i = 0; i < q; ++i)
{
int x;
cin >> x;
int min_index = min_element(a.begin(), a.end()) - a.begin();
cout << min_index + 1 << endl;
a[min_index] = 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 16:45:09
- Judged At
- 2024-11-11 03:14:01
- Judged By
- Score
- 60
- Total Time
- ≥1094ms
- Peak Memory
- ≥952.0 KiB