/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Runtime Error 3ms 1.336 MiB
#3 Runtime Error 3ms 1.27 MiB
#4 Runtime Error 3ms 1.27 MiB
#5 Accepted 31ms 3.316 MiB
#6 Accepted 32ms 3.352 MiB

Code

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

#define int long long
#define fo(i,a,n) for(ll i=a;i<n;i++)
#define all(v) v.begin(),v.end()
#define pb push_back
#define fi first
#define sc second
#define endl '\n'
#define gcd(x, y)   (__gcd(x, y))
#define lcm(x, y)   ((x/gcd(x, y))*y)
#define mem(a,b) memset(a, b, sizeof(a))
#define de(x) cerr<<#x<<" :: "<<x<<" "<<endl

void solve()
{
    int n;
    cin>>n;
    vector<pair<int,int>>v(n);
    for(int i=0;i<n;i++) {
        cin>>v[i].first;
        v[i].second = i+1 ;
    }
    int q;
    cin>>q;
    vector<int>x(q);

    sort(all(v));

    for(int i=0;i<q;i++) {
        int x;
        cin>>x;
        cout<<v[i].second<<endl;
    }
}

int32_t main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);

    int t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }

    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:17:08
Judged At
2024-10-03 13:27:47
Judged By
Score
50
Total Time
32ms
Peak Memory
3.352 MiB