112662024-08-03 09:34:22probaLegcsalódottabb versenyző (75 pont)python3Wrong answer 30/7574ms14820 KiB
#N = 10; sor = list(map(int, '2 5 3 8 2 5 4 9 8 9'.split(' ')))
N = int(input()); sor = list(map(int, input().split(' ')))
if sor.index(max(sor)) == 0:
    print(-1)
else:    
    for i, j in enumerate(sor):
        if i == 0:
            csvp, eddigmax, cshossz = 0, 0, 0
        else:
            if j > sor[eddigmax]:
                if cshossz < i-eddigmax:
                    cshossz = i-eddigmax; csvp = eddigmax
                    eddigmax = i
    print(csvp+1)                
            
    
                
        
        
    
SubtaskSumTestVerdictTimeMemory
base30/75
1Accepted0/017ms2960 KiB
2Wrong answer0/072ms14564 KiB
3Accepted5/518ms2916 KiB
4Accepted5/517ms2916 KiB
5Accepted5/518ms2960 KiB
6Wrong answer0/517ms2844 KiB
7Wrong answer0/517ms3064 KiB
8Wrong answer0/517ms2968 KiB
9Accepted5/517ms2928 KiB
10Wrong answer0/518ms3088 KiB
11Wrong answer0/518ms3252 KiB
12Accepted5/518ms3244 KiB
13Accepted5/571ms14592 KiB
14Wrong answer0/574ms14492 KiB
15Wrong answer0/572ms14500 KiB
16Wrong answer0/572ms14716 KiB
17Wrong answer0/572ms14820 KiB