/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 332.0 KiB
#2 Accepted 177ms 748.0 KiB
#3 Accepted 422ms 896.0 KiB
#4 Accepted 427ms 880.0 KiB
#5 Time Exceeded ≥1054ms ≥948.0 KiB
#6 Time Exceeded ≥1058ms ≥952.0 KiB

Code

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

int main()
{
    int n;
    cin >> n;

    vector<int> a(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> a[i];
    }

    int q;
    cin >> q;

    for (int i = 0; i < q; ++i)
    {
        int x;
        cin >> x;

        int min_index = min_element(a.begin(), a.end()) - a.begin();

        cout << min_index + 1 << endl;

        a[min_index] = 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 16:45:09
Judged At
2024-10-03 13:26:05
Judged By
Score
60
Total Time
≥1058ms
Peak Memory
≥952.0 KiB