112352024-07-26 11:07:53probaFasor (40)python3Wrong answer 18/40104ms27792 KiB
#fasor
#sor1 = '10 3'
sor1 = input()

hatar = int(sor1.split(' ')[0])
k = int(sor1.split(' ')[1])

#fak = [int(i) for i in '6 2 1 8 4 8 7 12 9 3'.split(' ')]
fak = [int(i) for i in input().split(' ')]
p = fak.index(max(fak))
#print(len(fak), p, hatar-k)
while len(fak) >= 2*k+1 and p >= k and p <= hatar-k:
    hatar = p
    fak = fak[:hatar]
    
print(fak.index(max(fak))+1)
SubtaskSumTestVerdictTimeMemory
base18/40
1Accepted0/018ms2960 KiB
2Wrong answer0/021ms4200 KiB
3Accepted2/218ms2960 KiB
4Wrong answer0/218ms3016 KiB
5Accepted2/217ms2960 KiB
6Wrong answer0/217ms2980 KiB
7Accepted2/217ms3044 KiB
8Accepted2/218ms3312 KiB
9Accepted2/221ms4112 KiB
10Wrong answer0/221ms4112 KiB
11Wrong answer0/221ms4000 KiB
12Accepted2/220ms3944 KiB
13Wrong answer0/259ms14564 KiB
14Accepted2/257ms14604 KiB
15Wrong answer0/2101ms25824 KiB
16Wrong answer0/2103ms26044 KiB
17Wrong answer0/2104ms27628 KiB
18Wrong answer0/2100ms27716 KiB
19Wrong answer0/2100ms27792 KiB
20Accepted2/250ms11112 KiB
21Wrong answer0/294ms26120 KiB
22Accepted2/297ms24972 KiB