/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 536.0 KiB
#2 Accepted 210ms 632.0 KiB
#3 Accepted 463ms 916.0 KiB
#4 Accepted 465ms 920.0 KiB
#5 Time Exceeded ≥1094ms ≥948.0 KiB
#6 Time Exceeded ≥1082ms ≥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-11-11 03:14:01
Judged By
Score
60
Total Time
≥1094ms
Peak Memory
≥952.0 KiB