9772022-02-08 10:16:50zsebiKéséscpp11Accepted 50/50250ms39384 KiB
#include <iostream>
#include <map>
#include <climits>

#define f first
#define s second

using namespace std;

map<long long, long long> x;
long long i,a,mini,n;
int main()
{
    cin>>n;
    for(i=1;i<=n;++i)
    {
        cin>>a;
        x[a]=i;
    }
    mini=INT_MAX;
    for(auto &e:x)
    {
        if(e.s<mini)mini=e.s;
    }
    cout<<mini;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/02ms1808 KiB
2Accepted0/014ms3072 KiB
3Accepted5/51ms2072 KiB
4Accepted5/51ms2072 KiB
5Accepted5/557ms2872 KiB
6Accepted5/556ms3648 KiB
7Accepted4/4180ms20568 KiB
8Accepted4/4192ms21364 KiB
9Accepted4/4178ms20492 KiB
10Accepted4/4159ms20240 KiB
11Accepted4/4152ms19748 KiB
12Accepted2/2187ms22568 KiB
13Accepted2/2250ms36436 KiB
14Accepted1/1244ms37888 KiB
15Accepted1/1250ms39384 KiB
16Accepted1/1210ms37032 KiB
17Accepted1/1200ms33508 KiB
18Accepted1/1122ms24824 KiB
19Accepted1/1112ms26156 KiB