79252024-01-12 07:19:19BenedekMartonKéséscpp17Time limit exceeded 20/50586ms4712 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int e[n];
    bool uccso[n], vmi[1000000000];
    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/03ms1880 KiB
2Accepted0/0171ms2336 KiB
3Accepted5/54ms2284 KiB
4Accepted5/53ms2496 KiB
5Accepted5/5338ms4456 KiB
6Accepted5/5338ms4712 KiB
7Time limit exceeded0/4535ms2916 KiB
8Time limit exceeded0/4565ms2892 KiB
9Time limit exceeded0/4569ms2916 KiB
10Time limit exceeded0/4541ms3220 KiB
11Time limit exceeded0/4578ms3220 KiB
12Time limit exceeded0/2546ms3176 KiB
13Time limit exceeded0/2586ms3172 KiB
14Time limit exceeded0/1537ms3436 KiB
15Time limit exceeded0/1563ms3260 KiB
16Time limit exceeded0/1558ms3328 KiB
17Time limit exceeded0/1541ms3316 KiB
18Time limit exceeded0/1574ms3368 KiB
19Time limit exceeded0/1546ms3408 KiB