/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Accepted 212ms 656.0 KiB
#3 Accepted 317ms 904.0 KiB
#4 Accepted 345ms 920.0 KiB
#5 Time Exceeded ≥1078ms ≥1.332 MiB
#6 Time Exceeded ≥1083ms ≥1.324 MiB

Code

#include <bits/stdc++.h>
using namespace std;
#define int long long

signed main() {
    int n, q;
    cin >> n;
    
    vector<int> vl(n);
    for (auto &u:vl) {
        cin >> u;
    }
    
    cin >> q;
    while (q--) {
        int x;
        cin >> x;
        int mn = vl[0];
        int ind = 0;
        for (int i = 1; i < n; i++) {
            if (vl[i] < mn) {
                mn = vl[i];
                ind = i;
            }
        }
        
        cout << (ind + 1) << endl;
        vl[ind] = 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:41:50
Judged At
2024-10-03 13:30:30
Judged By
Score
60
Total Time
≥1083ms
Peak Memory
≥1.332 MiB