Submission #12747422


Source Code Expand

Copy
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, K = map(int, readline().split())
lst = []
for _ in range(K):
    d = int(readline())
    lst += list(map(int, readline().split()))

x = N - len(set(lst))
print(x)

Submission Info

Submission Time
Task B - Trick or Treat
User maspy
Language Python (3.8.2)
Score 200
Code Size 296 Byte
Status
Exec Time 23 ms
Memory 9256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 00-Sample-00, 00-Sample-01
All 200 / 200 00-Sample-00, 00-Sample-01, 01-Handmade-00, 01-Handmade-01, 01-Handmade-02, 02-SmallRandom-00, 02-SmallRandom-01, 02-SmallRandom-02, 02-SmallRandom-03, 02-SmallRandom-04, 03-LargeRandom-00, 03-LargeRandom-01, 03-LargeRandom-02, 03-LargeRandom-03, 03-LargeRandom-04
Case Name Status Exec Time Memory
00-Sample-00 19 ms 9116 KB
00-Sample-01 22 ms 8952 KB
01-Handmade-00 23 ms 9124 KB
01-Handmade-01 18 ms 8948 KB
01-Handmade-02 17 ms 9120 KB
02-SmallRandom-00 23 ms 9248 KB
02-SmallRandom-01 18 ms 8916 KB
02-SmallRandom-02 18 ms 9116 KB
02-SmallRandom-03 19 ms 9132 KB
02-SmallRandom-04 15 ms 9044 KB
03-LargeRandom-00 18 ms 9256 KB
03-LargeRandom-01 23 ms 9112 KB
03-LargeRandom-02 18 ms 9060 KB
03-LargeRandom-03 16 ms 9112 KB
03-LargeRandom-04 18 ms 8960 KB