/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Accepted 15ms 764.0 KiB
#3 Accepted 266ms 944.0 KiB
#4 Accepted 266ms 908.0 KiB
#5 Time Exceeded ≥1094ms ≥1.324 MiB
#6 Time Exceeded ≥1087ms ≥1.324 MiB

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