194382025-12-09 12:09:17rebeka333Táblajátékpython3Wrong answer 0/5017ms3148 KiB
import sys

d = list(map(int, sys.stdin.buffer.read().split()))
K = d[0]
s = d[1:]

r = 1
c = 1

for x in s:
    if x < 2:
        r += 1
        c = c*2 - (x==0)
    elif x == 2:
        r -= 1
        c = (c+1)//2 if (c&1) else c//2
    else:
        c += -1 if x==3 else 1

sys.stdout.write(f"{r}\n{c:b}")
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/016ms3148 KiB
2Wrong answer0/016ms3124 KiB
3Wrong answer0/316ms3116 KiB
4Wrong answer0/316ms3064 KiB
5Wrong answer0/316ms2904 KiB
6Wrong answer0/316ms2868 KiB
7Wrong answer0/316ms2868 KiB
8Wrong answer0/316ms3088 KiB
9Wrong answer0/316ms3124 KiB
10Wrong answer0/316ms3124 KiB
11Wrong answer0/317ms3056 KiB
12Wrong answer0/317ms3064 KiB
13Wrong answer0/416ms2868 KiB
14Wrong answer0/417ms2880 KiB
15Wrong answer0/417ms2868 KiB
16Wrong answer0/417ms2868 KiB
17Wrong answer0/417ms2868 KiB