/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 324.0 KiB
#2 Wrong Answer 40ms 1.496 MiB
#3 Wrong Answer 38ms 1.406 MiB
#4 Wrong Answer 36ms 1.352 MiB
#5 Accepted 95ms 6.941 MiB
#6 Accepted 107ms 6.789 MiB

Code

#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) 42
#endif

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n),b(n);
  map<int,int> aa;
  for(int i=0;i<n;i++){
    cin >> a[i];
    aa[a[i]]=i+1;
  }
  b = a;
  sort(b.begin(),b.end());
  int q;
  vector<int> c;
  cin >> q;
  int minn = b[0];
  int l = 0;
  for(int i=0;i<q;i++){
    int tt;
    cin >> tt;
    c.push_back(aa[b[l]]);
    l++;
  }
  for(int i=0;i<c.size();i++){
    cout << c[i]<<"\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:25:01
Judged At
2024-10-03 13:27:01
Judged By
Score
50
Total Time
107ms
Peak Memory
6.941 MiB