112522024-07-30 10:38:45probaFasor (40)python3Wrong answer 10/40300ms27792 KiB
# Bagoly
#z = list(map(int, '10 3'.split(' '))); fa = list(map(int, '1 2 3 4 5 6 2 1 4 8 7 12 9 3'.split(' ')))
z = list(map(int, input().split(' '))); fa = list(map(int, input().split(' ')))

fszam, tav = z[0], z[1]

#kikeressük az első max-ot...
max1 = fa.index(max(fa))

# Első max-ig megvizsgáljuk van-e bagoly hely
j = tav
while max(fa[j-tav: j+tav+1]) != fa[j]:
    j += 1
print(j+1)
    
    


        
    
    

SubtaskSumTestVerdictTimeMemory
base10/40
1Accepted0/018ms2960 KiB
2Accepted0/021ms4192 KiB
3Wrong answer0/217ms2968 KiB
4Accepted2/217ms2916 KiB
5Wrong answer0/217ms2916 KiB
6Accepted2/217ms2960 KiB
7Wrong answer0/218ms3108 KiB
8Accepted2/218ms3132 KiB
9Runtime error0/268ms4184 KiB
10Accepted2/220ms4216 KiB
11Accepted2/223ms4332 KiB
12Wrong answer0/220ms3824 KiB
13Time limit exceeded0/2294ms14688 KiB
14Runtime error0/252ms14520 KiB
15Time limit exceeded0/2298ms27384 KiB
16Time limit exceeded0/2298ms26076 KiB
17Time limit exceeded0/2300ms27664 KiB
18Time limit exceeded0/2298ms27528 KiB
19Time limit exceeded0/2296ms27792 KiB
20Wrong answer0/245ms11116 KiB
21Time limit exceeded0/2298ms26076 KiB
22Time limit exceeded0/2300ms25012 KiB