/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Runtime Error 3ms 1.332 MiB
#3 Runtime Error 3ms 1.312 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-11-11 03:15:20
Judged By
Score
10
Total Time
3ms
Peak Memory
1.332 MiB