15922022-11-28 18:46:19kicsiboglarKéséscpp11Accepted 50/50133ms20512 KiB
#include <iostream>
#include <map>

using namespace std;
map<int,int> x;
long long n,i,a;
int main()
{
    ios::sync_with_stdio(false);
    cin>>n;
    for (i=1;i<=n;++i)
    {
        cin>>a;
        x[a]=i;
    }

    long long mini=n;
    for (auto e:x)
    {
        if (e.second<mini) mini=e.second;
    }
    cout<<mini<<"\n";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/03ms1892 KiB
2Accepted0/08ms2996 KiB
3Accepted5/52ms2572 KiB
4Accepted5/52ms2772 KiB
5Accepted5/537ms2860 KiB
6Accepted5/537ms3060 KiB
7Accepted4/4103ms14884 KiB
8Accepted4/4101ms14772 KiB
9Accepted4/497ms13272 KiB
10Accepted4/493ms12288 KiB
11Accepted4/490ms11012 KiB
12Accepted2/298ms11608 KiB
13Accepted2/2133ms20512 KiB
14Accepted1/1127ms20212 KiB
15Accepted1/1122ms20128 KiB
16Accepted1/1115ms16972 KiB
17Accepted1/1103ms12940 KiB
18Accepted1/165ms4848 KiB
19Accepted1/159ms4620 KiB