Submission #69491476


Source Code Expand

import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import gcd,log

input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

N,M,K = mi()
cnt = [0] * N
res = []
for _ in range(K):
    a,b = mi()
    cnt[a-1] += 1
    if cnt[a-1] == M:
        res.append(a)

print(*res)

Submission Info

Submission Time
Task B - Perfect
User chinerist
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 447 Byte
Status AC
Exec Time 92 ms
Memory 83644 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 21
Set Name Test Cases
Sample example_00.txt, example_01.txt
All example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.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
Case Name Status Exec Time Memory
example_00.txt AC 88 ms 83496 KiB
example_01.txt AC 87 ms 83392 KiB
hand_00.txt AC 89 ms 83432 KiB
hand_01.txt AC 89 ms 83520 KiB
hand_02.txt AC 89 ms 83372 KiB
hand_03.txt AC 90 ms 83404 KiB
hand_04.txt AC 92 ms 83520 KiB
hand_05.txt AC 91 ms 83644 KiB
hand_06.txt AC 91 ms 83376 KiB
random_00.txt AC 91 ms 83472 KiB
random_01.txt AC 89 ms 83396 KiB
random_02.txt AC 91 ms 83460 KiB
random_03.txt AC 91 ms 83464 KiB
random_04.txt AC 91 ms 83480 KiB
random_05.txt AC 89 ms 83436 KiB
random_06.txt AC 89 ms 83200 KiB
random_07.txt AC 89 ms 83240 KiB
random_08.txt AC 89 ms 83332 KiB
random_09.txt AC 89 ms 83052 KiB
random_10.txt AC 89 ms 83072 KiB
random_11.txt AC 89 ms 83432 KiB