/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 200ms 724.0 KiB
#3 Accepted 453ms 848.0 KiB
#4 Accepted 453ms 892.0 KiB
#5 Time Exceeded ≥1093ms ≥948.0 KiB
#6 Time Exceeded ≥1098ms ≥948.0 KiB

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-10-03 13:28:59
Judged By
Score
60
Total Time
≥1098ms
Peak Memory
≥948.0 KiB