120142024-11-24 21:04:46szasztundeKéséscpp17Accepted 50/50223ms8760 KiB
#include <iostream>
#include<map>
using namespace std;
map<int,int> evsz;
int main()
{
    int n,x;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>x;
        evsz[x]=i;
    }

    int mini=n;
    map<int,int>::iterator it;
    for(it=evsz.begin();it!=evsz.end();it++)
    {
        if(it->second<mini)
        {
            mini=it->second;
        }
    }

    cout<<mini;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/01ms320 KiB
2Accepted0/010ms568 KiB
3Accepted5/52ms320 KiB
4Accepted5/51ms320 KiB
5Accepted5/564ms448 KiB
6Accepted5/564ms444 KiB
7Accepted4/4156ms6104 KiB
8Accepted4/4157ms6080 KiB
9Accepted4/4150ms5180 KiB
10Accepted4/4144ms4572 KiB
11Accepted4/4136ms3876 KiB
12Accepted2/2160ms4408 KiB
13Accepted2/2223ms8760 KiB
14Accepted1/1222ms8504 KiB
15Accepted1/1197ms8504 KiB
16Accepted1/1187ms6712 KiB
17Accepted1/1174ms4868 KiB
18Accepted1/1122ms824 KiB
19Accepted1/1115ms628 KiB