69292023-12-20 10:22:51szabelrToronyépítés (1,1,3,3)cpp17Wrong answer 0/5014ms3584 KiB
#include <bits/stdc++.h>

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;
        }
    }/*
    for(auto it : evsz)
    {
        if(it.second<mini) mini=it.second;
    }*/
    cout<<mini;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/03ms1872 KiB
2Wrong answer0/03ms2080 KiB
3Wrong answer0/33ms2276 KiB
4Wrong answer0/33ms2364 KiB
5Wrong answer0/43ms2612 KiB
6Wrong answer0/43ms2816 KiB
7Wrong answer0/414ms2928 KiB
8Wrong answer0/44ms3136 KiB
9Wrong answer0/43ms3100 KiB
10Wrong answer0/43ms3096 KiB
11Wrong answer0/44ms3224 KiB
12Wrong answer0/414ms3340 KiB
13Wrong answer0/413ms3312 KiB
14Wrong answer0/46ms3304 KiB
15Wrong answer0/23ms3424 KiB
16Wrong answer0/23ms3584 KiB