Time Exceeded
Code
#include<bits/stdc++.h>
#define ll long long
#define el '\n'
#define pb push_back
#define fast ios_base::sync_with_stdio(0); cin.tie(nullptr);
using namespace std;
int main() {
fast;
ll t=1;
//cin>>t;
while(t--) {
ll n;
cin>>n;
vector<ll>v(n);
for(ll i=0;i<n;i++) {
cin>>v[i];
}
ll q;
cin>>q;
while(q--) {
ll x,a=0;
cin>>x;
for(ll i=1;i<n;i++) {
if(v[i]<v[a]) {
a=i;
}
}
cout<<a+1<<el;
v[a]=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:57:15
- Judged At
- 2024-11-11 03:16:42
- Judged By
- Score
- 60
- Total Time
- ≥1094ms
- Peak Memory
- ≥1.324 MiB