79232024-01-12 07:16:22BenedekMartonKéséscpp17Time limit exceeded 20/50574ms4716 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int e[n];
    bool uccso[n];
    for(int i=0; i<n; i++)
    {
            cin >> e[i];
            uccso[i]=1;
    }
    for(int i=n-1; i>=0; i--)
    {
        if(uccso[i])
        {
            for(int j=i-1; j>=0; j--)
            {
                if(e[i]==e[j])
                {
                    uccso[j]=0;
                }
            }
        }
    }
    for(int i=0; i<n; i++)
    {
        if(uccso[i])
        {
            cout << i+1;
            return 0;
        }
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base20/50
1Accepted0/03ms1872 KiB
2Accepted0/0171ms2288 KiB
3Accepted5/53ms2280 KiB
4Accepted5/53ms2368 KiB
5Accepted5/5338ms4612 KiB
6Accepted5/5338ms4716 KiB
7Time limit exceeded0/4555ms2880 KiB
8Time limit exceeded0/4556ms3084 KiB
9Time limit exceeded0/4565ms3084 KiB
10Time limit exceeded0/4569ms3204 KiB
11Time limit exceeded0/4549ms2944 KiB
12Time limit exceeded0/2560ms2948 KiB
13Time limit exceeded0/2561ms2948 KiB
14Time limit exceeded0/1561ms3276 KiB
15Time limit exceeded0/1569ms3260 KiB
16Time limit exceeded0/1546ms3216 KiB
17Time limit exceeded0/1545ms3460 KiB
18Time limit exceeded0/1574ms3340 KiB
19Time limit exceeded0/1574ms3548 KiB