121092024-12-02 15:21:20mártonágnesKéséscpp11Accepted 50/50216ms8832 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int N, x;
    cin >> N;
    map <int, int> E;
    for (int i=1; i<=N; i++)
    {
        cin>>x;
        E[x]=i;
    }
    int mini=INT_MAX;
    map <int, int> :: iterator y;
    for (y=E.begin(); y!=E.end(); y++)
    {
        if (y->second<mini) mini=y->second;
    }
    cout << mini;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/01ms320 KiB
2Accepted0/010ms568 KiB
3Accepted5/51ms320 KiB
4Accepted5/51ms320 KiB
5Accepted5/564ms440 KiB
6Accepted5/564ms440 KiB
7Accepted4/4162ms6204 KiB
8Accepted4/4164ms5952 KiB
9Accepted4/4145ms5176 KiB
10Accepted4/4142ms4656 KiB
11Accepted4/4138ms3896 KiB
12Accepted2/2164ms4432 KiB
13Accepted2/2209ms8832 KiB
14Accepted1/1206ms8504 KiB
15Accepted1/1216ms8508 KiB
16Accepted1/1193ms6816 KiB
17Accepted1/1165ms4756 KiB
18Accepted1/1123ms824 KiB
19Accepted1/1116ms816 KiB