problem_id
stringlengths 6
6
| user_id
stringlengths 10
10
| time_limit
float64 1k
8k
| memory_limit
float64 262k
1.05M
| problem_description
stringlengths 48
1.55k
| codes
stringlengths 35
98.9k
| status
stringlengths 28
1.7k
| submission_ids
stringlengths 28
1.41k
| memories
stringlengths 13
808
| cpu_times
stringlengths 11
610
| code_sizes
stringlengths 7
505
|
---|---|---|---|---|---|---|---|---|---|---|
p02688 | u461463382 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['\nN, K = map(int, input().split())\n#S = input()\nAi_list = []\n\nfor i in range(K):\n di = int(input())\n Ai_list += input().split()\n\nprint(Ai_list)\nprint(N - len(set(Ai_list)))', 'import numpy as np\n# coding: utf-8\n# Your code here!\nN, K = map(int, input().split())\n#S = input()\nAi_list = []\n \nfor i in range(K):\n di = int(input())\n Ai_list += input().split()\n \n#print(Ai_list)\nprint(N - len(set(Ai_list)))'] | ['Wrong Answer', 'Accepted'] | ['s393016658', 's866512112'] | [9716.0, 27096.0] | [23.0, 109.0] | [177, 232] |
p02688 | u479641507 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(input().split())\na = [1] * n\nfor i in range(k):\n tmp = map(int, input().split())\n for j in range(tmp):\n a[j] = 0\nprint(sum(a[j]))\n', 'n, k = map(int, input().split())\na = [1] * n\nfor i in range(k):\n tmp = map(int, input().split())\n for j in tmp:\n a[j - 1] = 0\nprint(sum(a[j]))\n', 'n, k = map(int, input().split())\na = [1] * n\nfor i in range(k):\n tmp = map(int, input().split())\n for j in range(tmp):\n a[j] = 0\nprint(sum(a[j]))\n', 'n, k = map(int, input().split())\na = [1] * n\nfor i in range(k):\n d = int(input())\n tmp = map(int, input().split())\n for j in tmp:\n a[j - 1] = 0\nprint(sum(a))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s271612965', 's299672050', 's331375417', 's022449914'] | [9100.0, 9020.0, 9152.0, 9168.0] | [25.0, 29.0, 26.0, 25.0] | [154, 156, 159, 174] |
p02688 | u483884608 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['import collections\nN,K=map(int,input().split())\na=[]\nwhile K>0:\n K=K-1\n d=int(input())\n a.append(map(str,input().split())\ne =collections.Counter(a)\nprint(N-len(e))', 'N,K=map(int,input().split())\na=[]\nwhile K>0:\n d=int(input())\n b=list(map(int,input().split())\n a.extend(b)\n K=K-1\ne=collection.counter(a)\nprint(N-len(e))', 'N,K=map(int,input().split())\na=[]\nwhile K>0:\n d=int(input())\n b=list(map(int,input().split())\n a.extend(b)\n K=K-1\ne=collection.Counter(a)\nprint(N-len(e))', 'import collections\nN,K=map(int,input().split())\na=[]\nK=K+1\nwhile K>0:\n K=K-1\n d=int(input())\n a.append(map(str,input().split()))\ne=collections.Counter(a)\nprint(N-len(a))', 'import collections\nN,K=map(int,input().split())\na=[]\nd=[]\nwhile K>0:\n K=K-1\n d.append(int(input()))\n b=list(map(int,input().split()))\n a.extend(b)\ne=collections.Counter(a)\nprint(a)\nprint(e)\nprint(N-len(e))', 'N,K=map(int,input().split())\na=[]\nwhile K>0:\n d=int(input())\n b=list(map(int,input().split())\n a.extend(b)\n K=K-1\ncollection.counter(a)\nprint(N-len(a))', 'import collections\nN,K=map(int,input().split())\nwhile K>0:\n K=K-1\n d=int(input())\n a.append(map(str,input().split()))\ne=collections.Counter(a)\np=N-len(e)\nprint(p)', 'import collections\nN,K=map(int,input().split())\na=[]\nd=[]\nwhile K>0:\n K=K-1\n d.append(int(input()))\n b=list(map(int,input().split()))\n a.extend(b)\ne=collections.Counter(a)\nprint(N-len(e))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s042337400', 's061491063', 's338058609', 's350362837', 's398306421', 's806775085', 's917000967', 's129079830'] | [9028.0, 9024.0, 9024.0, 10028.0, 9480.0, 8964.0, 9344.0, 9408.0] | [22.0, 24.0, 21.0, 26.0, 24.0, 26.0, 26.0, 27.0] | [166, 157, 157, 172, 209, 155, 165, 191] |
p02688 | u486209657 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K=map(int,input().split())\nA=[]\npeople=list(range(1,N+1,1))\nfor idx in range(K):\n d=int(input())\n X=list((map(int,input().split())))\n for i in range(len(X)):\n A.append(X[i])\nans =[i for i in people if not i in A]\nprint(ans[0])', 'N,K=map(int,input().split())\nA=[]\npeople=list(range(1,N+1,1))\nfor idx in range(K):\n d=int(input())\n X=list((map(int,input().split())))\n for i in range(len(X)):\n A.append(X[i])\nprint(A)\nprint(people)\nans =[i for i in people if not i in A]\nprint(len(ans))', 'N,K=map(int,input().split())\nA=[]\npeople=list(range(1,N+1,1))\nfor idx in range(K):\n d=int(input())\n X=list((map(int,input().split())))\n for i in range(len(X)):\n A.append(X[i])\nans =[i for i in people if not i in A]\nprint(len(ans))'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s310610469', 's775672476', 's489211379'] | [9100.0, 9104.0, 9040.0] | [27.0, 30.0, 29.0] | [244, 269, 246] |
p02688 | u489762173 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['import itertools\n\nN, K = list(map(int, input().split()))\n\nmans = []\nfor i in range(1, N+1):\n mans.append(i)\n\nhasmans=[]\nfor ii in range(K):\n d = int(input())\n hasmans.append(list(map(int, input().split())))\n\nhasmans = itertools.chain.from_iterable(hasmans)\n\nprint(*list(set(mans) - set(hasmans)))', 'import itertools\n\nN, K = list(map(int, input().split()))\n\nmans = []\nfor i in range(1, N+1):\n mans.append(i)\n\nhasmans=[]\nfor ii in range(K):\n d = int(input())\n hasmans.append(list(map(int, input().split())))\n\nhasmans = itertools.chain.from_iterable(hasmans)\n\nprint(len(list(set(mans) - set(hasmans))))'] | ['Wrong Answer', 'Accepted'] | ['s497645929', 's699553615'] | [9208.0, 9160.0] | [24.0, 25.0] | [305, 309] |
p02688 | u501254456 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N_setup_data = input().split()\nN_sunuke_number = int(N_setup_data[0])\nK_snack_number = int(N_setup_data[1]) - 1\nK_snack_number = int(N_setup_data[1])\nN_sunuke_pocket = [0] * N_sunuke_number\n\n\nfor j in range(K_snack_number):\n\tN_A_sunuke_pocket = [0] * (N_sunuke_number + 1)\n\tN_B_sunuke_pocket = [0] * (N_sunuke_number + 1)\n\td = input()\n\tN_A_sunuke_pocket = input().split()\n\tprint(N_A_sunuke_pocket)\n\tfor i in N_A_sunuke_pocket:\n\t\tN_B_sunuke_pocket[int(i) - 1] += 1\n\tprint(N_B_sunuke_pocket, i)\n\tj = 0\n\n\tfor i in N_B_sunuke_pocket:\n\t\tif i != 0:\n\t\t\tN_sunuke_pocket[j] += 1\n\t\tj += 1\n\t\tprint(N_sunuke_pocket)\ndef calc_area():\n\tOut_Area = 0\n\tfor i in N_sunuke_pocket:\n\t\tif i == 0:\n\t\t\tOut_Area += 1\n\treturn Out_Area\n\nprint(calc_area())\n', 'N_setup_data = input().split()\nN_sunuke_number = int(N_setup_data[0])\nK_snack_number = int(N_setup_data[1]) - 1\nK_snack_number = int(N_setup_data[1])\nN_sunuke_pocket = [0] * N_sunuke_number\n\n\nfor j in range(K_snack_number):\n\tN_A_sunuke_pocket = [0] * (N_sunuke_number + 1)\n\tN_B_sunuke_pocket = [0] * (N_sunuke_number + 1)\n\td = input()\n\tN_A_sunuke_pocket = input().split()\n#\tprint(N_A_sunuke_pocket)\n\tfor i in N_A_sunuke_pocket:\n\t\tN_B_sunuke_pocket[int(i) - 1] += 1\n#\tprint(N_B_sunuke_pocket, i)\n\tj = 0\n\n\tfor i in N_B_sunuke_pocket:\n\t\tif i != 0:\n\t\t\tN_sunuke_pocket[j] += 1\n\t\tj += 1\n#\t\tprint(N_sunuke_pocket)\ndef calc_area():\n\tOut_Area = 0\n\tfor i in N_sunuke_pocket:\n\t\tif i == 0:\n\t\t\tOut_Area += 1\n\treturn Out_Area\n\nprint(calc_area())\n'] | ['Wrong Answer', 'Accepted'] | ['s820761429', 's732847701'] | [9236.0, 9204.0] | [98.0, 24.0] | [729, 732] |
p02688 | u509029769 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K = map(int,input().split())\n\ns = [t for t in range(1,N+1)]\nfor i in range(K):\n d = int(input())\n A = list(map(input().split()))\n if A[i] in s:\n s.remove(A[i])\n K -= 1\nprint(lne(s))', 'N,K = list(map(int,input().split()))\n\ns = [t for t in range(1,N+1)]\nfor i in range(K):\n d = int(input())\n A = list(map(int,input().split()))\n for i in range(len(A)):\n if A[i] in s:\n s.remove(A[i])\nprint(len(s))'] | ['Runtime Error', 'Accepted'] | ['s580891005', 's728484785'] | [9156.0, 9080.0] | [20.0, 30.0] | [202, 237] |
p02688 | u514894322 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k = map(int,input().split())\ns = set()\nfor i in [0]*k:\n _ = input()\n s|=set(map(int,input().split()))\nprint(k-len(s))', 'n,k = map(int,input().split())\ns = set()\nfor i in [0]*n:\n _ = input()\n s|=set(map(int,input().split()))\nprint(k-len(s))', 'n,k = map(int,input().split())\nl=[]\nfor i in [0]*k:\n d = input()\n l+=list(map(int,input().split()))\nprint(n-len(set(l)))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s460040569', 's562893709', 's005374646'] | [9164.0, 9168.0, 9104.0] | [25.0, 22.0, 23.0] | [121, 121, 122] |
p02688 | u515647766 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['line1 = input().split()\nn = int(line1[0])\nk = int(line1[1])\nlist1 = []\nfor i in range(k):\n d = input()\n lst = input().split()\n list1 += lst\n\nset1 = set(list1)\nprint(set1)\nnothing = set(str(i+1) for i in range(n)) - set1\nprint(len(nothing))', 'line1 = input().split()\nn = int(line1[0])\nk = int(line1[1])\nlist1 = []\nfor i in range(k):\n d = input()\n lst = input().split()\n list1 += lst\n\nset1 = set(list1)\nnothing = set(i for i in range(n)) - set1\nprint(len(nothing))', 'line1 = input().split()\nn = int(line1[0])\nk = int(line1[1])\nlist1 = []\nfor i in range(k):\n d = input()\n lst = input().split()\n list1 += lst\n\nset1 = set(list1)\nnothing = set(str(i+1) for i in range(n)) - set1\nprint(len(nothing))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s706963254', 's939518630', 's997134563'] | [9332.0, 9488.0, 9512.0] | [22.0, 20.0, 20.0] | [242, 223, 230] |
p02688 | u516579758 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k=map(int,input().split())\nl=[]\ncount=0\nfor _ in range(k):\n d=int(input())\n a=list(map(int,input().split()))\n l+=a\nfor i in range(1,n+1):\n if i in l:\n count+=1\nprint(count)', 'n,k=map(int,input().split())\nl=[]\ncount=0\nfor _ in range(k):\n d=int(input())\n a=list(map(int,input().split()))\n l+=a\nfor i in range(1,n+1):\n if i not in l:\n count+=1\nprint(count)\n'] | ['Wrong Answer', 'Accepted'] | ['s428401355', 's673084161'] | [9192.0, 9128.0] | [23.0, 22.0] | [193, 198] |
p02688 | u522973286 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ["#!/usr/bin/env python3\n\nfrom typing import Iterable\n\n\ndef main() -> None:\n N, K = rmi()\n D, A = [], []\n for n in range(N):\n d = ri()\n D.append(d)\n A.append(rmi())\n target = [False] * N\n for k in range(K):\n for a in A[k]:\n target[a] = True\n w(target.count(False))\n\n\ndef r() -> str:\n return input().strip()\n\n\ndef ri() -> int:\n return int(input())\n\n\ndef rmi(delim: str = ' ') -> int:\n return tuple(map(int, input().split(delim)))\n\n\ndef w(data) -> None:\n print(data)\n\n\ndef wm(data: Iterable) -> None:\n print(' '.join(data))\n\n\nif __name__ == '__main__':\n main()\n", "#!/usr/bin/env python3\n\nfrom typing import Iterable\n\n\ndef main() -> None:\n N, K = rmi()\n D, A = [], []\n for k in range(K):\n d = ri()\n D.append(d)\n A.append(rmi())\n target = [False] * N\n for k in range(K):\n for a in A[k]:\n target[a - 1] = True\n w(target.count(False))\n\n\ndef r() -> str:\n return input().strip()\n\n\ndef ri() -> int:\n return int(r())\n\n\ndef rmi(delim: str = ' ') -> int:\n return tuple(map(int, input().split(delim)))\n\n\ndef w(data) -> None:\n print(data)\n\n\ndef wm(data: Iterable) -> None:\n print(' '.join(data))\n\n\nif __name__ == '__main__':\n main()\n"] | ['Runtime Error', 'Accepted'] | ['s430920071', 's949844369'] | [10220.0, 10208.0] | [35.0, 30.0] | [632, 632] |
p02688 | u523385176 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ["k=int(input())\na,b=map(int,input().split())\n\n\nf= False\nfor d in range (a,b+1):\n if d % k == 0:\n f=True\n break\n\n\nif f :\n print('OK')\nelse :\n print('NG')\n", 'n,k = map(int,input().split())\na=[0 for i in range(n)]\nfor i in range(k):\n di = int(input())\n ai = list(map(int,input().split()))\n for j in range(len(ai)):\n a[ai[j]-1] = 1\n\nprint(a.count(0))'] | ['Runtime Error', 'Accepted'] | ['s939218253', 's051378783'] | [9032.0, 9192.0] | [21.0, 23.0] | [176, 206] |
p02688 | u525796732 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['import sys\nimport itertools\nimport heapq\nimport numpy as np\nstdin = sys.stdin\nns = lambda: stdin.readline().rstrip()\nni = lambda: int(stdin.readline().rstrip())\nnm = lambda: map(int, stdin.readline().split())\nnl = lambda: list(map(int, stdin.readline().split()))\n\nN,K=nm()\nA=[0]*K\nfor i in range(K):\n d=int(input())\n tmp=nl()\n for j in range(d):\n A[tmp[j]-1]+=1\nc=0\nfor i in range(N):\n if(A[i]==0):\n c+=1\n\nprint(c)', 'import sys\nimport itertools\nstdin = sys.stdin\nns = lambda: stdin.readline().rstrip()\nni = lambda: int(stdin.readline().rstrip())\nnm = lambda: map(int, stdin.readline().split())\nnl = lambda: list(map(int, stdin.readline().split()))\n\nN,K=nm()\nA=[0 for i in range(N)]\nfor i in range(K):\n d=int(input())\n tmp=nl()\n for j in range(d):\n A[tmp[j]-1]+=1\nc=0\nfor i in range(N):\n if(A[i]==0):\n c+=1\n\nprint(c)\n'] | ['Runtime Error', 'Accepted'] | ['s183619632', 's003538989'] | [27160.0, 9236.0] | [108.0, 22.0] | [448, 433] |
p02688 | u531599639 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K=map(int, input().split())\nsunuke=[list(map(str, input().split())) for _ in range(2*K)]\nmerge=[]\nans=0\nfor i in range(K):\n merge+=sunuke[2*i+1]\nfor j in range(1, 101):\n if str(j) not in merge:\n ans+=1\nprint(ans)', 'N, K=map(int, input().split())\nsunuke=[list(map(str, input().split())) for _ in range(2*K)]\nmerge=[]\nans=0\nfor i in range(K):\n merge+=sunuke[2*i+1]\nfor j in range(1, N+1):\n if str(j) not in merge:\n ans+=1\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s318893256', 's031565185'] | [9352.0, 9356.0] | [23.0, 24.0] | [220, 221] |
p02688 | u535803878 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['\n\nn, k = map(int, input().split())\ncount = {i: [] for i in range(n)}\nfor i in range(k):\n input()\n a = list(map(int, input().split()))\n for ii in a:\n count[ii-1].append(i)\nsum(len(item)==0 for item in count.values())', '\n\nn, k = map(int, input().split())\ns = []\nfor i in range(k):\n input()\n a = list(map(int, input().split()))\n s.extend(a)\n\nprint(n - len(set(s)))'] | ['Wrong Answer', 'Accepted'] | ['s953668778', 's059334159'] | [9208.0, 9180.0] | [23.0, 24.0] | [231, 152] |
p02688 | u536034761 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split(" "))\nflag = [for 1 in range(N)]\nfor i in range(K):\n input()\n for j in map(int,input().split(" ")):\n flag[j-1] = 0\nsum(flag)', 'N,K = map(int, input().split(" "))\nflag = [1 for i in range(N)]\nfor i in range(K):\n input()\n a = map(int, input().split(" "))\n for j in a:\n flag[a - 1] = 0\nprint(sum(flag))', 'N, K = map(int, input().split())\nflag = [for 1 in range(N)]\nfor i in range(K):\n input()\n for j in map(int,input().split()):\n flag[j-1] = 0\nsum(flag)\n', 'N,K = map(int, input().split(" "))\nflag = [1 for i in range(N)]\nfor i in range(K):\n input()\n a = map(int, input().split(" "))\n for j in a:\n flag[j - 1] = 0\nprint(sum(flag))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s580579729', 's798689181', 's972270009', 's328877848'] | [8956.0, 9032.0, 8988.0, 9044.0] | [21.0, 20.0, 22.0, 21.0] | [159, 178, 154, 178] |
p02688 | u536642030 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k = list(map(int, input().split()))\nhoge = [1] * n\n\nfor i in range(k * 2):\n if i % 2 == 0:\n a = list(map(int, input().split()))\n \tfor j in a:\n hoge[j - 1] = 0\n \nprint(sum(hoge))\n', 'n,k = list(map(int, input().split()))\nhoge = [1] * n\n\nfor i in range(k * 2):\n if i % 2 != 0:\n a = list(map(int, input().split()))\n for j in a:\n hoge[j - 1] = 0\n \nprint(sum(hoge))\n', 'n,k = list(map(int, input().split()))\nhoge = [1] * n\n\nfor i in range(k * 2):\n if i % 2 != 0:\n a = list(map(int, input().split()))\n \tfor j in a:\n hoge[j - 1] = 0\n \nprint(sum(hoge))\n', 'n,k = list(map(int, input().split()))\nhoge = [1] * n\n\nfor i in range(k * 2):\n if i % 2 == 0:\n a = list(map(int, input().split()))\n for j in a:\n hoge[j - 1] = 0\n \nprint(sum(hoge))\n', 'n,k = list(map(int, input().split()))\nhoge = [1] * n\n\nfor i in range(k * 2):\n a = list(map(int, input().split()))\n if i % 2 != 0:\n for j in a:\n hoge[j - 1] = 0\n \nprint(sum(hoge))'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s356189391', 's520796215', 's594485651', 's816563472', 's666192591'] | [8960.0, 9180.0, 9024.0, 9184.0, 9184.0] | [25.0, 24.0, 23.0, 20.0, 23.0] | [195, 196, 195, 196, 193] |
p02688 | u537892680 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nd = int(input())\nwhile True:\n val = [int(i) for i in input().split()]\n if len(val) == 0:\n break\n\nprint(N - d)', '# B - Trick or Treat\n\nN, K = map(int, input().split())\nls = []\nfor _ in range(K):\n d = int(input())\n A = [int(a) for a in input().split()]\n ls += A\n\nprint(N - len(set(ls)))\n'] | ['Runtime Error', 'Accepted'] | ['s870644946', 's787521174'] | [9172.0, 9172.0] | [26.0, 22.0] | [147, 182] |
p02688 | u539659844 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int, input().split())\ncount = 0\nlis = []\n\nfor m in range(0, k):\n d = int(input())\n li = [int(i) for i in input().split()]\n lis = lis + li\n \nprint(lis)\n \nfor s in range(1, n+1):\n if s in lis:\n count += 0\n else:\n count += 1\n\nprint(count)', 'n, k = map(int, input().split())\ncount = 0\nlis = []\n\nfor m in range(0, k):\n d = int(input())\n li = [int(i) for i in input().split()]\n lis = lis + li\n \nfor s in range(1, n+1):\n if s in lis:\n count += 0\n else:\n count += 1\n\nprint(count)'] | ['Wrong Answer', 'Accepted'] | ['s163860163', 's563222845'] | [9192.0, 9172.0] | [24.0, 22.0] | [259, 245] |
p02688 | u539969758 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nSunuke = [0]*N\nd = list()\nA = list()\nfor _ in range(K):\n d = int(input()\n A = list(map(int, input().split()))\n for a in A:\n Sunuke[a-1] += 1\n\nans = 0\nfor s in Sunuke:\n if s == 0:\n ans += 1\nprint(ans)\n', 'N, K = map(int, input().split())\nSunuke = [0]*N\nfor _ in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n for a in A:\n Sunuke[a-1] += 1\n\nans = 0\nfor s in Sunuke:\n if s == 0:\n ans += 1\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s322635152', 's692770891'] | [8888.0, 9196.0] | [23.0, 32.0] | [244, 223] |
p02688 | u543489264 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['from sys import stdin\nimport re\nimport bisect\nimport numpy as np\n\nn, k = map(int(), stdin.readline().rstrip().split())\ndata = np.zeros((n,k),dtype=bool)\nfor i in range(k):\n _ = stdin.readline()\n line = map(int(), stdin.readline().rstrip().split())\n for j in line:\n data[i][j] = True\n\ncount = int(0)\nfor i in range(n):\n if (data.T[n]).all() == True:\n count += 1\nprint(count)', 'from sys import stdin\nimport re\nimport bisect\nimport numpy as np\n\nN, K = map(int, stdin.readline().rstrip().split())\nfrag = np.zeros((K,N), dtype=bool)\nfor i in range(K):\n _ = stdin.readline()\n line = map(int, stdin.readline().rstrip().split())\n for j in line:\n j -= 1\n frag[i][j] = True\n \ncount = int(0)\nfrag = frag.T\nfor i in range(N):\n if np.count_nonzero(frag[i] == 1) == 0:\n count += 1\nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s543402760', 's551402318'] | [27124.0, 27256.0] | [113.0, 105.0] | [399, 443] |
p02688 | u544165032 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nA = []\nfor i in range(K):\n d = int(input())\n B = list(map(int, input().split()))\n A.extend(B)\nE = list(set(A))\nF = N - len(E)', 'N, K = map(int, input().split())\nA = []\nfor i in range(K):\n d = int(input())\n B = list(map(int, input().split()))\n A.extend(B)\nE = list(set(A))\nF = N - len(E)\nprint(F)'] | ['Wrong Answer', 'Accepted'] | ['s218363310', 's727024681'] | [9276.0, 9156.0] | [22.0, 27.0] | [167, 176] |
p02688 | u544272759 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int, input().split())\n\nt = [0]*n\nfor i in range(k):\n d = int(input())\n A = list(map(int, input().split()))\n for a in range A:\n t[a - 1] += 1\nprint(t.count(0))', 'n, k = map(int, input().split())\n \nt = [0]*n\nfor i in range(k):\n d = int(input())\n A = list(map(int, input().split()))\n for a in A:\n t[a - 1] += 1\nprint(t.count(0))'] | ['Runtime Error', 'Accepted'] | ['s765543481', 's037892374'] | [8964.0, 9164.0] | [26.0, 22.0] | [175, 170] |
p02688 | u546501940 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['^CTraceback (most recent call last):\n File "testcon1.py", line 6, in <module>\n if x>=x2 and x<=y2:\nN,K = map(int,input().split())\nokashi=[0] * N\nfor i in range(K):\n x=input()\n y=input().split()\n for j in y:\n okashi[int(j)-1]=1\ncounter=0\n\nfor i in okashi:\n if i==0:\n counter=counter+1\nprint(counter)', 'N,K = map(int,input().split())\nokashi=[0] * N\nfor i in range(K):\n x=input()\n y=input().split()\n for j in y:\n okashi[int(j)-1]=1\ncounter=0\n\nfor i in okashi:\n if i==0:\n counter=counter+1\nprint(counter)'] | ['Runtime Error', 'Accepted'] | ['s758776273', 's071830739'] | [9004.0, 9180.0] | [21.0, 20.0] | [312, 209] |
p02688 | u547605071 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N = int(input())\nK = int(input())\nA=[]\nfor i in range(K):\n d = int(input())\n for i in range(d):\n a = int(input())\n A.append(a)\n\n \nans = len(list(set(A)))\nprint(N-ans)', 'N = int(input())\nK = int(input())\nfor i in range(K):\n d = int(input())\n for i in range(d):\n a = int(input())\n A.append(a) \nans = len(list(set(A)))\nprint(N-ans)', 'N,K = map(int, input().split())\nA=[]\nfor i in range(K):\n d = int(input())\n a=list(map(int, input().split()))\n for i in range(d):\n A.append(a[i])\n\nans = len(list(set(A)))\nprint(N-ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s020421612', 's301628080', 's575824818'] | [9124.0, 9116.0, 9188.0] | [24.0, 25.0, 23.0] | [186, 179, 198] |
p02688 | u549161102 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K = map(int, input().split())\nL = []\nfor i in range(N):\n d = int(input())\n A = list(map(int, input().split()))\n for j in range(d):\n L.append(A[j])\nprint(N-len(set(L)))', 'N,K = map(int, input().split())\nL = []\nfor i in range(N):\n d = int(input)\n A = list(map(int, input().split()))\n for j in range(d):\n L.append(A[j])\nprint(N-len(set(L)))', 'N,K = map(int, input().split())\nL = []\nfor i in range(N):\n d = int(input())\n if d == 1:\n A = list(int(input()))\n else:\n A = list(map(int, input().split()))\n for j in range(d):\n L.append(A[j])\nprint(N-len(set(L)))\n', 'N,K = map(int, input().split())\nL = []\nfor i in range(N):\n d = int(input())\n if d == 1:\n A = int(input())\n else:\n A = list(map(int, input().split()))\n for j in range(d):\n L.append(A[j])\nprint(N-len(set(L)))\n', 'N,K = map(int, input().split())\nL = []\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n for j in range(d):\n L.append(A[j])\nprint(N-len(set(L)))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s120305410', 's182105468', 's260582068', 's726413669', 's341639556'] | [9184.0, 9180.0, 9180.0, 9244.0, 9216.0] | [23.0, 20.0, 23.0, 24.0, 22.0] | [175, 173, 226, 220, 175] |
p02688 | u556589653 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K = map(int,input().split())\nls = [0 for i in range(N)]\nfor i in range(K):\n d = int(input())\n A = list(map(int,input().split()))\n for j in range(d):\n ls[A[j]-1] += 1\nfor i in range(N):\n if ls[i] == 0:\n print(i+1)', 'N,K = map(int,input().split())\nls = [0 for i in range(N)]\nfor i in range(K):\n d = int(input())\n A = list(map(int,input().split()))\n for j in range(d):\n ls[A[j]-1] += 1\nprint(ls.count(0))'] | ['Wrong Answer', 'Accepted'] | ['s095471715', 's135277384'] | [9188.0, 9128.0] | [26.0, 27.0] | [224, 192] |
p02688 | u557494880 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K = map(int,input().split())\nD = {}\nfor i in range(N):\n D[i+1] = 0\nfor i in range(K):\n d = input()\n A = list(map(int,input().split()))\n for a in A:\n d[a] += 1\nans = 0\nfor i in range(N):\n if D[i+1] == 0:\n ans += 1\nprint(ans)', 'N,K = map(int,input().split())\nD = {}\nfor i in range(N):\n D[i+1] = 0\nfor i in range(K):\n d = input()\n A = list(map(int,input().split()))\n for a in A:\n D[a] += 1\nans = 0\nfor i in range(N):\n if D[i+1] == 0:\n ans += 1\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s802542983', 's636560161'] | [9128.0, 9096.0] | [20.0, 22.0] | [254, 254] |
p02688 | u557750361 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int, input().split())\n\nd = int(input())\n\nnum = [int(input()) for _ in range(n)]\n\nprint(n - d)', 'n, k = map(int, input().split())\n\nans = []\n\nfor i in range(k*2):\n x = input().split()\n if 1 == i % 2:\n for j in range(len(x)):\n if int(x[j]) not in ans:\n ans.append(int(x[j]))\n\nprint(n - len(ans))\n'] | ['Runtime Error', 'Accepted'] | ['s525703107', 's960149979'] | [9072.0, 9148.0] | [23.0, 29.0] | [104, 214] |
p02688 | u562662744 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K=map(int,input().split())\na=set([])\nfor i in range(K):\n d=int(input())\n for i in range(d):\n L=list(map(int,input().split()))\n for x in L:\n a.add(x)\nprint(N-len(a))', 'N,K=map(int,input().split())\na=set([])\nfor i in range(K):\n d=int(input())\n L=list(map(int,input().split()))\n for x in L:\n a.add(x)\nprint(N-len(a))'] | ['Runtime Error', 'Accepted'] | ['s696464424', 's965397056'] | [9188.0, 9180.0] | [23.0, 25.0] | [197, 162] |
p02688 | u568855891 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K = map(int,input().split())\nunchecked = set((range(1,N+1)))\n#print(unchecked)\nchecked = set()\n\nfor i in range(K):\n d = int(input())\n A = set(map(int,input().split()))\n checked = A | checked\n\nprint(checked)\n\nprint(len(unchecked))', 'N,K = map(int,input().split())\nunchecked = set((range(1,N+1)))\n#print(unchecked)\nchecked = set()\n\nfor i in range(K):\n d = int(input())\n A = set(map(int,input().split()))\n checked = A | checked\n\n#print(checked)\nunchecked -= checked\nprint(len(unchecked))'] | ['Wrong Answer', 'Accepted'] | ['s771427702', 's352696031'] | [9180.0, 9188.0] | [22.0, 22.0] | [255, 255] |
p02688 | u569117803 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = list(map(int, input().split(" ")))\nL = [0]*n\n\nfor v in range(k):\n d_ = int(input())\n d__ = input()\n d_l = list(map(int, d__.split(" ")))\n for v in range(d_):\n m = d_l[v]\n L[m-1] += 1\nL.count(0)', 'n, k = list(map(int, input().split(" ")))\nL = [0]*n\n\nfor v in range(k):\n d_ = int(input())\n d__ = input()\n d_l = list(map(int, d__.split(" ")))\n for v in range(d_):\n m = d_l[v]\n L[m-1] += 1\nprint(L.count(0))'] | ['Wrong Answer', 'Accepted'] | ['s025607981', 's780088440'] | [9192.0, 9188.0] | [23.0, 24.0] | [226, 233] |
p02688 | u577733647 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['\nn, k = map(int, input().split())\ninput_map = {}\nfor i in range(k):\n d = int(input())\n for j in range(d):\n list = list(input())\n input_map.setdefault(i, list)\n\ncnt = 0\nhaving_list = input_map(k)\nfor j in having_list:\n cnt += 1\n\nprint(cnt)\n', '\nn, k = map(int, input().split())\ninput_map = {}\nfor i in range(k):\n d = int(input())\n input = input()\n list = [int(ai) for ai in input ]\n input_map.setdefault(i, list)\n\ncnt = 0\nhaving_list = input_map(k)\nfor j in having_list:\n cnt += 1\n\nprint(cnt)\n', '\nn, k = map(int, input().split())\ninput_map = {}\nfor i in range(k):\n d = int(input())\n list = list(input().split())\n input_map.setdefault(d, list)\n\ncnt = 0\nfor key, value in input_map.items():\n if len(value) >= key:\n cnt += 1\n\nprint(cnt)\n', '\nn, k = map(int, input().split())\ninput_map = {}\nfor i in range(k):\n d = int(input())\n list = list(input().split())\n input_map.setdefault(i, list)\n\ncnt = 0\nhaving_list = input_map(k)\nfor j in having_list:\n cnt += 1\n\nprint(cnt)\n', '\nn, k = map(int, input().split())\ninput_map = {}\nfor i in range(k):\n d = int(input())\n for j in range(d):\n input_list = input().split()\n list = [ int(ai) for ai in input_input ]\n input_map.setdefault(i, list)\n\ncnt = 0\nhaving_list = input_map(k)\nfor j in having_list:\n cnt += 1\n\nprint(cnt)\n', '\nn, k = map(int, input().split())\nn_list = list(range(1, n+1))\ninput_map = {}\nfor i in range(k):\n d = int(input())\n d_list = [ int(ai) for ai in input().split()]\n input_map.setdefault(d, d_list)\n\n\nhaving_map = {}\nfor key, value in input_map.items():\n for h in value:\n print(value)\n if n_list.count(h) >= 1:\n n_list.remove(h)\n\nprint(len(n_list))\n', '\nn, k = map(int, input().split())\nn_list = list(range(1, n+1))\ninput_map = {}\nfor i in range(k):\n d = int(input())\n d_list = [ int(ai) for ai in input().split()]\n for h in d_list:\n if n_list.count(h) == 1:\n n_list.remove(h)\n\nprint(len(n_list))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s210050082', 's279853967', 's437726782', 's493366822', 's656331016', 's705207118', 's473330859'] | [9192.0, 9128.0, 9188.0, 9196.0, 9212.0, 9144.0, 9192.0] | [23.0, 24.0, 22.0, 20.0, 21.0, 23.0, 24.0] | [377, 383, 376, 358, 434, 501, 390] |
p02688 | u580697892 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['#coding: utf-8\nfrom math import ceil, floor\nX = int(input())\na = 0\na2 = -a\ndef sign(v):\n if v < 0:\n return -1\n else:\n return 1\ndef counter(a):\n v = abs(a)\n for i in range(1, int(v**0.5)+2):\n if v % i == 0:\n if v == i**5:\n return True\n return False\nwhile True:\n a2 = -a\n b = (a**5 - X)\n b2 = (a2**5 - X)\n if counter(b):\n if a**5 - b == X:\n print(a, int(abs(round(b))**(1/5))*sign(b))\n quit()\n if counter(b2):\n if a2 ** 5 - b2 == X:\n print(a2, int(abs(round(b))**(1/5))*sign(b2))\n quit()\n a += 1\n', '#coding: utf-8\nN, K = map(int, input().split())\nA = [0 for _ in range(N)]\nans = 0\nfor i in range(K):\n d = int(input())\n tmp = list(map(int, input().split()))\n for j in range(d):\n A[tmp[j]-1] += 1\nfor i in range(N):\n if A[i] == 0:\n ans += 1\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s400818913', 's825922813'] | [9176.0, 9188.0] | [21.0, 23.0] | [632, 277] |
p02688 | u582803594 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K=map(int,input().split())\nS=[]\nb=0\n\nfor i in (K):\n d=input()\n A=list(map(int,input().split()))\n for i in A:\n S[i]+=1\n\nfor i in (len(S)):\n if S[i]==0:\n b+=1\nprint(b)', 'N,K=map(int,input().split())\nS=[0]*N\nb=0\n\nfor i in range(K):\n d=input()\n A=list(map(int,input().split()))\n for j in A:\n S[j-1]+=1\n\nfor i in range(len(S)):\n if S[i]==0:\n b+=1\nprint(b)'] | ['Runtime Error', 'Accepted'] | ['s711243625', 's644015886'] | [9116.0, 9108.0] | [24.0, 30.0] | [193, 208] |
p02688 | u585348179 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k=map(int, input().split())\nS = []\nfor i in range(k):\n d1 = int(input())\n \n S.append(list(map(int, input().split())))\n\nans = [0]*n\n\nfor i,s in enumerate(S):\n for d in s:\n print(d)\n ans[int(d)-1]+=1\n\n\ncnt = 0\nfor i in ans:\n if i == 0:\n cnt+=1\nprint(cnt)', 'n,k=map(int, input().split())\nS = []\nfor i in range(k):\n d1 = int(input())\n \n S.append(list(map(int, input().split())))\n\nans = [0]*n\n\nfor i,s in enumerate(S):\n for d in s:\n ans[int(d)-1]+=1\n\n\ncnt = 0\nfor i in ans:\n if i == 0:\n cnt+=1\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s723279375', 's692017133'] | [9324.0, 9196.0] | [26.0, 22.0] | [290, 273] |
p02688 | u588048170 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\ndi = K * 2\nl = []\n\nfor i in range (di):\n l.append(int(input()))\n\nl1 = []\nx = 1\nwhile x < di:\n for j in l[x]:\n l1.append(j)\n x += 2\nl1 = set(l1)\nprint(N - len(l1))', 'N, K = map(int, input().split())\nl = []\n\nfor i in range (K * 2):\n l.append(int(input())\nl1 = []\nx = 1\nwhile x < K * 2:\n for j in l[x]:\n l1.append(j)\n x += 2\nl1 = set(l)\nprint(N - len(l1))', 'N, K = map(int, input().split())\ndi = K * 2\nl = []\nfor i in range (di):\n l.append(input().split())\nl1 = []\nx = 1\nwhile x < di:\n for j in l[x]:\n l1.append(j)\n x += 2\nl1 = set(l1)\nprint(N - len(l1))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s319350318', 's771239056', 's322044059'] | [9196.0, 9020.0, 9592.0] | [20.0, 23.0, 19.0] | [211, 203, 212] |
p02688 | u590926526 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K=map(int,input().split())\ncount=0\nwho=[]\nwhile(K!=0):\n k=int(input())\n someone=list(map(int,input().split()))\n if(len(someone)!=0):\n for i in someone:\n who.append(i)\n someone.remove(i)\n K-=1\nprint(len(set(who)))', 'N,K=map(int,input().split())\nwho_have=[]\nwhile(K!=0):\n k=int(input())\n someone_have=list(map(int,input().split()))\n if(len(someone_have)!=0):\n for i in someone_have:\n if(i in range(1,N+1)):\n who_have.append(i)\n K-=1\nprint(N-len(set(who_have)))'] | ['Wrong Answer', 'Accepted'] | ['s287573811', 's572682995'] | [9192.0, 9192.0] | [24.0, 22.0] | [255, 288] |
p02688 | u592601397 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ["#ABC166\nn,k=map(int,input().split())\ncnt=[0]*(n+1)\nfor j in range(k):\n tmp = int(input())\n arr=list(map(int,input().split()))\n for val in arr:\n cnt[val]+=1\nans=0\nfor i in range(1,n+1):\n if cnt[i]==0:\n ans+=1\nprint('Anser is ' + str(ans))", '#ABC166\nn,k=map(int,input().split())\ncnt=[0]*(n+1)\nfor j in range(k):\n tmp = int(input())\n arr=list(map(int,input().split()))\n for val in arr:\n cnt[val]+=1\nans=0\nfor i in range(1,n+1):\n if cnt[i]==0:\n ans+=1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s032524857', 's111984522'] | [9192.0, 9156.0] | [27.0, 27.0] | [247, 228] |
p02688 | u595851428 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nd = []\nA = []\n\nfor i in range(K):\n d.append(int(input()))\n A.append(list(map(int, input().split())))\n\nokashi = [0] * N\n\nfor l in range(N):\n for i in A[l]:\n okashi[i-1] += 1\n\ncount = 0\nfor i in okashi:\n if i == 0:\n count += 1\n\nprint(count)\n', 'N, K = map(int, input().split())\nd = []\nA = []\n\nfor i in range(K):\n d.append(int(input()))\n A.append(list(map(int, input().split())))\n\nokashi = [0] * N\n\nfor l in range(K):\n print(l)\n for i in A[l]:\n okashi[i-1] += 1\n\nprint(okashi)\ncount = 0\nfor i in okashi:\n if i == 0:\n count += 1\n\nprint(count)\n', 'N, K = map(int, input().split())\nd = []\nA = []\n\nfor i in range(K):\n d.append(int(input()))\n A.append(list(map(int, input().split())))\n\nokashi = [0] * N\n\nfor l in range(K):\n for i in A[l]:\n okashi[i-1] += 1\n\ncount = 0\nfor i in okashi:\n if i == 0:\n count += 1\n\nprint(count)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s130035206', 's930577422', 's673607873'] | [9156.0, 9152.0, 9280.0] | [22.0, 26.0, 23.0] | [298, 325, 298] |
p02688 | u599859259 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int, input().split())\nd_list = []\nA_list =[]\nnuske = np.zeros(n)\nprint(nuske)\nimport numpy as np\nfor _ in range(k): \n d = input()\n a = list(map(int, input().split()))\n for i in a:\n nuske[i-1] +=1\n\np =0\n\nfor i in range(len(nuske)):\n if nuske[i] ==0:\n p+=1\n\nprint(p)\n', 'n, k = map(int, input().split())\nA_list =[]\nnuske = np.zeros(n)\nimport numpy as np\nfor _ in range(k): \n d = input()\n a = list(map(int, input().split()))\n for i in a:\n nuske[ i-1] +=1\n\np =0\n\nfor i in range(len(nuske)):\n if nuske[i] ==0:\n p+=1\n\nprint(p)\n', 'n, k = map(int, input().split())\nA_list =[]\nimport numpy as np\nnuske = np.zeros(n)\n\nfor _ in range(k): \n d = input()\n a = list(map(int, input().split()))\n for i in a:\n nuske[ i-1] +=1\n\np =0\n\nfor i in range(len(nuske)):\n if nuske[i] ==0:\n p+=1\n\nprint(p)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s192109885', 's936529624', 's460330301'] | [9196.0, 9192.0, 27168.0] | [23.0, 22.0, 105.0] | [303, 279, 279] |
p02688 | u600261652 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nfor i in range(K):\n D = list(int(input()))\n A = list(map(int, input().split()))\nlist = set(A)\nprint(len(A) - len(list))', 'N, K = map(int, input().split())\nNumber = []\nn = 0\nc = 1\nfor i in range(K):\n d = int(input())\n A = [int(x) for x in input().split()]\n Number.append(int(d))\nfor I in range(N):\n if c in A:\n c = c+1\n else:\n n = n+1\n c = c+1\nprint(n)', 'N, K = map(int, input().split())\nc = 0\nn = 1\nList = []\nfor i in range(1,K):\n d = int(input())\n m = int(input())\n List.append(m)\nfor I in range(1,N):\n if n in List:\n n = n+1\n else:\n c = c+1\n n = n+1\nprint(c)', 'N, K = map(int, input().split())\nc = 0\nn = 1\nfor i in range(K):\n d = int(input())\n List = list(map(int, input().split()))\nfor I in range(N):\n if n in List:\n n = n+1\n else:\n c = c+1\n n = n+1\nprint(c)', 'N, K = map(int, input().split())\nfor i in range(K):\n D = list(int(input()))\n A = list(map(int, input().split()))\nprint(N - len(set(A)))', 'N, K = map(int, input().split())\nc = 0\nn = 1\nfor i in range(K):\n List = list(map(int, input().split()))\nfor I in range(N):\n if n in List:\n else:\n c = c+1\n n = n+1\nprint(c)', 'N, K = map(int, input().split())\nc = 0\nn = 0\nfor i in range(K):\n d = int(input())\n List = list(map(int, input().split()))\nfor I in range(N):\n n = n+1\n if n in List:\n else:\n c = c+1\nprint(c)', 'N, K = map(int, input().split())\nc = 0\nn = 1\nfor i in range(K):\n Lists = list(int(input()))\n List = list(map(int, input().split()))\nfor I in range(N):\n if n in List:\n n = n+1\n else:\n c = c+1\n n = n+1\nprint(c)', 'N, K = map(int, input().split())\nc = 0\nn = 1\nfor i in range(K):\n d = int(input())\n List = list(map(int, input().split()))\nfor i in range(N):\n if n in List:\n n = n+1\n else:\n c = c+1\n n = n+1\nprint(c)', 'N, K = map(int, input().split())\nc = 0\nn = 1\nw = 1\nz = 1\nwhile w<=K\n d = int(input())\n List = list(map(int, input().split()))\n w = w+1\nwhile w<=N\n if n in List:\n n = n+1\n z = z+1\n else:\n c = c+1\n n = n+1\n z = z+1\nprint(c)', 'def resolve():\n N, K = map(int, input().split())\n D = []\n A = []\n for _ in range(K):\n d = int(input())\n a = list(map(int, input().split()))\n D.append(d)\n A.append(a)\n ans = 0\n for i in range(N):\n flag = 0\n for j in range(K):\n if i+1 in A[j]:\n flag = 1\n if flag == 0:\n ans += 1\n print(ans)\nresolve()'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s272880743', 's425829439', 's536957345', 's574812302', 's705705686', 's724355965', 's773914426', 's795060872', 's923580565', 's931664735', 's159335113'] | [9176.0, 9156.0, 9188.0, 9128.0, 9136.0, 8964.0, 8980.0, 9188.0, 9180.0, 9024.0, 9260.0] | [21.0, 23.0, 23.0, 21.0, 25.0, 25.0, 23.0, 22.0, 23.0, 24.0, 35.0] | [154, 243, 220, 211, 137, 178, 197, 221, 211, 241, 405] |
p02688 | u602081607 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['NK = list(map(int, input().split()))\nN=NK[0]\nK=NK[1]\nsunukes = [i+1 for i in range(N)]\nfor i in range(K):\n d = int(input())\n A = map(int, input().split())\n for a in A:\n if a in sunukes:\n sunukes.remove(a)\n\nprint(sunukes)', 'NK = list(map(int, input().split()))\nN=NK[0]\nK=NK[1]\nsunukes = [i+1 for i in range(N)]\nfor i in range(K):\n d = int(input())\n A = map(int, input().split())\n for a in A:\n if a in sunukes:\n sunukes.remove(a)\n\nprint(len(sunukes))\n\n'] | ['Wrong Answer', 'Accepted'] | ['s821834837', 's099802747'] | [9196.0, 9188.0] | [23.0, 22.0] | [231, 238] |
p02688 | u604655161 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ["\n\n\n\n\n\nN,K =map(int, input().split())\n#N = int(input())\n#S = input()\n\nsum=0\n\n#List = ['A','B','C','D','E']\n#List=list(range(1))\nList_A_all = list(range(3*K+1))\nList_A_all =[]\n\n\n\nfor i in range(K):\n\n List_d = int(input())\n\n List_A = input().split()\n List_A_int= [int(s) for s in List_A]\n List_A_all.extend(List_A_int)\n\n#print(List_A_all)\n\nfor t in range(N):\n if not t in List_A_all:\n sum+=1\n\n\n#print(List_d)\nprint(sum)\n\n\n\n\n# X,Y,Z= map(int, input().split())\n# List=[X,Y,Z]\n\n#List.sort()\n#print(List[1])\n\n\n \n\n#print(int(sum))\n\n#print(List.index(S)+1)\n\n#salary = 0\n\n#sum=0\n\n#print(N)\n#while sum!=N:\n\n# print(1)\n# sum+=1\n\n\n\n\n\n\n#\n#salary = int(salary)\n\n", "\n\n\n\n\n\nN,K =map(int, input().split())\n#N = int(input())\n#S = input()\n\nsum=0\n\n#List = ['A','B','C','D','E']\n#List=list(range(1))\nList_A_all = list(range(3*K+1))\nList_A_all =[]\n\n\n\nfor i in range(K):\n\n List_d = int(input())\n\n List_A = input().split()\n List_A_int= [int(s) for s in List_A]\n List_A_all.extend(List_A_int)\n\n#print(List_A_all)\n\nfor t in range(N):\n if not t+1 in List_A_all:\n sum+=1\n\n\n#print(List_d)\nprint(sum)\n\n\n\n\n# X,Y,Z= map(int, input().split())\n# List=[X,Y,Z]\n\n#List.sort()\n#print(List[1])\n\n\n \n\n#print(int(sum))\n\n#print(List.index(S)+1)\n\n#salary = 0\n\n#sum=0\n\n#print(N)\n#while sum!=N:\n\n# print(1)\n# sum+=1\n\n\n\n\n\n\n#\n#salary = int(salary)\n"] | ['Wrong Answer', 'Accepted'] | ['s125680196', 's424392180'] | [9184.0, 9224.0] | [22.0, 23.0] | [1074, 1075] |
p02688 | u606878291 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ["def main(n, a):\n indexes = {i + 1 for i in range(n)}\n reduced = set()\n for s in a:\n reduced |= s\n return len(indexes - reduced)\n\n\nif __name__ == '__main__':\n S = input().rstrip()\n N, K = map(int, input().split())\n A = []\n for _ in range(K):\n input()\n A.append(set(tuple(map(int, input().split(' ')))))\n print(main(N, A))\n", "def main(n, a):\n indexes = {i + 1 for i in range(n)}\n reduced = set()\n for s in a:\n reduced |= s\n return len(indexes - reduced)\n\n\nif __name__ == '__main__':\n S = input().rstrip()\n N, K = map(int, input().split())\n A = []\n for _ in range(K):\n input()\n A.append(set(tuple(map(int, input().split(' ')))))\n print(main(N, A))\n", "N, K = map(int, input().split(' '))\nS = set([i + 1 for i in range(N)])\n\nfor _ in range(K):\n input()\n S -= set(map(int, input().split(' ')))\n\nprint(len(S))\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s369966385', 's616845508', 's937751387'] | [9172.0, 9124.0, 9104.0] | [21.0, 24.0, 31.0] | [369, 369, 161] |
p02688 | u607563136 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int,input().split())\nd = []\na = []\nfor i in range(1,k+1):\n d.append(int(input()))\n a_temp = list(map(int,input().split()))\n a.append(a_temp)\n\nnum = []\n \nfor i in range(n):\n cnt = 0\n for j in range(k):\n if i in a[j]:\n cnt += 1\n if cnt == 0:\n num.append(i)\nprint(len(num))', 'n, k = map(int,input().split())\nd = []\na = []\nfor i in range(1,k+1):\n d.append(int(input()))\n a_temp = list(map(int,input().split()))\n a.append(a_temp)\n\nnum = []\n \nfor i in range(n):\n cnt = 0\n for j in range(k):\n if i+1 in a[j]:\n cnt += 1\n if cnt == 0:\n num.append(i)\nprint(len(num))'] | ['Wrong Answer', 'Accepted'] | ['s537296092', 's921721848'] | [9200.0, 9064.0] | [34.0, 29.0] | [327, 329] |
p02688 | u610120522 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\n\nsusuke = [1] * N\n\nfor i in range(K):\n di = int(input())\n ai = map(int, input().split())\n for j in range(ai):\n susuke[j - 1] = 0\n \nprint(sum(susuke))', 'N, K = map(int, input().split())\n\nsusuke = [1] * N\n\nfor i in range(K):\n di = int(input())\n ai = map(int, input().split())\n for j in range(ai):\n susuke[j - 1] = 0\n \nprint(sum(susuke))', 'N, K = map(int, input().split())\nsunuke = [1] * N\nfor i in range(K):\n di = int(input())\n ai = map(int, input().split())\n for j in ai:\n sunuke[j - 1] = 0\nprint(sum(sunuke))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s143259523', 's154689234', 's905520595'] | [9144.0, 9212.0, 9176.0] | [22.0, 20.0, 24.0] | [191, 191, 177] |
p02688 | u614063956 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int, input().split())\n\narr = []\nfor _ in range(k):\n. d = int(input())\n a = list(map(int, input().split()))\n arr.append(a)\n\noks = [False] * n\nfor xs in arr:\n for x in xs:\n oks[x - 1] = True\n\nans = 0\nfor x in oks:\n if x == False:\n ans += 1\n\nprint(ans)\n', 'n, k = map(int, input().split())\n\narr = []\nfor _ in range(k):\n d = int(input())\n a = list(map(int, input().split()))\n arr.append(a)\n\noks = [False] * n\nfor xs in arr:\n for x in xs:\n oks[x - 1] = True\n\nans = 0\nfor x in oks:\n if x == False:\n ans += 1\n\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s656002061', 's014437468'] | [8952.0, 9188.0] | [23.0, 24.0] | [290, 289] |
p02688 | u614181788 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k = map(int,input().split())\nd = [0]*k\na = [0]*k\ns = []\nfor i in range(k):\n d[i] = int(input())\n a[i] = list(map(int,input().split()))\n s.extend(a[i])\nd = set(s)\n\nprint(n-len(d))\nprint(s)', 'n,k = map(int,input().split())\nans = [1]*n\nfor i in range(k):\n d = int(input())\n a = list(map(int,input().split()))\n for x in a:\n ans[x-1] *= 0\nprint(sum(ans))\n'] | ['Wrong Answer', 'Accepted'] | ['s409481701', 's581536934'] | [9196.0, 9092.0] | [22.0, 25.0] | [198, 176] |
p02688 | u616382321 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['import numpy as np\n\nN, K = map(int, input().split())\n\nd = []\na = []\n\nfor i in range(K):\n d.append(int(input()))\n a.append(list(map(int, input().split())))\n\na = np.array(a)\na = np.unique(a)\n\nprint(N - len(a))\n\n', 'import itertools\n\nN, K = map(int, input().split())\n\nd = []\na = []\n\nfor i in range(K):\n d.append(int(input()))\n a.append(list(map(int, input().split())))\n\na = itertools.chain.from_iterable(a)\nb = set(a)\n\nprint(N - len(b))\n'] | ['Wrong Answer', 'Accepted'] | ['s273033554', 's630603788'] | [27396.0, 9092.0] | [116.0, 29.0] | [215, 227] |
p02688 | u616539426 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['from copy import copy\nfrom functool import reduce\n\nclass Sunkune:\n\tdef __init__(self):\n \t\tself.has_snack = False\n\nn_sunuke, n_v_snacks = [int(s) for s in input().split(2)]\n\nall_sunuke = [copy(Sunuke()) for i in range(n_sunuke)]\n\nfor snack_id in n_v_snacks:\n \tn_snacks = int(input())\n for sunuke_id in (int(s) for s in input().split()):\n \tall_sunuke[s - 1].has_snack = True\n\nprint(reduce(lambda n,s: n + (0 if s.has_snack else 1), all_sunuke, 0)', 'from copy import copy\nfrom functools import reduce\n \nclass Sunuke:\n def __init__(self):\n self.has_snack = False\n \nn_sunuke, n_v_snacks = [int(s) for s in input().split()]\n \nall_sunuke = [copy(Sunuke()) for i in range(n_sunuke)]\n \nfor snack_id in range(n_v_snacks):\n n_snacks = int(input())\n for sunuke_id in (int(s) for s in input().split()):\n all_sunuke[sunuke_id - 1].has_snack = True\n \nprint(reduce(lambda n,s: n + (0 if s.has_snack else 1), all_sunuke, 0))'] | ['Runtime Error', 'Accepted'] | ['s071929170', 's292229241'] | [9044.0, 9736.0] | [24.0, 26.0] | [452, 498] |
p02688 | u616619529 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['# -*- coding: utf-8 -*-\nn, k = map(int, input().split())\n\nsunuke_list = [False for i in range(n)]\n\nfor i in range(k):\n d = int(input())\n has_sunuke_list = input().split()\n for k in has_sunuke_list:\n sunuke_list[int(k)-1] = True\n\nprint(sunuke_list.coutn(False))\n', '# -*- coding: utf-8 -*-\nn, k = map(int, input().split())\n\nsunuke_list = [False for i in range(n)]\n\nfor i in range(k):\n d = int(input())\n has_sunuke_list = input().split()\n for k in has_sunuke_list:\n sunuke_list[int(k)-1] = True\n\nprint(sunuke_list.count(False))\n'] | ['Runtime Error', 'Accepted'] | ['s492111772', 's764660691'] | [9172.0, 9176.0] | [23.0, 24.0] | [277, 277] |
p02688 | u616719454 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K =map(int,input().split())\nC =[]\nD =[]\n\nN1 = N +1\nfor o in range(1,N+1):\n D.append(o)\n \nprint(D)\n\n\nfor i in range(K):\n A =int(input())\n C.append(A)\n B =list(map(int,input().split()))\n for j in D:\n for z in B:\n if j ==z:\n D.remove(j)\n\nprint(D)\n \n \n \n#print(E)\nprint(len(D))\n \n ', 'N,K =map(int,input().split())\nC =[]\nD =[]\n\nN1 = N +1\nfor o in range(1,N+1):\n D.append(o)\n \n#print(D)\n\n\nfor i in range(K):\n A =int(input())\n C.append(A)\n B =list(map(int,input().split()))\n for z in B:\n for j in D:\n if j ==z:\n D.remove(j)\n\n#print(D)\n \n \n \n#print(E)\nprint(len(D))\n \n '] | ['Wrong Answer', 'Accepted'] | ['s116911271', 's620832260'] | [9136.0, 9188.0] | [22.0, 21.0] | [389, 391] |
p02688 | u617040773 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nmem = {}\nfor _ in range(K):\n _ = input()\n mem = mem | {input().split()}\n\nmem_count = len(mem)\nprint(N-mem_count)', 'N, K = map(int, input().split())\nmem = set()\nfor _ in range(K):\n _ = input()\n mem = mem | {input().split()}\n\nmem_count = len(mem)\nprint(N-mem_count)', 'N, K = map(int, input().split())\nmem = set()\nfor _ in range(K):\n _ = input()\n mem = mem | {input().split()}\nmem_count = len(mem)\nprint(N-mem_count)', 'N, K = map(int, input().split())\nmem = set()\nfor _ in range(K):\n _ = input()\n mem = mem | set(map(int, input().split()))\n\nmem_count = len(mem)\nprint(K, mem_count, mem)\nprint(N-mem_count)', 'N, K = map(int, input().split())\nmem = set()\nfor _ in range(K):\n _ = input()\n mem = mem | set(map(int, input().split()))\n\nmem_count = len(mem)\nprint(N-mem_count)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s058430710', 's313919853', 's322556404', 's969969523', 's063409044'] | [9100.0, 9108.0, 9168.0, 9180.0, 9112.0] | [21.0, 22.0, 24.0, 25.0, 24.0] | [147, 150, 149, 188, 163] |
p02688 | u620452671 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k=map(int,input().split())\nans=0\nlis=[0 for i in range(n)]\nfor i in range(k):\n d=int(input())\n ll=map(int,input().split())\n for j in ll:\n lis[j-1]+=0\nfor i in lis:\n if i==0:\n ans+=1\n \nprint(ans)', 'n,k=map(int,input().split())\nans=0\nlis=[0 for i in range(n)]\nfor i in range(k):\n d=int(input())\n ll=list(map(int,input().split()))\n #print(ll)\n for j in ll:\n lis[j-1]+=1\n#print(lis)\nfor i in lis:\n if i==0:\n ans+=1\n \nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s695135707', 's217199134'] | [9192.0, 9188.0] | [23.0, 21.0] | [209, 240] |
p02688 | u621345513 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int, input().split())\nss = set()\n\nfor i in range(1, k*2+1):\n if i%2==1:\n pass\n else:\n for s_i in map(int, input().split()):\n ss.add(s_i)\nprint(len([s for s in range(1, n+1) if s not in ss]))\n', "n, k = map(int, input().split())\n#print(n, k)\n\nss = set()\n\nfor i in range(1, k*2+1):\n #print(i)\n if i%2==1:\n input()#print('d', i//2+1, ': ', input())\n else:\n for s_i in map(int, input().split()):\n #print('s_i: ', s_i)\n ss.add(s_i)\n#print(ss)\nprint(len([s for s in range(1, n+1) if s not in ss]))\n"] | ['Wrong Answer', 'Accepted'] | ['s723844450', 's063819006'] | [9180.0, 9184.0] | [23.0, 21.0] | [215, 316] |
p02688 | u621699252 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['from collections import defaultdict\n\nN, K = list(map(int, input().split()))\nd = defaultdict(list)\nfor x in range(K):\n input()\n for i in map(int, input().split()):\n d[i].append(True)\ncount = 0\nfor i in range(1, K):\n if len(d[i]) == 0:\n count += 1\nprint(count)\n', 'from collections import defaultdict\n\nN, K = list(map(int, input().split()))\nd = {}\nfor i in range(1, N+1):\n d[i] = []\nprint(d)\nfor k in range(1, K):\n input()\n for i in map(int, input().split()):\n d[i].append(k)\ncount = 0\nfor i in range(1, N+1):\n if len(d[i]) == 0:\n count += 1\nprint(count)\n', 'from collections import defaultdict\n\nN, K = list(map(int, input().split()))\nd = {}\nfor i in range(1, N+1):\n d[i] = []\nfor k in range(1, K+1):\n input()\n for i in map(int, input().split()):\n d[i].append(k)\ncount = 0\nfor i in range(1, N+1):\n if len(d[i]) == 0:\n count += 1\nprint(count)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s163824051', 's196113772', 's262634523'] | [9512.0, 9368.0, 9568.0] | [24.0, 27.0, 28.0] | [282, 316, 309] |
p02688 | u629350026 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k = map(int, input().split())\ndi=[0]*k\nAp=[0]*n\nfor i in range(0,k):\n di[i] = int(input())\n A = list(map(int, input().split()))\n ai=0\n for j in range(1,di[i]+1):\n if A[ai]==j:\n ai=ai+1\n Ap[j-1]=1\nnum=0\nfor l in range(0,n):\n if Ap[l]==0:\n num=num+1\nprint(num)', 'n,k = map(int, input().split())\ndi=[0]*k\nAp=[0]*n\nfor i in range(0,k):\n di[i] = int(input())\n A = list(map(int, input().split()))\n ai=0\n A.append(-100)\n for j in range(1,n+1):\n if A[ai]==j:\n ai=ai+1\n Ap[j-1]=1\nnum=0\nfor l in range(0,n):\n if Ap[l]==0:\n num=num+1\nprint(num)'] | ['Wrong Answer', 'Accepted'] | ['s253078355', 's295141974'] | [9140.0, 9216.0] | [23.0, 22.0] | [311, 326] |
p02688 | u630511239 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n = int(input())\na = []\nfor i in range(n):\n a.append(list(map(int, input().split())))\na0 = a[0]\nN = int(a0[0])\nK = int(a0[1])\nb =list(range(0,N-1))\nfor i in range(K):\n di = int(a[2i+1])\n bi = a[2i+2]\nfor l in range(N):\n for i in range(K):\n for k in range(di):\n if bi[k] == l:\n \tb.remove(l)\n bi.remove(l)\nprint(len(b))', 'n = input().split()\nN = int(n[0])\nK = int(n[1])\ns = [list(map(int, input().split())) for i in range(2*K+1)] \nb = list(range(N))\nfor l in b:\n for i in range(K):\n di = s[2*i]\n ai = s[2*i+1]\n for k in ai:\n if k == l:\n b.remove(l)\n ai.remove(l)\nprint(len(b))', 'n = int(input())\na = []\nfor i in range(n):\n a.append(list(map(int, input().split())))\na0 = a[0]\nN = int(a0[0])\nK = int(a0[1])\nb =[]\nfor i in range(K):\n di = int(a[2i+1])\n bi = a[2i+2]\nfor l in range(N):\n for i in range(K):\n for k in range(di):\n if not bi[k] == l:\n \tb.append(l)\nprint(len(b))', 'n = int(input())\na = []\nfor i in range(n):\n a.append(list(map(int, input().split())))\na0 = a[0]\nN = a0[0]\nK = a0[1]\nb = []\nfor i in range(K):\n di = a[2i+1]\n bi = a[2i+2]\nfor l in range(N):\n for i in range(K):\n for k in range(di):\n if not bi[k] == l:\n \tb.append(l)\nprint(len(b))', 'n = int(input())\na = []\nfor i in range(n):\n a.append(list(map(int, input().split())))\na0 = a[0]\nN = a0[0]\nK = a0[1]\nb = []\nfor i in range(K):\n di = a[2i+1]\n bi = a[2i+2]\nfor l in range(N):\n for i in range(K):\n for k in range(di):\n if bi[k] == l:\n b.append(l)\nprint(len(b))', 'n = int(input())\na = []\nfor i in range(n):\n a.append(list(map(int, input().split())))\na0 = a[0]\nN = int(a0[0])\nK = int(a0[1])\nb =list(range(0,N-1))\nfor i in range(K):\n di = int(a[2*i+1])\n bi = a[2*i+2]\nfor l in range(N):\n for i in range(K):\n for k in range(di):\n if bi[k] == l:\n \tb.remove(l)\n bi.remove(l)\nprint(len(b))', 'N, K = map(int, input().split())\nd = []\nA = []\ns = [1] * N\nfor k in range(K):\n d.append(int(input()))\n A.append([int(i) for i in input().split()])\n \nfor k in range(K):\n for n in range(1, N+1):\n if n in A[k]:\n if s[n-1] == 1:\n s[n-1] = 0\nprint(sum(s))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s072980425', 's089143801', 's357628010', 's426689615', 's469862741', 's549141356', 's140672950'] | [9048.0, 9204.0, 8988.0, 9044.0, 8984.0, 9004.0, 9196.0] | [25.0, 19.0, 22.0, 21.0, 26.0, 22.0, 30.0] | [373, 319, 332, 318, 317, 375, 269] |
p02688 | u632609425 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K=map(int,input().split())\nD=[]\nA=set()\nfor i in range(K):\n\tD.append(input())\n\tA.add(int(input()))\nS=len(A)\nprint(N-S)', 'N,K=map(int,input().split())\nD=[]\nA=set()\nfor i in range(K):\n\tD.append(int(input()))\n\tA=A|set(map(int,input().split()))\nlength=len(A)\nprint(N-length)'] | ['Runtime Error', 'Accepted'] | ['s560084438', 's024067836'] | [9176.0, 9208.0] | [24.0, 21.0] | [120, 149] |
p02688 | u652522621 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ["import itertools\nN, K = map(int, input().split(' '))\n\nA_all = []\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split(' ')))\n A_all.append(A)\n\nresult = 0 \nA_all = list(itertools.chain.from_iterable(A_all))\nfor i in range(1, N + 1):\n if A_all.count(i) == 0:\n print(i)\n result += 1\n \nprint(result)\n \t", "import itertools\nN, K = map(int, input().split(' '))\n\nA_all = []\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split(' ')))\n A_all.append(A)\n\nresult = 0 \nA_all = list(itertools.chain.from_iterable(A_all))\nfor i in range(1, N + 1):\n if A_all.count(i) == 0:\n result += 1\n \nprint(result)\n \t"] | ['Wrong Answer', 'Accepted'] | ['s993863228', 's536165267'] | [9188.0, 9368.0] | [34.0, 33.0] | [331, 318] |
p02688 | u659712937 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K=map(int,input().split())\n\nSanuke=list(range(K))\n\nfor i in range(N):\n di=int(input())\n A=list(map(int,input().split()))\n for j in A:\n Sanuke[j]+=1\n\ntemp=0\n\nfor i in Sanuke:\n if i ==0:\n higaisha += 1\n\nprint(higaisha)', 'N,K=map(int,input().split())\n\nSanuke=list(range(K))\n\nfor i in range(N):\n di=int(input())\n A=list(map(int,input().split()))\n for j in A:\n Sanuke[j]+=1\n\nhigaisha=0\n\nfor i in Sanuke:\n if i ==0:\n higaisha += 1\n\nprint(higaisha)', 'N,K=map(int,input().split())\n\nSanuke=list(range(K))\n\ndef calc_double(n):\n return n -1\n\nfor i in range(N):\n di=int(input())\n A=list(map(int,input().split()))\n A=map(calc_double, A)\n for j in A:\n Sanuke[j]+=1\n\nhigaisha=0\n\nfor i in Sanuke:\n if i ==0:\n higaisha += 1\n\nprint(higaisha)', 'N,K=map(int,input().split())\n\nSanuke=list(range(K))\n\nfor i in range(N):\n di=int(input())\n A=list(map(int,input().split()))-1\n for j in A:\n Sanuke[j]+=1\n\nhigaisha=0\n\nfor i in Sanuke:\n if i ==0:\n higaisha += 1\n\nprint(higaisha)', 'n,k=map(int,input().split())\n\nans=[0]*n\n\nfor i in range(k):\n d=int(input())\n a=[int(k) - 1 for k in input().split()]\n for j in a:\n ans[j]+=1\n\nansint=0\n\n\nfor i in range(n):\n if ans[i]==0:\n ansint+=1\n\n\nprint(ansint)\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s132049940', 's634704397', 's732393448', 's735944640', 's291051899'] | [9196.0, 9192.0, 9200.0, 9112.0, 9128.0] | [22.0, 23.0, 24.0, 22.0, 24.0] | [228, 232, 295, 234, 224] |
p02688 | u661647607 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nlist0 = [list(map(int, input().split())) for i in range(2*K)]\nd = list0[0::2]\nlistd = list0[1::2]\nlistf = listd[0]\ncount = 0\nfor i in range(1, K):\n listf = listf + listd[i]\n\nfor i in range(1, N):\n if i not in listf:\n count = count + 1\n\nprint(listf)\nprint(count)', 'N, K = map(int, input().split())\nans = [0]*N\nfor i in range(K):\n d = int(input())\n for j in list(map(int, input().split())):\n ans[j-1] = 1\nprint(ans.count(0))'] | ['Wrong Answer', 'Accepted'] | ['s275595368', 's343217508'] | [9236.0, 9000.0] | [23.0, 25.0] | [299, 163] |
p02688 | u667427469 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['if __name__ == \'__main__\':\n s = input()\n\n if s == "ABC":\n print("ARC")\n if s == "ARC":\n print("ABC")\n', "if __name__ == '__main__':\n nk = input()\n nk = nk.split()\n n = int(nk[0])\n k = int(nk[1])\n\n d = []\n A = []\n\n for i in range(k):\n d_element = input()\n d_element = int(d_element)\n d.append(d_element)\n A_element = input()\n A_element = A_element.split()\n A_element = list(map(int,A_element))\n A.append(A_element)\n\n s = set()\n for i in range(len(A)):\n for j in range(len(A[i])):\n s.add(A[i][j])\n\n ans = n - len(s)\n print(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s220844852', 's494012825'] | [9088.0, 9208.0] | [25.0, 23.0] | [124, 521] |
p02688 | u669696235 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K=map(int,input().split())\nhoge={}\nfor j in range(K):\n input()\n [hoge.update({int(j):1}) for j in input().split()]\nprint(sum([not j in hoge for j in range(N)]))\n', 'N,K=map(int,input().split())\nhoge={}\nfor j in range(K):\n input()\n [hoge.update({int(j)-1:1}) for j in input().split()]\nprint(sum([not j in hoge for j in range(N)]))\n'] | ['Wrong Answer', 'Accepted'] | ['s434911836', 's524206418'] | [9204.0, 9172.0] | [23.0, 20.0] | [169, 171] |
p02688 | u669819350 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nA = set()\nfor _ in rnage(K):\n d = int(input())\n A.add(list(input().split()))\nprint(N - len(A))', 'N, K = map(int, input().split())\nA = set()\nfor _ in range(K):\n d = int(input())\n A.add(list(input().split()))\nprint(N - len(A))\n', 'N, K = map(int, input().split())\nA = set()\nfor _ in range(K):\n d = int(input())\n A.update(list(map(int, input().split())))\nprint(N - len(A))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s761046043', 's831110387', 's307075305'] | [9140.0, 9032.0, 9076.0] | [22.0, 24.0, 31.0] | [129, 130, 143] |
p02688 | u678505520 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k = map(int,input().split())\nN = list(range(1,n+1))\nA = set()\ncount = 0\nfor i in range(k):\n d = int(input())\n Ad = list(map(int,input().split()))\n for j in range(d):\n A.add(Ad[j])\n\nfor i in range(n):\n if N[i] in A:\n count += 1\nprint(A)\nprint(n-count)\n', 'n,k = map(int,input().split())\nN = list(range(1,n+1))\nA = set()\ncount = 0\nfor i in range(k):\n d = int(input())\n Ad = list(map(int,input().split()))\n for j in range(d):\n A.add(Ad[j])\n\nfor i in range(n):\n if N[i] in A:\n count += 1\n\nprint(n-count)'] | ['Wrong Answer', 'Accepted'] | ['s491506709', 's827734140'] | [9192.0, 9136.0] | [21.0, 23.0] | [263, 254] |
p02688 | u679236042 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['S = input()\n\n\n\nif S == "ABC":\n print("ARC")\nelse:\n print("ABC")\n\n\n', 'N,K = map(int,input().split())\n\n\nzisyo = {} \nzisyo = set(zisyo)\n\nfor i in range(K):\n d = int(input())\n A = list(map(int,input().split()))\n for j in range(d):\n zisyo.add(A[j])\n\nprint(N-len(zisyo))\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s803515967', 's047878370'] | [9084.0, 9180.0] | [22.0, 23.0] | [72, 341] |
p02688 | u684267998 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K= list(map(int, input().split())) \n\nans = [0]*(N+1)\n\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split())) \n for j in range(d):\n ans[A[j]] = 1\n\nres = sum(ans)\nprint(res)\n \n ', 'N,K= list(map(int, input().split())) \n\nans = [0]*(N+1)\n\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split())) \n for j in range(d):\n ans[A[j]] = 1\n\nres = len(ans)-1-sum(ans)\nprint(res)\n \n '] | ['Wrong Answer', 'Accepted'] | ['s937392313', 's954275618'] | [9180.0, 9184.0] | [22.0, 22.0] | [222, 233] |
p02688 | u690215271 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ["n,k=map(int,input().split(' '))\na=list(1 for i in range(n+1))\nfor z in range(k):\n x=int(input())\n temp=map(int,input.split(' '))\n for i in temp:\n a[i]+=1\nc=0\nfor i in range(1,n+1):\n if(a[i]==0):\n c++\nprint(c)", "n,k=map(int,input().split(' '))\na=list(1 for i in range(n+1))\nfor z in range(k):\n x=int(input())\n temp=map(int,input.split(' '))\n for i in temp:\n a[i]+=1\n c=0\nfor i in range(1,n+1):\n if(a[i]==0):\n c++\nprint(c)", "n,k=map(int,input().split(' '))\na=[0 for i in range(n+1)]\nfor z in range(k):\n x=int(input())\n temp=map(int,input().split(' '))\n for i in temp:\n a[i]+=1\nc=0\nfor i in range(1,n+1):\n if(a[i]==0):\n c+=1\nprint(c)"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s373610099', 's728901692', 's263165935'] | [8924.0, 8920.0, 9184.0] | [22.0, 22.0, 21.0] | [218, 222, 217] |
p02688 | u690554532 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = int(input())\nl_n = [0] * n\nfor i in range(0, k):\n d = int(input())\n a = int(input())\n for l in a:\n l_n[l-1] = 1\nprint(l_n.count(0)) ', 'n, k = map(int, input().split())\nl_n = [0] * n\nfor i in range(0, k):\n d = int(input())\n a = map(int, input().split())\n for l in a:\n l_n[l-1] = 1\nprint(l_n.count(0)) '] | ['Runtime Error', 'Accepted'] | ['s658381026', 's026406538'] | [9172.0, 9184.0] | [25.0, 20.0] | [155, 181] |
p02688 | u690833702 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['def main():\n n, k = map(int, input().split())\n \n kids = list()\n sum = 0\n \n for i in k-1:\n dustbox = input()\n kids += list(map(int, input().split()))\n \n for i in range(1, n+1):\n if i not in kids:\n sum += 1\n \n print(sum)\n \nmain()', 'def main():\n n, k = map(int, input().split())\n \n kids = list()\n sum = 0\n \n for i in k:\n dustbox = input()\n kids += list(map(int, input().split()))\n \n for i in range(1, n+1):\n if i not in kids:\n sum += 1\n \n print(sum)\n \nmain()', 'def main():\n n, k = map(int, input().split())\n \n kids = list()\n sum = 0\n \n for i in range(k):\n dustbox = input()\n kids += list(map(int, input().split()))\n \n for i in range(1, n+1):\n if i not in kids:\n sum += 1\n \n print(sum)\n \nmain()'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s005012643', 's390835417', 's729003614'] | [9120.0, 9020.0, 8864.0] | [24.0, 26.0, 28.0] | [258, 256, 263] |
p02688 | u692687119 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nA = []\n\nfor i in range(K):\n d = int(input())\n a = list(map(int, input().split()))\n A.append(a)\n\nref = A[0]\n\nfor i in range(1, K):\n ref = list(set(ref) & set(A[i])) + list(set(ref) ^ set(A[i]))\n\nlen = len(ref)\n\nprint(len)\nprint(N - len)', 'N, K = map(int, input().split())\nA = []\n\nfor i in range(K):\n d = int(input())\n a = list(map(int, input().split()))\n A.append(a)\n\nref = A[0]\n\nfor i in range(1, K):\n ref = list(set(ref) & set(A[i])) + list(set(ref) ^ set(A[i]))\n\nlen = len(ref)\n\nprint(N - len)'] | ['Wrong Answer', 'Accepted'] | ['s155378966', 's659890137'] | [9180.0, 9200.0] | [22.0, 20.0] | [272, 261] |
p02688 | u694402282 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['import itertools\nN1, K1 = map(int, input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n except:\n break;\nN = len(listA)\nlistB = []\nfor n in range(1,N):\n if n%2==0:\n listB.append(listA[n])\nlistC = list(itertools.chain.from_iterable(listB))\nprint(N1 - len(list(set(listC))))', 'import itertools\nN1, K1 = map(int, input().split())\nlistA=[]\nwhile True:\n try:\n listA.append(list(map(int,input().split())))\n except:\n break;\nN = len(listA)\n#print(N)\nlistB = []\nfor n in range(0,N):\n if n%2==1:\n listB.append(listA[n])\n\nlistC = list(itertools.chain.from_iterable(listB))\n\nprint(N1 - len(list(set(listC))))'] | ['Wrong Answer', 'Accepted'] | ['s838211048', 's022589549'] | [9144.0, 9380.0] | [24.0, 23.0] | [333, 375] |
p02688 | u696419801 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\n\nhave_snack = [0 for i in range(N)]\n\nfor k in range(K):\n hito_len = int(input())\n have_hito = map(int, input().split())\n for hh in range(have_hito):\n have_snack[hh - 1] = 1\n\nprint(have_snack.count(0))\n', 'N, K = map(int, input().split())\n\nhave_snack = [0 for i in range(N)]\n\nfor k in range(K):\n hito_len = int(input())\n have_hito = list(map(int, input().split()))\n for hh in have_hito:\n have_snack[hh - 1] = 1\n\nprint(have_snack.count(0))\n'] | ['Runtime Error', 'Accepted'] | ['s059895942', 's331276775'] | [9088.0, 9084.0] | [26.0, 23.0] | [250, 249] |
p02688 | u698756732 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k = list(map(int, input("").split()))\n\nsunuke = [0] * n\n \nfor i in range(K):\n d = int(input())\n a = list(map(int,input().split()))\n for j in a:\n sunuke[j-1] = 0\n\nprint(sum(sunuke))', 'n,k = list(map(int, input().split()))\n\nsunuke = [1] * n\n \nfor i in range(k):\n d = int(input())\n a = list(map(int, input().split()))\n for j in a:\n sunuke[j-1] = 0\n\nprint(sum(sunuke))'] | ['Runtime Error', 'Accepted'] | ['s518822478', 's923860983'] | [9168.0, 9136.0] | [25.0, 32.0] | [198, 197] |
p02688 | u698919163 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K = map(int,input().split())\ntmp_A = [0]*N\nans = 0\n\nfor i in range(K):\n d = int(input())\n A = list(map(int,input().split()))\n for j in range(d):\n tmp_A[A[j]-1] += 1\n \nfor i in range(N):\n tmp_A[i] == 0:\n ans += 1\n \nprint(ans)', 'N,K = map(int,input().split())\ntmp_A = [0]*N\nans = 0\n\nfor i in range(K):\n d = int(input())\n A = list(map(int,input().split()))\n for j in range(d):\n tmp_A[A[j]-1] += 1\n \nfor i in range(N):\n if tmp_A[i] == 0:\n ans += 1\n \nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s405039940', 's903932752'] | [8972.0, 9184.0] | [22.0, 22.0] | [266, 269] |
p02688 | u701017915 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nl = [list(map(int, input().split())) for _ in range(2 * K)]\n\ntreated = (list(range(1, N+1)))\n\nfor i in range(int((K+1)/2)):\n tt = list(set(list(range(1, N+1))) - set(l[2*i+1]))\n print(tt)\n treated = list(set(treated) & set(tt))\n\nprint(len(treated))', 'N, K = map(int, input().split())\nl = [list(map(int, input().split())) for _ in range(2 * K)]\n\ntreated = (list(range(1, N+1)))\n\nfor i in range(K):\n tt = list(set(list(range(1, N+1))) - set(l[2*i+1]))\n treated = list(set(treated) & set(tt))\n\nprint(len(treated))'] | ['Wrong Answer', 'Accepted'] | ['s221505723', 's864340644'] | [9208.0, 9200.0] | [22.0, 21.0] | [284, 261] |
p02688 | u701350595 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k=map(int,input().split())\nl=[]\nfor k in range(n):\n l.append(k)\nfor i in range(k):\n d=int(input())\n s=input().split()\n for j in s:\n if int(j) in l:\n l.remove(int(j))\nprint(len(l))\n\n ', 'n,k=map(int,input().split())\nl=[]\nfor m in range(1,n+1):\n l.append(m)\nfor i in range(k):\n d=int(input())\n s=input().split()\n for j in s:\n if int(j) in l:\n l.remove(int(j))\nprint(len(l))'] | ['Runtime Error', 'Accepted'] | ['s593745636', 's152003029'] | [9176.0, 9172.0] | [20.0, 20.0] | [197, 197] |
p02688 | u705283512 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['import sys\n\nn, k = map(int, sys.stdin.readline().split())\n\nsnukes = [1] * n\n\nfor _ in range(k):\n nums = list(map(int, sys.stdin.readline().split()))\n for num in nums:\n snukes[num - 1] = 0\n\nprint(sum(snukes))\n', 'import sys\n \nn, k = map(int, sys.stdin.readline().split())\n \nsnukes = [1] * n\n \nfor _ in range(k):\n n = int(sys.stdin.readline())\n nums = list(map(int, sys.stdin.readline().split()))\n for num in nums:\n snukes[num - 1] = 0\n\nprint(sum(snukes))\n'] | ['Wrong Answer', 'Accepted'] | ['s216883310', 's749516538'] | [9088.0, 9156.0] | [21.0, 24.0] | [213, 260] |
p02688 | u706121438 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int, input().split())\nsnk = [-1] * (n + 1)\nans = 0\nfor j in range(k):\n\td = int(input())\n\tlis = list(input().split())\n\tfor i in range(d):\n\t\ty = int(lis[i])\n\t\tsnk[y] = 0\nfor j in range(n):\n if snk[j] == -1:\n ans += 1\nprint(ans)', 'n, k = map(int, input().split())\nsnk = [-1] * (n + 1)\nfor j in range(k):\n\td = input()\n\tlist = map(int, input().split())\n for i in range(d):\n snk[list[i]] = 0\nfor j in range(n):\n if snk[j] == -1:\n ans += 1\nprint(ans)\n', 'n, k = map(int, input().split())\nsnk = [-1] * (n + 1)\nfor j in range(k):\n\td = input()\n\tlist = map(int, input().split())\n for i in range(d):\n snk[list[i]] = 0\nfor j in range(n):\n if snk[j + 1] == -1:\n ans += 1\nprint(ans)', 'n, k = map(int, input().split())\nsnk = [-1] * (n+1)\nans = 0\nfor j in range(k):\n\td = int(input())\n\tlis = list(input().split())\n\tfor i in range(d):\n\t\ty = int(lis[i])\n\t\tsnk[y] = 0\nfor j in range(n):\n if snk[j+1] == -1:\n ans += 1\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s527582818', 's531980295', 's731228498', 's299843174'] | [9128.0, 8856.0, 8908.0, 9220.0] | [23.0, 25.0, 20.0, 23.0] | [246, 236, 239, 246] |
p02688 | u707030679 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k =map(int,input().split())\n\nD=[]\nA=[]\nC=[]\nfor i in range(k):\n D.append(int(input()))\n A.append(list(map(int,input().split())))\nfor i in range(1,n+1):\n C.append(int(i))\n\nfor i in range(k-1):\n for a in A[i]:\n if C.count(a)!=0:\n C.remove(a)\n \nprint( C, len(C) )\n\n', 'n,k =map(int,input().split())\n\nD=[]\nA=[]\nC=[]\nfor i in range(k):\n D.append(int(input()))\n A.append(list(map(int,input().split())))\nfor i in range(1,n+1):\n C.append(int(i))\n\nfor i in range(k):\n for a in A[i]:\n if C.count(a)!=0:\n C.remove(a)\n \nprint( len(C) )\n\n'] | ['Wrong Answer', 'Accepted'] | ['s541586668', 's578987949'] | [9092.0, 8948.0] | [27.0, 28.0] | [301, 296] |
p02688 | u713165870 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['if __name__ == "__main__":\n str_N_K = input()\n \n list_N_K = str_N_K.split(\' \')\n N = int(list_N_K[0])\n K = int(list_N_K[1])\n \n list_person = [0] * N\n \n for i in range(K):\n d = int(input())\n str_persons = input()\n if (" " in str_persons):\n list_str_persons = str_persons.split(" ")\n else:\n list_str_persons = [str_persons]\n \n for str_person in list_str_persons:\n int_person = int(str_person)\n list_person[int_person] += 1\n \n output = 0\n for person in list_person:\n if person == 0:\n output += 1\n \n print(output)\n \n \n \n', 'if __name__ == "__main__":\n str_N_K = input()\n \n list_N_K = str_N_K.split(\' \')\n N = int(list_N_K[0])\n K = int(list_N_K[1])\n \n list_person = [0] * N\n \n for i in range(K):\n d = int(input())\n str_persons = input()\n if " " in str_persons:\n list_str_persons = list_str_persons.split(" ")\n else:\n list_str_persons = list_str_persons\n \n for str_person in list_str_persons:\n int_person = int(str_person)\n list_person[int_person] += 1\n \n output = 0\n for person in list_person:\n if person == 0:\n output += 1\n \n print(output)\n \n \n \n', 'if __name__ == "__main__":\n str_N_K = input()\n list_N_K = str_N_K.split(\' \')\n N = int(list_N_K[0])\n K = int(list_N_K[1])\n \n list_person = [0] * N\n \n for i in range(K):\n d = int(input())\n str_persons = input()\n list_str_persons = str_persons.split(" ")\n for str_person in list_str_persons:\n int_person = int(str_person)\n list_person[int_person] += 1\n \n output = 0\n for person in list_person:\n if person == 0:\n output += 1\n \n print(output)\n \n \n ', 'if __name__ == "__main__":\n str_N_K = input()\n \n list_N_K = str_N_K.split(\' \')\n N = int(list_N_K[0])\n K = int(list_N_K[1])\n \n list_person = [0] * N\n \n for i in range(K):\n d = int(input())\n str_persons = input()\n if (" " in str_persons):\n list_str_persons = list_str_persons.split(" ")\n else:\n list_str_persons = list_str_persons\n \n for str_person in list_str_persons:\n int_person = int(str_person)\n list_person[int_person] += 1\n \n output = 0\n for person in list_person:\n if person == 0:\n output += 1\n \n print(output)\n \n \n \n', 'if __name__ == "__main__":\n str_N_K = input()\n \n list_N_K = str_N_K.split(\' \')\n N = int(list_N_K[0])\n K = int(list_N_K[1])\n \n list_person = [0] * N\n \n for _ in range(K):\n d = int(input())\n str_persons = input()\n if (" " in str_persons):\n list_str_persons = str_persons.split(" ")\n else:\n list_str_persons = [str_persons]\n \n for str_person in list_str_persons:\n int_person = int(str_person)\n list_person[int_person-1] += 1\n \n output = 0\n for person in list_person:\n if person == 0:\n output += 1\n \n print(output)\n \n \n \n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s201296139', 's356939948', 's474871135', 's964323690', 's762269700'] | [9220.0, 9196.0, 9176.0, 9224.0, 9140.0] | [20.0, 23.0, 23.0, 23.0, 24.0] | [586, 592, 495, 594, 588] |
p02688 | u717695824 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int, input().split())\nlist = []\nfor p in range(k):\n m = int(input())\n k_list = list(map(int, input().split()))\n for q in k_list:\n if not q in list:\n list.append(q)\nk_l = len(k_list)\nprint(n-k_l)', 'n, k = map(int, input().split())\nlist = []\nfor p in range(k):\n d = int(input())\n k_list = [int(x) for x in input().split()]\n m = len(k_list)\n for q in k_list:\n if not q in list:\n list.append(q)\nl = len(list)\nprint(n - l)'] | ['Runtime Error', 'Accepted'] | ['s676716863', 's534564525'] | [9184.0, 9188.0] | [20.0, 25.0] | [216, 232] |
p02688 | u718270795 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['import itertools\nN, K = map(int, input().split())\nd_list = []\nA = []\na_set = set()\nal_set = {i for i in range(N)}\nfor i in range(K):\n d_list.append(int(input()))\n A.append(list(map(int, input().split())))\nfor i in itertools.chain.from_iterable(A):\n a_set.add(i)\nprint(len(al_set - a_set))', 'import itertools\nN, K = map(int, input().split())\nd_list = []\nA = []\na_set = set()\nal_set = {i for i in range(1, N+1)}\nfor i in range(K):\n d_list.append(int(input()))\n A.append(list(map(int, input().split())))\nfor i in itertools.chain.from_iterable(A):\n a_set.add(i)\nprint(len(al_set - a_set))'] | ['Wrong Answer', 'Accepted'] | ['s107468901', 's152502887'] | [9236.0, 9216.0] | [21.0, 22.0] | [297, 302] |
p02688 | u718765445 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nS = [input().split() for _ in range(N+K-1)]\nnew_list = []; count = 1\nwhile count < 2*K:\n for i in new_list[count]:\n new_list.append(i)\n count += 2\nnew_list = set(new_list)\nprint(N - len(new_list))', 'N, K = map(int, input().split())\nS = [input().split() for _ in range(K*2)]\nnew_list = []\nfor i in range(5):\n S.append([])\nS.append([])\nfor i in range(1,len(S)-2,2):\n for j in S[i]:\n new_list.append(j)\n\nnew_list = set(new_list)\nprint(N - len(new_list))\n'] | ['Runtime Error', 'Accepted'] | ['s099689037', 's527777169'] | [9528.0, 9352.0] | [24.0, 22.0] | [242, 265] |
p02688 | u723345499 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int, input().split())\n\nN = list(range(1,n +1))\nfor i in range(k):\n d = int(input())\n a = list(map(int, input().split()))\n for p in a:\n try:\n if N.index(p):\n N[N.index(p)] = 0\n except:\n pass\n\ncnt = 0 \nfor q in N:\n if q != 0:\n cnt += 1\nprint(cnt)', 'n, k = map(int, input().split())\n\nN = list(range(1,n +1))\nfor i in range(k):\n d = int(input())\n a = list(map(int, input().split()))\n for p in a:\n N[p - 1] = 0\n\ncnt = 0 \nfor q in N:\n if q != 0:\n cnt += 1\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s303195106', 's574397926'] | [9064.0, 9140.0] | [34.0, 21.0] | [344, 258] |
p02688 | u726823037 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['import sys\ndef Ii():return int(sys.stdin.buffer.readline())\ndef Mi():return map(int,sys.stdin.buffer.readline().split())\ndef Li():return list(map(int,sys.stdin.buffer.readline().split()))\n\nn,k = Mi()\nb = [1]*n\nfor i in range(k):\n d = Ii()\n a = Li()\n for j in a:\n b[j] = 0\n \nprint(sum(b)-1)', 'import sys\ndef Ii():return int(sys.stdin.buffer.readline())\ndef Mi():return map(int,sys.stdin.buffer.readline().split())\ndef Li():return list(map(int,sys.stdin.buffer.readline().split()))\n \nn,k = Mi()\nb = [1]*(n+1)\nfor i in range(k):\n d = Ii()\n a = Li()\n for j in a:\n b[j] = 0\n \nprint(sum(b)-1)'] | ['Runtime Error', 'Accepted'] | ['s047405286', 's149445503'] | [9236.0, 9184.0] | [28.0, 26.0] | [298, 303] |
p02688 | u727051308 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K = map(int,input().split())\nA = [1]*N\nimport collections\nfor i in range(K):\n d = int(input())\n check = input().split()\n for j in range(d):\n if A[int(check[j])-1] == 1:\n A[int(check[j])-1] = 0\nc = collections.Counter(A)\nprint(c[0])', 'N,K = map(int,input().split())\nA = [1]*N\nimport collections\nfor i in range(K):\n d = int(input())\n check = input().split()\n for j in range(d):\n if A[int(check[j])-1] == 1:\n A[int(check[j])-1] = 0\nc = collections.Counter(A)\nprint(c[1])'] | ['Wrong Answer', 'Accepted'] | ['s963699457', 's375152182'] | [9468.0, 9460.0] | [25.0, 25.0] | [244, 244] |
p02688 | u729008627 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\nL = [1 for i in range(N)]\nfor k in range(K):\n d = int(input())\n A = list(map(int, input().spit()))\n for i in range(d):\n L[A[i] - 1] = 0\nprint(sum(L))', 'N, K = map(int, input().split())\nL = [1 for i in range(N)]\nfor k in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n for i in range(d):\n L[A[i] - 1] = 0\nprint(sum(L))'] | ['Runtime Error', 'Accepted'] | ['s851006410', 's805036130'] | [9072.0, 9108.0] | [23.0, 24.0] | [188, 189] |
p02688 | u729600565 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = list(map(int, input().split()))\nd=[0] * K\nA=[0] * K\nokashi_sunuke = list()\nfor i in range(K):\n d[i] = int(input())\n A[i] = list(map(int, input().split()))\n okashi_sunuke += A[i]\n\nsunuke = 0\nfor i in range(N):\n if i in okashi_sunuke:\n sunuke +=1\n\nprint(N-sunuke)\n\n\n\n\n', 'N, K = list(map(int, input().split()))\nd=[0] * K\nA=[0] * K\nokashi_sunuke = list()\nfor i in range(K):\n d[i] = int(input())\n A[i] = list(map(int, input().split()))\n okashi_sunuke += A[i]\n\nsunuke = 0\nfor i in range(1,N+1):\n if i in okashi_sunuke:\n sunuke +=1\n\nprint(N-sunuke)\n\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s726505649', 's601528821'] | [9192.0, 9184.0] | [21.0, 24.0] | [292, 296] |
p02688 | u730807152 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n, k = map(int,input().split())\nA = []\nN = []\n\nN = set(range(1,n+1))\n\nfor i in range(1,k+1):\n d = int(input())\n a=set(map(int,input().split()))\n A += a\n\nans = list(N-A)\n\nprint(len(ans))', 'n, k = map(int,input().split())\nA = []\nN = []\n\nN = list(range(1,n+1))\n\nfor i in range(1,k+1):\n d = int(input())\n a=set(map(int,input().split()))\n A += a\n\nans = list(set(N)-set(A))\n\nprint(len(ans))'] | ['Runtime Error', 'Accepted'] | ['s489121526', 's917102863'] | [9160.0, 9180.0] | [28.0, 31.0] | [194, 205] |
p02688 | u731362892 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k=map(int,input().split())\t\nx=[list(map(int, input().split())) for i in range(2*k)]\nans=[range(1,n+1)]\nnum=[]\nprint(x)\nmany=x[0:2*k:2]\ncookie=x[1:2*k:2]\nprint(many)\nprint(cookie)\nfor y in range(len(cookie)):\n for z in range(len(cookie[y])):\n num.append(cookie[y][z])\nQ=set(num)\nW=list(Q)\nprint(n-len(W))', 'n,k=map(int,input().split())\t\nx=[list(map(int, input().split())) for i in range(2*k)]\nans=[range(1,n+1)]\nnum=[]\nmany=x[0:2*k:2]\ncookie=x[1:2*k:2]\nfor y in range(len(cookie)):\n for z in range(len(cookie[y])):\n num.append(cookie[y][z])\nQ=set(num)\nW=list(Q)\nprint(n-len(W))'] | ['Wrong Answer', 'Accepted'] | ['s612007875', 's650550908'] | [9172.0, 9236.0] | [24.0, 24.0] | [315, 280] |
p02688 | u734936991 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['(n, k) = [int(s) for s in input().split()]\n\ndata = arr = [[0 for i in range(k + 1)] for j in range(n + 1)]\n\nfor i in range(0, k):\n d = int(input())\n a = [int(s) for s in input().split()]\n\n for m in a:\n data[m - 1][d - 1] = 1\n\ndd = []\n\nfor d in data:\n dd.append(sum(d))\n\nans = 0\n\nfor ddd in dd:\n if ddd == 0:\n ans += 1\n\nprint(ans)\n\n', '(n, k) = [int(s) for s in input().split()]\n\ndata = [[0 for i in range(k)] for j in range(n)]\n\nfor i in range(0, k):\n d = int(input())\n a = [int(s) for s in input().split()]\n\n for m in a:\n data[m - 1][d - 1] = 1\n\ndd = []\n\n\n\nans = 0\n\nfor ddd in dd:\n if ddd == 0:\n ans += 1\n\nprint(ans)\n\n', '(n, k) = [int(s) for s in input().split()]\n\ndata = [[0 for i in range(k)] for j in range(n)]\n\nfor i in range(0, k):\n d = int(input())\n a = [int(s) for s in input().split()]\n\n for m in a:\n data[m - 1][i] = 1\n\ndd = []\n\nfor d in data:\n dd.append(sum(d))\n\nans = 0\n\nfor ddd in dd:\n if ddd == 0:\n ans += 1\n\nprint(ans)\n\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s535381197', 's589461691', 's741239927'] | [9208.0, 9200.0, 9240.0] | [21.0, 22.0, 24.0] | [360, 310, 342] |
p02688 | u737135713 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k = map(int,input().split())\n\nz = 0\nl = [0]\nfor i in range(k):\n d=int(input())\n s =list(map(int,input().split()))\n l.extend(s)\n \nprint(l)\nfor i in range(n+1):\n if l.count(i)==0:\n z = z + 1\nprint(z)', 'n,k = map(int,input().split())\n\nz = 0\nl = [0]\nfor i in range(k):\n d=int(input())\n s =list(map(int,input().split()))\n l.extend(s)\nfor i in range(n+1):\n if l.count(i)==0:\n z = z + 1\nprint(z)'] | ['Wrong Answer', 'Accepted'] | ['s409711858', 's352593174'] | [9188.0, 9180.0] | [33.0, 34.0] | [207, 195] |
p02688 | u740157634 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = map(int, input().split())\na = [0]*n\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n for l in A:\n a[l-1] = 1\nprint(a.count(0))\n', 'N, K = map(int, input().split())\na = [0]*n\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n A.sort()\n for l in A:\n a[l-1] = 1\nprint(a.count(0))\n', 'N, K = map(int, input().split())\na = [0]*n\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n A.sort()\n for l in L:\n a[l-1] = 1\nprint(a.count(0))\n', 'N, K = map(int, input().split())\na = [0]*N\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n for l in A:\n a[l-1] = 1\nprint(a.count(0))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s077230264', 's172421975', 's724374288', 's013222153'] | [9156.0, 9108.0, 8904.0, 9116.0] | [22.0, 23.0, 23.0, 30.0] | [176, 189, 189, 176] |
p02688 | u741282728 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N, K = input().split(" ")\n\nd_num = int(input())\n\nokasi_nasi = set()\nfor i in range(d_num):\n okasi_nasi = okasi_nasi | input().split(" ")\n\nprint(len(okasi_nasi))', 'N, K = input().split(" ")\n\nokasi_nasi = set()\nfor i in range(int(K)*2):\n buf = input()\n if i % 2 == 1:\n if buf[0] != "":\n okasi_nasi = okasi_nasi | set(buf.split(" "))\n\nprint(int(N) - len(okasi_nasi))\n'] | ['Runtime Error', 'Accepted'] | ['s890901068', 's030596186'] | [9176.0, 9176.0] | [21.0, 22.0] | [163, 225] |
p02688 | u746154235 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K = map(int, input().split())\narr1=[]\narr=[]\nfor i in range(1, N+1):\n arr1.append(i)\n\nfor i in range(K*2):\n A=list(map(int, input().split()))\n if i%2!=0:\n arr = arr+A\nprint(list(set(arr1) - set(arr)))\n', 'N,K = map(int, input().split())\nsunukes = [1 for _ in range(K)]\narr=[]\nfor _ in range(K):\n d = input()\n A=list(map(int, input().split()))\n arr = arr+A\nprint(len(list(set(sunukes) - set(arr))))\n', 'N,K = map(int, input().split())\n\narr=[]\narr1=[]\nfor i in range(1, N+1):\n arr1.append(i)\n\nfor i in range(K):\n d=input()\n A=list(map(int, input().split()))\n arr = arr+A\nprint(len(set(arr1) - set(arr)))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s697508852', 's924318990', 's513955756'] | [9220.0, 9172.0, 9284.0] | [22.0, 24.0, 23.0] | [209, 196, 203] |
p02688 | u749416810 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['n,k=map(int,input().split())\nD=[0]*n\nfor i in range(k):\n a=list(map(int,input().split()))\n for i in range(len(a)):\n D[a[i]-1]+=1\nres=0\nfor i in range(n):\n if not D[i]:\n res+=1\nprint(res)', 'n,k=map(int,input().split())\nD=[0]*n\nfor i in range(k):\n a=list(map(int,input().split()))\n for j in range(len(a)):\n D[a[j]-1]+=1\nres=0\nfor i in range(n):\n if not D[i]:\n res+=1\nprint(res)\n', 'n,k=map(int,input().split())\nD=[0]*n\nfor i in range(k):\n d=int(input())\n a=list(map(int,input().split()))\n for j in range(d):\n D[a[j]-1]+=1\nres=0\nfor i in range(n):\n if not D[i]:\n res+=1\nprint(res)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s356568444', 's793142446', 's324158933'] | [9192.0, 9180.0, 9060.0] | [22.0, 23.0, 27.0] | [195, 196, 208] |
p02688 | u753854665 | 2,000 | 1,048,576 | N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town. There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}. Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief? | ['N,K= map(int,input().split())\nlist1 = []\n\nfor i in range(1,N+1):\n list1.append(i)\n\n\n\nfor j in range(K):\n d =int(input())\n lista = list(map(int,input().split()))\n for l in list1:\n for h in lista:\n if (l==h):\n list1.remove(l)\n\n[print(m)for m in list1]', 'N,K= map(int,input().split())\nlist1 = []\n\nfor i in range(1,N+1):\n list1.append(i)\n\nfor j in range(K):\n d =int(input())\n lista = list(map(int,input().split()))\n for l in lista:\n for h in list1:\n if (l==h):\n list1.remove(h)\n\nprint(len(list1))'] | ['Wrong Answer', 'Accepted'] | ['s554977728', 's540437370'] | [9192.0, 9024.0] | [23.0, 24.0] | [294, 285] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.