/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 320.0 KiB
#2 Accepted 15ms 576.0 KiB
#3 Accepted 278ms 856.0 KiB
#4 Accepted 279ms 884.0 KiB
#5 Time Exceeded ≥1095ms ≥2.391 MiB
#6 Time Exceeded ≥1093ms ≥2.438 MiB

Code

#include<bits/stdc++.h>
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define ll long long
#define endl '\n'
using namespace std;
int main()
{
    optimize();
    int n;
    cin>>n;
    vector<ll>v(n),v1;
    for(auto &u:v)
    {
        cin>>u;
        v1.push_back(u);
    }
    int t;
    cin>>t;
    while(t--)
    {
        ll m;
        cin>>m;
        int s=min_element(v1.begin(),v1.end())-v1.begin();
        v1[s]=m;
        cout<<s+1<<endl;
    }


}

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 17:07:14
Judged At
2024-10-03 13:24:01
Judged By
Score
60
Total Time
≥1095ms
Peak Memory
≥2.438 MiB