/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Accepted 215ms 612.0 KiB
#3 Accepted 478ms 796.0 KiB
#4 Accepted 478ms 904.0 KiB
#5 Time Exceeded ≥1095ms ≥948.0 KiB
#6 Time Exceeded ≥1071ms ≥952.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-11-11 03:16:25
Judged By
Score
60
Total Time
≥1095ms
Peak Memory
≥952.0 KiB