79262024-01-12 07:28:48BenedekMartonKéséscpp17Runtime error 40/50150ms130716 KiB
#include <iostream>

using namespace std;

int main()
{
    int n, me=0, uccso;
    cin >> n;
    int e[n];
    for(int i=0; i<n; i++)
    {
            cin >> e[i];
            me=max(e[i], me);
    }
    bool vmi[me];
    for(int i=0; i<me; i++)
    {
        vmi[i]=1;
    }
    for(int i=n-1; i>=0; i--)
    {
        if(vmi[e[i]])
        {
            uccso=i;
            vmi[e[i]]=0;
        }
    }
    cout << uccso+1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base40/50
1Accepted0/03ms1876 KiB
2Accepted0/08ms2328 KiB
3Accepted5/53ms2460 KiB
4Accepted5/53ms2596 KiB
5Accepted5/550ms4180 KiB
6Accepted5/550ms4420 KiB
7Accepted4/471ms4752 KiB
8Accepted4/471ms5464 KiB
9Accepted4/471ms5280 KiB
10Accepted4/471ms5100 KiB
11Accepted4/471ms5512 KiB
12Runtime error0/2138ms130716 KiB
13Runtime error0/2136ms130496 KiB
14Runtime error0/1137ms130272 KiB
15Runtime error0/1141ms130052 KiB
16Runtime error0/1137ms130044 KiB
17Runtime error0/1140ms130020 KiB
18Runtime error0/1150ms130012 KiB
19Runtime error0/1146ms130004 KiB