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
u759412327
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()\n\nfor n in range(N):\n input()\n S|=set(input().split())\n\nprint(N-len(S))', 'N,K = map(int,input().split())\nS = set()\n\nfor n in range(N):\n\tinput()\n\tS|=set(input().split())\n\nprint(N-len(S))', 'N,K = map(int,input().split())\nS = set()\n\nfor k in range(K):\n input()\n S|=set(input().split())\n\nprint(N-len(S))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s590449885', 's664521982', 's303602152']
[9128.0, 9064.0, 9148.0]
[23.0, 20.0, 32.0]
[113, 111, 113]
p02688
u759884285
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())\nlistX=[]\n\nwhile K>0:\n dk=int(input())\n listk=input().split()\n listX=listX+listk\n K=K-1\n\nlistN=list(range(N+1))\nlistZ=list(set(listN)-set(listX))\nL=str(len(listZ))\nprint(L)\n', 'N,K=map(int,input().split())\nlistX=list()\n\nwhile K>0:\n dk=int(input())\n listk=input().split()\n listX.extend(listk)\n K=K-1\n\nlistX=[int(s) for s in listX]\nlistN=list(range(N))\nlistN.append(N)\nlistN.remove(0)\nlistZ=list(set(listN)-set(listX))\n\nL=str(len(listZ))\nprint(L)\n']
['Wrong Answer', 'Accepted']
['s588288405', 's028769186']
[9636.0, 9516.0]
[23.0, 24.0]
[213, 280]
p02688
u760256928
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 = []\nA = []\nB = set()\nfor i in range(K):\n _d = int(input())\n _A = list(map(int, input().split()))\n d.append(_d)\n A.append(_A)\n _B = set(_A)\n B = B | _B\nprint(B)\nprint(N - len(B))', 'N, K = list(map(int, input().split()))\nd = []\nA = []\nB = set()\nfor i in range(K):\n _d = int(input())\n _A = list(map(int, input().split()))\n d.append(_d)\n A.append(_A)\n _B = set(_A)\n B = B | _B\nprint(N - len(B))']
['Wrong Answer', 'Accepted']
['s916082519', 's777603467']
[9204.0, 9076.0]
[20.0, 25.0]
[237, 228]
p02688
u763249708
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\nsnk = [False] * n\n\nfor i in range(k):\n d = int(input())\n a = list(map(int, input().split()))\n \n for i+1 in a:\n snk[i] = True\n \nprint(snk.count(False))', 'n, k = map(int, input().split())\n\n\nsnk = [False]*n\n\nfor i in range(k):\n d = int(input())\n a = list(map(int, input().split()))\n \n for i in a:\n snk[i-1] = True\n\nprint(snk.count(False))']
['Runtime Error', 'Accepted']
['s696179892', 's620901039']
[9052.0, 9184.0]
[24.0, 22.0]
[203, 201]
p02688
u764401543
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\ns = set([i for i in range(1, N+1)])\nprint(s)\nrs = set()\n\nfor i in range(K):\n d.append(int(input()))\n A.append(list(map(int, input().split())))\n\nfor i in range(K):\n for a in A:\n for j in a:\n rs.add(j)\n\nfor i in rs:\n s.remove(i)\n\nprint(len(s))', 'N, K = map(int, input().split())\nd = []\nA = []\n\ns = set([i for i in range(1, N+1)])\nrs = set()\n\nfor i in range(K):\n d.append(int(input()))\n A.append(list(map(int, input().split())))\n\nfor i in range(K):\n for a in A:\n for j in a:\n rs.add(j)\n\nfor i in rs:\n s.remove(i)\n\nprint(len(s))']
['Wrong Answer', 'Accepted']
['s319817389', 's469167683']
[9312.0, 9184.0]
[94.0, 95.0]
[319, 310]
p02688
u766565683
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\na = []\n\ns = 0\nfor i in range(k):\n d = int(input())\n array = list(map(int, input().strip().split()))\n a.append(array)\nfor j in range(1, n):\n if k not in a:\n s += 1\nprint(s) \n', 'n, k = map(int, input().split())\n\narray = []\n\ns = 0\nfor i in range(k):\n d = int(input())\n array += list(map(int, input().strip().split()))\n\narray = set(array)\n\nfor j in range(1,n+1):\n if j not in array:\n s += 1\nprint(s) \n']
['Wrong Answer', 'Accepted']
['s461158908', 's198759397']
[9180.0, 9152.0]
[22.0, 23.0]
[215, 228]
p02688
u768256617
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\nlist_n=[]\nfor i in range(1,N+1):\n list_n.append(i)\n \nt=[]\nfor i in range(K):\n d=int(input())\n s=list(map(int,input().split()))\n t+=s\n \ns=set(t)\ns.sort()\n\ncnt=0\nfor i in list_n:\n if i not in s:\n cnt+=1\n \nprint(cnt)', 'N,K=map(int,input().split())\n\nlist_n=[]\nfor i in range(1,N+1):\n list_n.append(i)\n \nt=[]\nfor i in range(K):\n d=int(input())\n s=list(map(int,input().split()))\n t+=s\n \ns=list(set(t))\ns.sort()\n\ncnt=0\nfor i in list_n:\n if i not in s:\n cnt+=1\n \nprint(cnt)']
['Runtime Error', 'Accepted']
['s402341091', 's649883877']
[9204.0, 9200.0]
[21.0, 23.0]
[278, 284]
p02688
u769620184
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?
['first_line = list(map(int, input().split()))\nN = first_line[0]\nK = first_line[1]\nrest = list(range(1, N+1))\nfor i in range(K):\n d = int(input())\n given = list(map(int, input().split()))\n for j in range(1, N+1):\n if j in given and j in rest:\n print(j)\n rest.remove(j)\n\nprint(len(rest))', 'first_line = list(map(int, input().split()))\nN = first_line[0]\nK = first_line[1]\nrest = list(range(1, N+1))\nfor i in range(K):\n d = int(input())\n given = list(map(int, input().split()))\n for j in range(1, N+1):\n if j in given and j in rest:\n rest.remove(j)\n\nprint(len(rest))\n']
['Wrong Answer', 'Accepted']
['s862720554', 's265589406']
[9204.0, 9212.0]
[24.0, 26.0]
[300, 286]
p02688
u770558697
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())\ndata = []\nfor _ in range(k):\n d = int(input())\n data.extend(list(map(int,input().split())))\n\nprint(data)\nprint(n-len(set(data)))', 'n, k = map(int,input().split())\ndata = []\nfor _ in range(k):\n d = int(input())\n data.extend(list(map(int,input().split())))\n\nprint(n-len(set(data)))']
['Wrong Answer', 'Accepted']
['s751489756', 's014195963']
[9204.0, 9184.0]
[23.0, 21.0]
[166, 154]
p02688
u771710924
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 = []\nfrom collections import defaultdict as dd\ndc = dd(lambda : 0)\nfor i in range(k):\n d = int(input())\n a = list(map(int , input().split()))\n for i in a:\n dc[i] += 1\ncnt = 0\nfor i in range(1 , n + 1):\n if d[i] == 0:\n cnt += 1\nprint(cnt)\n ', 'n,k = map(int , input().split())\na = []\nfrom collections import defaultdict as dd\ndc = dd(lambda : 0)\nfor i in range(k):\n d = int(input())\n a = list(map(int , input().split()))\n for i in a:\n dc[i] += 1\ncnt = 0\nfor i in range(1 , n + 1):\n if dc[i] == 0:\n cnt += 1\nprint(cnt)']
['Runtime Error', 'Accepted']
['s836405394', 's108714629']
[9384.0, 9504.0]
[23.0, 25.0]
[292, 283]
p02688
u772029934
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())\nli_ = []\nfor i in range(K):\n d = int(input())\n li_ += list(map(int,input().split()))\n print(li_)\nprint(N -len(set(li_)))\n', 'N, K = map(int,input().split())\nli_ = []\nfor i in range(K):\n d = int(input())\n li_ += list(map(int,input().split()))\nprint(N -len(set(li_)))\n']
['Wrong Answer', 'Accepted']
['s840252243', 's538219141']
[9220.0, 9176.0]
[57.0, 21.0]
[162, 147]
p02688
u773440446
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 = []\nans = 0\nfor i in range(k):\n d = int(input())\n A = list(map(int,input().split()))\n for i in range(d):\n s.append(A[i])\n \nfor i in range(k+1):\n if s.count(i+1) == 0:\n ans += 1\n \nprint(ans-1)', 'n,k = map(int,input().split())\ns = []\nans = 0\nfor i in range(K):\n d = int(input())\n A = list(map(int,input().split()))\n for i in range(d):\n s.append(A[i])\n \nfor i in range(K):\n if s.count(i) == 0:\n ans += 1\n \nprint(ans)\n ', 'n,k = map(int,input().split())\ns = []\nans = 0\nfor i in range(k):\n d = int(input())\n A = list(map(int,input().split()))\n for i in range(d):\n s.append(A[i])\nprint(s)\nfor i in range(n+1):\n if s.count(i) == 0:\n ans += 1\n \nprint(ans-1)', 'n,k = map(int,input().split())\ns = []\nans = 0\nfor i in range(k):\n d = int(input())\n A = list(map(int,input().split()))\n for i in range(d):\n s.append(A[i])\n\nfor i in range(n+1):\n if s.count(i) == 0:\n ans += 1\n \nprint(ans-1)']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s296286080', 's315243380', 's572332733', 's030042448']
[9148.0, 9084.0, 9196.0, 9160.0]
[33.0, 24.0, 35.0, 31.0]
[239, 238, 243, 235]
p02688
u779728630
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\nL = [0 for i in range(N+1)]\n\nfor i in range(K):\n d = int(input())\n for j in range(d):\n s = int(input())\n L[s] += 1\n\nans = 0\nfor i in range(1,N+1):\n if L[i] == 0:\n ans += 1\nprint(ans)', 'N, K = map(int, input().split())\n\nL = [0 for i in range(N+1)]\n\nfor i in range(K):\n d = int(input())\n LL = list(map(int, input().split()))\n for j in range( len(LL) ):\n L[ LL[j] ] += 1\n\nans = 0\nfor i in range(1,N+1):\n if L[i] == 0:\n ans += 1\nprint(ans)']
['Runtime Error', 'Accepted']
['s070605891', 's757855293']
[9188.0, 9200.0]
[21.0, 22.0]
[228, 260]
p02688
u782785740
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(x) for x in input().split())\nall = set(map(lambda a: a+1,range(N)))\nfor i in range(K):\n\td = input()\n\tAi = set(int(x) for x in input().split())\n\tall -= Ai\n\tprint(Ai)\nprint(len(all))', 'N,K = (int(x) for x in input().split())\nall = set(map(lambda a: a+1,range(N)))\nfor i in range(K):\n\td = input()\n\tAi = set(int(x) for x in input().split())\n\tall -= Ai\n\t\nprint(len(all))']
['Wrong Answer', 'Accepted']
['s527941977', 's993259935']
[9168.0, 9192.0]
[22.0, 22.0]
[191, 182]
p02688
u785618718
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?
['a,b = map(int, input().split())\n\np = [1]*a\n\nwhile True:\n if !input():\n break\n c = input().split()\n for d in c:\n p[d]=0\n\nprint(sum(p))', 'a,b = map(int, input().split())\n \np = [1]*a\n \nwhile True:\n try:\n input()\n except EOFError:\n break\n c = input().split()\n for d in c:\n p[int(d)]=0\n \nprint(sum(p))', 'a,b = map(int, input().split())\n \np = [1]*a\n \nwhile True:\n try:\n input()\n except EOFError:\n break\n c = input().split()\n for d in c:\n p[int(d)-1]=0\n \nprint(sum(p))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s331510365', 's638357903', 's165528526']
[8912.0, 9196.0, 9184.0]
[22.0, 26.0, 22.0]
[142, 173, 175]
p02688
u793225228
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 Qb():\n n, k = map(int, input().split())\n ans = set()\n for v in range(k):\n d = int(input())\n ans.add(tuple(int(v) for v in input().split()))\n print(f'{d=}')\n print(f'{ans=}')\n print(n - len(ans))\n\n\nif __name__ == '__main__':\n Qb()\n", "def Qb():\n n, k = map(int, input().split())\n ans = set()\n for v in range(k):\n d = int(input())\n ns = [int(v) for v in input().split()]\n for N in ns:\n ans.add(N)\n print(n - len(ans))\n\n\nif __name__ == '__main__':\n Qb()\n"]
['Wrong Answer', 'Accepted']
['s116814965', 's178317704']
[9240.0, 9092.0]
[39.0, 33.0]
[277, 264]
p02688
u799428010
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())\nhas = set()\nfor _ in range(K):\n d = int(input())\n has = set(map(int, input().split()))\nprint(N - len(has))', 'N, K = map(int, input().split())\nfor i in range(K):\n d = int(input())\n A=list(map(int, input().split()))\nprint(N - len(A))', 'N , K = map(int, input().split())\nhas = set()\nfor _ in range(K):\n d = int(input())\n has |= set(map(int, input().split()))\nprint(N - len(has))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s779305814', 's852392409', 's806984122']
[9204.0, 9068.0, 9140.0]
[26.0, 25.0, 26.0]
[146, 124, 147]
p02688
u802662134
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())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(map(int,(input().split()))\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'n,k = map(int,input().split())\ny = 0\n\nsunuke=[]\nfor i range(1,n):\n sunuke.append(i)\n\n\nfor j range(1,k):\n ka = input()\n for l range(ka):\n x = input()\n sunuke[x - 1] = -1\n\n\nfor m range(0,n-1):\n if sunuke[m] != -1:\n y += 1\n \nprint(y)', 'N,K = map(int,input().split())\n \nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(int,input().split())\n for i in range(a):\n P[b[i]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[l] == 0:\n m += 1\n \nprint(m)', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(map(int,(input().split()))\n for j in range(a):\n P[b[j]-1] = 1\nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(map(int,(input().split()))\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'N,K = map(int,input().split())\n \nP = [0 for i in range(N)]\nm = 0\nfor i in range(K):\n a = int(input())\n b = list(int,input().split())\n for j in range(a):\n P[b[j]-1] = 1\n j += 1\n \nfor l in range(N):\n if P[l] == 0:\n m += 1\n \nprint(m)\n', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(input().split())\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(input().split())\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'N,K = map(int,input().split())\n \nP = [0 for i in range(N)]\nm = 0\nfor i in range(K):\n a = int(input())\n b = list(int,input().split())\n for j in range(a):\n P[b[j]-1] = 1\n j += 1\n \nfor l in range(N):\n if P[l] == 0:\n m += 1\n \npeint(m)', 'N,K = map(int,input().split())\n\nP = [0]*N\nm = 0\nfor i in range(K):\n a = int(input())\n b = list(int,input().split())\n for j in range(a):\n P[b[j]-1] = 1\n j += 1\n \nfor l in range(N):\n if P[l] == 1:\n m += 1\n \npeint(m)\n \n', 'n,k = map(int,input().split())\ny = 0\n\nsunuke=[]\nfor i in range(1,n):\n sunuke.append(i)\n\n\nfor j in range(1,k):\n ka = input()\n for l in range(ka):\n x = input()\n sunuke[x - 1] = -1\n\n\nfor m in range(0,n-1):\n if sunuke[m] != -1:\n y += 1\n \nprint(y)\n', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(map(int,(input().split()))\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(map(int,(input().split()))\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(map(int,input().split()))\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'n, k = map(int, input().split())\n \nmember = [0]*n\n \nfor i in range(k):\n d = int(input())\n \n for j in range(d):\n a = [int(x) for x in input().split()]\n member[a[j]-1] += 1\n \nprint(member.count(0))', 'N,K = map(int,input().split())\n \nP = [0]*N\nm = 0\nfor i in range(K):\n a = int(input())\n b = list(int,input().split())\n for j in range(a):\n P[b[j]-1] = 1\n j += 1\n \nprint(P.count(0))', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(map(int,(input().split()))\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(input().split())\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(input().split())\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'N,K = map(int,input().split())\nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(map(int,(input().split()))\n for j in range(a):\n P[b[j]-1] = 1\nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)', 'N,K = map(int,input().split())\n \nP = [0 for i in range(N)]\nfor i in range(K):\n a = int(input())\n b = list(int,input().split())\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\n \nprint(m)', 'N,K = map(int,input().split())\nP = [0] * N\nfor i in range(K):\n a = int(input())\n b = list(map(int,input().split()))\n for j in range(a):\n P[b[j]-1] = 1 \nm = 0 \nfor i in range(N):\n if P[i] == 0:\n m += 1\nprint(m)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s085655795', 's090025778', 's259926895', 's301597787', 's398675216', 's413193053', 's413952866', 's429859198', 's441898294', 's493497820', 's525868407', 's617924738', 's620121299', 's704162348', 's752476838', 's761616656', 's837485600', 's850289609', 's852550533', 's943661556', 's952159839', 's249630960']
[8968.0, 8900.0, 9176.0, 8972.0, 9048.0, 9092.0, 8888.0, 8976.0, 9124.0, 9188.0, 9076.0, 8984.0, 8980.0, 8964.0, 9168.0, 9168.0, 8856.0, 9136.0, 8988.0, 8976.0, 9148.0, 9124.0]
[23.0, 19.0, 25.0, 23.0, 24.0, 21.0, 25.0, 26.0, 22.0, 24.0, 22.0, 20.0, 24.0, 23.0, 25.0, 24.0, 19.0, 24.0, 24.0, 22.0, 21.0, 24.0]
[250, 303, 237, 251, 250, 250, 238, 234, 249, 238, 316, 250, 248, 247, 217, 191, 250, 217, 238, 251, 237, 235]
p02688
u806976856
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())\nx=[c for c in range(1,n+1)]\nfor i in range(1,k+1):\n d=int(input())\n s=input().split()\n for b in range(d):\n if int(s[b]) in x:\n x.remove(int(s_i[b]))\nprint(len(x))\n', 'n,k=map(int,input().split())\nx=[c for c in range(1,n+1)]\nfor i in range(1,k+1):\n d=int(input())\n s=input().split()\n for b in range(d):\n if int(s[b]) in x:\n x.remove(int(s[b]))\nprint(len(x))']
['Runtime Error', 'Accepted']
['s934193292', 's047734041']
[9124.0, 9196.0]
[19.0, 22.0]
[203, 200]
p02688
u809816772
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())\nsnuke = [0]*N\n\nfor i in range(K):\n d = int(input())\n a = list(map(int,input().split()))\n for j in range(d):\n snuke[a[j]] = 1\n\nprint(snuke.count(0))', 'N, K =map(int, input().split())\nsnuke = [0]*N\n\nfor i in range(K):\n d = int(input())\n a = list(map(int,input().split()))\n for j in range(d):\n snuke[a[j]-1] = 1\n\nprint(snuke.count(0))']
['Runtime Error', 'Accepted']
['s097324388', 's321439588']
[8972.0, 9128.0]
[23.0, 23.0]
[195, 197]
p02688
u809819902
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())\nkids = list()\nfor i in range(k):\n d = input()\n kids += list(map(int, input().split()))\nres = 0\nprint(kids)\nfor i in range(1,n+1):\n if i not in kids:\n res+= 1\nprint(res)', 'n, k = map(int, input().split())\nkids = list()\nfor i in range(k):\n d = input()\n kids += list(map(int, input().split()))\nres = 0\nfor i in range(1,n+1):\n if i not in kids:\n res+= 1\nprint(res)']
['Wrong Answer', 'Accepted']
['s864770621', 's356622180']
[9196.0, 8936.0]
[29.0, 28.0]
[217, 205]
p02688
u810778810
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\ndic={}\nfor i in range(K):\n d[i]=int(input())\n A[i]=input().split()\nfor j in range(K):\n if d[j]==1:\n if A[j][0] not in dic:\n dic[A[j][0]]=1\n if d[j]!=1:\n print(A[j])\n for k in range(d[j]):\n if A[j][k] not in dic:\n dic[A[j][k]]=1\nprint(dic)\nprint(N-len(dic))', 'N,K=map(int, input().split(" "))\nd=[0]*K\nA=[0]*K\ndic={}\nfor i in range(K):\n d[i]=int(input())\n A[i]=input().split()\nfor j in range(K):\n if d[j]==1:\n if A[j][0] not in dic:\n dic[A[j][0]]=1\n if d[j]!=1:\n for k in range(d[j]):\n if A[j][k] not in dic:\n dic[A[j][k]]=1\nprint(N-len(dic))']
['Wrong Answer', 'Accepted']
['s435805215', 's734146039']
[9452.0, 9324.0]
[21.0, 21.0]
[379, 348]
p02688
u811332826
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?
['total, kinds = map(int, input().split())\n\nl = [False]*total\nprint(list)\n\nfor i in range(kinds):\n non = input()\n people = list(map(int, input().split()))\n for j in range(len(people)) :\n l[people[j]-1] = True\n \nprint(l.count(False))', 'total, kinds = map(int, input().split())\n\nl = [False]*total\n\nfor i in range(kinds):\n non = input()\n people = list(map(int, input().split()))\n for j in range(len(people)) :\n l[people[j]-1] = True\n \nprint(l.count(False))']
['Wrong Answer', 'Accepted']
['s636853188', 's016463225']
[9024.0, 9120.0]
[25.0, 25.0]
[249, 237]
p02688
u811705223
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(input().split())\nn = nk[0]\nk = nk[1]\na = []\nc = 0\nfor i in range(k):\n d = int(input())\n b = list(input().split())\n a.extend(b)\nfor j in range(1,n+1):\n if j not in a:\n c = c+1\nprint(c)', 'nk = list(input().split())\nn = nk[0]\nk = nk[1]\na = []\nfor i in range(1,k+1):\n d = int(input())\n b = list(input().split())\n a.entend(b)\nc = 0\nfor j in range(1,n+1):\n if j not in a:\n c = c+1\nprint(c)\n ', 'nk = list(input().split())\nn = nk[0]\nk = nk[1]\na = []\nc = 0\nfor i in range(int(k)):\n d = int(input())\n b = list(input().split())\n a.extend(b)\nfor j in range(1,int(n)+1):\n if str(j) not in a:\n c = c+1\nprint(c)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s096355519', 's594640173', 's572793439']
[9124.0, 9120.0, 9592.0]
[23.0, 21.0, 23.0]
[200, 207, 215]
p02688
u812354010
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\nA=[]\n\nfor i range(K):\n d = int(input())\n A[i] = [int(x) for x in input().split()]\n\nprint(3)', 'N,K= map(int, input().split())\n\nA=[]\n\nfor i range(K)\n d = int(input())\n A[i] = [int(x) for x in input().split()]\n\nprint("A")', 'Sunuke=[]\n\nN, K = map(int, input().split()) \nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n\n Sunuke.extend(A)\n\nprint(N-(len(set(Sunuke))))\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s298793181', 's873497440', 's037781506']
[8956.0, 8948.0, 9172.0]
[25.0, 24.0, 29.0]
[129, 130, 176]
p02688
u821432765
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())\nhas_snack = [False]*N\n\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n for v in A:\n has_snack[v-1] = True\n\nprint(sum(has_snack))\n', 'N, K = map(int, input().split())\n\n\n\n\nhas_snack = set() \nfor i in range(K):\n d = int(input()) \n A = set(map(int, input().split())) \n has_snack |= A \n\n\nprint(N-len(has_snack))\n']
['Wrong Answer', 'Accepted']
['s244658480', 's692401261']
[9180.0, 9176.0]
[23.0, 19.0]
[205, 568]
p02688
u823585596
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()))\nh=[range(1,n+1)]\na=[]\nfor i in range(k):\n d=int(input())\n b=list(map(int,input().split()))\n a.append(*b)\nc=set(a)\nans=n-len(c)\nprint(ans)', 'N,K=list(map(int,input().split()))\nh=[]\nfor k in range(K):\n d_i=int(input())\n a=list(map(int,input().split()))\n for i in range(d_i):\n h.append(a[i])\nh2=set(h)\nans=N-len(h2)\nprint(ans)']
['Runtime Error', 'Accepted']
['s210783328', 's248796406']
[9196.0, 9184.0]
[22.0, 21.0]
[181, 199]
p02688
u826354810
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 check(human):\n sum = 0\n for i in human:\n if(i == 0):\n sum += 1\n return sum\n\ndef resolve():\n data = [int(i) for i in input().split()]\n \n human = [0 for i in range(data[0])]\n sweet = data[1]\n \n for i in range(sweet):\n mem = int(input())\n have = [int(j) for j in input().split()]\n \n for k in have:\n human[k-1] += 1\n \n print(check(human))', 'def check(human):\n sum = 0\n for i in human:\n if(i == 0):\n sum += 1\n return sum\n\ndef resolve():\n data = [int(i) for i in input().split()]\n \n human = [0 for i in range(data[0])]\n sweet = data[1]\n \n for i in range(sweet):\n mem = int(input())\n have = [int(j) for j in input().split()]\n \n for k in have:\n human[k-1] += 1\n \n print(check(human))\nresolve()']
['Wrong Answer', 'Accepted']
['s515754664', 's286194608']
[9132.0, 9208.0]
[24.0, 22.0]
[428, 438]
p02688
u827261928
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=[False for _ in range(N)]\nfor i in range(K):\n d=int(input())\n A=list(map(int,input().split()))\n for j in range(N):\n if l[j]==A[j]:\n l[j]=True\nprint(list.count(False)) ', 'N,K=map(int,input().split())\nl=[False for _ in range(N)]\nfor i in range(K):\n d=int(input())\n A=list(map(int,input().split()))\n for j in range(N):\n if l[i]==A[i]:\n l[i]=True\nprint(list.count(False))', 'N,K=map(int,input().split())\nl=[False for x in range(N)]\nfor i in range(K):\n d=int(input())\n A=list(map(int,input().split()))\n for j in A:\n l[j-1]=True\nprint(l.count(False)) ']
['Runtime Error', 'Runtime Error', 'Accepted']
['s780951448', 's789559942', 's406533536']
[9128.0, 9196.0, 9196.0]
[26.0, 26.0, 26.0]
[225, 224, 192]
p02688
u830162518
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())\nm=[]\nfor i in range(n):\n d=int(input())\n a=list(map(int,input().split()))\n for i in a:\n m=m.append(i)\nj=set(m)\nprint(n-len(j))\n \n ', 'N,K=map(int,input())\nB=[]\nfor i in range(K):\n D=int(input())\n A=list(map(int,input().split()))\n for j in A:\n B.append(j)\nprint(N-len(set(B)))', 'n,k=map(int,input().split())\nm=[]\nfor i in range(k):\n d=int(input())\n a=list(map(int,input().split()))\n for p in a:\n m.append(p)\nj=set(m)\nprint(n-len(j))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s548326474', 's789758957', 's645397004']
[9156.0, 9172.0, 9164.0]
[23.0, 22.0, 22.0]
[167, 147, 159]
p02688
u830588156
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 for j in range(100)]for i in range(100)]\nB = [0 for j in range(N)]\nS = 0\nfor i in range(K):\n d = int(input())\n A[i] = list(map(int,input().split()))\nfor i in range(100):\n for j in range(100):\n for k in range(N):\n if A[i][j] == k+1:\n B[k] = 1\nfor i in range(N):\n if B[i] != 1:\n S += 1\nprint (S)', 'N,K = map(int,input().split())\nA = [[0 for j in range(K)]for i in range(K)]\nB = [0 for j in range(N)]\nS = 0\nfor i in range(K):\n d = int(input())\n A[i] = list(map(int,input().split()))\nfor i in range(K):\n for j in range(len(A[i])):\n for k in range(N):\n if A[i][j] == k+1:\n B[k] = 1\nfor i in range(N):\n if B[i] != 1:\n S += 1\nprint (S)']
['Runtime Error', 'Accepted']
['s670766730', 's942723644']
[9224.0, 9084.0]
[118.0, 131.0]
[384, 384]
p02688
u830742419
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(ipt) for ipt in input().split(' ')]\n\nsunukekuns = [str(i) for i in range(N)]\n\nfor k in range(K):\n _ = input()\n sunukekun = input().split(' ')\n for (kun in sunukekun):\n if kun in sunukekuns:\n sunukekuns.remove(kun)\n\nprint(len(sunukekuns))\n", "N, K = input().split(' ')\n\nsunukekuns = [i for i in range(N)]\n\nfor k in range(K):\n _, sunukekun = input(), input().split(' ')\n for (kun in sunukekun):\n if kun in sunukekuns:\n sunukekuns.remove(kun)\n\nprint(len(sunukekuns))", "N, K = [int(ipt) for ipt in input().split(' ')]\n\nsunukekuns = [str(i) for i in range(N)]\n\nfor k in range(K):\n _ = input()\n sunukekun = input().split(' ')\n for kun in sunukekun:\n if kun in sunukekuns:\n sunukekuns.remove(kun)\n\nprint(len(sunukekuns))\n", "N, K = [int(ipt) for ipt in input().split(' ')]\n\nsunukekuns = [str(i+1) for i in range(N)]\n\nfor k in range(K):\n _ = input()\n sunukekun = input().split(' ')\n for kun in sunukekun:\n if kun in sunukekuns:\n sunukekuns.remove(kun)\n\nprint(len(sunukekuns))\n"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s107413246', 's689441382', 's870386624', 's130929934']
[9056.0, 8964.0, 9180.0, 9184.0]
[26.0, 23.0, 22.0, 24.0]
[261, 231, 259, 261]
p02688
u834983620
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?
['a ,b= map(int,input().split())\naaa = [list(map(int,input().split())) for i in range(b*2)]\n \ns = {i+1 for i in range(a)}\n\nfor i in range(1,a+1,2):\n for k in aaa[i]:\n for j in k:\n s.discard(j)\nprint(len(s))', 'a,b = map(int,input().split())\naaa = [list(map(int,input().split())) for i in range(b*2)]\n\nc = set()\ne = set([i for i in range(1,a+1)])\nfor i in range(1,len(aaa),2):\n for k in aaa[i]:\n e.discard(k)\n\nprint(len(e))']
['Runtime Error', 'Accepted']
['s606973965', 's899471060']
[9196.0, 9156.0]
[21.0, 23.0]
[225, 217]
p02688
u842388336
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 = [1]*n\nfor _ in range(b):\n _ = input()\n for i in range(list(map(int, input().split()))):\n n_list[i-1] = 0\nprint(sum(n_list))', 'n, k = map(int, input().split())\nn_list = [1]*n\nfor _ in range(k):\n _ = input()\n for i in range(list(map(int, input().split()))):\n n_list[i-1] = 0\nprint(sum(n_list))\n', 'n, k = map(int, input().split())\nn_list = [1]*n\nfor _ in range(k):\n _ = input()\n for i in list(map(int, input().split())):\n n_list[i-1] = 0\nprint(sum(n_list))\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s765212623', 's775298672', 's344748113']
[9180.0, 9024.0, 9128.0]
[31.0, 24.0, 28.0]
[170, 171, 164]
p02688
u843420912
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 = 0\nlistA = []\nfor k in range(1,K+1):\n d = int(input())\n listA += list(map(int,input().split()))\n \nfor n in range(1,N+1):\n if n in listA:\n c += 1\nprint(c) ', 'N,K = map(int,input().split())\nc = 0\nlistA = []\nfor k in range(1,K+1):\n d = int(input())\n listA += list(map(int,input().split()))\n \nfor n in range(1,N+1):\n if n not in listA:\n c += 1\nprint(c) ']
['Wrong Answer', 'Accepted']
['s967486991', 's082399925']
[9272.0, 9136.0]
[22.0, 23.0]
[214, 215]
p02688
u843768197
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 count = 0\n ans = []\n N, K = map(int, input().split())\n for _ in range(K):\n d = int(input())\n a = [input() for _ in range(d)]\n ans.append(a)\n for _ in range(1, N + 1):\n if _ not in ans:\n count += 1\n\n print(count)\n return\n\nmain()', 'def main():\n ans = []\n N, K = map(int, input().split())\n\n for i in range(K):\n d = int(input())\n a = map(int, input().split())\n for j in a:\n ans.append(j)\n\n count = 0\n for i in range(1, N + 1):\n if not i in ans:\n count += 1\n\n print(count)\n return\n\nmain()']
['Runtime Error', 'Accepted']
['s069101082', 's607980852']
[9116.0, 9120.0]
[23.0, 24.0]
[300, 324]
p02688
u845573105
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())\nstate = [1 for i in range(N)]\nfor i in range(K):\n d = int(input())\n for j in range(d):\n x = list(map(int,input().split()))\n for k in x:\n state[x-1] = 0\nprint(sum(state))', 'N, K = map(int,input().split())\nstate = [1 for i in range(N)]\nfor i in range(K):\n d = int(input())\n for j in range(d):\n x = list(map(int,input().split()))\n for k in x:\n state[k-1] = 0\nprint(sum(state))', 'N, K = map(int,input().split())\nstate = [1 for i in range(N)]\nfor i in range(K):\n d = int(input())\n #print(1,i,d)\n x = list(map(int, input().split()))\n for k in x:\n state[k-1] = 0\nprint(sum(state))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s387355935', 's538707684', 's909452295']
[9188.0, 9184.0, 9120.0]
[25.0, 20.0, 21.0]
[214, 214, 204]
p02688
u845847173
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(k):\n d.append(int(input))\n a.append(list(map(int, input().split())))\n\naa = [0]*n\n\nfor j in a:\n for t in j:\n aa[t - 1] += 1\n\nans = 0\n\nfor z in aa:\n if z == 0:\n ans += 0\n\nprint(ans)', 'n, k = map(int, input().split())\nd = []\na = []\nfor i in range(k):\n d.append(int(input))\n a.append(list(map(int, input().split())))\n\naa = [0]*n\n\nfor j in a:\n for t in j:\n aa[t - 1] += 1\n\nans = 0\n\nfor z in aa:\n if z == 0:\n ans += 1\n else:\n ans += 0\n\nprint(ans)', 'n, k = map(int, input().split())\nd = []\na = []\nfor i in range(k):\n d.append(int(input()))\n a.append(list(map(int, input().split())))\n\naa = [0]*n\n\nfor j in a:\n for t in j:\n aa[t - 1] += 1\n\nans = 0\n\nfor z in aa:\n if z == 0:\n ans += 1\n else:\n ans += 0\n\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s132385617', 's406465182', 's091312398']
[9124.0, 9168.0, 9168.0]
[20.0, 22.0, 22.0]
[267, 294, 296]
p02688
u847727454
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 Counter\nN,K = list(map(int,input().split()))\n\nsnk_sweets = []\n\nfor i in range(K):\n try:\n sweets = int(input())\n snk_sweets = (list(int(x) for x in input().split()))\n\n except:\n break;\n\ncounter_snk = Counter(snk_sweets)\nlen_snk = len(counter_snk.keys())\nprint(N - len_snk)', 'N,K = list(map(int,input().split()))\n\nsnk_sweets = []\n\nfor i in range(K):\n sweets = input()\n snk_sweets = snk_sweets + input().split()\n\nlen_snk = len(set(snk_sweets))\nprint(N - len_snk)\n']
['Wrong Answer', 'Accepted']
['s831070269', 's401405904']
[9448.0, 9460.0]
[25.0, 23.0]
[321, 192]
p02688
u861071267
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 Counter\nN,K=map(int,input().split())\nans=[0]*N\nprint(ans)\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] += 1\n\n\nac = Counter(ans)\n\nprint(ac[0])', 'from collections import Counter\nN,K=map(int,input().split())\nans=[0]*N\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] += 1\n\n\nac = Counter(ans)\n\nprint(ac[0])']
['Wrong Answer', 'Accepted']
['s991572224', 's433737841']
[9472.0, 9464.0]
[26.0, 25.0]
[239, 228]
p02688
u861886710
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 = [1] * N \n\nfor i in range(K):\n d = int(input())\n t = map(int, input().split())\n for i in range(t):\n S[i-1] = 0\nprint(sum(S))', 'N, K = list(map(int, input().split()))\n\n\n\n\nS = [1] * N \n\nfor i in range(K):\n d = int(input())\n t = map(int, input().split())\n for i in range(t):\n \n S[i-1] = 1\nprint(sum(S))', 'N, K = list(map(int, input().split()))\nfor i in range(1, K+1):\n d = int(input())\n N = map(int, input().split())\n print(d)\n print(N)\n', 'N, K = map(int, input().split())\n\n\n\n\nS = [1] * N \n\nfor i in range(K):\n d = int(input())\n t = map(int, input().split())\n for i in range(t):\n \n S[i-1] = 1\nprint(sum(S))', 'N, K = map(int, input().split())\n\n\n\n\nS = [1] * N \n\nfor i in range(K):\n d = int(input())\n t = map(int, input().split())\n for i in t:\n \n S[i-1] = 0\nprint(sum(S))']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s172131698', 's235759061', 's477642796', 's701681786', 's252824826']
[9176.0, 9124.0, 9124.0, 9156.0, 9180.0]
[20.0, 23.0, 22.0, 21.0, 24.0]
[177, 373, 144, 367, 360]
p02688
u863433366
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())\ncheck = [False for i in range(n)]\n\nfor j in range(k):\n d = int(input())\n a = map(int, input().split())\n for k in a:\n check[k-1] = True\n\nprint(check.count(True))', 'n, k = map(int, input().split())\ncheck = [False for i in range(n)]\n\nfor j in range(k):\n d = int(input())\n a = map(int, input().split())\n for k in a:\n check[k-1] = True\n\nprint(check.count(False))']
['Wrong Answer', 'Accepted']
['s939773109', 's651867810']
[9172.0, 9140.0]
[24.0, 25.0]
[199, 200]
p02688
u865108308
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 random\nn = list(x for x in range(input()))\nk = int(input())\nl = 0\n\nwhile l <= k:\n d = random.randint(1, n)\n print(d)\n for m in range(d):\n print(random.choice(n))\n l += 1\n ', 'import random\nn = int(input())\nk = int(input())\nl = 0\n\nwhile l <= k:\n d = random.randint(1, n)\n print(d)\n for m in range(d):\n print(random.randint(1, n))\n l += 1\n \n', 'n, k = map(int, input().split())\na = set()\n\nfor _ in range(k):\n d = int(input())\n a += (int(m) for m in input().split())\n\nprint(n - len(a))\n', 'n, k = map(int, input().split())\na = set()\n\nfor _ in range(k):\n d = int(input())\n while m <= d:\n l = int(input())\n a.append(l)\n m += 1\n\nprint(n - len(a))\n', 'n, k = map(int, input().split())\na = set()\n\nfor _ in range(k):\n d = int(input())\n while m <= d:\n a.append(int(input()))\n m += 1\n\nprint(n - len(a))', 'n, k = map(int, input().split())\na = set()\n\nfor _ in range(k):\n d = int(input())\n a.append(map(int, input().split()))\n\nprint(n - len(a))\n', 'n, k = map(int, input().split())\na = set()\n\nfor m in range(k):\n d = int(input())\n print(d)\n for l in range(d):\n a.append(range(n))\n print(a)', 'n, k = map(int, input().split())\na = set()\n\nfor _ in range(k):\n d = int(input())\n a += [int(m) for m in input().split(" ")]\n\nprint(n - len(a))\n', 'n, k = map(int, input().split())\na = set()\n\nfor _ in range(k):\n d = int(input())\n a += [int(m) for m in input().split()]\n\nprint(n - len(a))\n', 'n, k = map(int, input().split())\na = set()\n\nfor _ in range(k):\n d = int(input())\n a.add(list((map(int, input().split())))\n\nprint(n - len(a))\n', 'import random\nn = list(range(1, int(input())))\nk = int(input())\ni = 0\nm = 0\n\nwhile i == k:\n for d in random.randint(1, k+1):\n for m in range(d)\n print(random.choice(n))\n i += 1\n ', 'n, k = map(int, input().split())\na = []\n\nfor _ in range(k):\n d = int(input())\n a += [int(m) for m in input().split()]\n\nprint(n - len(set(a)))\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s221047718', 's312694921', 's408040987', 's414861217', 's463526958', 's690303078', 's761919630', 's831000640', 's901785097', 's946621697', 's977124688', 's861341842']
[9564.0, 9560.0, 9152.0, 9192.0, 9028.0, 9168.0, 9028.0, 9172.0, 9188.0, 9012.0, 8972.0, 9172.0]
[25.0, 21.0, 24.0, 23.0, 23.0, 24.0, 23.0, 23.0, 21.0, 24.0, 25.0, 22.0]
[186, 172, 142, 165, 154, 139, 147, 145, 142, 143, 189, 144]
p02688
u865857819
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())\nA = [0] * N\n\nfor i in range(K):\n d = int(input())\n targets = list(map(int, input().split()))\n for j in range(d):\n index = targets[j-1]\n A[index] = 1\n\ncount = 0\nfor i in range(N):\n if A[i] == 0:\n count += 1\n\nprint(count)\n', 'N, K = map(int, input().split())\nA = [0] * N\n\nfor i in range(K):\n d = int(input())\n targets = list(map(int, input().split()))\n for j in range(d):\n index = targets[j] -1\n A[index] = 1\n\ncount = 0\nfor i in range(N):\n if A[i] == 0:\n count += 1\n\nprint(count)\n']
['Runtime Error', 'Accepted']
['s269211842', 's171482549']
[9060.0, 9076.0]
[21.0, 21.0]
[287, 287]
p02688
u867616076
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\nn,k = map(int, input().split())\nl = np.zeros(n)\nfor i in range(k):\n d = int(input())\n a = map(int, input().split())\n for j in range(d):\n l[a[j]-1] = 1\nans = 0\nfor i in l:\n if(i == 0):\n ans += 1\nprint(ans)\n', 'import numpy as np\nn,k = map(int, input().split())\nl = [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 a:\n l[j-1] = 1\n\nprint(l.count(0))\n']
['Runtime Error', 'Accepted']
['s170431248', 's698694649']
[26928.0, 27084.0]
[113.0, 117.0]
[250, 210]
p02688
u875113233
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 for i in range(K):\n input()\n a |= set(list(map(int,input.split())))\n print(n-len(a))\n \n \nif __name__ == "__main__":\n main()', 'def main():\n n, k = map(int, input().split())\n a = set()\n for i in range(k):\n input()\n a |= set(list(map(int, input().split())))\n print(n-len(a))\n\nif __name__ == "__main__":\n main()']
['Runtime Error', 'Accepted']
['s218268893', 's624954733']
[9168.0, 9092.0]
[24.0, 27.0]
[177, 192]
p02688
u878291720
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 \nnlist = [i for i in range(1,N+1)]\n \nfor i in range(N):\n d = int(input())\n A = list(map(int, input().split()))\n nlist = [a for a in A if a not in nlist]\nprint(len(nlist))', 'N,K = map(int, input().split())\n \nnlist = [i for i in range(1,N+1)]\n \nfor i in range(N):\n d = int(input())\n A = list(map(int, input().split()))\n for a in A:\n if a in nlist:\n nlist.remove(a)\nprint(len(nlist))', 'N,K = map(int, input().split())\n\nnlist = [i for i in range(N)]\n\nfor i in range(N):\n d = int(input())\n A = list(map(int, input().split()))\n for a in A:\n if a in nlist:\n nlist.remove(a)\nprint(len(nlist))', 'N,K = map(int, input().split())\n \nnlist = [i for i in range(1,N+1)]\n \nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n for a in A:\n if a in nlist:\n nlist.remove(a)\nprint(len(nlist))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s207565617', 's615441344', 's707257058', 's881923161']
[9176.0, 9184.0, 9176.0, 9180.0]
[23.0, 23.0, 22.0, 22.0]
[206, 218, 212, 218]
p02688
u879248892
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 = set(map(int, input().split())) \n a = set(map(int, input().split())) \n D.extend(d)\n A.extend(a)\nl = set(A)\nans = []\nfor i in range (1,n+1):\n if i not in l:\n ans.append(i)\nif len(ans) ==1:\n print(ans[0])\nelse:\n print(*ans)', 'n,k = map(int, input().split())\nD=[]\nA=[]\nfor i in range(1,k+1):\n d = set(map(int, input().split())) \n a = set(map(int, input().split())) \n D.extend(d)\n A.extend(a)\nl = set(A)\nprint(n-len(l))']
['Wrong Answer', 'Accepted']
['s231077561', 's581265968']
[9156.0, 9188.0]
[23.0, 23.0]
[308, 203]
p02688
u880400515
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\nSnack = [0] * N\n\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n\n for j in range(d):\n Snack[A[j]] += 1\n \nsum = 0\nfor i in range(N):\n if (Snack[i] == 0):\n sum += 1\n\nprint(sum)\n', 'N, K = list(map(int, input().split()))\n\nSnack = [0] * N\n\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n\n for j in range(d):\n Snack[A[d]] += 1\n \nsum = 0\nfor i in range(N):\n if (Snack[i] == 0):\n sum += 1\n\nprint(sum)\n', 'N, K = list(map(int, input().split()))\n\nSnack = [0] * N\n\nfor i in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n\n for j in range(d):\n Snack[A[j]-1] += 1\n \nsum = 0\nfor i in range(N):\n if (Snack[i] == 0):\n sum += 1\n\nprint(sum)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s108363224', 's445874492', 's991246066']
[9208.0, 9136.0, 9132.0]
[23.0, 24.0, 22.0]
[271, 271, 273]
p02688
u880850253
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,m = map(int,input().split())\n\nd = {}\n\nfor i in range(m):\n input()\n L = list(map(int,input().split()))\n for j in L:\n d[j] = j\n\nprint(n - len(L))\n ', 'n,m = map(int,input().split())\n\nd = {}\n\nfor i in range(m):\n input()\n L = list(map(int,input().split()))\n #print(L)\n for j in L:\n d[j] = j\n\n#print(d)\nprint(n - len(d))']
['Wrong Answer', 'Accepted']
['s312218686', 's048505743']
[9168.0, 9176.0]
[22.0, 22.0]
[166, 185]
p02688
u886902015
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\nfor i in range(k):\n ans=[]\n d=int(input())\n li=list(map(int,input().split()))\n for j in range(1,n+1):\n if (j not in li) and (j not in ans):\n ans.append(j)\nprint(len(ans))\n \n ', 'n,k=map(int,input().split())\nans=[]\nfor i in range(k):\n d=int(input())\n li=list(map(int,input().split()))\n for j in range(1,n+1):\n if (j not in li) and (j not in ans):\n ans.append(j)\nprint(len(ans))\n', 'n,k=map(int,input().split())\nans=[1]*n\nfor _ in range(k):\n d=int(input())\n li=list(map(int,input().split()))\n for i in li:\n ans[i-1]=0\nprint(sum(ans))\n ']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s017980795', 's129734677', 's472792353']
[9156.0, 9072.0, 8992.0]
[30.0, 39.0, 31.0]
[253, 227, 171]
p02688
u891853274
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={k:0 for k in range(1,N+1)}\nfor i in range(1,K+1):\n d=int(input())\n l=list(map(int,input().split()))\n for item in l:\n ans[item]=ans[item]+1 \nfor i in ans:\n if ans[i]==0:\n print(i)', 'N,K=map(int,input().split())\nans={k:0 for k in range(1,N+1)}\nfor i in range(1,K+1):\n d=int(input())\n l=list(map(int,input().split()))\n for item in l:\n ans[item]=ans[item]+1 \ncount=0\nfor i in ans:\n if ans[i]==0:\n count+=1\nprint(count)']
['Wrong Answer', 'Accepted']
['s522084273', 's615529754']
[9084.0, 9208.0]
[21.0, 22.0]
[238, 259]
p02688
u901144784
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(i) for i in input().split())\nl=[i for i in range(1,n+1)]\nfor i in range(k):\n d=input()\n for i in input().split():\n l[i]=0\nc=0\nfor i in l:\n if(i>0):\n c+=1\nprint(c)', 'n,k=(int(i) for i in input().split())\nl=[1 for i in range(1,n+1)]\nfor i in range(k):\n d=input()\n l1=[int(j) for j in input().split()]\n for j in l1:\n l[j-1]=0\nc=0\nfor i in l:\n if(i>0):\n c+=1\nprint(c)']
['Runtime Error', 'Accepted']
['s478086442', 's977222922']
[9188.0, 9188.0]
[23.0, 22.0]
[180, 210]
p02688
u901598613
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,m=map(int,input().split())\nlis=[i for i in range(1,n+1)]\nfor i in range(m):\n d=int(input())\n for j in range(d):\n a=int(input())\n if a in lis:\n lis.remove(a)\nprint(len(lis))', 'n,m=map(int,input().split())\nlis=[i for i in range(1,n+1)]\nfor i in range(m):\n d=int(input())\n a=list(map(int,input().split()))\n for j in range(d):\n if a[j] in lis:\n lis.remove(a[j])\nprint(len(lis))']
['Runtime Error', 'Accepted']
['s831315330', 's920603507']
[9188.0, 9212.0]
[23.0, 21.0]
[205, 225]
p02688
u905793676
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 = input().split()\nn = int(nk[0])\nk = int(nk[1])\ns = [input() for i in range(k*2)]\no = []\n\nfor j in range(len(s)):\n if j % 2 == 0:\n pass\n else:\n o[len(o):len(o)] = s[j]\n print(o)\n\nl =list(set(o))\nans = n - len(l) \nprint(ans)', 'nk = input().split()\nn = int(nk[0])\nk = int(nk[1])\ns = [input() for i in range(k*2)]\no = []\n\nfor j in range(len(s)):\n if j % 2 == 0:\n pass\n else:\n o[len(o):len(o)] = s[j]\n\nl =list(set(o))\nans = n - len(l) \nprint(ans)', 'nk = input().split()\nn = int(nk[0])\nk = int(nk[1])\ns = [input().split() for i in range(k*2)]\no = []\n \nfor j in range(len(s)):\n if j % 2 == 0:\n pass\n else:\n o[len(o):len(o)] = s[j]\n \nl =list(set(o))\nans = n - len(l) \nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s296012326', 's999861189', 's465831775']
[10708.0, 9200.0, 9352.0]
[127.0, 25.0, 23.0]
[254, 237, 247]
p02688
u907446975
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 do():\n n,m=map(int,input().split())\n d=int(input())\n l=[]\n for i in range(n):\n a=list(map(int,input().split()))\n l.extend(a)\n for j in range(1,n+1):\n if j not in l:\n return j\nprint(do())', 'def do():\n n,m=map(int,input().split())\n num=[]\n k=0\n for i in range(m):\n d=int(input())\n l=list(map(int,input().split()))\n num.extend(l)\n for i in range(1,n+1):\n if i not in num:\n k+=1\n return k\n\n\nprint(do())']
['Runtime Error', 'Accepted']
['s755379915', 's371901409']
[9188.0, 9300.0]
[20.0, 27.0]
[237, 266]
p02688
u912556688
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())\nnumber = 0\ndata = []\nnolist = list(range(1,K+1))\nprint(nolist)\nfor i in range(N):\n number = int(input())\n for j in range(number):\n data = input().split()\n nolist[int(data[j])-1] = 0\ntry:\n for i in range(N):\n \tnolist.remove(0)\nexcept:\n pass\nprint(len(nolist))', 'N,K = map(int,input().split())\nnumber = 0\ndata = []\nnolist = list(range(1,K+1))\nfor i in range(N):\n number = int(input())\n for j in range(number):\n data = input().split()\n nolist[int(data[j])-1] = 0\ntry:\n for i in range(N):\n \tnolist.remove(0)\nexcept:\n pass\nprint(len(nolist))', 'N,K = map(int,input().split())\ndata = []\nnolist = list(range(1,N+1))\nfor i in range(K):\n number = int(input())\n data = input().split()\n for j in range(number):\n nolist[int(data[j])-1] = 0\ntry:\n for i in range(N):\n \tnolist.remove(0)\nexcept:\n pass\nprint(len(nolist))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s274655556', 's550359879', 's904573665']
[9144.0, 9212.0, 9152.0]
[26.0, 23.0, 23.0]
[300, 286, 273]
p02688
u913392095
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())\nprint(n)\nprint(k)\nd=[[] for i in range(k)]\ndlist=[]\nmemb=[i+1 for i in range(n)]\nfor i in range(k):\n d[i]=int(input())\n dklist=list(map(int,input().split()))\n dlist.append(dklist)\n print(d[i])\n print(dlist[i])\n for j in dklist:\n print(j)\n if j in memb:\n memb.remove(j)\nprint(len(list(memb)))', 'n,k=map(int,input().split())\nd=[[] for i in range(k)]\ndlist=[]\nmemb=[i+1 for i in range(n)]\nfor i in range(k):\n d[i]=int(input())\n dklist=list(map(int,input().split()))\n dlist.append(dklist)\n for j in dklist:\n if j in memb:\n memb.remove(j)\nprint(len(list(memb)))']
['Wrong Answer', 'Accepted']
['s025121597', 's485004724']
[9248.0, 9152.0]
[27.0, 21.0]
[363, 292]
p02688
u914802579
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()))\ns=set()\nfor i in range(k):\n s.append(int(input()))\n j=list(map(int,input().split()))\nprint(n-len(s))', 'n,k = list(map(int,input().split()))\ns=set()\nfor i in range(k):\n int(input())\n j=set(map(int,input().split()));s=s.union(j)\nprint(n-len(s))']
['Runtime Error', 'Accepted']
['s243007252', 's590390466']
[9184.0, 9144.0]
[25.0, 22.0]
[139, 141]
p02688
u921156673
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())\nsunukes = [0 for k in range(N)]\nfor k in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n for a in A:\n sunukes[a] += 1\n assert len(A) == d\nprint(len([k for k in sunukes if k == 0]))', 'N, K = map(int, input().split())\nsunukes = [0 for k in range(N)]\nfor k in range(K):\n d = int(input())\n A = list(map(int, input().split()))\n for a in A:\n sunukes[a-1] += 1\n assert len(A) == d\nprint(len([k for k in sunukes if k == 0]))']
['Runtime Error', 'Accepted']
['s648660228', 's082737431']
[9124.0, 9120.0]
[25.0, 27.0]
[238, 240]
p02688
u921818939
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=int(input())\n a=set(int(i) for i in input().split())\nprint(n-len(set(a)))\n', 'n,k=map(int,input().split())\nseta=set()\nfor i in range(k):\n d=int(input())\n l=[int(i) for i in input().split()]\n for j in l:\n seta.add(j)\n\nprint(n-len(set(seta)))\n']
['Wrong Answer', 'Accepted']
['s360078523', 's482972246']
[9164.0, 9164.0]
[23.0, 25.0]
[131, 179]
p02688
u923172145
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\nC = [0 for _ in range(N)]\nct = N\nfor i in range(N):\n d = int(input())\n A = list(map(int, input().split()))\n for a in A:\n if C[a-1] == 0:\n C[a-1] += 1\n ct -= 1\n\nprint(ct)\n\n', 'N, K = map(int,input().split())\n\nC = [0 for _ in range(N)]\nct = N\nfor i in range(K):\n d = input()\n A = list(map(int, input().split()))\n for a in A:\n if C[a-1] == 0:\n C[a-1] += 1\n ct -= 1\n\nprint(ct)\n\n']
['Runtime Error', 'Accepted']
['s455109865', 's372396674']
[9068.0, 9188.0]
[31.0, 34.0]
[220, 215]
p02688
u924273546
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\n\nn,k = map(int,input().split())\n\nsunuke = ["{}".format(i) for i in range(1,n+1)]\n\nfor i in range(k):\n d = int(input())\n a = input().split()\n for i in a:\n if i in sunuke:\n sunuke.remove(i)\n print(sunuke)\n\nans = len(sunuke)\n\nprint("{}".format(ans))', '#coding:utf-8\n\nn,k = map(int,input().split())\n\nsunuke = ["{}".format(i) for i in range(1,n+1)]\n\nfor i in range(k):\n d = int(input())\n a = input().split()\n for i in a:\n if i in sunuke:\n sunuke.remove(i)\n\nans = len(sunuke)\n\nprint("{}".format(ans))']
['Wrong Answer', 'Accepted']
['s438296796', 's049137864']
[9192.0, 9192.0]
[22.0, 23.0]
[290, 272]
p02688
u929217794
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?
['# B Trick or Treat\n\nN, K = map(int, input().split())\n\nsunuke = [0] * N\nfor i in k:\n d = int(input())\n a = list(map(int, input().split()))\n for ai in a:\n sunuke[ai-1] += 1\nprint(sunuke.count(0))\n \n ', '# B Trick or Treat\n\nN, K = map(int, input().split())\n\nsunuke = [0] * N\nfor i in range(K):\n d = int(input())\n a = list(map(int, input().split()))\n for ai in a:\n sunuke[ai-1] += 1\nprint(sunuke.count(0))']
['Runtime Error', 'Accepted']
['s900325750', 's145469338']
[9152.0, 9100.0]
[28.0, 28.0]
[205, 206]
p02688
u931394483
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())\nc = []\nfor i in range(K):\n\ta = int(input())\n\tb=list(map(int,input().split()))\n\tc.append(b)\nf = list(itertools.chain.from_iterable(c))\nd = []\nfor i in range(1,N+1):\n\te = i in f\n\tif e == False:\n\t\td.append(i)\nlength = len(d)\nfor i in range(length):\n\tprint(d[i])\n', 'import itertools\nN,K = map(int, input().split())\nc = []\nfor i in range(K):\n\ta = int(input())\n\tb=list(map(int,input().split()))\n\tc.append(b)\nf = list(itertools.chain.from_iterable(c))\nd = []\nfor i in range(1,N+1):\n\te = i in f\n\tif e == False:\n\t\td.append(i)\nlength = len(d)\nprint(length)\n']
['Wrong Answer', 'Accepted']
['s491457399', 's415565226']
[9372.0, 9104.0]
[20.0, 25.0]
[310, 287]
p02688
u932868243
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())\nlists=[]\nfor _ in range(k):\n d=int(input())\n a=list(map(int,input().split()))\n lists.append(list)\nnum=[0]*n\nfor list in lists:\n for __ in range(len(list)):\n num[list[__]-1]+=1\ncount=0\nfor nn in num:\n if nn==0:\n count+=1\nprint(count)', 'n,k=map(int,input().split())\nlists=[]\nfor _ in range(k):\n d=int(input())\n a=list(map(int,input().split()))\n list.append(list)\nnum=[0]*n\nfor list in lists:\n for __ in range(len(list)):\n num[list[__]-1]+=1\ncount=0\nfor nn in num:\n if nn==0:\n count+=1\nprint(count)', 'n,k=map(int,input().split())\nlists=[]\nfor _ in range(k):\n d=int(input())\n lis=list(map(int,input().split()))\n lists.append(lis)\nans=[0]*n\nfor list in lists:\n for i in range(len(list)):\n ans[list[i]-1]+=1\ncount=0\nfor h in ans:\n if h==0:\n count+=1', 'n,k=map(int,input().split())\nlists=[]\nfor _ in range(k):\n d=input()\n if d==1:\n list=[int(input())]\n else:\n list=list(map(int,input().split()))\n lists.append(list)\nans=[0]*n\nfor list in lists:\n for i in range(1,len(list)+1):\n ans[i-1]+=1\ncount=0\nfor h in ans:\n if h==0:\n count+=1\nprint(count)', 'n,k=map(int,input().split())\nlists=[]\nfor _ in range(k):\n d=input()\n list=list(map(int,input().split()))\n lists.append(list)\nans=[0]*n\nfor list in lists:\n for i in range(1,len(list)+1):\n ans[i-1]+=1\ncount=0\nfor h in ans:\n if h==0:\n count+=1\nprint(count)', 'n,k=map(int,input().split())\nlists=[]\nfor _ in range(k):\n d=int(input())\n a=list(map(int,input().split()))\n lists.append(a)\nnum=[0]*n\nfor list in lists:\n for __ in range(len(list)):\n num[list[__]-1]+=1\ncount=0\nfor nn in num:\n if nn==0:\n count+=1\nprint(count)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s580219862', 's765834385', 's844735209', 's887423446', 's984075151', 's568644942']
[9208.0, 9148.0, 9192.0, 9216.0, 9216.0, 9200.0]
[23.0, 20.0, 22.0, 21.0, 21.0, 20.0]
[272, 271, 256, 309, 264, 269]
p02688
u937782958
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(range(1,n+1))\ni = 0\nkashi_sunuke = []\nd = ''\nwhile i < k:\n d = input()\n okashi = list(map(int,input().split()))\n kashi_sunuke += okashi\n i+=1\n\no = list(set(sunuke) - set(kashi_sunuke))\nprint('o', o, len(o))\n", "n,k = map(int,input().split())\nsunuke = list(range(1,n+1))\ni = 0\nkashi_sunuke = []\nd = ''\nwhile i < k:\n d = input()\n okashi = list(map(int,input().split()))\n kashi_sunuke += okashi\n i+=1\n\no = list(set(sunuke) - set(kashi_sunuke))\nprint(len(o))"]
['Wrong Answer', 'Accepted']
['s378718347', 's476712327']
[9192.0, 9200.0]
[21.0, 22.0]
[256, 247]
p02688
u940780117
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(map(int,input().split()))for i in range(2*K)]\nsunuke=[]\nfor i in range(2*K):\n if i%2==1:\n d=sum(a[i-1])\n for n in range(d):\n sunuke.append(a[i][n])\nprint(sunuke)\nsunuke=set(sunuke)\nprint(N-len(sunuke))', 'N,K=map(int,input().split())\na=[list(map(int,input().split()))for i in range(2*K)]\nsunuke=[]\nfor i in range(2*K):\n if i%2==1:\n d=sum(a[i-1])\n for n in range(d):\n sunuke.append(a[i][n])\nsunuke=set(sunuke)\nprint(N-len(sunuke))']
['Wrong Answer', 'Accepted']
['s997108708', 's159417070']
[9256.0, 9204.0]
[24.0, 28.0]
[266, 252]
p02688
u942893435
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(lambda x:int(x),input().split()))\n\na = [0] * n\nprint(a)\nfor w in range(k):\n d = int(input())\n ds = list(map(lambda x:int(x),input().split()))\n for i in ds:\n a[i-1] = 1\n\nprint(len(list(filter(lambda x:x==0,a))))\n\n', 'n,k=list(map(lambda x:int(x),input().split()))\n\na = [0] * n\nfor w in range(k):\n d = int(input())\n ds = list(map(lambda x:int(x),input().split()))\n for i in ds:\n a[i-1] = 1\n\nprint(len(list(filter(lambda x:x==0,a))))\n\n']
['Wrong Answer', 'Accepted']
['s403023232', 's214566087']
[9196.0, 9192.0]
[23.0, 23.0]
[241, 232]
p02688
u949234226
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?
['#--Trick or Treat\nimport itertools\n\nN, K = map(int, input().split())\n\nA = []\njudge = list(range(1,N+1))\nfor i in range(K):\n d = int(input())\n A.append([int(i) for i in input().split()])\n\nallocate = list(itertools.chain.from_iterable(A))\n#print(judge)\n\n\nl1_l2_sym_diff = []\nl1_l2_sym_diff = set(allocate) ^ set(judge)\nprint(l1_l2_sym_diff)\n\n', '#--Trick or Treat\nimport itertools\n\nN, K = map(int, input().split())\n\nA = []\njudge = list(range(1,N+1))\nfor i in range(K):\n d = int(input())\n A.append([int(i) for i in input().split()])\n\nallocate = list(itertools.chain.from_iterable(A))\n#print(judge)\n\n\nl1_l2_sym_diff = []\nl1_l2_sym_diff = set(allocate) ^ set(judge)\nprint(len(l1_l2_sym_diff))\n\n']
['Wrong Answer', 'Accepted']
['s802475916', 's710541899']
[9376.0, 9240.0]
[21.0, 25.0]
[363, 368]
p02688
u954054306
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 k in range(0,K):\n d = int(input())\n D.append(d)\n a = list(map(int, input().split()))\n\nfor i in range(1,N+1):\n x = a.count(i)\n if x >= 2:\n for n in range(1,x):\n a.remove(i)\n\nprint(N - len(a))', 'N,K = map(int,input().split())\nD = []\nA = []\nfor k in range(1,K+1):\n d = int(input())\n D.append(d)\n a = list(map(int, input().split()))\n for n in a:\n A.append(n)\n\nfor i in range(1,N+1):\n x = A.count(i)\n if x >= 2:\n for n in range(1,x):\n A.remove(i)\n\nprint(N - len(A))']
['Wrong Answer', 'Accepted']
['s471386992', 's195195733']
[9080.0, 9316.0]
[22.0, 288.0]
[265, 310]
p02688
u954650724
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 s = list(map(int,input().split()))\n n = [0]*s[0]\n for k in range(0,s[1],1):\n d = int(input())\n a = list(map(int,input().split()))\n #print(a)\n for i in range(0,d,1):\n #print(a[i])\n n[a[i]-1] = 1\n #print(n)\n \n sum=0\n print(n)\n \n for k in range(0,s[0],1): \n if(n[k]==0): sum = sum+1\n \n print(sum)\n \nmain()', 'def main():\n s = list(map(int,input().split()))\n n = [0]*s[0]\n for k in range(0,s[1],1):\n d = int(input())\n a = list(map(int,input().split()))\n #print(a)\n for i in range(0,d,1):\n #print(a[i])\n n[a[i]-1] = 1\n #print(n)\n \n sum=0\n #print(n)\n \n for k in range(0,s[0],1): \n if(n[k]==0): sum = sum+1\n \n print(sum)\n \nmain()']
['Wrong Answer', 'Accepted']
['s192280442', 's879927883']
[9204.0, 9208.0]
[23.0, 25.0]
[360, 361]
p02688
u964521959
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 = int(input())\n\nd_list = []\nA_list_list = []\nfor i in range(K):\n \n d = int(input())\n d_list.append(d)\n \n A_list = list(map(int, input().split()))\n A_list_list.append(A_list)\n \ncounter = 0\nfor i in range(N):\n if((i+1 in A_list) ==True):\n counter = counter\n else:\n counter = counter + 1\nprint(counter)\n \n', '\nN,K = map(int, input().split())\n\nd_list = []\nA_list_list = []\nfor i in range(K):\n \n d = int(input())\n d_list.append(d)\n \n A_list = list(map(int, input().split()))\n A_list_list.append(A_list)\n \ncounter = 0\nfor i in range(N):\n if((i+1 in A_list) ==True):\n counter = counter\n else:\n counter = counter + 1\nprint(counter)\n \n\n', '\nN,K = map(int, input().split())\n\nd_list = []\nA_list_list = []\nfor i in range(K):\n \n d = int(input())\n d_list.append(d)\n \n A_list = list(map(int, input().split()))\n #print(A_list)\n A_list_list.extend(A_list)\n#print(A_list)\ncounter = 0\nfor i in range(N):\n if((i+1 in A_list_list) ==True):\n counter = counter\n else:\n counter = counter + 1\nprint(counter)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s587195932', 's801423968', 's354979057']
[9184.0, 9188.0, 9140.0]
[23.0, 24.0, 24.0]
[404, 418, 447]
p02688
u969708690
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=list()\nfor i in range(K):\n D=int(input())\n L=list(map(int,input(),split()))\n ans+=L\n ans=list(set(ans))\nprint(N-len(ans))', 'N,K=map(int,input().split())\nans=list()\nfor i in range(K):\n D=int(input())\n L=list(map(int,input().split()))\n ans+=L\n ans=list(set(ans))\nprint(N-len(ans))']
['Runtime Error', 'Accepted']
['s863702597', 's372491008']
[8940.0, 9036.0]
[27.0, 32.0]
[158, 158]
p02688
u970267139
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(map(str, range(1, n+1)))\n\nfor i in range(k):\n _ = input()\n a = input().split()\n for ai in a:\n n.remove(ai)\nprint(len(n))', 'n, k = map(int, input().split())\nn = list(map(str, range(1, n+1)))\n\nfor i in range(k):\n _ = input()\n a = input().split()\n print(a)\n for ai in a:\n n.remove(ai)\nprint(len(n))\n\n', 'n, k = map(int, input().split())\nn = list(map(str, range(1, n+1)))\n\nfor i in range(k):\n _ = input()\n a = input().split()\n for ai in a:\n for ni in n:\n if ai == ni:\n n.remove(ai)\nprint(len(n))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s649603427', 's842342348', 's955106845']
[9156.0, 9176.0, 9152.0]
[21.0, 23.0, 23.0]
[178, 193, 232]
p02688
u979374305
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(x) for x in input().split()]\n\ns = set()\n\nfor i in range(k):\n input()\n s |= set(input().split)\n \nprint(n-len(s))\n', '(n, k) = [int(x) for x in input().split()]\n\ns = set()\n\nfor i in range(k):\n input()\n s |= set(input().split)\n \nprint(n-len(s))\n', '(n, k) = [int(x) for x in input().split()]\n\ns = set()\n\nfor i in range(k):\n\tinput()\n s |= set(input().split)\n \nprint(n-len(s))', '(n, k) = [int(x) for x in input().split()]\n\ns = set()\n\nfor i in range(k):\n input()\n s |= set(input().split())\n \nprint(n-len(s))\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s203129599', 's740962937', 's873041426', 's244438488']
[9052.0, 9112.0, 8972.0, 9072.0]
[20.0, 26.0, 26.0, 29.0]
[135, 131, 131, 137]
p02688
u981264846
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?
['whatMan = []\n\nN, K = input().split()\nfor i in range(int(K)):\n whatMan.extend(input().split())\nprint(int(N) - set(wahtMan).count)', 'whatMan = []\n\nN, K = input()\nfor i in range(1, K):\n wahtMan.append(input().split())\nprint(N - set(wahtMan).count)', 'whatMan = []\n \nN, K = input().split()\nfor i in range(int(K)):\n wahtMan.append(input().split())\nprint(wahtMan)', 'whatMan = []\n\nN, K = input().split()\nfor i in range(int(K)):\n whatMan.extend(input().split())\nprint(int(N) - len(set(whatMan)))', 'whatMan = []\n \nN, K = input()\nfor i in range(int(K)):\n\u3000\u3000\u3000\u3000wahtMan.append(input().split())\nprint(wahtMan)', 'whatMan = []\n\nN, K = input().split()\nfor i in range(int(K)):\n wahtMan.extend(input().split())\nprint(wahtMan)', 'whatMan = []\n\nN, K = input()\nfor i in range(int(K)):\n wahtMan.append(input().split())\n\nprint(int(N) - set(wahtMan).count)', 'whatMan = []\n \nN, K = input()\nfor i in range(int(K)):\n wahtMan.append(input().split())\nprint(wahtMan)', 'whatMan = []\n\nN, K = input().split()\nfor i in range(int(K)):\n whatMan.extend(input().split())\nprint(whatMan)', 'whatMan = []\n\nN, K = input().split()\nwahtMan.extend(input().split())\nprint(wahtMan)', 'whatMan = []\n \nN, K = input().split()\nprint(N)', 'whatMan = []\n\nN, K = input().split()\nprint(input().split())', 'whatMan = []\n\nN, K = input().split()\nfor i in range(int(K)):\n wahtMan.append(input().split())\nprint(wahtMan)', 'whatMan = []\n\nN, K = input().split()\nfor i in range(int(K)):\n whatMan.extend(input().split())\nprint(int(N) - set(whatMan).count)', 'whatMan = []\n\nN, K = input().split()\nfor i in range(int(K)):\n print(input().split())', 'whatMan = []\n\nN, K = input().split()\nfor i in range(int(K)):\n input()\n whatMan.extend(input().split())\nprint(int(N) - len(set(whatMan)))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s027739059', 's044764751', 's231915144', 's245658464', 's278954527', 's349057941', 's617136154', 's638350688', 's778949317', 's812894271', 's817230470', 's836208465', 's870872232', 's913958162', 's916737479', 's599999891']
[9384.0, 9008.0, 9084.0, 9168.0, 9020.0, 9156.0, 8996.0, 9072.0, 9336.0, 9104.0, 9000.0, 9100.0, 9072.0, 9348.0, 9076.0, 9644.0]
[21.0, 23.0, 25.0, 22.0, 20.0, 21.0, 25.0, 19.0, 22.0, 21.0, 23.0, 23.0, 23.0, 21.0, 21.0, 20.0]
[131, 116, 112, 130, 112, 111, 124, 104, 111, 83, 46, 59, 111, 131, 87, 142]
p02688
u982030663
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 = [1 for i in range(N)]\nfor i in range(K):\n input() # ignore\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() # ignore\n for j in map(int, input().split(" ")):\n flag[j - 1] = 0\nprint(sum(flag))\n']
['Wrong Answer', 'Accepted']
['s873201202', 's143198667']
[9108.0, 9092.0]
[21.0, 23.0]
[175, 182]
p02688
u997927785
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 = []\nsafe = []\nubsafe = []\nfor k in range(K):\n d.append(int(input()))\n A.append(list(map(int, input().split())))\n\nfor _ in range(K-1):\n for p in range(d[K-1]-1):\n safe.append(A[_][p])\n \nL = len(list(set(safe)))\nprint(N-L)\n', 'N, K = map(int, input().split())\nd = []\nA = []\nsafe = []\nubsafe = []\nfor k in range(K):\n d.append(int(input()))\n A.append(list(map(int, input().split())))\n\nfor _ in range(K-1):\n for p in range(d[K-1]):\n safe.append(A[_][p])\n \nL = len(list(set(safe)))\nprint(N-L)\n', 'N, K = map(int, input().split())\nd = []\nA = []\n\nfor k in range(K):\n d.append(int(input()))\n A.append(list(map(int, input().split())))\n\nAlist = [e for row in A for e in row]\n \nL = len(list(set(Alist)))\nprint(N-L)\n\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s295937240', 's566463795', 's461382622']
[9256.0, 9112.0, 9240.0]
[24.0, 26.0, 22.0]
[287, 285, 226]
p02688
u999799597
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())\nsnuke = []\nfor _ in range(k):\n okashi = int(input())\n snuke += [int(v) for v in input().split()]\ntarget = 1\nfor j in range(len(snuke)):\n if j + 1 != target:\n print(j + 1)\n break', 'n, k = map(int, input().split())\nsnukes = []\nfor _ in range(k):\n okashi = int(input())\n snukes += [int(v) for v in input().split()]\ntarget = 1\ncnt = 0\nl = list(set(snukes))\ns = [int(v) for v in range(1, n + 1)]\n\nfor p in s:\n if p not in l:\n cnt += 1\nprint(cnt)']
['Wrong Answer', 'Accepted']
['s169434506', 's413736031']
[9128.0, 9184.0]
[30.0, 30.0]
[233, 276]
p02689
u004108273
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['import collections\n\nN, M = map(int,input().split())\nH = [int(input()) for i in range(N)]\n\nX = []\nfor i in range(M):\n Aj, Bj = map(int,input().split())\n if H[Aj - 1] < H[Bj - 1]:\n X.append(Aj)\n elif H[Bj - 1] < H[Aj - 1]:\n X.append(Bj)\n elif H[Aj - 1] == H[Bj - 1]:\n X.append(Aj)\n X.append(Bj)\n\nlow_H = collections.Counter(X)\nans = N - len(low_H)\nprint(ans)\n', 'import collections\n\nN, M = map(int,input().split())\nH = [int(i) for i in input().split()]\n\nX = []\nfor i in range(M):\n Aj, Bj = map(int,input().split())\n if H[Aj - 1] < H[Bj - 1]:\n X.append(Aj)\n elif H[Bj - 1] < H[Aj - 1]:\n X.append(Bj)\n elif H[Aj - 1] == H[Bj - 1]:\n X.append(Aj)\n X.append(Bj)\n\nlow_H = collections.Counter(X)\nans = N - len(low_H)\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s575708890', 's531296233']
[11116.0, 22044.0]
[32.0, 252.0]
[395, 396]
p02689
u006883624
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['from heapq import heappush, heappop\n\n\ndef main():\n\n N, M = [int(v) for v in input().split()]\n\n H = [int(v) for v in input().split()]\n link = [0] * N\n\n for _ in range(M):\n a, b = [int(v) - 1 for v in input().split()]\n link[a] = max(link[a], H[b])\n link[b] = max(link[b], H[a])\n\n count = 0\n for h, nh in zip(H, link):\n print(h, nh)\n if h > nh:\n count += 1\n print(count)\n\n\nmain()\n', 'from heapq import heappush, heappop\n\n\ndef main():\n\n N, M = [int(v) for v in input().split()]\n\n H = [int(v) for v in input().split()]\n link = [0] * N\n\n for _ in range(M):\n a, b = [int(v) - 1 for v in input().split()]\n link[a] = max(link[a], H[b])\n link[b] = max(link[b], H[a])\n\n count = 0\n for h, nh in zip(H, link):\n if h > nh:\n count += 1\n print(count)\n\n\nmain()\n']
['Wrong Answer', 'Accepted']
['s979116540', 's053777015']
[20168.0, 19960.0]
[328.0, 296.0]
[444, 423]
p02689
u010178026
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['n, m = map(int, input().split())\nh = list(map(int, input().split()))\nans = [1] * n\nfor i in range(m):\n ai, bi = map(int, input().split()) \n ab[i] = ai\n ab[i+m] = bi\n if h[ai-1] >= h[bi-1]:\n ans[bi-1] = 0\n elif h[ai-1] < h[bi-1]:\n ans[ai-1] = 0\nprint(sum(ans))', 'n, m = map(int, input().split())\nh = list(map(int, input().split()))\nans = [1] * n\nfor i in range(m):\n ai, bi = map(int, input().split()) \n if h[ai-1] >= h[bi-1]:\n ans[bi-1] = 0\n if h[ai-1] <= h[bi-1]:\n ans[ai-1] = 0\nprint(sum(ans))']
['Runtime Error', 'Accepted']
['s005424968', 's538623963']
[20148.0, 20104.0]
[43.0, 273.0]
[288, 255]
p02689
u010379708
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
["i = input()\ni = i.split(' ')\nl = []\nwhile len(l)<int(i[0]):\n l += [0]\n\nlim = int(i[1])\n\ni = input()\ni = i.split(' ')\nfor j in list(range(len(l))):\n i[j]=int(i[j])\nprint(i)\n\ncount=0\nwhile count<lim:\n count += 1\n k = input()\n k = k.split(' ')\n if i[int(k[0])-1]==i[int(k[1])-1]:\n l[int(k[1])-1] = 1\n l[int(k[0])-1] = 1\n elif i[int(k[0])-1]>i[int(k[1])-1]:\n l[int(k[1])-1] = 1\n else:\n l[int(k[0])-1] = 1\n\ncount = 0\nfor j in l:\n if j==0:\n count += 1\nprint(count)\n \n", "i = input()\ni = i.split(' ')\nl = []\nwhile len(l)<int(i[0]):\n l += [0]\n\nlim = int(i[1])\n\ni = input()\ni = i.split(' ')\nfor j in list(range(len(l))):\n i[j]=int(i[j])\n\n\ncount=0\nwhile count<lim:\n count += 1\n k = input()\n k = k.split(' ')\n if i[int(k[0])-1]==i[int(k[1])-1]:\n l[int(k[1])-1] = 1\n l[int(k[0])-1] = 1\n elif i[int(k[0])-1]>i[int(k[1])-1]:\n l[int(k[1])-1] = 1\n else:\n l[int(k[0])-1] = 1\n\ncount = 0\nfor j in l:\n if j==0:\n count += 1\nprint(count)\n \n"]
['Wrong Answer', 'Accepted']
['s400494752', 's104388487']
[21600.0, 21436.0]
[351.0, 344.0]
[522, 514]
p02689
u021915951
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['n,m = map(int,input().split())\nh = list(map(int,input().split()))\nans = [1]*n\nfor i in range(m):\n print(ans)\n a,b = map(int,input().split())\n if h[a-1]>h[b-1]:\n ans[b-1] = 0\n elif h[b-1]>h[a-1]:\n ans[a-1] = 0\n else:\n print("a")\n ans[a-1] = 0\n ans[b-1] = 0\nprint(ans.count(1)) ', 'n,m = map(int,input().split())\nh = list(map(int,input().split()))\nans = [1]*n\nfor i in range(m):\n print(ans)\n a,b = map(int,input().split())\n if h[a-1]>h[b-1]:\n ans[b-1] = 0\n else if h[b-1]>h[a-1]:\n ans[a-1] = 0\n else:\n print("a")\n ans[a-1] = 0\n ans[b-1] = 0\nprint(ans.count(1)) ', 'n,m = map(int,input().split())\nh = list(map(int,input().split()))\nans = [1]*n\nfor i in range(m):\n a,b = map(int,input().split())\n if h[a-1]>h[b-1]:\n ans[b-1] = 0\n elif h[b-1]>h[a-1]:\n ans[a-1] = 0\n else:\n #print("a")\n ans[a-1] = 0\n ans[b-1] = 0\nprint(ans.count(1)) ']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s322432307', 's899748252', 's150552259']
[130428.0, 9044.0, 20060.0]
[2461.0, 26.0, 251.0]
[329, 332, 327]
p02689
u047719604
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['n,m = map(int,input().split())\nheight = list(map(int,input().split()))\nlst = [0]*n\nfor j in range(m):\n x,y = map(int,input().split())\nif height[x-1] >= height[y-1]:\n lst[x-1] = 1\nif height[x-1] <= height[y-1]:\n lst[y-1] = 1\n print(lst.count(0))', 'n,m = map(int,input().split())\nheight = list(map(int,input().split()))\nlst = [0]*n\nfor j in range(m):\n x,y = map(int,input().split())\nif height[x-1] >= height[y-1]:\n lst[y-1] = 1\nif height[x-1] <= height[y-1]:\n lst[x-1] = 1\nprint(lst.count(0))', 'n,m = map(int,input().split())\nheight = list(map(int,input().split()))\nlst = [0]*n\nfor j in range(m):\n x,y = map(int,input().split())\nif height[x-1] >= height[y-1]:\n lst[y-1] = 1\nif height[x-1] <= height[y-1]:\n lst[x-1] = 1\n print(lst.count(0))', 'n,m = map(int,input().split())\nheight = list(map(int,input().split()))\nlst = [0]*n\nfor j in range(m):\n x,y = map(int,input().split())\n if height[x-1] >= height[y-1]:\n lst[y-1] = 1\n if height[x-1] <= height[y-1]:\n lst[x-1] = 1\nprint(lst.count(0))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s286701461', 's672607456', 's970731939', 's610848790']
[20088.0, 20024.0, 20020.0, 20036.0]
[202.0, 204.0, 200.0, 257.0]
[256, 252, 256, 268]
p02689
u050641473
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['N, M = map(int, input().split())\nheights = list(map(int,input().split()))\nwin = []\n\nfor i in range(1, N + 1):\n win.append(i)\n\nfor i in range(M):\n x, y = map(int, input().split())\n if heights[x - 1] > heights[y - 1]:\n del win[x - 1]\n elif heights[x - 1] < heights[y - 1]:\n del win[y - 1]\n\nprint(len(win))', 'N, M = map(int, input().split())\nheights = list(map(int,input().split()))\nlose = []\n\nfor i in range(M):\n x, y = map(int, input().split())\n if heights[x - 1] > heights[y - 1]:\n lose.append(y)\n elif heights[x - 1] < heights[y - 1]:\n lose.append(x)\n elif heights[x - 1] == heights[y - 1]:\n lose.append(y)\n lose.append(x)\n\nprint(N - len(list(set(lose))))']
['Runtime Error', 'Accepted']
['s685769308', 's302972554']
[20068.0, 20112.0]
[62.0, 251.0]
[313, 366]
p02689
u050805798
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['n,m = map(int,input().split())\nh = [int(x) for x in input().split()]\na = [0] * m\nb = [0] * m\nfor i in range(m):\n a[i],b[i] = map(int,input().split())\nind = []\nfor i in range(m):\n if h[a[i]-1] < h[b[i]-1]:\n ind.append(a[i])\n elif h[a[i]-1] == h[b[i]-1]:\n ind.append(a[i])\n ind.append(b[i])\n else:\n ind.append(b[i])\nind2 = [0] * n\nfor i in range(n):\n ind2[ind[i]-1] += 1\nans = 0\nfor i in range(n):\n if ind2[i] == 0:\n ans += 1\nprint(ans)', 'n,m = map(int,input().split())\nh = [int(x) for x in input().split()]\na = [0] * m\nb = [0] * m\nfor i in range(m):\n a[i],b[i] = map(int,input().split())\nind = []\nfor i in range(m):\n if h[a[i]-1] < h[b[i]-1]:\n ind.append(a[i])\n elif h[a[i]-1] == h[b[i]-1]:\n ind.append(a[i])\n ind.append(b[i])\n else:\n ind.append(b[i])\nind2 = [0] * n\nfor i in range(len(ind)):\n ind2[ind[i]-1] += 1\nans = 0\nfor i in range(n):\n if ind2[i] == 0:\n ans += 1\nprint(ans)']
['Runtime Error', 'Accepted']
['s652851139', 's889263939']
[22644.0, 22640.0]
[305.0, 292.0]
[487, 494]
p02689
u053438578
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['import numpy as np\nX=int(input())\nflag=1\nfor c in range(np.power(10,9)):\n c+=1\n x=X\n if x%c==0:\n x=x//c\n for a in range(np.power(10,3)):\n if (np.power(a,4) + np.power(a,3)*(a-c) + np.power(a,2)*np.power(a-c,2) + a*np.power(a-c,3) + np.power(a-c,4))==x:\n print(a,a-c)\n flag=0\n break\n if flag==0:\n break', 'N, M = list(map(int, input().split()))\nrecord = [1 for i in range(N)]\nH = list(map(int, input().split()))\ngrid = []\nfor i in range(M):\n array = list(map(int, input().split()))\n grid.append(array)\n\nfor i in range(M):\n if H[grid[i][0]-1] > H[grid[i][1]-1]:\n record[grid[i][1]-1] = 0\n elif H[grid[i][0]-1] < H[grid[i][1]-1]:\n record[grid[i][0]-1] = 0\n elif H[grid[i][0]-1] == H[grid[i][1]-1]:\n record[grid[i][0]-1] = 0\n record[grid[i][1]-1] = 0\n\nflag = 0\nfor i in range(N):\n if record[i] == 1:\n flag += 1\nprint(flag)\n']
['Runtime Error', 'Accepted']
['s604303475', 's775449146']
[27056.0, 32736.0]
[106.0, 347.0]
[390, 567]
p02689
u057942294
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['N, M = map(int,input().split())\n\nH = [int(input()) for i in range(N)]\n\nV = [list(map(int, input().split())) for i in range(M)]\n\ncount = 0\n\ndic = {}\n\nfor i in range(1, N):\n dic[i] = set()\n\nfor hen in V:\n dic[hen[0]].add(hen[1])\n dic[hen[1]].add(hen[0])\n\nprint(sum(all([H[i] > hs for hs in dic[i]]) for i in N))', 'N, M = map(int,input().split())\n\nH = list(map(int, input().split()))\n\nV = [list(map(int, input().split())) for i in range(M)]\n\ncount = 0\n\ndic = {}\n\nfor i in range(1, N):\n dic[i] = set()\n\nfor hen in V:\n dic[hen[0]].add(hen[1])\n dic[hen[1]].add(hen[0])\n\nprint(sum(all([H[i] > hs for hs in dic[i]]) for i in range(N)))', 'N, M = map(int,input().split())\n\nH = list(map(int, input().split()))\n\nV = [list(map(int, input().split())) for i in range(M)]\n\ncount = 0\n\ndic = {}\n\nfor i in range(1, N):\n dic[i] = set()\n\nfor hen in V:\n dic[hen[0]].add(hen[1])\n dic[hen[1]].add(hen[0])\n\nprint(sum(all([H[i] > hs for hs in dic[i]]) for i in N))', 'N, M = map(int,input().split())\n\nH = list(map(int, input().split()))\nH.insert(0, 0)\n\nV = [list(map(int, input().split())) for i in range(M)]\n\ncount = 0\n\ndic = {}\n\nfor i in range(1, N+1):\n dic[i] = set()\n\nfor hen in V:\n dic[hen[0]].add(hen[1])\n dic[hen[1]].add(hen[0])\n\nprint(sum(all([H[i] > H[hs] for hs in dic[i]]) for i in range(1, N+1)))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s034217757', 's237589354', 's407941909', 's006947832']
[10848.0, 65892.0, 65752.0, 65892.0]
[27.0, 398.0, 460.0, 542.0]
[312, 318, 311, 343]
p02689
u057993957
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['n, m = list(map(int, input().split()))\nH = list(map(int, input().split()))\nab = [list(map(int, input().split())) for i in range(m)]\n\nans = [1] * (n)\nroute = [1] * (n)\nfor i in range(len(ab)):\n a, b = ab[i]\n if H[a-1] <= H[b-1]:\n ans[a-1] = 0\n\n elif H[b-1] <= H[a-1]:\n ans[b-1] = 0\n \nprint(sum(cnt))', 'n, m = list(map(int, input().split()))\nH = list(map(int, input().split()))\nab = [list(map(int, input().split())) for i in range(m)]\n\nans = [1] * (n)\nroute = [1] * (n)\nfor i in range(len(ab)):\n a, b = ab[i]\n if H[a-1] <= H[b-1]:\n ans[a-1] = 0\n\n if H[b-1] <= H[a-1]:\n ans[b-1] = 0\n \nprint(sum(ans))']
['Runtime Error', 'Accepted']
['s659953327', 's747935650']
[32724.0, 32820.0]
[277.0, 315.0]
[320, 318]
p02689
u060896757
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['import numpy as np\n\nN, M = map(int, input().split())\nH = [int(a) for a in input().split()]\ngood = np.zeros(N, dtype=int)\nfor i in range(M):\n a, b = map(int, input().split())\n a -= 1\n b -= 1\n print(H[a], H[b])\n if H[a] > H[b]:\n good[b] += 1\n elif H[a] < H[b]:\n good[a] += 1\n\nans = 0\nprint(good)\nfor i in good:\n if i == 0:\n ans += 1\nprint(ans)\n', 'import numpy as np\n\nN, M = map(int, input().split())\nH = [int(a) for a in input().split()]\ngood = np.zeros(N, dtype=int)\nfor i in range(M):\n a, b = map(int, input().split())\n a -= 1\n b -= 1\n if H[a] > H[b]:\n good[b] += 1\n elif H[a] < H[b]:\n good[a] += 1\n else:\n good[a] += 1\n good[b] += 1\n\nans = 0\nfor i in good:\n if i == 0:\n ans += 1\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s898662648', 's303159052']
[38400.0, 38656.0]
[712.0, 434.0]
[384, 402]
p02689
u062484507
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['n, m = map(int, readline().split())\nh = list(map(int, readline().split()))\n\nl = [1]*n\nfor i in range(m):\n a, b= map(int, readline().split())\n if h[a - 1] < h[b - 1]:\n l[a - 1] = 0\n elif h[a - 1] > h[b - 1]:\n l[b - 1] = 0\n else:\n l[a - 1] = 0\n l[b - 1] = 0\nprint(sum(l))', 'import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nn, m = map(int, readline().split())\nh = list(map(int, readline().split()))\n\nl = [1]*n\nfor i in range(m):\n a, b= map(int, readline().split())\n if h[a - 1] < h[b - 1]:\n l[a - 1] = 0\n elif h[a - 1] > h[b - 1]:\n l[b - 1] = 0\n else:\n l[a - 1] = 0\n l[b - 1] = 0\nprint(sum(l))\n']
['Runtime Error', 'Accepted']
['s447157568', 's222677192']
[9088.0, 18288.0]
[26.0, 155.0]
[309, 427]
p02689
u062967213
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['\nn,m = map(int,input().split())\nh = list(map(int, input().split()))\nobs = []\nj = []\nfor i in range(m):\n a, b = list(map(int, input().split()))\n j.append([a,b])\n\nfor i in j:\n if h[i[0]-1] > h[i[1]-1]:\n obs.append(h[i[0]-1]) \n elif h[i[1]-1] > h[i[0]-1]:\n obs.append(h[i[1]-1])\nprint(obs) \nprint(len(set(obs)))', 'n,m = map(int,input().split())\nh = list(map(int, input().split()))\nok =[True] * n\nfor i in range(m):\n a, b = list(map(int,input().split()))\n if h[a-1] > h[b-1]:\n ok[b-1] = False\n elif h[b-1] > h[a-1]: \n ok[a-1] = False\n else:\n ok[a-1] = False\n ok[b-1] = False\nprint(ok.count(True))']
['Wrong Answer', 'Accepted']
['s226697084', 's734151034']
[32056.0, 20112.0]
[344.0, 262.0]
[347, 321]
p02689
u065994196
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['list1=list(map(int,input().strip().split()))[:2]\nn,m=list1[0],list1[1]\narr=list(map(int,input().strip().split()))[:n]\ndict1={}\nfor i in range(m):\n\tl=list(map(int,input().strip().split()))[:2]\n\tkey,val=l[0],l[1]\n\tif key in dict1:\n\t\tdict1[key].append(val)\n\telse:\n\t\tdict1[key]=[]\n\t\tdict1[key].append(val)\n\tif val in dict1:\n\t\tdict1[val].append(key)\n\telse:\n\t\tdict1[val]=[]\n\t\tdict1[val].append(key)\nprint(dict1)\ncount=0\nfor i in range(1,n+1):\n\tflag=0\n\tif i in dict1:\n\t\tl=arr[i-1]\n\t\tfor j in dict1[i]:\n\t\t\tif(l <= arr[j-1]):\n\t\t\t\tflag=1\n\t\t\t\tbreak\n\tif(flag==0):\n\t\tcount+=1\nprint(count)', 'list1=list(map(int,input().strip().split()))[:2]\nn,m=list1[0],list1[1]\narr=list(map(int,input().strip().split()))[:n]\ndict1={}\nfor i in range(m):\n\tl=list(map(int,input().strip().split()))[:2]\n\tkey,val=l[0],l[1]\n\tif key in dict1:\n\t\tdict1[key].append(val)\n\telse:\n\t\tdict1[key]=[]\n\t\tdict1[key].append(val)\n\tif val in dict1:\n\t\tdict1[val].append(key)\n\telse:\n\t\tdict1[val]=[]\n\t\tdict1[val].append(key)\ncount=0\nfor i in range(1,n+1):\n\tflag=0\n\tif i in dict1:\n\t\tl=arr[i-1]\n\t\tfor j in dict1[i]:\n\t\t\tif(l <= arr[j-1]):\n\t\t\t\tflag=1\n\t\t\t\tbreak\n\tif(flag==0):\n\t\tcount+=1\nprint(count)']
['Wrong Answer', 'Accepted']
['s715306038', 's159343407']
[35200.0, 31680.0]
[560.0, 441.0]
[575, 562]
p02689
u066551652
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['n, m = map(int, input().split())\nhs = list(map(int, input().split()))\n\nedge = [[] for _ in range(n)]\n\nfor i in range(m):\n a, b = map(int, input().split())\n a -= 1\n b -= 1\n edge[a].append(b)\n edge[b].append(a)\n\nprint(edge)\ncnt = 0\n\nfor node in range(n):\n good = True\n for neighbor in edge[node]:\n if hs[node] <= hs[neighbor]:\n good = False\n if good:\n cnt +=1\n\nprint(cnt)', 'n, m = map(int,input().split())\nh = list(map(int,input().split()))\nneighbor = [[0] for _ in range(n)]\ngood = 0\n\nfor i in range(m):\n a, b = map(int,input().split())\n a -= 1\n b -= 1\n neighbor[a].append(h[b])\n neighbor[b].append(h[a])\n\nfor i in range(n):\n my_height = h[i]\n neighbor_height = neighbor[i]\n if all(my_height > x for x in neighbor_height):\n good += 1\n\nprint(good)']
['Wrong Answer', 'Accepted']
['s029352393', 's188839787']
[33580.0, 26104.0]
[428.0, 456.0]
[418, 404]
p02689
u067074785
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['N,M = map(int,input().split())\nH = list(map(int,input().split()))\nXX = [set() for i in range(N)]\nans = 0\nfor i in range(M):\n A,B = map(int,input().split())\n XX[A-1].add(B-1)\n XX[B-1].add(A-1)\n \nfor i in range(N):\n for y in XX[i]:\n r = True\n if H[i]<=H[y]:\n r = False\n break\n if r:\n ans += 1\n\nprint(ans)\n', 'N,M = map(int,input().split())\nH = list(map(int,input().split()))\nXX = [set() for i in range(N)]\nans = 0\nfor i in range(M):\n A,B = map(int,input().split())\n XX[A-1].add(B-1)\n XX[B-1].add(A-1)\n \nfor i in range(N):\n r = True\n for y in XX[i]:\n if H[i]<=H[y]:\n r = False\n break\n if r:\n ans += 1\n\nprint(ans)\n', 'N,M = map(int,input().split())\nH = list(map(int,input().split()))\nXX = [set() for i in range(N)]\nans = 0\nfor i in range(M):\n A,B = map(int,input().split())\n XX[A-1].add(B)\n XX[B-1].add(A)\n \nfor i in range(N):\n for y in XX[1]\n \tif H[i]<=H[y]:\n break\n else:\n ans += 1\n \nprint(ans)', 'N,M = map(int,input().split())\nH = list(map(int,input().split()))\nAB = [set() for i in range(N)]\nfor i in range(M):\n A,B = map(int,input().split())\n AB[A-1].add(B-1)\n AB[B-1].add(A-1)\nans = 0\nfor i in range(N):\n res = True\n for x in AB[i]:\n if H[i]<=H[x]:\n res = False\n break\n if res:\n ans += 1\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s155090563', 's405085573', 's473547540', 's500804994']
[45296.0, 45268.0, 9068.0, 45236.0]
[426.0, 432.0, 22.0, 420.0]
[332, 330, 302, 359]
p02689
u067077296
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['n, m = map(int, input().split())\nh = list(map(int, input().split()))\na = [0] * m\nb = [0] * m\nfor i in range(m):\n a[i], b[i] = map(int, input().split())\n\ncnt = 0\n\nlose_flag = [0] * n\nfor j in range(m):\n if h[a[j]-1] < h[b[j]-1]:\n lose_flag[a[j]-1] = 1\n elif h[a[j]-1] > h[b[j]-1]:\n lose_flag[b[j]-1] = 1\n elif h[a[j]-1] == h[b[j]-1]:\n lose_flag[a[j]-1] = 1\n lose_flag[b[j]-1] = 1\n\ncnt += lose_flag.count(0)\nprint(lose_flag)\nprint(cnt)', 'n, m = map(int, input().split())\nh = list(map(int, input().split()))\na = [0] * m\nb = [0] * m\nfor i in range(m):\n a[i], b[i] = map(int, input().split())\n\ncnt = 0\n\nlose_flag = [0] * n\nfor j in range(m):\n if h[a[j]-1] < h[b[j]-1]:\n lose_flag[a[j]-1] = 1\n elif h[a[j]-1] > h[b[j]-1]:\n lose_flag[b[j]-1] = 1\n elif h[a[j]-1] == h[b[j]-1]:\n lose_flag[a[j]-1] = 1\n lose_flag[b[j]-1] = 1\n\ncnt += lose_flag.count(0)\n\nprint(cnt)']
['Wrong Answer', 'Accepted']
['s666336827', 's015088143']
[22308.0, 21808.0]
[293.0, 282.0]
[473, 457]
p02689
u067095357
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['vn, m = list(map(int, input().split()))\nhs = list(map(int, input().split()))\nans = [1]*n\nfor i in range(m):\n road = list(map(int, input().split()))\n if hs[road[0]-1] <= hs[road[1]-1]:\n ans[road[0]-1] = 0\n if hs[road[0]-1] >= hs[road[1]-1]:\n ans[road[1]-1] = 0\nprint(ans.count(0))\n', 'n, m = list(map(int, input().split()))\nhs = list(map(int, input().split()))\nans = [1]*n\nroads = []\nfor i in range(m):\n roads += list(map(int, input().split()))\nfor road in roads:\n if hs[road[0]-1] <= hs[road[1]-1]:\n ans[road[0]-1]\xa0= 0\n if hs[road[0]-1] >= hs[road[1]-1]:\n ans[road[1]-1]\xa0= 0\nprint(ans.count(1))', 'n, m = list(map(int, input().split()))\nhs = list(map(int, input().split()))\nans = [1]*n\nfor i in range(m):\n road = list(map(int, input().split()))\n if hs[road[0]-1] <= hs[road[1]-1]:\n ans[road[0]-1]\xa0= 0\n if hs[road[0]-1] >= hs[road[1]-1]:\n ans[road[1]-1]\xa0= 0\nprint(ans.count(0))', '#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n"""\nCreated on Sun May 3 13:26:56 2020\n\n@author: r\n"""\n\nimport sys\n\nn = int(input())\nt = [0]\nx = [0]\ny = [0]\nb = 1\n\nfor i in range(n):\n a = list(map(int, input().split()))\n t += [a[0]]\n x += [a[1]]\n y += [a[2]]\n\nfor i in range(n):\n if (x[i]-x[i+1]+y[i]-y[i+1]-t[i]+t[i+1])%2 or (abs(x[i]-x[i+1])+abs(y[i]-y[i+1])-abs(t[i]-t[i+1])) > 0:\n b = 0\n break\n \n \nif b == 0:\n print("No")\nelse:\n print("Yes")\n', 'vn, m = list(map(int, input().split()))\nhs = list(map(int, input().split()))\nans = [1]*n\nfor i in range(m):\n road = list(map(int, input().split()))\n if hs[road[0]-1] <= hs[road[1]-1]:\n ans[road[0]-1] = 0\n if hs[road[0]-1] >= hs[road[1]-1]:\n ans[road[1]-1] = 0\nprint(ans.count(0))\n', 'n, m = list(map(int, input().split()))\nhs = list(map(int, input().split()))\nans = [1]*n\nfor i in range(m):\n road = list(map(int, input().split()))\n if hs[road[0]-1] <= hs[road[1]-1]:\n ans[road[0]-1] = 0\n if hs[road[0]-1] >= hs[road[1]-1]:\n ans[road[1]-1] = 0\nprint(ans.count(1))\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s141770838', 's279886323', 's630766315', 's663973247', 's949838443', 's050322045']
[20128.0, 9000.0, 9044.0, 9268.0, 20112.0, 20052.0]
[42.0, 25.0, 23.0, 23.0, 41.0, 293.0]
[304, 336, 304, 491, 304, 303]
p02689
u071695942
2,000
1,048,576
There are N observatories in AtCoder Hill, called Obs. 1, Obs. 2, ..., Obs. N. The elevation of Obs. i is H_i. There are also M roads, each connecting two different observatories. Road j connects Obs. A_j and Obs. B_j. Obs. i is said to be good when its elevation is higher than those of all observatories that can be reached from Obs. i using just one road. Note that Obs. i is also good when no observatory can be reached from Obs. i using just one road. How many good observatories are there?
['N,M = map(int,input().split())\nlistH = list(map(int,input().split()))\nLofS = [set() for i in range(N) ]\nfor i in range(M):\n a,b=map(int,input().split())\n LofS[a-1].add(b)\n LofS[b-1].add(a)\nlistMax = []\nfor i in range(N):\n listMax.append( max( [ listH[j-1] for j in LofS[i] ] , default=0) )\nprint(listMax)\ncount = 0\nfor i in range(N):\n if listH[i] > listMax[i]:\n count += 1\nprint(count)', 'N,M = map(int,input().split())\nlistH = list(map(int,input().split()))\nLofS = [set() for i in range(N) ]\nfor i in range(M):\n a,b=map(int,input().split())\n LofS[a-1].add(b)\n LofS[b-1].add(a)\nlistMax = []\nfor i in range(N):\n listMax.append( max( [ listH[j-1] for j in LofS[i] ] , default=0) )\ncount = 0\nfor i in range(N):\n if listH[i] > listMax[i]:\n count += 1\nprint(count)\n']
['Wrong Answer', 'Accepted']
['s264236995', 's605185076']
[48680.0, 45924.0]
[475.0, 501.0]
[394, 380]