/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 201ms 944.0 KiB
#3 Wrong Answer 277ms 1.094 MiB
#4 Wrong Answer 280ms 1.078 MiB
#5 Time Exceeded ≥1092ms ≥1.312 MiB
#6 Time Exceeded ≥1093ms ≥1.316 MiB

Code

#include <bits/stdc++.h>
using namespace std;
int min(int arr[],int n){
    long long t=999999999;
    int k;
    for(int i=0;i<n;i++){
        if(t>arr[i]){
            t=arr[i];
            k=i;
        }
        else continue;
    }
    return k;
}
int main()
{
   int n;
   cin>>n;
   int arr[n];
   for(int i=0;i<n;i++){
    cin>>arr[i];

   }
   int ans=0;
   int q;
   cin>>q;
   int quer[q];
   for(int i=0;i<q;i++){
    cin>>quer[i];
    ans=min(arr,n);
    cout<<ans+1<<endl;
     arr[ans]=quer[n];
   
   


   }
}

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:19:57
Judged At
2024-10-03 13:27:28
Judged By
Score
10
Total Time
≥1093ms
Peak Memory
≥1.316 MiB