112342024-07-26 11:04:18probaFasor (40)python3Wrong answer 18/40107ms27932 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/017ms2916 KiB
2Wrong answer0/021ms4112 KiB
3Accepted2/217ms2960 KiB
4Wrong answer0/217ms2960 KiB
5Accepted2/217ms2916 KiB
6Wrong answer0/217ms2916 KiB
7Accepted2/217ms3060 KiB
8Accepted2/217ms3172 KiB
9Accepted2/221ms4112 KiB
10Wrong answer0/221ms4068 KiB
11Wrong answer0/221ms4096 KiB
12Accepted2/220ms3828 KiB
13Wrong answer0/259ms14644 KiB
14Accepted2/257ms14520 KiB
15Wrong answer0/2101ms25908 KiB
16Wrong answer0/297ms25956 KiB
17Wrong answer0/2105ms27784 KiB
18Wrong answer0/2107ms27932 KiB
19Wrong answer0/297ms27796 KiB
20Accepted2/250ms11260 KiB
21Wrong answer0/293ms26128 KiB
22Accepted2/297ms24968 KiB