121062024-12-02 15:19:20ruffbrigiKéséscpp17Accepted 50/50233ms8760 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int N,x;
    cin>>N;
    map<int, int> I;
    for(int i=1;i<=N;i++)
    {
        cin>>x;
        I[x]=i;
    }
    int mini=INT_MAX;
    map<int, int> :: iterator y;
    for(y=I.begin();y!=I.end();y++)
    {
        if(y->second<mini) mini=y->second;
    }
    cout<<mini;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/01ms320 KiB
2Accepted0/010ms700 KiB
3Accepted5/51ms320 KiB
4Accepted5/51ms320 KiB
5Accepted5/568ms444 KiB
6Accepted5/568ms448 KiB
7Accepted4/4160ms6112 KiB
8Accepted4/4160ms5916 KiB
9Accepted4/4151ms5176 KiB
10Accepted4/4146ms4584 KiB
11Accepted4/4141ms3920 KiB
12Accepted2/2168ms4408 KiB
13Accepted2/2233ms8760 KiB
14Accepted1/1231ms8504 KiB
15Accepted1/1203ms8508 KiB
16Accepted1/1203ms6752 KiB
17Accepted1/1171ms4660 KiB
18Accepted1/1128ms824 KiB
19Accepted1/1123ms568 KiB