112282024-07-20 23:35:41probaLegcsalódottabb versenyző (75 pont)python3Wrong answer 25/7585ms14712 KiB
#N = 10
N = int(input())
#sor = list(map(int, '2 5 3 8 2 5 4 9 8 9'.split(' ')))
sor = list(map(int, input().split(' ')))
hisz = [0]*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
base25/75
1Accepted0/017ms3116 KiB
2Wrong answer0/082ms14712 KiB
3Accepted5/518ms2916 KiB
4Wrong answer0/517ms2916 KiB
5Accepted5/518ms3044 KiB
6Accepted5/517ms3064 KiB
7Wrong answer0/517ms2968 KiB
8Wrong answer0/517ms3060 KiB
9Accepted5/517ms2940 KiB
10Wrong answer0/517ms2992 KiB
11Wrong answer0/517ms3044 KiB
12Wrong answer0/517ms3192 KiB
13Accepted5/585ms14692 KiB
14Wrong answer0/585ms14560 KiB
15Wrong answer0/581ms14564 KiB
16Wrong answer0/585ms14512 KiB
17Wrong answer0/582ms14564 KiB