129252025-01-03 15:51:53herczegkatProgramtermék verseny (70 pont)cpp17Forditási hiba
'''
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=int(vDB/12); uE=int(vDB/4); uB=int(vDB/2)
#print(uA,uE,uB)
P=pL[hanyadik]
helye=1; A=0;E=0;B=0
for i in range(1,hanyadik):
    if pL[i]>P: helye+=1
    
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)


Forditási hiba
open /var/local/lib/isolate/434/box/a.out: no such file or directory
main.cpp:1:1: error: empty character constant
    1 | '''
      | ^~
main.cpp:1:3: warning: missing terminating ' character
    1 | '''
      |   ^
main.cpp:1:3: error: missing terminating ' character
main.cpp:11:1: error: empty character constant
   11 | '''
      | ^~
main.cpp:11:3: warning: missing terminating ' character
   11 | '''
      |   ^
main.cpp:11:3: error: missing terminating ' character
main.cpp:16:2: error: invalid preprocessing directive #print
   16 | #print(uA,uE,uB)
      |  ^~~~~
main.cpp:1:1: error: expected unqualified-id before '\x0'
    1 | '''
      | ^~
main.cpp:15:17: error: 'uE' does not name a type
   15 | uA=int(vDB/12); uE=int(vDB/4); uB=int(vDB/2)
      |                 ^~
main.cpp:15:32: error: 'uB' does not name a type
   15 | uA=int(vDB/12); uE=int(vDB/4); uB=int(vDB/2)
      |                                ^~
main.cpp:18:10: error: 'A' does not name a type
   18 | helye=1; A=0;E=0;B=0
      |          ^
main.cpp:18:14: error: 'E' does not name a type
   18 | helye=1; A=0;E=0;B=0
      |              ^
main.cpp:18:18: error: 'B' does not name a type
   18 | helye=1; A=0;E=0;B=0
      |                  ^