200982026-01-01 19:56:38herczegkatProgramtermék verseny (70 pont)python3Accepted 70/7082ms14748 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
12 12
12 11 10 9 8 7 6 5 4 3 2 1

'''
vDB,hanyadik =[int (i) for i in input().split()]
pL=[int (i) for i in input().split()]
pL=[0]+pL
uA=vDB//12; uE=vDB//4; uB=vDB//2
P=pL[hanyadik]
helye=1
for i in range(1,hanyadik):
    if pL[i]>P: helye+=1

A=0;E=0;B=0    
for i in range(hanyadik,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
base70/70
1Accepted0/016ms3124 KiB
2Accepted0/016ms3116 KiB
3Accepted0/082ms14748 KiB
4Accepted3/316ms3312 KiB
5Accepted3/316ms3004 KiB
6Accepted3/316ms3008 KiB
7Accepted3/316ms3124 KiB
8Accepted3/316ms3020 KiB
9Accepted3/316ms3132 KiB
10Accepted3/316ms3212 KiB
11Accepted3/317ms3308 KiB
12Accepted3/317ms3352 KiB
13Accepted3/318ms3256 KiB
14Accepted4/417ms3472 KiB
15Accepted4/450ms8688 KiB
16Accepted4/457ms9552 KiB
17Accepted4/461ms10660 KiB
18Accepted4/421ms4160 KiB
19Accepted4/430ms5324 KiB
20Accepted4/432ms6432 KiB
21Accepted4/479ms14612 KiB
22Accepted4/482ms14552 KiB
23Accepted4/476ms12748 KiB