Submission #69467693


Source Code Expand

n, m, K = map(int, input().split())
D = [set() for _ in range(n+1)]
answer = []
for _ in range(K):
  a, b = map(int, input().split())
  D[a].add(b)
  if len(D[a])==m:
    answer.append(a)



print(*answer)

Submission Info

Submission Time
Task B - Perfect
User uparupaaa
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 216 Byte
Status AC
Exec Time 60 ms
Memory 76608 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 58 ms 76576 KiB
example_01.txt AC 57 ms 76296 KiB
hand_00.txt AC 58 ms 76224 KiB
hand_01.txt AC 58 ms 76368 KiB
hand_02.txt AC 58 ms 76384 KiB
hand_03.txt AC 58 ms 76372 KiB
hand_04.txt AC 57 ms 76416 KiB
hand_05.txt AC 58 ms 76448 KiB
hand_06.txt AC 59 ms 76444 KiB
random_00.txt AC 58 ms 76584 KiB
random_01.txt AC 58 ms 76340 KiB
random_02.txt AC 57 ms 76360 KiB
random_03.txt AC 60 ms 76328 KiB
random_04.txt AC 58 ms 76476 KiB
random_05.txt AC 59 ms 76260 KiB
random_06.txt AC 58 ms 76476 KiB
random_07.txt AC 58 ms 76608 KiB
random_08.txt AC 59 ms 76360 KiB
random_09.txt AC 59 ms 76316 KiB
random_10.txt AC 59 ms 76468 KiB
random_11.txt AC 59 ms 76296 KiB