79392024-01-12 07:49:58TundeKéséscpp17Runtime error 40/50149ms130448 KiB
#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int t[n];
    int lk=5000, ln=0;
    for(int i=0; i<n; i++)
    {
        cin >> t[i];
        if(t[i]>ln)
        {
            ln=t[i];
        }
        if(t[i]<lk)
        {
            lk=t[i];
        }
    }
    int r[ln-lk];
    for(int i=0; i<n; i++)
    {
        r[t[i]-lk]=i;
    }
    int x=0;
    for(int i=0; i<n && x==0; i++)
    {
        if(r[t[i]-lk]==i)
        {
            ++x;
            cout << i+1;
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base40/50
1Accepted0/03ms1880 KiB
2Accepted0/08ms2356 KiB
3Accepted5/53ms2332 KiB
4Accepted5/53ms2692 KiB
5Accepted5/550ms4420 KiB
6Accepted5/550ms4600 KiB
7Accepted4/471ms6224 KiB
8Accepted4/471ms6348 KiB
9Accepted4/471ms6572 KiB
10Accepted4/471ms6540 KiB
11Accepted4/471ms6748 KiB
12Runtime error0/2149ms130448 KiB
13Runtime error0/2136ms130428 KiB
14Runtime error0/1145ms130396 KiB
15Runtime error0/1136ms130384 KiB
16Runtime error0/1148ms130304 KiB
17Runtime error0/1136ms130064 KiB
18Runtime error0/1136ms130056 KiB
19Runtime error0/1136ms129944 KiB