112172024-07-16 23:58:04probaFasor (40)python3Wrong answer 8/40300ms27660 KiB
#Bagoly
elso = list(map(int, input().split()))
fa = elso[0]
tav = elso[1]
sor = list(map(int, input().split()))
# print(fa, tav)
i = tav
#print(sor[i-tav: i+tav+1])
while i < len(sor)-tav and max(sor[i-tav: i+tav+1]) > sor[i]:
    i += 1
    
print(i+1 if i < len(sor)-tav else -1)
    
    
SubtaskSumTestVerdictTimeMemory
base8/40
1Accepted0/017ms2960 KiB
2Accepted0/020ms4168 KiB
3Wrong answer0/218ms2916 KiB
4Wrong answer0/217ms2844 KiB
5Wrong answer0/217ms2916 KiB
6Accepted2/217ms2844 KiB
7Wrong answer0/217ms3192 KiB
8Accepted2/218ms3308 KiB
9Wrong answer0/270ms4132 KiB
10Accepted2/221ms4000 KiB
11Accepted2/221ms4196 KiB
12Wrong answer0/219ms3812 KiB
13Time limit exceeded0/2300ms14704 KiB
14Wrong answer0/248ms14728 KiB
15Time limit exceeded0/2296ms27304 KiB
16Time limit exceeded0/2296ms26012 KiB
17Time limit exceeded0/2300ms27536 KiB
18Time limit exceeded0/2300ms27660 KiB
19Time limit exceeded0/2300ms27636 KiB
20Wrong answer0/241ms11116 KiB
21Time limit exceeded0/2300ms26000 KiB
22Time limit exceeded0/2300ms25112 KiB