37522023-03-02 18:41:54Erik_GepardKéséscpp17Accepted 50/50126ms20708 KiB
#include <bits/stdc++.h>
using namespace std;

const int mod = 20210108;

void solve(){
    int n;
    cin>>n;
    map<int, int> ev;
    for(int i=1; i<=n; i++){
        int a;
        cin>>a;
        ev[a]=i;
    }
    int mini=INT_MAX;
    for(pair<int, int> x : ev){
        mini=min(mini, x.second);
    }
    cout<<mini<<"\n";
}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1828 KiB
2Accepted0/08ms2980 KiB
3Accepted5/53ms2428 KiB
4Accepted5/53ms2660 KiB
5Accepted5/535ms2828 KiB
6Accepted5/537ms2812 KiB
7Accepted4/4104ms14584 KiB
8Accepted4/4101ms14284 KiB
9Accepted4/497ms12952 KiB
10Accepted4/493ms11928 KiB
11Accepted4/489ms10704 KiB
12Accepted2/2100ms11588 KiB
13Accepted2/2126ms20708 KiB
14Accepted1/1122ms20248 KiB
15Accepted1/1122ms20064 KiB
16Accepted1/1114ms16964 KiB
17Accepted1/1103ms13064 KiB
18Accepted1/164ms5116 KiB
19Accepted1/159ms4868 KiB