112232024-07-20 19:09:18probaElőzésekpython3Runtime error 0/10083ms29436 KiB
sor1 = list(map(int, input().split(' ')))
#sor1 = list(map(int, '7 8'.split(' ')))
seloz = [0]*sor1[0]
#cars = list(map(int, '5 2 3 4 1 7 6'.split(' ')))
cars = list(map(int, input().split(' ')))

for i in range(sor1[1]):
    k = cars.index(int(input()))
    seloz[cars[k-1]-1] +=1
    cars[k], cars[k-1] = cars[k-1], cars[k]
    print(seloz.index(max(seloz))+1)
    
    
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted17ms2916 KiB
subtask20/30
2Runtime error18ms2824 KiB
3Runtime error17ms3088 KiB
4Runtime error17ms3120 KiB
5Runtime error18ms3172 KiB
6Runtime error18ms3320 KiB
7Runtime error17ms3324 KiB
subtask30/70
8Runtime error28ms7512 KiB
9Runtime error37ms12252 KiB
10Runtime error41ms13752 KiB
11Runtime error52ms18864 KiB
12Runtime error57ms21204 KiB
13Runtime error61ms22732 KiB
14Runtime error79ms27520 KiB
15Runtime error82ms29436 KiB
16Runtime error83ms29176 KiB
17Runtime error83ms29172 KiB
18Runtime error78ms29208 KiB
19Runtime error76ms29176 KiB
20Runtime error72ms27728 KiB
21Runtime error82ms29104 KiB