Submission #76086786


Source Code Expand

N, Q = map(int, input().split())#誤っていた。:int(input().split())
sqs = [0 for _ in range(N)]#誤り:[0 for _ in N]
ys = [N]
base = 0
for _ in range(Q):
    #print(sqs, ys, base)
    match tuple(map(int, input().split())):#ここでも上と同じ誤り#更に、tuple化しないと受け取ってもらえなかった
        case (1, x):
            x0 = x-1#0 origin
            sqs[x0]+=1
            y = sqs[x0]
            if len(ys)<=y:
                ys.append(1)
            else:
                ys[y]+=1
                if ys[y]==N:
                    base += 1
        case (2, y):
            print(ys[y+base]if len(ys)>y else 0)

Submission Info

Submission Time
Task C - Drop Blocks
User hydroxed_sil
Language Python (PyPy 3.11-v7.3.20)
Score 0
Code Size 672 Byte
Status RE
Exec Time 690 ms
Memory 124860 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 1
AC × 29
WA × 5
RE × 16
Set Name Test Cases
Sample example_00.txt
All example_00.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, hand_08.txt, hand_09.txt, hand_10.txt, hand_11.txt, hand_12.txt, hand_13.txt, hand_14.txt, hand_15.txt, hand_16.txt, hand_17.txt, hand_18.txt, hand_19.txt, hand_20.txt, hand_21.txt, hand_22.txt, hand_23.txt, hand_24.txt, hand_25.txt, hand_26.txt, hand_27.txt, hand_28.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt
Case Name Status Exec Time Memory
example_00.txt AC 50 ms 79592 KiB
hand_00.txt RE 401 ms 116852 KiB
hand_01.txt AC 321 ms 111032 KiB
hand_02.txt AC 616 ms 108656 KiB
hand_03.txt RE 690 ms 110928 KiB
hand_04.txt RE 549 ms 113788 KiB
hand_05.txt RE 405 ms 110808 KiB
hand_06.txt RE 167 ms 113996 KiB
hand_07.txt WA 302 ms 124796 KiB
hand_08.txt WA 624 ms 108692 KiB
hand_09.txt WA 481 ms 119008 KiB
hand_10.txt RE 130 ms 114956 KiB
hand_11.txt AC 304 ms 124860 KiB
hand_12.txt AC 309 ms 124760 KiB
hand_13.txt AC 629 ms 108720 KiB
hand_14.txt AC 484 ms 119172 KiB
hand_15.txt AC 481 ms 113624 KiB
hand_16.txt AC 49 ms 79392 KiB
hand_17.txt AC 622 ms 110976 KiB
hand_18.txt AC 298 ms 124564 KiB
hand_19.txt AC 296 ms 124780 KiB
hand_20.txt AC 301 ms 124484 KiB
hand_21.txt AC 492 ms 111024 KiB
hand_22.txt AC 315 ms 111096 KiB
hand_23.txt AC 627 ms 111032 KiB
hand_24.txt AC 614 ms 111088 KiB
hand_25.txt AC 52 ms 86900 KiB
hand_26.txt AC 51 ms 86996 KiB
hand_27.txt AC 128 ms 111244 KiB
hand_28.txt RE 211 ms 113804 KiB
random_00.txt RE 130 ms 114964 KiB
random_01.txt AC 507 ms 108780 KiB
random_02.txt RE 149 ms 111688 KiB
random_03.txt AC 545 ms 108792 KiB
random_04.txt AC 562 ms 113580 KiB
random_05.txt WA 535 ms 114168 KiB
random_06.txt RE 143 ms 113700 KiB
random_07.txt RE 282 ms 111052 KiB
random_08.txt AC 441 ms 109068 KiB
random_09.txt AC 443 ms 108884 KiB
random_10.txt RE 129 ms 115056 KiB
random_11.txt RE 129 ms 112704 KiB
random_12.txt RE 249 ms 111784 KiB
random_13.txt AC 502 ms 108780 KiB
random_14.txt AC 456 ms 108824 KiB
random_15.txt WA 391 ms 121780 KiB
random_16.txt RE 147 ms 114348 KiB
random_17.txt AC 427 ms 120388 KiB
random_18.txt AC 461 ms 109156 KiB
random_19.txt RE 468 ms 114644 KiB