129212025-01-03 15:33:16herczegkatProgramtermék verseny (70 pont)python3Wrong answer 64/7082ms14752 KiB
'''
12 3
1 2 20 5 21 22 26 27 23 28 24 25
12 4
1 2 5 21 20 22 26 27 23 28 24 25
12 3
1 2 20 5 21 22 26 27 23 28 24 25
'''
vDB,hanyadik =[int (i) for i in input().split()]
pL=[int (i) for i in input().split()]
pL=[0]+pL
uA=int(vDB/12); uE=int(vDB/4); uB=int(vDB/2)
P=pL[hanyadik]
helye=1; A=0;E=0;B=0
for i in range(1,vDB+1):
    if pL[i]>P: helye+=1
    if helye<=uA:
        A=i
    elif helye<=uE:
        E=i
    elif helye<=uB:
        B=i
print(A)
print(E)
print(B)


SubtaskSumTestVerdictTimeMemory
base64/70
1Accepted0/016ms3124 KiB
2Wrong answer0/016ms3116 KiB
3Accepted0/082ms14752 KiB
4Accepted3/316ms3144 KiB
5Accepted3/316ms2964 KiB
6Wrong answer0/316ms2892 KiB
7Wrong answer0/316ms3016 KiB
8Accepted3/317ms3128 KiB
9Accepted3/316ms2980 KiB
10Accepted3/317ms3144 KiB
11Accepted3/317ms3128 KiB
12Accepted3/317ms3228 KiB
13Accepted3/317ms3384 KiB
14Accepted4/418ms3388 KiB
15Accepted4/452ms8852 KiB
16Accepted4/457ms9492 KiB
17Accepted4/461ms10812 KiB
18Accepted4/421ms4184 KiB
19Accepted4/430ms5328 KiB
20Accepted4/435ms6356 KiB
21Accepted4/482ms14572 KiB
22Accepted4/479ms14636 KiB
23Accepted4/479ms12752 KiB