129182025-01-03 15:31:17herczegkatProgramtermék verseny (70 pont)python3Wrong answer 0/70181ms14748 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
    print(i, helye,end=' ')
    if helye<=uA:
        A=i
    elif helye<=uE:
        E=i
    elif helye<=uB:
        B=i
print(A)
print(E)
print(B)


SubtaskSumTestVerdictTimeMemory
base0/70
1Wrong answer0/016ms3128 KiB
2Wrong answer0/016ms3144 KiB
3Wrong answer0/0181ms14564 KiB
4Wrong answer0/314ms3120 KiB
5Wrong answer0/317ms2956 KiB
6Wrong answer0/316ms3116 KiB
7Wrong answer0/316ms3028 KiB
8Wrong answer0/316ms3128 KiB
9Wrong answer0/317ms3132 KiB
10Wrong answer0/317ms3248 KiB
11Wrong answer0/317ms3284 KiB
12Wrong answer0/318ms3376 KiB
13Wrong answer0/320ms3536 KiB
14Wrong answer0/424ms3640 KiB
15Wrong answer0/497ms8848 KiB
16Wrong answer0/4108ms9572 KiB
17Wrong answer0/4126ms10572 KiB
18Wrong answer0/432ms4204 KiB
19Wrong answer0/446ms5320 KiB
20Wrong answer0/459ms6476 KiB
21Wrong answer0/4172ms14748 KiB
22Wrong answer0/4175ms14572 KiB
23Wrong answer0/4159ms12876 KiB