112272024-07-20 23:34:16probaLegcsalódottabb versenyző (75 pont)python3Runtime error 0/7582ms14748 KiB
#N = 10
N = input()
#sor = list(map(int, '2 5 3 8 2 5 4 9 8 9'.split(' ')))
sor = list(map(int, input().split(' ')))
hisz = [0]*int(N)

for i, j in enumerate(sor):
    if i == 0:
        elso, epont, hisz[i] = i, j, 1

    elif epont >= j:
        hisz[elso] += 1
        
    else:
        elso, epont = i, j
        hisz[i] = 1

if hisz.count(0) == N-1:
    print(-1)
else:
    print(hisz.index(max(hisz))+1)
    

        
        
        
    
    
SubtaskSumTestVerdictTimeMemory
base0/75
1Runtime error0/017ms2960 KiB
2Runtime error0/082ms14608 KiB
3Runtime error0/517ms2960 KiB
4Runtime error0/517ms2916 KiB
5Runtime error0/517ms3044 KiB
6Runtime error0/517ms3064 KiB
7Runtime error0/517ms3044 KiB
8Runtime error0/518ms2916 KiB
9Runtime error0/517ms3008 KiB
10Runtime error0/518ms2972 KiB
11Runtime error0/518ms3060 KiB
12Runtime error0/517ms2940 KiB
13Runtime error0/582ms14508 KiB
14Runtime error0/579ms14748 KiB
15Runtime error0/581ms14628 KiB
16Runtime error0/582ms14640 KiB
17Runtime error0/579ms14584 KiB