59262023-10-05 19:03:21mmatedKéséscpp17Accepted 50/50131ms20336 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n;
    cin >> n;
    map<int, int> m;
    f(i,0,n) 
    {
        int x;
        cin>>x;
        m[x]=i;
    }
    int maxi=inf;
    for(pair<int,int> p : m)  maxi=min(maxi,p.second);
    cout<<maxi+1;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1832 KiB
2Accepted0/08ms2976 KiB
3Accepted5/53ms2420 KiB
4Accepted5/53ms2468 KiB
5Accepted5/537ms2716 KiB
6Accepted5/537ms2672 KiB
7Accepted4/4107ms14440 KiB
8Accepted4/4104ms14132 KiB
9Accepted4/498ms12728 KiB
10Accepted4/496ms11480 KiB
11Accepted4/493ms10396 KiB
12Accepted2/2103ms11168 KiB
13Accepted2/2131ms20336 KiB
14Accepted1/1130ms20084 KiB
15Accepted1/1126ms19672 KiB
16Accepted1/1116ms16704 KiB
17Accepted1/1105ms12644 KiB
18Accepted1/168ms4668 KiB
19Accepted1/164ms4180 KiB