Compile Error
foo.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
Code
#include <bits/stdc++.h>
#define fast() ios::sync_with_stdio(false); cin.tie(0);
using namespace std;
#define ll long long int
#define ft first
#define se second
int main() {
fast();
ll N;
cin >> N;
vector<pair<ll, ll>> v(N);
for (ll i = 0; i < N; i++) {
cin >> v[i].first;
v[i].second = i + 1;
}
sort(v.begin(), v.end());
ll Q;
cin >> Q;
while (Q--) {
ll X;
cin >> X;
cout << v[0].second << endl;
v[0].first = X;
ll i = 0;
while (i + 1 < N && v[i].first > v[i + 1].first) {
swap(v[i], v[i + 1]);
i++;
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1086 KuZ the Position
- Contest
- Bangladesh 2.0
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-08-16 16:07:26
- Judged At
- 2024-10-03 13:28:32
- Judged By
- Score
- 0
- Total Time
- 0ms
- Peak Memory
- 0 Bytes