121052024-12-02 15:18:23KissCsongor777Késéscpp11Accepted 50/50216ms8760 KiB
#include<bits/stdc++.h>
using namespace std;

int main()
{
    int N,x,m=INT_MAX;
    cin>>N;
    map<int, int> H;
    for(int i=1; i<=N; i++)
    {
        cin>>x;
        H[x]=i;
    }
    map <int, int>::iterator h;
    for(h=H.begin();h!=H.end(); h++)
    {
        if(m>h->second)m=h->second;
    }
    cout<<m;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/01ms320 KiB
2Accepted0/010ms568 KiB
3Accepted5/51ms320 KiB
4Accepted5/52ms320 KiB
5Accepted5/564ms448 KiB
6Accepted5/564ms444 KiB
7Accepted4/4156ms6236 KiB
8Accepted4/4150ms6064 KiB
9Accepted4/4149ms5176 KiB
10Accepted4/4143ms4664 KiB
11Accepted4/4141ms3984 KiB
12Accepted2/2165ms4404 KiB
13Accepted2/2212ms8760 KiB
14Accepted1/1196ms8504 KiB
15Accepted1/1216ms8504 KiB
16Accepted1/1185ms6716 KiB
17Accepted1/1172ms4664 KiB
18Accepted1/1123ms824 KiB
19Accepted1/1116ms572 KiB