node_ids
listlengths 4
1.4k
| edge_index
listlengths 1
2.22k
| text
listlengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
4,
18,
4,
18,
13,
2,
18,
18,
13,
13,
13,
17,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
4,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
160,
14
],
[
160,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
19,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
19,
33
],
[
33,
34
],
[
33,
35
],
[
19,
37
],
[
37,
38
],
[
37,
39
],
[
19,
42
],
[
42,
43
],
[
42,
44
],
[
19,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
19,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
83,
93
],
[
93,
94
],
[
94,
95
],
[
83,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
98,
104
],
[
104,
105
],
[
105,
106
],
[
97,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
112,
118
],
[
107,
119
],
[
119,
120
],
[
119,
121
],
[
19,
122
],
[
122,
123
],
[
122,
124
],
[
19,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
125,
135
],
[
135,
136
],
[
136,
137
],
[
125,
138
],
[
139,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
141,
148
],
[
140,
149
],
[
149,
150
],
[
19,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
151,
156
],
[
15,
157
],
[
157,
158
],
[
0,
159
],
[
159,
160
],
[
159,
161
]
] |
[
"import java.util.ArrayList;\nimport java.util.Map;\nimport java.util.Scanner;\nimport java.util.TreeMap;\n\npublic class Main {\n\tpublic static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\t\t\tint N = scan.nextInt();\n\t\t\tint K = scan.nextInt();\n\t\t\tint []d = new int[K];\n\t\t\tint[][]A = new int[K][N];\n\t\t\tMap<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();\n\t\t\t\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i<K;i++) {\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tfor(int i = 0;i<map.size();i++) {\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\t\t\n\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Map;",
"Map",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.TreeMap;",
"TreeMap",
"java.util",
"public class Main {\n\tpublic static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\t\t\tint N = scan.nextInt();\n\t\t\tint K = scan.nextInt();\n\t\t\tint []d = new int[K];\n\t\t\tint[][]A = new int[K][N];\n\t\t\tMap<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();\n\t\t\t\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i<K;i++) {\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tfor(int i = 0;i<map.size();i++) {\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\t\t\n\n}",
"Main",
"public static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\t\t\tint N = scan.nextInt();\n\t\t\tint K = scan.nextInt();\n\t\t\tint []d = new int[K];\n\t\t\tint[][]A = new int[K][N];\n\t\t\tMap<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();\n\t\t\t\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i<K;i++) {\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tfor(int i = 0;i<map.size();i++) {\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}",
"main",
"{\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\t\t\tint N = scan.nextInt();\n\t\t\tint K = scan.nextInt();\n\t\t\tint []d = new int[K];\n\t\t\tint[][]A = new int[K][N];\n\t\t\tMap<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();\n\t\t\t\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i<K;i++) {\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tfor(int i = 0;i<map.size();i++) {\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}",
"try(Scanner scan = new Scanner(System.in)){\n\t\t\tint N = scan.nextInt();\n\t\t\tint K = scan.nextInt();\n\t\t\tint []d = new int[K];\n\t\t\tint[][]A = new int[K][N];\n\t\t\tMap<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();\n\t\t\t\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i<K;i++) {\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tfor(int i = 0;i<map.size();i++) {\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}",
"{\n\t\t\tint N = scan.nextInt();\n\t\t\tint K = scan.nextInt();\n\t\t\tint []d = new int[K];\n\t\t\tint[][]A = new int[K][N];\n\t\t\tMap<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();\n\t\t\t\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i<K;i++) {\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tfor(int i = 0;i<map.size();i++) {\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}",
"Scanner scan = new Scanner(System.in)",
"Scanner scan = new Scanner(System.in)",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int []d = new int[K];",
"d",
"new int[K]",
"K",
"int[][]A = new int[K][N];",
"A",
"new int[K][N]",
"K",
"N",
"Map<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();",
"map",
"new TreeMap<Integer,ArrayList<Integer>>()",
"for(int i = 0;i<N;i++) {\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}",
"{\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}",
"map.put(i,new ArrayList<Integer>())",
"map.put",
"map",
"i",
"new ArrayList<Integer>()",
"for(int i = 0;i<K;i++) {\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}",
"{\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}",
"d[i] = scan.nextInt()",
"d[i]",
"d",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j<d[i]",
"j",
"d[i]",
"d",
"i",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}",
"{\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}",
"A[i][j] = scan.nextInt()",
"A[i][j]",
"A[i]",
"A",
"i",
"j",
"scan.nextInt()",
"scan.nextInt",
"scan",
"map.get(A[i][j]-1).add(i+1)",
"map.get(A[i][j]-1).add",
"map.get(A[i][j]-1)",
"map.get",
"map",
"A[i][j]-1",
"A[i][j]",
"A[i]",
"A",
"i",
"j",
"1",
"i+1",
"i",
"1",
"int count = 0;",
"count",
"0",
"for(int i = 0;i<map.size();i++) {\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<map.size()",
"i",
"map.size()",
"map.size",
"map",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}",
"{\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}",
"if(map.get(i).size()==0)count++;",
"map.get(i).size()==0",
"map.get(i).size()",
"map.get(i).size",
"map.get(i)",
"map.get",
"map",
"i",
"0",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[]args",
"args",
"public class Main {\n\tpublic static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\t\t\tint N = scan.nextInt();\n\t\t\tint K = scan.nextInt();\n\t\t\tint []d = new int[K];\n\t\t\tint[][]A = new int[K][N];\n\t\t\tMap<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();\n\t\t\t\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i<K;i++) {\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tfor(int i = 0;i<map.size();i++) {\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\t\t\n\n}",
"public class Main {\n\tpublic static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\t\t\tint N = scan.nextInt();\n\t\t\tint K = scan.nextInt();\n\t\t\tint []d = new int[K];\n\t\t\tint[][]A = new int[K][N];\n\t\t\tMap<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();\n\t\t\t\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tmap.put(i,new ArrayList<Integer>());\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0;i<K;i++) {\n\t\t\t\td[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ\n\t\t\t\tfor(int j = 0;j<d[i];j++) {\n\t\t\t\t\tA[i][j] = scan.nextInt();//ใใใใๅฅดใ\n\t\t\t\t\tmap.get(A[i][j]-1).add(i+1);\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tfor(int i = 0;i<map.size();i++) {\n\t\t\t\tif(map.get(i).size()==0)count++;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tfor(int j = 0;j<map.get(i).size();j++) {\n\t\t\t\t\tSystem.out.print(map.get(i).get(j));\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t*/\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\t\t\n\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Main {
public static void main(String[]args) {
try(Scanner scan = new Scanner(System.in)){
int N = scan.nextInt();
int K = scan.nextInt();
int []d = new int[K];
int[][]A = new int[K][N];
Map<Integer,ArrayList<Integer>>map = new TreeMap<Integer,ArrayList<Integer>>();
for(int i = 0;i<N;i++) {
map.put(i,new ArrayList<Integer>());
}
for(int i = 0;i<K;i++) {
d[i] = scan.nextInt();//i็ช็ฎใฎใ่ๅญใใใใไบบๆฐ
for(int j = 0;j<d[i];j++) {
A[i][j] = scan.nextInt();//ใใใใๅฅดใ
map.get(A[i][j]-1).add(i+1);
}
}
int count = 0;
for(int i = 0;i<map.size();i++) {
if(map.get(i).size()==0)count++;
/*
for(int j = 0;j<map.get(i).size();j++) {
System.out.print(map.get(i).get(j));
}
System.out.println();
*/
}
System.out.println(count);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
200,
17
],
[
200,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
40,
41
],
[
40,
42
],
[
20,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
20,
80
],
[
80,
81
],
[
80,
82
],
[
20,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
83,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
96,
102
],
[
102,
103
],
[
103,
104
],
[
20,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
18,
109
],
[
109,
110
],
[
200,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
111,
115
],
[
115,
116
],
[
111,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
111,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
126,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
136,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
125,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
111,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
158,
159
],
[
111,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
164,
167
],
[
167,
168
],
[
111,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
173,
176
],
[
176,
177
],
[
111,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
184,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
180,
197
],
[
197,
198
],
[
0,
199
],
[
199,
200
],
[
199,
201
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n private static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n public static void main(final String[] args) throws IOException {\n FastReader in = new FastReader();\n PrintWriter out = new PrintWriter(System.out, true);\n\n int n = in.nextInt();\n int k = in.nextInt();\n int[] snukes = new int[n + 1];\n\n for (int i = 1; i <= k; i++) {\n int d = in.nextInt();\n for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }\n }\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n if (snukes[i] == 0) {\n answer++;\n }\n }\n out.println(answer);\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\n private static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n public static void main(final String[] args) throws IOException {\n FastReader in = new FastReader();\n PrintWriter out = new PrintWriter(System.out, true);\n\n int n = in.nextInt();\n int k = in.nextInt();\n int[] snukes = new int[n + 1];\n\n for (int i = 1; i <= k; i++) {\n int d = in.nextInt();\n for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }\n }\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n if (snukes[i] == 0) {\n answer++;\n }\n }\n out.println(answer);\n }\n}",
"Main",
"public static void main(final String[] args) throws IOException {\n FastReader in = new FastReader();\n PrintWriter out = new PrintWriter(System.out, true);\n\n int n = in.nextInt();\n int k = in.nextInt();\n int[] snukes = new int[n + 1];\n\n for (int i = 1; i <= k; i++) {\n int d = in.nextInt();\n for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }\n }\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n if (snukes[i] == 0) {\n answer++;\n }\n }\n out.println(answer);\n }",
"main",
"{\n FastReader in = new FastReader();\n PrintWriter out = new PrintWriter(System.out, true);\n\n int n = in.nextInt();\n int k = in.nextInt();\n int[] snukes = new int[n + 1];\n\n for (int i = 1; i <= k; i++) {\n int d = in.nextInt();\n for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }\n }\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n if (snukes[i] == 0) {\n answer++;\n }\n }\n out.println(answer);\n }",
"FastReader in = new FastReader();",
"in",
"new FastReader()",
"PrintWriter out = new PrintWriter(System.out, true);",
"out",
"new PrintWriter(System.out, true)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int k = in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"int[] snukes = new int[n + 1];",
"snukes",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 1; i <= k; i++) {\n int d = in.nextInt();\n for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d = in.nextInt();\n for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }\n }",
"{\n int d = in.nextInt();\n for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }\n }",
"int d = in.nextInt();",
"d",
"in.nextInt()",
"in.nextInt",
"in",
"for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }",
"int j = 1;",
"int j = 1;",
"j",
"1",
"j <= d",
"j",
"d",
"j++",
"j++",
"j",
"{\n snukes[in.nextInt()]++;\n }",
"{\n snukes[in.nextInt()]++;\n }",
"snukes[in.nextInt()]++",
"snukes[in.nextInt()]",
"snukes",
"in.nextInt()",
"in.nextInt",
"in",
"int answer = 0;",
"answer",
"0",
"for (int i = 1; i <= n; i++) {\n if (snukes[i] == 0) {\n answer++;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (snukes[i] == 0) {\n answer++;\n }\n }",
"{\n if (snukes[i] == 0) {\n answer++;\n }\n }",
"if (snukes[i] == 0) {\n answer++;\n }",
"snukes[i] == 0",
"snukes[i]",
"snukes",
"i",
"0",
"{\n answer++;\n }",
"answer++",
"answer",
"out.println(answer)",
"out.println",
"out",
"answer",
"final String[] args",
"args",
"private static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"FastReader",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n str = br.readLine();\n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n\n private static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n public static void main(final String[] args) throws IOException {\n FastReader in = new FastReader();\n PrintWriter out = new PrintWriter(System.out, true);\n\n int n = in.nextInt();\n int k = in.nextInt();\n int[] snukes = new int[n + 1];\n\n for (int i = 1; i <= k; i++) {\n int d = in.nextInt();\n for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }\n }\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n if (snukes[i] == 0) {\n answer++;\n }\n }\n out.println(answer);\n }\n}",
"public class Main {\n\n private static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n public static void main(final String[] args) throws IOException {\n FastReader in = new FastReader();\n PrintWriter out = new PrintWriter(System.out, true);\n\n int n = in.nextInt();\n int k = in.nextInt();\n int[] snukes = new int[n + 1];\n\n for (int i = 1; i <= k; i++) {\n int d = in.nextInt();\n for (int j = 1; j <= d; j++) {\n snukes[in.nextInt()]++;\n }\n }\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n if (snukes[i] == 0) {\n answer++;\n }\n }\n out.println(answer);\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
private static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
public static void main(final String[] args) throws IOException {
FastReader in = new FastReader();
PrintWriter out = new PrintWriter(System.out, true);
int n = in.nextInt();
int k = in.nextInt();
int[] snukes = new int[n + 1];
for (int i = 1; i <= k; i++) {
int d = in.nextInt();
for (int j = 1; j <= d; j++) {
snukes[in.nextInt()]++;
}
}
int answer = 0;
for (int i = 1; i <= n; i++) {
if (snukes[i] == 0) {
answer++;
}
}
out.println(answer);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
13,
17,
30,
14,
2,
18,
13,
2,
18,
18,
13,
13,
13,
17,
17,
0,
18,
13,
2,
18,
18,
13,
13,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
190,
5
],
[
190,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
51,
61
],
[
61,
62
],
[
62,
63
],
[
51,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
8,
75
],
[
75,
76
],
[
75,
77
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
8,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
96,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
109,
117
],
[
117,
118
],
[
118,
119
],
[
109,
120
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
123,
129
],
[
122,
130
],
[
122,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
135,
141
],
[
132,
142
],
[
131,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
147,
151
],
[
146,
152
],
[
143,
153
],
[
8,
154
],
[
154,
155
],
[
154,
156
],
[
8,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
157,
162
],
[
162,
163
],
[
162,
164
],
[
157,
165
],
[
165,
166
],
[
166,
167
],
[
157,
168
],
[
169,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
171,
175
],
[
170,
176
],
[
176,
177
],
[
8,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
178,
183
],
[
8,
184
],
[
184,
185
],
[
185,
186
],
[
6,
187
],
[
187,
188
],
[
0,
189
],
[
189,
190
],
[
189,
191
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int N=sc.nextInt();\n\t\t int K=sc.nextInt();\n\t\t int d[]=new int[K];\n\t\t int A[][]=new int[K][N];\n\t\t for(int i=0;i<K;i++) {\n\t\t\t d[i]=sc.nextInt();\n\t\t\t for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }\n\t\t }\n\t\t boolean student[]=new boolean[N];\n\t\t for(int i=0;i<N;i++)\n\t\t\t student[i]=false;\n\t\t for(int i=0;i<K;i++) {\n\t\t\t for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }\n\t\t }\n\t\t int num=0;\n\t\t for(int i=0;i<N;i++) {\n\t\t\t if(student[i]==false)\n\t\t\t\t num++;\n\t\t }\n\t System.out.println(num);\n\t sc.close();\n\t }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int N=sc.nextInt();\n\t\t int K=sc.nextInt();\n\t\t int d[]=new int[K];\n\t\t int A[][]=new int[K][N];\n\t\t for(int i=0;i<K;i++) {\n\t\t\t d[i]=sc.nextInt();\n\t\t\t for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }\n\t\t }\n\t\t boolean student[]=new boolean[N];\n\t\t for(int i=0;i<N;i++)\n\t\t\t student[i]=false;\n\t\t for(int i=0;i<K;i++) {\n\t\t\t for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }\n\t\t }\n\t\t int num=0;\n\t\t for(int i=0;i<N;i++) {\n\t\t\t if(student[i]==false)\n\t\t\t\t num++;\n\t\t }\n\t System.out.println(num);\n\t sc.close();\n\t }\n}",
"Main",
"public static void main(String[] args){\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int N=sc.nextInt();\n\t\t int K=sc.nextInt();\n\t\t int d[]=new int[K];\n\t\t int A[][]=new int[K][N];\n\t\t for(int i=0;i<K;i++) {\n\t\t\t d[i]=sc.nextInt();\n\t\t\t for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }\n\t\t }\n\t\t boolean student[]=new boolean[N];\n\t\t for(int i=0;i<N;i++)\n\t\t\t student[i]=false;\n\t\t for(int i=0;i<K;i++) {\n\t\t\t for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }\n\t\t }\n\t\t int num=0;\n\t\t for(int i=0;i<N;i++) {\n\t\t\t if(student[i]==false)\n\t\t\t\t num++;\n\t\t }\n\t System.out.println(num);\n\t sc.close();\n\t }",
"main",
"{\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int N=sc.nextInt();\n\t\t int K=sc.nextInt();\n\t\t int d[]=new int[K];\n\t\t int A[][]=new int[K][N];\n\t\t for(int i=0;i<K;i++) {\n\t\t\t d[i]=sc.nextInt();\n\t\t\t for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }\n\t\t }\n\t\t boolean student[]=new boolean[N];\n\t\t for(int i=0;i<N;i++)\n\t\t\t student[i]=false;\n\t\t for(int i=0;i<K;i++) {\n\t\t\t for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }\n\t\t }\n\t\t int num=0;\n\t\t for(int i=0;i<N;i++) {\n\t\t\t if(student[i]==false)\n\t\t\t\t num++;\n\t\t }\n\t System.out.println(num);\n\t sc.close();\n\t }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N=sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K=sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d[]=new int[K];",
"d",
"new int[K]",
"K",
"int A[][]=new int[K][N];",
"A",
"new int[K][N]",
"K",
"N",
"for(int i=0;i<K;i++) {\n\t\t\t d[i]=sc.nextInt();\n\t\t\t for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }\n\t\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\t d[i]=sc.nextInt();\n\t\t\t for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }\n\t\t }",
"{\n\t\t\t d[i]=sc.nextInt();\n\t\t\t for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }\n\t\t }",
"d[i]=sc.nextInt()",
"d[i]",
"d",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }",
"int count=0;",
"int count=0;",
"count",
"0",
"count<d[i]",
"count",
"d[i]",
"d",
"i",
"count++",
"count++",
"count",
"{\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }",
"{\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }",
"A[i][count]=sc.nextInt()",
"A[i][count]",
"A[i]",
"A",
"i",
"count",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean student[]=new boolean[N];",
"student",
"new boolean[N]",
"N",
"for(int i=0;i<N;i++)\n\t\t\t student[i]=false;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"student[i]=false;",
"student[i]=false",
"student[i]",
"student",
"i",
"false",
"for(int i=0;i<K;i++) {\n\t\t\t for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }\n\t\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\t for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }\n\t\t }",
"{\n\t\t\t for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }\n\t\t }",
"for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }",
"int count=0;",
"int count=0;",
"count",
"0",
"count<N",
"count",
"N",
"count++",
"count++",
"count",
"{\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }",
"{\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }",
"if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;",
"A[i][count]==0",
"A[i][count]",
"A[i]",
"A",
"i",
"count",
"0",
"{}",
"if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;",
"student[A[i][count]-1]==false",
"student[A[i][count]-1]",
"student",
"A[i][count]-1",
"A[i][count]",
"A[i]",
"A",
"i",
"count",
"1",
"false",
"student[A[i][count]-1]=true",
"student[A[i][count]-1]",
"student",
"A[i][count]-1",
"A[i][count]",
"A[i]",
"A",
"i",
"count",
"1",
"true",
"int num=0;",
"num",
"0",
"for(int i=0;i<N;i++) {\n\t\t\t if(student[i]==false)\n\t\t\t\t num++;\n\t\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\t if(student[i]==false)\n\t\t\t\t num++;\n\t\t }",
"{\n\t\t\t if(student[i]==false)\n\t\t\t\t num++;\n\t\t }",
"if(student[i]==false)\n\t\t\t\t num++;",
"student[i]==false",
"student[i]",
"student",
"i",
"false",
"num++",
"num",
"System.out.println(num)",
"System.out.println",
"System.out",
"System",
"System.out",
"num",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int N=sc.nextInt();\n\t\t int K=sc.nextInt();\n\t\t int d[]=new int[K];\n\t\t int A[][]=new int[K][N];\n\t\t for(int i=0;i<K;i++) {\n\t\t\t d[i]=sc.nextInt();\n\t\t\t for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }\n\t\t }\n\t\t boolean student[]=new boolean[N];\n\t\t for(int i=0;i<N;i++)\n\t\t\t student[i]=false;\n\t\t for(int i=0;i<K;i++) {\n\t\t\t for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }\n\t\t }\n\t\t int num=0;\n\t\t for(int i=0;i<N;i++) {\n\t\t\t if(student[i]==false)\n\t\t\t\t num++;\n\t\t }\n\t System.out.println(num);\n\t sc.close();\n\t }\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int N=sc.nextInt();\n\t\t int K=sc.nextInt();\n\t\t int d[]=new int[K];\n\t\t int A[][]=new int[K][N];\n\t\t for(int i=0;i<K;i++) {\n\t\t\t d[i]=sc.nextInt();\n\t\t\t for(int count=0;count<d[i];count++) {\n\t\t\t\t A[i][count]=sc.nextInt();\n\t\t\t }\n\t\t }\n\t\t boolean student[]=new boolean[N];\n\t\t for(int i=0;i<N;i++)\n\t\t\t student[i]=false;\n\t\t for(int i=0;i<K;i++) {\n\t\t\t for(int count=0;count<N;count++) {\n\t\t\t\t if(A[i][count]==0) {}\n\t\t\t\t else if(student[A[i][count]-1]==false) \n\t\t\t\t\t\tstudent[A[i][count]-1]=true;\n\t\t\t }\n\t\t }\n\t\t int num=0;\n\t\t for(int i=0;i<N;i++) {\n\t\t\t if(student[i]==false)\n\t\t\t\t num++;\n\t\t }\n\t System.out.println(num);\n\t sc.close();\n\t }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N=sc.nextInt();
int K=sc.nextInt();
int d[]=new int[K];
int A[][]=new int[K][N];
for(int i=0;i<K;i++) {
d[i]=sc.nextInt();
for(int count=0;count<d[i];count++) {
A[i][count]=sc.nextInt();
}
}
boolean student[]=new boolean[N];
for(int i=0;i<N;i++)
student[i]=false;
for(int i=0;i<K;i++) {
for(int count=0;count<N;count++) {
if(A[i][count]==0) {}
else if(student[A[i][count]-1]==false)
student[A[i][count]-1]=true;
}
}
int num=0;
for(int i=0;i<N;i++) {
if(student[i]==false)
num++;
}
System.out.println(num);
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
4,
18,
13,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
31,
41
],
[
41,
42
],
[
42,
43
],
[
31,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
46,
53
],
[
53,
54
],
[
53,
55
],
[
46,
56
],
[
56,
57
],
[
57,
58
],
[
46,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
8,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
6,
95
],
[
95,
96
]
] |
[
"import java.util.*;\nclass Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int[] ary = new int[n+1];\n int ans = 0;\n for (int i = 1; i < k+1 ; i++){\n for(int d = scan.nextInt(); d>0 ; d--){\n ary[scan.nextInt()] ++;\n }\n }\n for (int i = 1; i<=n ; i++){\n if (ary[i]==0){\n ans ++;\n }\n }\n System.out.println(ans);\n }\n }",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int[] ary = new int[n+1];\n int ans = 0;\n for (int i = 1; i < k+1 ; i++){\n for(int d = scan.nextInt(); d>0 ; d--){\n ary[scan.nextInt()] ++;\n }\n }\n for (int i = 1; i<=n ; i++){\n if (ary[i]==0){\n ans ++;\n }\n }\n System.out.println(ans);\n }\n }",
"Main",
"public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int[] ary = new int[n+1];\n int ans = 0;\n for (int i = 1; i < k+1 ; i++){\n for(int d = scan.nextInt(); d>0 ; d--){\n ary[scan.nextInt()] ++;\n }\n }\n for (int i = 1; i<=n ; i++){\n if (ary[i]==0){\n ans ++;\n }\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int k = scan.nextInt();\n int[] ary = new int[n+1];\n int ans = 0;\n for (int i = 1; i < k+1 ; i++){\n for(int d = scan.nextInt(); d>0 ; d--){\n ary[scan.nextInt()] ++;\n }\n }\n for (int i = 1; i<=n ; i++){\n if (ary[i]==0){\n ans ++;\n }\n }\n System.out.println(ans);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] ary = new int[n+1];",
"ary",
"new int[n+1]",
"n+1",
"n",
"1",
"int ans = 0;",
"ans",
"0",
"for (int i = 1; i < k+1 ; i++){\n for(int d = scan.nextInt(); d>0 ; d--){\n ary[scan.nextInt()] ++;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < k+1",
"i",
"k+1",
"k",
"1",
"i++",
"i++",
"i",
"{\n for(int d = scan.nextInt(); d>0 ; d--){\n ary[scan.nextInt()] ++;\n }\n }",
"{\n for(int d = scan.nextInt(); d>0 ; d--){\n ary[scan.nextInt()] ++;\n }\n }",
"for(int d = scan.nextInt(); d>0 ; d--){\n ary[scan.nextInt()] ++;\n }",
"int d = scan.nextInt();",
"int d = scan.nextInt();",
"d",
"scan.nextInt()",
"scan.nextInt",
"scan",
"d>0",
"d",
"0",
"d--",
"d--",
"d",
"{\n ary[scan.nextInt()] ++;\n }",
"{\n ary[scan.nextInt()] ++;\n }",
"ary[scan.nextInt()] ++",
"ary[scan.nextInt()]",
"ary",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (int i = 1; i<=n ; i++){\n if (ary[i]==0){\n ans ++;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (ary[i]==0){\n ans ++;\n }\n }",
"{\n if (ary[i]==0){\n ans ++;\n }\n }",
"if (ary[i]==0){\n ans ++;\n }",
"ary[i]==0",
"ary[i]",
"ary",
"i",
"0",
"{\n ans ++;\n }",
"ans ++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args"
] |
import java.util.*;
class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int k = scan.nextInt();
int[] ary = new int[n+1];
int ans = 0;
for (int i = 1; i < k+1 ; i++){
for(int d = scan.nextInt(); d>0 ; d--){
ary[scan.nextInt()] ++;
}
}
for (int i = 1; i<=n ; i++){
if (ary[i]==0){
ans ++;
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
2,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
104,
5
],
[
104,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
62,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
72,
80
],
[
80,
81
],
[
81,
82
],
[
72,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
85,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
6,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint have[] = new int[n];\n \t\t\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint have[] = new int[n];\n \t\t\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint have[] = new int[n];\n \t\t\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint have[] = new int[n];\n \t\t\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int have[] = new int[n];",
"have",
"new int[n]",
"n",
"for(int i=0;i<k;i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}\n\t\t}",
"int d = scan.nextInt();",
"d",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}",
"{\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}",
"int take = scan.nextInt();",
"take",
"scan.nextInt()",
"scan.nextInt",
"scan",
"have[take-1] = 1",
"have[take-1]",
"have",
"take-1",
"take",
"1",
"1",
"int ans = 0;",
"ans",
"0",
"for(int i=0;i<n;i++) {\n\t\t\tif(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}\n\t\t}",
"if(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}",
"have[i] == 0",
"have[i]",
"have",
"i",
"0",
"{\n\t\t\t\tans += 1;\n\t\t\t}",
"ans += 1",
"ans",
"1",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint have[] = new int[n];\n \t\t\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint have[] = new int[n];\n \t\t\n\t\tfor(int i=0;i<k;i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint take = scan.nextInt();\n\t\t\t\thave[take-1] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(have[i] == 0) {\n\t\t\t\tans += 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\t\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int k = scan.nextInt();
int have[] = new int[n];
for(int i=0;i<k;i++) {
int d = scan.nextInt();
for(int j=0;j<d;j++) {
int take = scan.nextInt();
have[take-1] = 1;
}
}
int ans = 0;
for(int i=0;i<n;i++) {
if(have[i] == 0) {
ans += 1;
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
20,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
101,
8
],
[
101,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
39,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
11,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
11,
87
],
[
87,
88
],
[
88,
89
],
[
11,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
96,
97
],
[
9,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
] |
[
"import java.util.Scanner;\nimport java.util.ArrayList;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n ArrayList<Integer> ar = new ArrayList<Integer>();\n for(int i=0; i<N; i++) {\n ar.add(i+1);\n }\n int K = scan.nextInt();\n for(int i=0; i<K; i++) {\n int d = scan.nextInt();\n for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }\n }\n scan.close();\n\n System.out.println(ar.size());\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n ArrayList<Integer> ar = new ArrayList<Integer>();\n for(int i=0; i<N; i++) {\n ar.add(i+1);\n }\n int K = scan.nextInt();\n for(int i=0; i<K; i++) {\n int d = scan.nextInt();\n for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }\n }\n scan.close();\n\n System.out.println(ar.size());\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n ArrayList<Integer> ar = new ArrayList<Integer>();\n for(int i=0; i<N; i++) {\n ar.add(i+1);\n }\n int K = scan.nextInt();\n for(int i=0; i<K; i++) {\n int d = scan.nextInt();\n for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }\n }\n scan.close();\n\n System.out.println(ar.size());\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n ArrayList<Integer> ar = new ArrayList<Integer>();\n for(int i=0; i<N; i++) {\n ar.add(i+1);\n }\n int K = scan.nextInt();\n for(int i=0; i<K; i++) {\n int d = scan.nextInt();\n for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }\n }\n scan.close();\n\n System.out.println(ar.size());\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"ArrayList<Integer> ar = new ArrayList<Integer>();",
"ar",
"new ArrayList<Integer>()",
"for(int i=0; i<N; i++) {\n ar.add(i+1);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n ar.add(i+1);\n }",
"{\n ar.add(i+1);\n }",
"ar.add(i+1)",
"ar.add",
"ar",
"i+1",
"i",
"1",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i=0; i<K; i++) {\n int d = scan.nextInt();\n for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int d = scan.nextInt();\n for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }\n }",
"{\n int d = scan.nextInt();\n for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }\n }",
"int d = scan.nextInt();",
"d",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }",
"{\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }",
"int A = scan.nextInt();",
"A",
"scan.nextInt()",
"scan.nextInt",
"scan",
"ar.remove(new Integer(A))",
"ar.remove",
"ar",
"new Integer(A)",
"scan.close()",
"scan.close",
"scan",
"System.out.println(ar.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"ar.size()",
"ar.size",
"ar",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n ArrayList<Integer> ar = new ArrayList<Integer>();\n for(int i=0; i<N; i++) {\n ar.add(i+1);\n }\n int K = scan.nextInt();\n for(int i=0; i<K; i++) {\n int d = scan.nextInt();\n for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }\n }\n scan.close();\n\n System.out.println(ar.size());\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n ArrayList<Integer> ar = new ArrayList<Integer>();\n for(int i=0; i<N; i++) {\n ar.add(i+1);\n }\n int K = scan.nextInt();\n for(int i=0; i<K; i++) {\n int d = scan.nextInt();\n for(int j=0; j<d; j++) {\n int A = scan.nextInt();\n ar.remove(new Integer(A));\n }\n }\n scan.close();\n\n System.out.println(ar.size());\n }\n}",
"Main"
] |
import java.util.Scanner;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
ArrayList<Integer> ar = new ArrayList<Integer>();
for(int i=0; i<N; i++) {
ar.add(i+1);
}
int K = scan.nextInt();
for(int i=0; i<K; i++) {
int d = scan.nextInt();
for(int j=0; j<d; j++) {
int A = scan.nextInt();
ar.remove(new Integer(A));
}
}
scan.close();
System.out.println(ar.size());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
20,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
29,
30
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
65,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
8,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
76,
84
],
[
84,
85
],
[
85,
86
],
[
76,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
95,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint d;\n\t\tint a;;\n\t\tboolean[] b = new boolean[n+1];\n\t\tint count = 0;\n\n\t\tfor(int i=1;i<=k;i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint d;\n\t\tint a;;\n\t\tboolean[] b = new boolean[n+1];\n\t\tint count = 0;\n\n\t\tfor(int i=1;i<=k;i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint d;\n\t\tint a;;\n\t\tboolean[] b = new boolean[n+1];\n\t\tint count = 0;\n\n\t\tfor(int i=1;i<=k;i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint d;\n\t\tint a;;\n\t\tboolean[] b = new boolean[n+1];\n\t\tint count = 0;\n\n\t\tfor(int i=1;i<=k;i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int d;",
"d",
"int a;",
"a",
"boolean[] b = new boolean[n+1];",
"b",
"new boolean[n+1]",
"n+1",
"n",
"1",
"int count = 0;",
"count",
"0",
"for(int i=1;i<=k;i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\td = scan.nextInt();\n\t\t\tfor(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}\n\t\t}",
"{\n\t\t\td = scan.nextInt();\n\t\t\tfor(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}\n\t\t}",
"d = scan.nextInt()",
"d",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}",
"int j=1;",
"int j=1;",
"j",
"1",
"j<=d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}",
"{\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}",
"a = scan.nextInt()",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"b[a] = true",
"b[a]",
"b",
"a",
"true",
"for(int i=1;i<=n;i++) {\n\t\t\tif(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}",
"!b[i]",
"b[i]",
"b",
"i",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint d;\n\t\tint a;;\n\t\tboolean[] b = new boolean[n+1];\n\t\tint count = 0;\n\n\t\tfor(int i=1;i<=k;i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint d;\n\t\tint a;;\n\t\tboolean[] b = new boolean[n+1];\n\t\tint count = 0;\n\n\t\tfor(int i=1;i<=k;i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor(int j=1;j<=d;j++) {\n\t\t\t\ta = scan.nextInt();\n\t\t\t\tb[a] = true;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(!b[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int k = scan.nextInt();
int d;
int a;;
boolean[] b = new boolean[n+1];
int count = 0;
for(int i=1;i<=k;i++) {
d = scan.nextInt();
for(int j=1;j<=d;j++) {
a = scan.nextInt();
b[a] = true;
}
}
for(int i=1;i<=n;i++) {
if(!b[i]) {
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
2,
13,
17,
17,
41,
13,
17,
28,
13,
13,
30,
30,
0,
13,
13,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
116,
11
],
[
116,
12
],
[
12,
13
],
[
12,
14
],
[
116,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
17,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
17,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
87,
93
],
[
17,
94
],
[
94,
95
],
[
94,
96
],
[
17,
97
],
[
97,
98
],
[
97,
99
],
[
97,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
17,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
15,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
] |
[
"import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n static int n = 0;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a = sc.nextInt();\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n; i++) {\n list.add(0);\n }\n\n for (int i = 0; i < a; i++) {\n int b = sc.nextInt();\n for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }\n }\n\n int ans = 0;\n for (int x : list) {\n ans += x;\n }\n\n System.out.println(n - ans);\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n static int n = 0;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a = sc.nextInt();\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n; i++) {\n list.add(0);\n }\n\n for (int i = 0; i < a; i++) {\n int b = sc.nextInt();\n for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }\n }\n\n int ans = 0;\n for (int x : list) {\n ans += x;\n }\n\n System.out.println(n - ans);\n }\n}",
"Main",
"static int n = 0;",
"n",
"0",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a = sc.nextInt();\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n; i++) {\n list.add(0);\n }\n\n for (int i = 0; i < a; i++) {\n int b = sc.nextInt();\n for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }\n }\n\n int ans = 0;\n for (int x : list) {\n ans += x;\n }\n\n System.out.println(n - ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a = sc.nextInt();\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n; i++) {\n list.add(0);\n }\n\n for (int i = 0; i < a; i++) {\n int b = sc.nextInt();\n for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }\n }\n\n int ans = 0;\n for (int x : list) {\n ans += x;\n }\n\n System.out.println(n - ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> list = new ArrayList<Integer>();",
"list",
"new ArrayList<Integer>()",
"for (int i = 0; i < n; i++) {\n list.add(0);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n list.add(0);\n }",
"{\n list.add(0);\n }",
"list.add(0)",
"list.add",
"list",
"0",
"for (int i = 0; i < a; i++) {\n int b = sc.nextInt();\n for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a",
"i",
"a",
"i++",
"i++",
"i",
"{\n int b = sc.nextInt();\n for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }\n }",
"{\n int b = sc.nextInt();\n for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }\n }",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < b",
"j",
"b",
"j++",
"j++",
"j",
"{\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }",
"{\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }",
"int tmp = sc.nextInt();",
"tmp",
"sc.nextInt()",
"sc.nextInt",
"sc",
"list.set(tmp - 1, 1)",
"list.set",
"list",
"tmp - 1",
"tmp",
"1",
"1",
"int ans = 0;",
"ans",
"0",
"for (int x : list) {\n ans += x;\n }",
"int x",
"list",
"{\n ans += x;\n }",
"{\n ans += x;\n }",
"ans += x",
"ans",
"x",
"System.out.println(n - ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"n - ans",
"n",
"ans",
"String[] args",
"args",
"public class Main {\n static int n = 0;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a = sc.nextInt();\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n; i++) {\n list.add(0);\n }\n\n for (int i = 0; i < a; i++) {\n int b = sc.nextInt();\n for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }\n }\n\n int ans = 0;\n for (int x : list) {\n ans += x;\n }\n\n System.out.println(n - ans);\n }\n}",
"public class Main {\n static int n = 0;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int a = sc.nextInt();\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n; i++) {\n list.add(0);\n }\n\n for (int i = 0; i < a; i++) {\n int b = sc.nextInt();\n for (int j = 0; j < b; j++) {\n int tmp = sc.nextInt();\n list.set(tmp - 1, 1);\n }\n }\n\n int ans = 0;\n for (int x : list) {\n ans += x;\n }\n\n System.out.println(n - ans);\n }\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
static int n = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int a = sc.nextInt();
List<Integer> list = new ArrayList<Integer>();
for (int i = 0; i < n; i++) {
list.add(0);
}
for (int i = 0; i < a; i++) {
int b = sc.nextInt();
for (int j = 0; j < b; j++) {
int tmp = sc.nextInt();
list.set(tmp - 1, 1);
}
}
int ans = 0;
for (int x : list) {
ans += x;
}
System.out.println(n - ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
40,
18,
13,
13,
30,
40,
13,
0,
18,
13,
13,
17,
4,
18,
13,
13,
12,
13,
30,
4,
18,
13,
4,
18,
13,
12,
13,
30,
38,
30,
41,
13,
20,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
17,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
4,
18,
13,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
197,
23
],
[
197,
24
],
[
24,
25
],
[
24,
26
],
[
197,
27
],
[
27,
28
],
[
27,
29
],
[
197,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
43,
45
],
[
46,
47
],
[
46,
48
],
[
32,
49
],
[
49,
50
],
[
49,
51
],
[
32,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
70,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
94,
95
],
[
82,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
32,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
197,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
107,
111
],
[
111,
112
],
[
112,
113
],
[
197,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
123,
124
],
[
114,
125
],
[
125,
126
],
[
197,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
127,
131
],
[
131,
132
],
[
127,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
139,
141
],
[
133,
142
],
[
142,
143
],
[
127,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
147,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
157,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
146,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
127,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
175,
178
],
[
178,
179
],
[
127,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
184,
187
],
[
187,
188
],
[
127,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
197,
195
],
[
0,
196
],
[
196,
197
],
[
196,
198
]
] |
[
"\nimport java.io.BufferedReader;\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main implements Closeable {\n\n private InputReader in = new InputReader(System.in);\n private PrintWriter out = new PrintWriter(System.out);\n\n public void solve() {\n int n = in.ni(), k = in.ni();\n boolean[] has = new boolean[n + 1];\n int result = n;\n for (int i = 0; i < k; i++) {\n int d = in.ni();\n for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }\n }\n out.println(result);\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }\n\n public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.Closeable;",
"Closeable",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main implements Closeable {\n\n private InputReader in = new InputReader(System.in);\n private PrintWriter out = new PrintWriter(System.out);\n\n public void solve() {\n int n = in.ni(), k = in.ni();\n boolean[] has = new boolean[n + 1];\n int result = n;\n for (int i = 0; i < k; i++) {\n int d = in.ni();\n for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }\n }\n out.println(result);\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }\n\n public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }\n}",
"Main",
"private InputReader in = new InputReader(System.in);",
"in",
"new InputReader(System.in)",
"private PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"public void solve() {\n int n = in.ni(), k = in.ni();\n boolean[] has = new boolean[n + 1];\n int result = n;\n for (int i = 0; i < k; i++) {\n int d = in.ni();\n for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }\n }\n out.println(result);\n }",
"solve",
"{\n int n = in.ni(), k = in.ni();\n boolean[] has = new boolean[n + 1];\n int result = n;\n for (int i = 0; i < k; i++) {\n int d = in.ni();\n for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }\n }\n out.println(result);\n }",
"int n = in.ni()",
"n",
"in.ni()",
"in.ni",
"in",
"k = in.ni();",
"k",
"in.ni()",
"in.ni",
"in",
"boolean[] has = new boolean[n + 1];",
"has",
"new boolean[n + 1]",
"n + 1",
"n",
"1",
"int result = n;",
"result",
"n",
"for (int i = 0; i < k; i++) {\n int d = in.ni();\n for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d = in.ni();\n for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }\n }",
"{\n int d = in.ni();\n for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }\n }",
"int d = in.ni();",
"d",
"in.ni()",
"in.ni",
"in",
"for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }",
"{\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }",
"int next = in.ni();",
"next",
"in.ni()",
"in.ni",
"in",
"if (!has[next]) {\n result--;\n }",
"!has[next]",
"has[next]",
"has",
"next",
"{\n result--;\n }",
"result--",
"result",
"has[next] = true",
"has[next]",
"has",
"next",
"true",
"out.println(result)",
"out.println",
"out",
"result",
"@Override\n public void close() throws IOException {\n in.close();\n out.close();\n }",
"close",
"{\n in.close();\n out.close();\n }",
"in.close()",
"in.close",
"in",
"out.close()",
"out.close",
"out",
"public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }",
"main",
"{\n try (Main instance = new Main()) {\n instance.solve();\n }\n }",
"try (Main instance = new Main()) {\n instance.solve();\n }",
"{\n instance.solve();\n }",
"Main instance = new Main()",
"Main instance = new Main()",
"new Main()",
"instance.solve()",
"instance.solve",
"instance",
"String[] args",
"args",
"static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }",
"InputReader",
"public BufferedReader reader;",
"reader",
"public StringTokenizer tokenizer;",
"tokenizer",
"public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"InputReader",
"{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"reader = new BufferedReader(new InputStreamReader(stream), 32768)",
"reader",
"new BufferedReader(new InputStreamReader(stream), 32768)",
"tokenizer = null",
"tokenizer",
"null",
"InputStream stream",
"stream",
"public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"next",
"{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n tokenizer = new StringTokenizer(reader.readLine());\n }",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"public int ni() {\n return Integer.parseInt(next());\n }",
"ni",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nl() {\n return Long.parseLong(next());\n }",
"nl",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public void close() throws IOException {\n reader.close();\n }",
"close",
"{\n reader.close();\n }",
"reader.close()",
"reader.close",
"reader",
"Closeable",
"public class Main implements Closeable {\n\n private InputReader in = new InputReader(System.in);\n private PrintWriter out = new PrintWriter(System.out);\n\n public void solve() {\n int n = in.ni(), k = in.ni();\n boolean[] has = new boolean[n + 1];\n int result = n;\n for (int i = 0; i < k; i++) {\n int d = in.ni();\n for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }\n }\n out.println(result);\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }\n\n public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }\n}",
"public class Main implements Closeable {\n\n private InputReader in = new InputReader(System.in);\n private PrintWriter out = new PrintWriter(System.out);\n\n public void solve() {\n int n = in.ni(), k = in.ni();\n boolean[] has = new boolean[n + 1];\n int result = n;\n for (int i = 0; i < k; i++) {\n int d = in.ni();\n for (int j = 0; j < d; j++) {\n int next = in.ni();\n if (!has[next]) {\n result--;\n }\n has[next] = true;\n }\n }\n out.println(result);\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }\n\n public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main implements Closeable {
private InputReader in = new InputReader(System.in);
private PrintWriter out = new PrintWriter(System.out);
public void solve() {
int n = in.ni(), k = in.ni();
boolean[] has = new boolean[n + 1];
int result = n;
for (int i = 0; i < k; i++) {
int d = in.ni();
for (int j = 0; j < d; j++) {
int next = in.ni();
if (!has[next]) {
result--;
}
has[next] = true;
}
}
out.println(result);
}
@Override
public void close() throws IOException {
in.close();
out.close();
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int ni() {
return Integer.parseInt(next());
}
public long nl() {
return Long.parseLong(next());
}
public void close() throws IOException {
reader.close();
}
}
public static void main(String[] args) throws IOException {
try (Main instance = new Main()) {
instance.solve();
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
2,
4,
18,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
14,
40,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
102,
11
],
[
102,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
65,
69
],
[
62,
70
],
[
14,
71
],
[
71,
72
],
[
71,
73
],
[
14,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
74,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
14,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
12,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tboolean[] s = new boolean[n];\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = in.nextInt();\n\t\t\tfor (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;\n\t\t}\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (!s[i])\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tboolean[] s = new boolean[n];\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = in.nextInt();\n\t\t\tfor (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;\n\t\t}\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (!s[i])\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tboolean[] s = new boolean[n];\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = in.nextInt();\n\t\t\tfor (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;\n\t\t}\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (!s[i])\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tboolean[] s = new boolean[n];\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = in.nextInt();\n\t\t\tfor (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;\n\t\t}\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (!s[i])\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\t}",
"Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));",
"in",
"new Scanner(new BufferedReader(new InputStreamReader(System.in)))",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int k = in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"boolean[] s = new boolean[n];",
"s",
"new boolean[n]",
"n",
"for (int i = 0; i < k; i++) {\n\t\t\tint d = in.nextInt();\n\t\t\tfor (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tint d = in.nextInt();\n\t\t\tfor (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;\n\t\t}",
"{\n\t\t\tint d = in.nextInt();\n\t\t\tfor (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;\n\t\t}",
"int d = in.nextInt();",
"d",
"in.nextInt()",
"in.nextInt",
"in",
"for (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"s[in.nextInt() - 1] = true;",
"s[in.nextInt() - 1] = true",
"s[in.nextInt() - 1]",
"s",
"in.nextInt() - 1",
"in.nextInt()",
"in.nextInt",
"in",
"1",
"true",
"int r = 0;",
"r",
"0",
"for (int i = 0; i < n; i++)\n\t\t\tif (!s[i])\n\t\t\t\tr++;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"if (!s[i])\n\t\t\t\tr++;",
"if (!s[i])\n\t\t\t\tr++;",
"!s[i]",
"s[i]",
"s",
"i",
"r++",
"r",
"System.out.println(r)",
"System.out.println",
"System.out",
"System",
"System.out",
"r",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tboolean[] s = new boolean[n];\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = in.nextInt();\n\t\t\tfor (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;\n\t\t}\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (!s[i])\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint k = in.nextInt();\n\t\tboolean[] s = new boolean[n];\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = in.nextInt();\n\t\t\tfor (int j = 0; j < d; j++)\n\t\t\t\ts[in.nextInt() - 1] = true;\n\t\t}\n\t\tint r = 0;\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tif (!s[i])\n\t\t\t\tr++;\n\t\tSystem.out.println(r);\n\t}\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
int n = in.nextInt();
int k = in.nextInt();
boolean[] s = new boolean[n];
for (int i = 0; i < k; i++) {
int d = in.nextInt();
for (int j = 0; j < d; j++)
s[in.nextInt() - 1] = true;
}
int r = 0;
for (int i = 0; i < n; i++)
if (!s[i])
r++;
System.out.println(r);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
4,
18,
13,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
40,
13,
17,
1,
40,
13,
30,
30,
14,
4,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
134,
11
],
[
134,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
31,
41
],
[
41,
42
],
[
42,
43
],
[
31,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
46,
50
],
[
14,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
87,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
93,
97
],
[
14,
98
],
[
98,
99
],
[
98,
100
],
[
14,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
101,
112
],
[
112,
113
],
[
113,
114
],
[
101,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
118,
121
],
[
117,
122
],
[
122,
123
],
[
123,
124
],
[
14,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
12,
131
],
[
131,
132
],
[
0,
133
],
[
133,
134
],
[
133,
135
]
] |
[
"import java.util.HashMap;\nimport java.util.Map;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n Map<Integer, Boolean> list = new HashMap<>();\n for (int i = 1; i <=N+1; i++) {\n list.put(i, true);\n }\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }\n\n }\n\n\n\n\n\n int ans = 0;\n for (int i = 1; i <+ N+1; i++) {\n if(list.get(i)){\n ans++;\n }\n }\n System.out.println(ans);\n }\n\n}\n",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.Map;",
"Map",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n Map<Integer, Boolean> list = new HashMap<>();\n for (int i = 1; i <=N+1; i++) {\n list.put(i, true);\n }\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }\n\n }\n\n\n\n\n\n int ans = 0;\n for (int i = 1; i <+ N+1; i++) {\n if(list.get(i)){\n ans++;\n }\n }\n System.out.println(ans);\n }\n\n}",
"Main",
"public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n Map<Integer, Boolean> list = new HashMap<>();\n for (int i = 1; i <=N+1; i++) {\n list.put(i, true);\n }\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }\n\n }\n\n\n\n\n\n int ans = 0;\n for (int i = 1; i <+ N+1; i++) {\n if(list.get(i)){\n ans++;\n }\n }\n System.out.println(ans);\n }",
"main",
"{\n\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n Map<Integer, Boolean> list = new HashMap<>();\n for (int i = 1; i <=N+1; i++) {\n list.put(i, true);\n }\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }\n\n }\n\n\n\n\n\n int ans = 0;\n for (int i = 1; i <+ N+1; i++) {\n if(list.get(i)){\n ans++;\n }\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Map<Integer, Boolean> list = new HashMap<>();",
"list",
"new HashMap<>()",
"for (int i = 1; i <=N+1; i++) {\n list.put(i, true);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <=N+1",
"i",
"N+1",
"N",
"1",
"i++",
"i++",
"i",
"{\n list.put(i, true);\n }",
"{\n list.put(i, true);\n }",
"list.put(i, true)",
"list.put",
"list",
"i",
"true",
"for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }\n\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }\n\n }",
"{\n int d = sc.nextInt();\n for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }\n\n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }",
"{\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(list.get(A)){\n list.put(A,false);\n }",
"list.get(A)",
"list.get",
"list",
"A",
"{\n list.put(A,false);\n }",
"list.put(A,false)",
"list.put",
"list",
"A",
"false",
"int ans = 0;",
"ans",
"0",
"for (int i = 1; i <+ N+1; i++) {\n if(list.get(i)){\n ans++;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <+ N+1",
"i",
"+ N+1",
"+ N",
"N",
"1",
"i++",
"i++",
"i",
"{\n if(list.get(i)){\n ans++;\n }\n }",
"{\n if(list.get(i)){\n ans++;\n }\n }",
"if(list.get(i)){\n ans++;\n }",
"list.get(i)",
"list.get",
"list",
"i",
"{\n ans++;\n }",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n Map<Integer, Boolean> list = new HashMap<>();\n for (int i = 1; i <=N+1; i++) {\n list.put(i, true);\n }\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }\n\n }\n\n\n\n\n\n int ans = 0;\n for (int i = 1; i <+ N+1; i++) {\n if(list.get(i)){\n ans++;\n }\n }\n System.out.println(ans);\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n Map<Integer, Boolean> list = new HashMap<>();\n for (int i = 1; i <=N+1; i++) {\n list.put(i, true);\n }\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for(int j = 0;j<d;j++){\n int A = sc.nextInt();\n if(list.get(A)){\n list.put(A,false);\n }\n }\n\n }\n\n\n\n\n\n int ans = 0;\n for (int i = 1; i <+ N+1; i++) {\n if(list.get(i)){\n ans++;\n }\n }\n System.out.println(ans);\n }\n\n}",
"Main"
] |
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
Map<Integer, Boolean> list = new HashMap<>();
for (int i = 1; i <=N+1; i++) {
list.put(i, true);
}
for (int i = 0; i < K; i++) {
int d = sc.nextInt();
for(int j = 0;j<d;j++){
int A = sc.nextInt();
if(list.get(A)){
list.put(A,false);
}
}
}
int ans = 0;
for (int i = 1; i <+ N+1; i++) {
if(list.get(i)){
ans++;
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
17,
0,
18,
18,
13,
13,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
18,
13,
13,
13,
30,
40,
13,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
122,
5
],
[
122,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
39,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
60,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
65,
71
],
[
8,
72
],
[
72,
73
],
[
72,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
90,
98
],
[
98,
99
],
[
99,
100
],
[
90,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
103,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
8,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
6,
119
],
[
119,
120
],
[
0,
121
],
[
121,
122
],
[
121,
123
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tboolean[][] hasOkasi = new boolean[n][k];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tcount++;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tboolean[][] hasOkasi = new boolean[n][k];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tcount++;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tboolean[][] hasOkasi = new boolean[n][k];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tcount++;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}",
"main",
"{\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tboolean[][] hasOkasi = new boolean[n][k];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tcount++;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean[][] hasOkasi = new boolean[n][k];",
"hasOkasi",
"new boolean[n][k]",
"n",
"k",
"for(int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}\n\t\t}",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}",
"{\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}",
"int temp = sc.nextInt() - 1;",
"temp",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"hasOkasi[temp][i] = true",
"hasOkasi[temp][i]",
"hasOkasi[temp]",
"hasOkasi",
"temp",
"i",
"true",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++) {\n\t\t\tcount++;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tcount++;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tcount++;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"count++",
"count",
"for(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < k",
"j",
"k",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"hasOkasi[i][j]",
"hasOkasi[i]",
"hasOkasi",
"i",
"j",
"{\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"count--",
"count",
"break;",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tboolean[][] hasOkasi = new boolean[n][k];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tcount++;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\t\n\t\tboolean[][] hasOkasi = new boolean[n][k];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++) {\n\t\t\t\tint temp = sc.nextInt() - 1;\n\t\t\t\thasOkasi[temp][i] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tcount++;\n\t\t\tfor(int j = 0; j < k; j++) {\n\t\t\t\tif(hasOkasi[i][j]) {\n\t\t\t\t\tcount--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(count);\n\t\t\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
boolean[][] hasOkasi = new boolean[n][k];
for(int i = 0; i < k; i++) {
int d = sc.nextInt();
for(int j = 0; j < d; j++) {
int temp = sc.nextInt() - 1;
hasOkasi[temp][i] = true;
}
}
int count = 0;
for(int i = 0; i < n; i++) {
count++;
for(int j = 0; j < k; j++) {
if(hasOkasi[i][j]) {
count--;
break;
}
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
40,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
107,
5
],
[
107,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
45,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
8,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
6,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
] |
[
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint s[] = new int[N];\n int answer=0;\n int d;\n int A;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint s[] = new int[N];\n int answer=0;\n int d;\n int A;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint s[] = new int[N];\n int answer=0;\n int d;\n int A;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint s[] = new int[N];\n int answer=0;\n int d;\n int A;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int s[] = new int[N];",
"s",
"new int[N]",
"N",
"int answer=0;",
"answer",
"0",
"int d;",
"d",
"int A;",
"A",
"for (int i = 0; i < K; i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\td = scan.nextInt();\n\t\t\tfor (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\td = scan.nextInt();\n\t\t\tfor (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}\n\t\t}",
"d = scan.nextInt()",
"d",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}",
"int y = 0;",
"int y = 0;",
"y",
"0",
"y < d",
"y",
"d",
"y++",
"y++",
"y",
"{\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}",
"{\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}",
"A = scan.nextInt()",
"A",
"scan.nextInt()",
"scan.nextInt",
"scan",
"s[A - 1]++",
"s[A - 1]",
"s",
"A - 1",
"A",
"1",
"for (int i = 0; i < N; i++) {\n\t\t\tif (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tif (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}\n\t\t}",
"if (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}",
"s[i] == 0",
"s[i]",
"s",
"i",
"0",
"{\n\t\t\t\tanswer += 1;\n\t\t\t}",
"answer += 1",
"answer",
"1",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint s[] = new int[N];\n int answer=0;\n int d;\n int A;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint s[] = new int[N];\n int answer=0;\n int d;\n int A;\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td = scan.nextInt();\n\t\t\tfor (int y = 0; y < d; y++) {\n\t\t\t\tA = scan.nextInt();\n\t\t\t\ts[A - 1]++;\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (s[i] == 0) {\n\t\t\t\tanswer += 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int K = scan.nextInt();
int s[] = new int[N];
int answer=0;
int d;
int A;
for (int i = 0; i < K; i++) {
d = scan.nextInt();
for (int y = 0; y < d; y++) {
A = scan.nextInt();
s[A - 1]++;
}
}
for (int i = 0; i < N; i++) {
if (s[i] == 0) {
answer += 1;
}
}
System.out.println(answer);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
2,
13,
17,
17,
41,
13,
17,
28,
13,
13,
30,
30,
14,
40,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
97,
5
],
[
97,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
41,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
62,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
68,
74
],
[
8,
75
],
[
75,
76
],
[
75,
77
],
[
8,
78
],
[
78,
79
],
[
78,
80
],
[
78,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
6,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
] |
[
"import java.util.Scanner;\npublic class Main{\n public static void main(String[]args){\n Scanner s = new Scanner(System.in);\n\n\n// s= new Scanner(\n// \"3 2\\n\" +\n// \"2\\n\" +\n// \"1 3\\n\" +\n// \"1\\n\" +\n// \"3\");\n//\n// s=new Scanner(\"3 3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\");\n\n int N = s.nextInt();\n int K = s.nextInt();\n boolean[] ppl = new boolean[N];\n\n s.nextLine();\n\n for(int i=0; i<K; i++) {\n int quantity = s.nextInt();\n s.nextLine();\n for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }\n }\n\n int count = 0;\n for(boolean b: ppl){\n if(!b)\n count++;\n }\n System.out.println(count);\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[]args){\n Scanner s = new Scanner(System.in);\n\n\n// s= new Scanner(\n// \"3 2\\n\" +\n// \"2\\n\" +\n// \"1 3\\n\" +\n// \"1\\n\" +\n// \"3\");\n//\n// s=new Scanner(\"3 3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\");\n\n int N = s.nextInt();\n int K = s.nextInt();\n boolean[] ppl = new boolean[N];\n\n s.nextLine();\n\n for(int i=0; i<K; i++) {\n int quantity = s.nextInt();\n s.nextLine();\n for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }\n }\n\n int count = 0;\n for(boolean b: ppl){\n if(!b)\n count++;\n }\n System.out.println(count);\n\n }\n}",
"Main",
"public static void main(String[]args){\n Scanner s = new Scanner(System.in);\n\n\n// s= new Scanner(\n// \"3 2\\n\" +\n// \"2\\n\" +\n// \"1 3\\n\" +\n// \"1\\n\" +\n// \"3\");\n//\n// s=new Scanner(\"3 3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\");\n\n int N = s.nextInt();\n int K = s.nextInt();\n boolean[] ppl = new boolean[N];\n\n s.nextLine();\n\n for(int i=0; i<K; i++) {\n int quantity = s.nextInt();\n s.nextLine();\n for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }\n }\n\n int count = 0;\n for(boolean b: ppl){\n if(!b)\n count++;\n }\n System.out.println(count);\n\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n\n\n// s= new Scanner(\n// \"3 2\\n\" +\n// \"2\\n\" +\n// \"1 3\\n\" +\n// \"1\\n\" +\n// \"3\");\n//\n// s=new Scanner(\"3 3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\");\n\n int N = s.nextInt();\n int K = s.nextInt();\n boolean[] ppl = new boolean[N];\n\n s.nextLine();\n\n for(int i=0; i<K; i++) {\n int quantity = s.nextInt();\n s.nextLine();\n for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }\n }\n\n int count = 0;\n for(boolean b: ppl){\n if(!b)\n count++;\n }\n System.out.println(count);\n\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int N = s.nextInt();",
"N",
"s.nextInt()",
"s.nextInt",
"s",
"int K = s.nextInt();",
"K",
"s.nextInt()",
"s.nextInt",
"s",
"boolean[] ppl = new boolean[N];",
"ppl",
"new boolean[N]",
"N",
"s.nextLine()",
"s.nextLine",
"s",
"for(int i=0; i<K; i++) {\n int quantity = s.nextInt();\n s.nextLine();\n for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int quantity = s.nextInt();\n s.nextLine();\n for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }\n }",
"{\n int quantity = s.nextInt();\n s.nextLine();\n for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }\n }",
"int quantity = s.nextInt();",
"quantity",
"s.nextInt()",
"s.nextInt",
"s",
"s.nextLine()",
"s.nextLine",
"s",
"for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<quantity",
"j",
"quantity",
"j++",
"j++",
"j",
"{\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }",
"{\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }",
"int idx = s.nextInt();",
"idx",
"s.nextInt()",
"s.nextInt",
"s",
"ppl[idx-1] = true",
"ppl[idx-1]",
"ppl",
"idx-1",
"idx",
"1",
"true",
"int count = 0;",
"count",
"0",
"for(boolean b: ppl){\n if(!b)\n count++;\n }",
"boolean b",
"ppl",
"{\n if(!b)\n count++;\n }",
"{\n if(!b)\n count++;\n }",
"if(!b)\n count++;",
"!b",
"b",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[]args",
"args",
"public class Main{\n public static void main(String[]args){\n Scanner s = new Scanner(System.in);\n\n\n// s= new Scanner(\n// \"3 2\\n\" +\n// \"2\\n\" +\n// \"1 3\\n\" +\n// \"1\\n\" +\n// \"3\");\n//\n// s=new Scanner(\"3 3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\");\n\n int N = s.nextInt();\n int K = s.nextInt();\n boolean[] ppl = new boolean[N];\n\n s.nextLine();\n\n for(int i=0; i<K; i++) {\n int quantity = s.nextInt();\n s.nextLine();\n for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }\n }\n\n int count = 0;\n for(boolean b: ppl){\n if(!b)\n count++;\n }\n System.out.println(count);\n\n }\n}",
"public class Main{\n public static void main(String[]args){\n Scanner s = new Scanner(System.in);\n\n\n// s= new Scanner(\n// \"3 2\\n\" +\n// \"2\\n\" +\n// \"1 3\\n\" +\n// \"1\\n\" +\n// \"3\");\n//\n// s=new Scanner(\"3 3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\\n\" +\n// \"1\\n\" +\n// \"3\");\n\n int N = s.nextInt();\n int K = s.nextInt();\n boolean[] ppl = new boolean[N];\n\n s.nextLine();\n\n for(int i=0; i<K; i++) {\n int quantity = s.nextInt();\n s.nextLine();\n for(int j=0; j<quantity; j++) {\n int idx = s.nextInt();\n ppl[idx-1] = true;\n }\n }\n\n int count = 0;\n for(boolean b: ppl){\n if(!b)\n count++;\n }\n System.out.println(count);\n\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[]args){
Scanner s = new Scanner(System.in);
// s= new Scanner(
// "3 2\n" +
// "2\n" +
// "1 3\n" +
// "1\n" +
// "3");
//
// s=new Scanner("3 3\n" +
// "1\n" +
// "3\n" +
// "1\n" +
// "3\n" +
// "1\n" +
// "3");
int N = s.nextInt();
int K = s.nextInt();
boolean[] ppl = new boolean[N];
s.nextLine();
for(int i=0; i<K; i++) {
int quantity = s.nextInt();
s.nextLine();
for(int j=0; j<quantity; j++) {
int idx = s.nextInt();
ppl[idx-1] = true;
}
}
int count = 0;
for(boolean b: ppl){
if(!b)
count++;
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
90,
11
],
[
90,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
14,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
49,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
14,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
12,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
]
] |
[
"import java.util.HashSet;\nimport java.util.Scanner;\nimport java.util.Set;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sunuke = Integer.parseInt(sc.next());\n\t\tint okasi = Integer.parseInt(sc.next());\n\t\tSet<Integer> count = new HashSet();\n\n\t\tfor (int i = 0; i < okasi; i++) {\n\t\t\tint okasi2 = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sunuke - count.size());\n\n\t}\n\n\n}",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sunuke = Integer.parseInt(sc.next());\n\t\tint okasi = Integer.parseInt(sc.next());\n\t\tSet<Integer> count = new HashSet();\n\n\t\tfor (int i = 0; i < okasi; i++) {\n\t\t\tint okasi2 = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sunuke - count.size());\n\n\t}\n\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sunuke = Integer.parseInt(sc.next());\n\t\tint okasi = Integer.parseInt(sc.next());\n\t\tSet<Integer> count = new HashSet();\n\n\t\tfor (int i = 0; i < okasi; i++) {\n\t\t\tint okasi2 = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sunuke - count.size());\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sunuke = Integer.parseInt(sc.next());\n\t\tint okasi = Integer.parseInt(sc.next());\n\t\tSet<Integer> count = new HashSet();\n\n\t\tfor (int i = 0; i < okasi; i++) {\n\t\t\tint okasi2 = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sunuke - count.size());\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int sunuke = Integer.parseInt(sc.next());",
"sunuke",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int okasi = Integer.parseInt(sc.next());",
"okasi",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"Set<Integer> count = new HashSet();",
"count",
"new HashSet()",
"for (int i = 0; i < okasi; i++) {\n\t\t\tint okasi2 = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < okasi",
"i",
"okasi",
"i++",
"i++",
"i",
"{\n\t\t\tint okasi2 = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"{\n\t\t\tint okasi2 = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"int okasi2 = Integer.parseInt(sc.next());",
"okasi2",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"for(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < okasi2",
"j",
"okasi2",
"j++",
"j++",
"j",
"{\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}",
"{\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}",
"count.add(sc.nextInt())",
"count.add",
"count",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(sunuke - count.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"sunuke - count.size()",
"sunuke",
"count.size()",
"count.size",
"count",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sunuke = Integer.parseInt(sc.next());\n\t\tint okasi = Integer.parseInt(sc.next());\n\t\tSet<Integer> count = new HashSet();\n\n\t\tfor (int i = 0; i < okasi; i++) {\n\t\t\tint okasi2 = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sunuke - count.size());\n\n\t}\n\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sunuke = Integer.parseInt(sc.next());\n\t\tint okasi = Integer.parseInt(sc.next());\n\t\tSet<Integer> count = new HashSet();\n\n\t\tfor (int i = 0; i < okasi; i++) {\n\t\t\tint okasi2 = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < okasi2; j++) {\n\t\t\t\tcount.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sunuke - count.size());\n\n\t}\n\n\n}",
"Main"
] |
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int sunuke = Integer.parseInt(sc.next());
int okasi = Integer.parseInt(sc.next());
Set<Integer> count = new HashSet();
for (int i = 0; i < okasi; i++) {
int okasi2 = Integer.parseInt(sc.next());
for(int j = 0; j < okasi2; j++) {
count.add(sc.nextInt());
}
}
System.out.println(sunuke - count.size());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
40,
18,
13,
2,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
111,
5
],
[
111,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
44,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
65,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
44,
77
],
[
77,
78
],
[
78,
79
],
[
8,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
80,
91
],
[
92,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
93,
99
],
[
99,
100
],
[
100,
101
],
[
8,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
6,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n sc.nextLine();\n int[] sunuke = new int[N];\n int kagaisha = 0;\n\n for (int i = 0; i < K; i++) {\n int okashi_num = Integer.parseInt(sc.nextLine());\n \n for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }\n sc.nextLine();\n }\n\n for (int i = 0; i < N; i++) {\n if (sunuke[i] == 0) {\n kagaisha++;\n }\n }\n \n System.out.println(kagaisha);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n sc.nextLine();\n int[] sunuke = new int[N];\n int kagaisha = 0;\n\n for (int i = 0; i < K; i++) {\n int okashi_num = Integer.parseInt(sc.nextLine());\n \n for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }\n sc.nextLine();\n }\n\n for (int i = 0; i < N; i++) {\n if (sunuke[i] == 0) {\n kagaisha++;\n }\n }\n \n System.out.println(kagaisha);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n sc.nextLine();\n int[] sunuke = new int[N];\n int kagaisha = 0;\n\n for (int i = 0; i < K; i++) {\n int okashi_num = Integer.parseInt(sc.nextLine());\n \n for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }\n sc.nextLine();\n }\n\n for (int i = 0; i < N; i++) {\n if (sunuke[i] == 0) {\n kagaisha++;\n }\n }\n \n System.out.println(kagaisha);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n sc.nextLine();\n int[] sunuke = new int[N];\n int kagaisha = 0;\n\n for (int i = 0; i < K; i++) {\n int okashi_num = Integer.parseInt(sc.nextLine());\n \n for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }\n sc.nextLine();\n }\n\n for (int i = 0; i < N; i++) {\n if (sunuke[i] == 0) {\n kagaisha++;\n }\n }\n \n System.out.println(kagaisha);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int[] sunuke = new int[N];",
"sunuke",
"new int[N]",
"N",
"int kagaisha = 0;",
"kagaisha",
"0",
"for (int i = 0; i < K; i++) {\n int okashi_num = Integer.parseInt(sc.nextLine());\n \n for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }\n sc.nextLine();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int okashi_num = Integer.parseInt(sc.nextLine());\n \n for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }\n sc.nextLine();\n }",
"{\n int okashi_num = Integer.parseInt(sc.nextLine());\n \n for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }\n sc.nextLine();\n }",
"int okashi_num = Integer.parseInt(sc.nextLine());",
"okashi_num",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < okashi_num",
"j",
"okashi_num",
"j++",
"j++",
"j",
"{\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }",
"{\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }",
"int sunuke_num = sc.nextInt();",
"sunuke_num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sunuke[sunuke_num-1]++",
"sunuke[sunuke_num-1]",
"sunuke",
"sunuke_num-1",
"sunuke_num",
"1",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for (int i = 0; i < N; i++) {\n if (sunuke[i] == 0) {\n kagaisha++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n if (sunuke[i] == 0) {\n kagaisha++;\n }\n }",
"{\n if (sunuke[i] == 0) {\n kagaisha++;\n }\n }",
"if (sunuke[i] == 0) {\n kagaisha++;\n }",
"sunuke[i] == 0",
"sunuke[i]",
"sunuke",
"i",
"0",
"{\n kagaisha++;\n }",
"kagaisha++",
"kagaisha",
"System.out.println(kagaisha)",
"System.out.println",
"System.out",
"System",
"System.out",
"kagaisha",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n sc.nextLine();\n int[] sunuke = new int[N];\n int kagaisha = 0;\n\n for (int i = 0; i < K; i++) {\n int okashi_num = Integer.parseInt(sc.nextLine());\n \n for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }\n sc.nextLine();\n }\n\n for (int i = 0; i < N; i++) {\n if (sunuke[i] == 0) {\n kagaisha++;\n }\n }\n \n System.out.println(kagaisha);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n sc.nextLine();\n int[] sunuke = new int[N];\n int kagaisha = 0;\n\n for (int i = 0; i < K; i++) {\n int okashi_num = Integer.parseInt(sc.nextLine());\n \n for(int j = 0; j < okashi_num; j++) {\n int sunuke_num = sc.nextInt();\n sunuke[sunuke_num-1]++;\n }\n sc.nextLine();\n }\n\n for (int i = 0; i < N; i++) {\n if (sunuke[i] == 0) {\n kagaisha++;\n }\n }\n \n System.out.println(kagaisha);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
sc.nextLine();
int[] sunuke = new int[N];
int kagaisha = 0;
for (int i = 0; i < K; i++) {
int okashi_num = Integer.parseInt(sc.nextLine());
for(int j = 0; j < okashi_num; j++) {
int sunuke_num = sc.nextInt();
sunuke[sunuke_num-1]++;
}
sc.nextLine();
}
for (int i = 0; i < N; i++) {
if (sunuke[i] == 0) {
kagaisha++;
}
}
System.out.println(kagaisha);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
17,
40,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
0,
18,
36,
13,
17,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
29,
18,
13,
40,
13,
29,
40,
17,
12,
13,
30,
29,
40,
2,
2,
13,
17,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
4,
13,
18,
13,
13,
40,
13,
12,
13,
30,
4,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
2,
2,
2,
13,
17,
13,
17,
0,
13,
4,
13,
29,
8,
13,
40,
13,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
2,
2,
2,
13,
17,
13,
17,
0,
13,
4,
13,
29,
8,
13,
40,
13,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
4,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
521,
20
],
[
521,
21
],
[
21,
22
],
[
21,
23
],
[
521,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
26,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
26,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
26,
43
],
[
43,
44
],
[
43,
45
],
[
26,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
80,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
26,
89
],
[
89,
90
],
[
89,
91
],
[
26,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
92,
102
],
[
102,
103
],
[
103,
104
],
[
92,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
114,
115
],
[
26,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
24,
122
],
[
122,
123
],
[
521,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
124,
128
],
[
128,
129
],
[
128,
130
],
[
124,
132
],
[
132,
133
],
[
124,
134
],
[
134,
135
],
[
124,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
138,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
144,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
136,
153
],
[
153,
154
],
[
124,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
158,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
166,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
175,
178
],
[
162,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
179,
183
],
[
183,
184
],
[
157,
185
],
[
185,
186
],
[
124,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
190,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
190,
198
],
[
198,
199
],
[
199,
200
],
[
124,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
206,
210
],
[
210,
211
],
[
210,
212
],
[
201,
213
],
[
213,
214
],
[
124,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
219,
222
],
[
222,
223
],
[
222,
224
],
[
224,
225
],
[
224,
226
],
[
218,
227
],
[
227,
228
],
[
124,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
232,
233
],
[
231,
234
],
[
234,
235
],
[
235,
236
],
[
124,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
240,
244
],
[
244,
245
],
[
239,
246
],
[
246,
247
],
[
246,
248
],
[
239,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
239,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
253,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
259,
262
],
[
258,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
239,
267
],
[
267,
268
],
[
268,
269
],
[
269,
270
],
[
124,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
276,
277
],
[
274,
278
],
[
278,
279
],
[
273,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
273,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
284,
288
],
[
288,
289
],
[
288,
290
],
[
290,
291
],
[
273,
292
],
[
292,
293
],
[
292,
294
],
[
273,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
295,
299
],
[
299,
300
],
[
300,
301
],
[
300,
302
],
[
299,
303
],
[
303,
304
],
[
303,
305
],
[
305,
306
],
[
273,
307
],
[
307,
308
],
[
307,
309
],
[
273,
310
],
[
310,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
310,
315
],
[
315,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
317,
321
],
[
321,
322
],
[
321,
323
],
[
316,
324
],
[
324,
325
],
[
315,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
329,
330
],
[
330,
331
],
[
330,
332
],
[
329,
333
],
[
328,
334
],
[
315,
335
],
[
335,
336
],
[
335,
337
],
[
337,
338
],
[
273,
339
],
[
339,
340
],
[
340,
341
],
[
340,
342
],
[
342,
343
],
[
340,
344
],
[
124,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
348,
349
],
[
349,
350
],
[
350,
351
],
[
348,
352
],
[
352,
353
],
[
347,
354
],
[
354,
355
],
[
354,
356
],
[
356,
357
],
[
347,
358
],
[
358,
359
],
[
359,
360
],
[
359,
361
],
[
358,
362
],
[
362,
363
],
[
362,
364
],
[
364,
365
],
[
347,
366
],
[
366,
367
],
[
366,
368
],
[
347,
369
],
[
369,
370
],
[
370,
371
],
[
370,
372
],
[
369,
373
],
[
373,
374
],
[
374,
375
],
[
374,
376
],
[
373,
377
],
[
377,
378
],
[
377,
379
],
[
379,
380
],
[
347,
381
],
[
381,
382
],
[
381,
383
],
[
347,
384
],
[
384,
385
],
[
385,
386
],
[
386,
387
],
[
386,
388
],
[
384,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
391,
395
],
[
395,
396
],
[
395,
397
],
[
390,
398
],
[
398,
399
],
[
389,
400
],
[
400,
401
],
[
400,
402
],
[
402,
403
],
[
403,
404
],
[
404,
405
],
[
404,
406
],
[
403,
407
],
[
402,
408
],
[
389,
409
],
[
409,
410
],
[
409,
411
],
[
411,
412
],
[
347,
413
],
[
413,
414
],
[
414,
415
],
[
414,
416
],
[
416,
417
],
[
414,
418
],
[
124,
419
],
[
419,
420
],
[
419,
421
],
[
421,
422
],
[
422,
423
],
[
423,
424
],
[
424,
425
],
[
423,
426
],
[
426,
427
],
[
124,
428
],
[
428,
429
],
[
428,
430
],
[
430,
431
],
[
431,
432
],
[
431,
433
],
[
430,
435
],
[
435,
436
],
[
436,
437
],
[
437,
438
],
[
437,
439
],
[
435,
440
],
[
440,
441
],
[
440,
442
],
[
435,
443
],
[
443,
444
],
[
444,
445
],
[
435,
446
],
[
446,
447
],
[
447,
448
],
[
448,
449
],
[
448,
450
],
[
447,
451
],
[
451,
452
],
[
430,
453
],
[
453,
454
],
[
428,
455
],
[
455,
456
],
[
124,
457
],
[
457,
458
],
[
457,
459
],
[
459,
460
],
[
460,
461
],
[
460,
462
],
[
459,
464
],
[
464,
465
],
[
465,
466
],
[
466,
467
],
[
466,
468
],
[
464,
469
],
[
469,
470
],
[
469,
471
],
[
464,
472
],
[
472,
473
],
[
473,
474
],
[
464,
475
],
[
475,
476
],
[
476,
477
],
[
477,
478
],
[
477,
479
],
[
476,
480
],
[
480,
481
],
[
459,
482
],
[
482,
483
],
[
457,
484
],
[
484,
485
],
[
124,
486
],
[
486,
487
],
[
486,
488
],
[
488,
489
],
[
489,
490
],
[
489,
491
],
[
488,
494
],
[
494,
495
],
[
495,
496
],
[
496,
497
],
[
496,
498
],
[
494,
499
],
[
499,
500
],
[
499,
501
],
[
494,
502
],
[
502,
503
],
[
503,
504
],
[
494,
505
],
[
505,
506
],
[
506,
507
],
[
507,
508
],
[
507,
509
],
[
506,
510
],
[
510,
511
],
[
511,
512
],
[
512,
513
],
[
488,
514
],
[
514,
515
],
[
486,
516
],
[
516,
517
],
[
486,
518
],
[
518,
519
],
[
0,
520
],
[
520,
521
],
[
520,
522
]
] |
[
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.math.BigDecimal;\nimport java.math.RoundingMode;\nimport java.util.*;\n\n\npublic class Main {\n\tstatic int max=0;\n\tpublic static void main(String[] args){\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tInputReader sc=new InputReader(System.in);\n\t\tint N=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint[] c=new int[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}\n\t\t}\n\t\tint count=0;\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\tif (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tstatic class InputReader { \n\t\tprivate InputStream in;\n\t\tprivate byte[] buffer = new byte[1024];\n\t\tprivate int curbuf;\n\t\tprivate int lenbuf;\n\t\tpublic InputReader(InputStream in) {\n\t\t\tthis.in = in;\n\t\t\tthis.curbuf = this.lenbuf = 0;\n\t\t}\n \n\t\tpublic boolean hasNextByte() {\n\t\t\tif (curbuf >= lenbuf) {\n\t\t\t\tcurbuf = 0;\n\t\t\t\ttry {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (lenbuf <= 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n \n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[curbuf++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n \n\t\tprivate boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n \n\t\tprivate void skip() {\n\t\t\twhile (hasNextByte() && isSpaceChar(buffer[curbuf]))\n\t\t\t\tcurbuf++;\n\t\t}\n \n\t\tpublic boolean hasNext() {\n\t\t\tskip();\n\t\t\treturn hasNextByte();\n\t\t}\n \n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n \n\t\tpublic int nextInt() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic long[] nextLongArray(int n) {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic char[][] nextCharMap(int n, int m) {\n\t\t\tchar[][] map = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tmap[i] = next().toCharArray();\n\t\t\treturn map;\n\t\t}\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.math.RoundingMode;",
"RoundingMode",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic int max=0;\n\tpublic static void main(String[] args){\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tInputReader sc=new InputReader(System.in);\n\t\tint N=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint[] c=new int[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}\n\t\t}\n\t\tint count=0;\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\tif (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tstatic class InputReader { \n\t\tprivate InputStream in;\n\t\tprivate byte[] buffer = new byte[1024];\n\t\tprivate int curbuf;\n\t\tprivate int lenbuf;\n\t\tpublic InputReader(InputStream in) {\n\t\t\tthis.in = in;\n\t\t\tthis.curbuf = this.lenbuf = 0;\n\t\t}\n \n\t\tpublic boolean hasNextByte() {\n\t\t\tif (curbuf >= lenbuf) {\n\t\t\t\tcurbuf = 0;\n\t\t\t\ttry {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (lenbuf <= 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n \n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[curbuf++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n \n\t\tprivate boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n \n\t\tprivate void skip() {\n\t\t\twhile (hasNextByte() && isSpaceChar(buffer[curbuf]))\n\t\t\t\tcurbuf++;\n\t\t}\n \n\t\tpublic boolean hasNext() {\n\t\t\tskip();\n\t\t\treturn hasNextByte();\n\t\t}\n \n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n \n\t\tpublic int nextInt() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic long[] nextLongArray(int n) {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic char[][] nextCharMap(int n, int m) {\n\t\t\tchar[][] map = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tmap[i] = next().toCharArray();\n\t\t\treturn map;\n\t\t}\n\t}\n}",
"Main",
"static int max=0;",
"max",
"0",
"public static void main(String[] args){\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tInputReader sc=new InputReader(System.in);\n\t\tint N=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint[] c=new int[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}\n\t\t}\n\t\tint count=0;\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\tif (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"main",
"{\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tInputReader sc=new InputReader(System.in);\n\t\tint N=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint[] c=new int[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}\n\t\t}\n\t\tint count=0;\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\tif (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"InputReader sc=new InputReader(System.in);",
"sc",
"new InputReader(System.in)",
"int N=sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K=sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] c=new int[N];",
"c",
"new int[N]",
"N",
"for (int i = 0; i < K; i++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tint d=sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d=sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}\n\t\t}",
"int d=sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}",
"{\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}",
"int a=sc.nextInt()-1;",
"a",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"c[a]++",
"c[a]",
"c",
"a",
"int count=0;",
"count",
"0",
"for (int i = 0; i < c.length; i++) {\n\t\t\tif (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < c.length",
"i",
"c.length",
"c",
"c.length",
"i++",
"i++",
"i",
"{\n\t\t\tif (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}",
"c[i]==0",
"c[i]",
"c",
"i",
"0",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"static class InputReader { \n\t\tprivate InputStream in;\n\t\tprivate byte[] buffer = new byte[1024];\n\t\tprivate int curbuf;\n\t\tprivate int lenbuf;\n\t\tpublic InputReader(InputStream in) {\n\t\t\tthis.in = in;\n\t\t\tthis.curbuf = this.lenbuf = 0;\n\t\t}\n \n\t\tpublic boolean hasNextByte() {\n\t\t\tif (curbuf >= lenbuf) {\n\t\t\t\tcurbuf = 0;\n\t\t\t\ttry {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (lenbuf <= 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n \n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[curbuf++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n \n\t\tprivate boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n \n\t\tprivate void skip() {\n\t\t\twhile (hasNextByte() && isSpaceChar(buffer[curbuf]))\n\t\t\t\tcurbuf++;\n\t\t}\n \n\t\tpublic boolean hasNext() {\n\t\t\tskip();\n\t\t\treturn hasNextByte();\n\t\t}\n \n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n \n\t\tpublic int nextInt() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic long[] nextLongArray(int n) {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic char[][] nextCharMap(int n, int m) {\n\t\t\tchar[][] map = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tmap[i] = next().toCharArray();\n\t\t\treturn map;\n\t\t}\n\t}",
"InputReader",
"private InputStream in;",
"in",
"private byte[] buffer = new byte[1024];",
"buffer",
"new byte[1024]",
"1024",
"private int curbuf;",
"curbuf",
"private int lenbuf;",
"lenbuf",
"public InputReader(InputStream in) {\n\t\t\tthis.in = in;\n\t\t\tthis.curbuf = this.lenbuf = 0;\n\t\t}",
"InputReader",
"{\n\t\t\tthis.in = in;\n\t\t\tthis.curbuf = this.lenbuf = 0;\n\t\t}",
"this.in = in",
"this.in",
"this",
"this.in",
"in",
"this.curbuf = this.lenbuf = 0",
"this.curbuf",
"this",
"this.curbuf",
"this.lenbuf = 0",
"this.lenbuf",
"this",
"this.lenbuf",
"0",
"InputStream in",
"in",
"public boolean hasNextByte() {\n\t\t\tif (curbuf >= lenbuf) {\n\t\t\t\tcurbuf = 0;\n\t\t\t\ttry {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (lenbuf <= 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"hasNextByte",
"{\n\t\t\tif (curbuf >= lenbuf) {\n\t\t\t\tcurbuf = 0;\n\t\t\t\ttry {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (lenbuf <= 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"if (curbuf >= lenbuf) {\n\t\t\t\tcurbuf = 0;\n\t\t\t\ttry {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (lenbuf <= 0)\n\t\t\t\t\treturn false;\n\t\t\t}",
"curbuf >= lenbuf",
"curbuf",
"lenbuf",
"{\n\t\t\t\tcurbuf = 0;\n\t\t\t\ttry {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (lenbuf <= 0)\n\t\t\t\t\treturn false;\n\t\t\t}",
"curbuf = 0",
"curbuf",
"0",
"try {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t}",
"lenbuf = in.read(buffer)",
"lenbuf",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (lenbuf <= 0)\n\t\t\t\t\treturn false;",
"lenbuf <= 0",
"lenbuf",
"0",
"return false;",
"false",
"return true;",
"true",
"private int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[curbuf++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}",
"readByte",
"{\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[curbuf++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}",
"if (hasNextByte())\n\t\t\t\treturn buffer[curbuf++];\n\t\t\telse\n\t\t\t\treturn -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[curbuf++];",
"buffer[curbuf++]",
"buffer",
"curbuf++",
"curbuf",
"return -1;",
"-1",
"1",
"private boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}",
"isSpaceChar",
"{\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}",
"return !(c >= 33 && c <= 126);",
"!(c >= 33 && c <= 126)",
"(c >= 33 && c <= 126)",
"c >= 33",
"c",
"33",
"c <= 126",
"c",
"126",
"int c",
"c",
"private void skip() {\n\t\t\twhile (hasNextByte() && isSpaceChar(buffer[curbuf]))\n\t\t\t\tcurbuf++;\n\t\t}",
"skip",
"{\n\t\t\twhile (hasNextByte() && isSpaceChar(buffer[curbuf]))\n\t\t\t\tcurbuf++;\n\t\t}",
"while (hasNextByte() && isSpaceChar(buffer[curbuf]))\n\t\t\t\tcurbuf++;",
"hasNextByte() && isSpaceChar(buffer[curbuf])",
"hasNextByte()",
"hasNextByte",
"isSpaceChar(buffer[curbuf])",
"isSpaceChar",
"buffer[curbuf]",
"buffer",
"curbuf",
"curbuf++",
"curbuf",
"public boolean hasNext() {\n\t\t\tskip();\n\t\t\treturn hasNextByte();\n\t\t}",
"hasNext",
"{\n\t\t\tskip();\n\t\t\treturn hasNextByte();\n\t\t}",
"skip()",
"skip",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}",
"next",
"{\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}",
"if (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}",
"!isSpaceChar(b)",
"isSpaceChar(b)",
"isSpaceChar",
"b",
"{\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public int nextInt() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}",
"nextInt",
"{\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}",
"if (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"int c = readByte();",
"c",
"readByte()",
"readByte",
"while (isSpaceChar(c))\n\t\t\t\tc = readByte();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = readByte()",
"c",
"readByte()",
"readByte",
"boolean minus = false;",
"minus",
"false",
"if (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}",
"c == '-'",
"c",
"'-'",
"{\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}",
"minus = true",
"minus",
"true",
"c = readByte()",
"c",
"readByte()",
"readByte",
"int res = 0;",
"res",
"0",
"do {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t}",
"if (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res = res * 10 + c - '0'",
"res",
"res * 10 + c - '0'",
"res * 10 + c",
"res * 10",
"res",
"10",
"c",
"'0'",
"c = readByte()",
"c",
"readByte()",
"readByte",
"return (minus) ? -res : res;",
"(minus) ? -res : res",
"(minus)",
"-res",
"res",
"res",
"public long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}",
"nextLong",
"{\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}",
"if (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"int c = readByte();",
"c",
"readByte()",
"readByte",
"while (isSpaceChar(c))\n\t\t\t\tc = readByte();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = readByte()",
"c",
"readByte()",
"readByte",
"boolean minus = false;",
"minus",
"false",
"if (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}",
"c == '-'",
"c",
"'-'",
"{\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}",
"minus = true",
"minus",
"true",
"c = readByte()",
"c",
"readByte()",
"readByte",
"long res = 0;",
"res",
"0",
"do {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t}",
"if (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res = res * 10 + c - '0'",
"res",
"res * 10 + c - '0'",
"res * 10 + c",
"res * 10",
"res",
"10",
"c",
"'0'",
"c = readByte()",
"c",
"readByte()",
"readByte",
"return (minus) ? -res : res;",
"(minus) ? -res : res",
"(minus)",
"-res",
"res",
"res",
"public double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public int[] nextIntArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}",
"nextIntArray",
"{\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextInt();",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public long[] nextLongArray(int n) {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}",
"nextLongArray",
"{\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextLong();",
"a[i] = nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"public char[][] nextCharMap(int n, int m) {\n\t\t\tchar[][] map = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tmap[i] = next().toCharArray();\n\t\t\treturn map;\n\t\t}",
"nextCharMap",
"{\n\t\t\tchar[][] map = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tmap[i] = next().toCharArray();\n\t\t\treturn map;\n\t\t}",
"char[][] map = new char[n][m];",
"map",
"new char[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++)\n\t\t\t\tmap[i] = next().toCharArray();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"map[i] = next().toCharArray();",
"map[i] = next().toCharArray()",
"map[i]",
"map",
"i",
"next().toCharArray()",
"next().toCharArray",
"next()",
"next",
"return map;",
"map",
"int n",
"n",
"int m",
"m",
"public class Main {\n\tstatic int max=0;\n\tpublic static void main(String[] args){\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tInputReader sc=new InputReader(System.in);\n\t\tint N=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint[] c=new int[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}\n\t\t}\n\t\tint count=0;\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\tif (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tstatic class InputReader { \n\t\tprivate InputStream in;\n\t\tprivate byte[] buffer = new byte[1024];\n\t\tprivate int curbuf;\n\t\tprivate int lenbuf;\n\t\tpublic InputReader(InputStream in) {\n\t\t\tthis.in = in;\n\t\t\tthis.curbuf = this.lenbuf = 0;\n\t\t}\n \n\t\tpublic boolean hasNextByte() {\n\t\t\tif (curbuf >= lenbuf) {\n\t\t\t\tcurbuf = 0;\n\t\t\t\ttry {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (lenbuf <= 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n \n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[curbuf++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n \n\t\tprivate boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n \n\t\tprivate void skip() {\n\t\t\twhile (hasNextByte() && isSpaceChar(buffer[curbuf]))\n\t\t\t\tcurbuf++;\n\t\t}\n \n\t\tpublic boolean hasNext() {\n\t\t\tskip();\n\t\t\treturn hasNextByte();\n\t\t}\n \n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n \n\t\tpublic int nextInt() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic long[] nextLongArray(int n) {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic char[][] nextCharMap(int n, int m) {\n\t\t\tchar[][] map = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tmap[i] = next().toCharArray();\n\t\t\treturn map;\n\t\t}\n\t}\n}",
"public class Main {\n\tstatic int max=0;\n\tpublic static void main(String[] args){\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tInputReader sc=new InputReader(System.in);\n\t\tint N=sc.nextInt();\n\t\tint K=sc.nextInt();\n\t\tint[] c=new int[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint a=sc.nextInt()-1;\n\t\t\t\tc[a]++;\n\t\t\t}\n\t\t}\n\t\tint count=0;\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\tif (c[i]==0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n\t\n\tstatic class InputReader { \n\t\tprivate InputStream in;\n\t\tprivate byte[] buffer = new byte[1024];\n\t\tprivate int curbuf;\n\t\tprivate int lenbuf;\n\t\tpublic InputReader(InputStream in) {\n\t\t\tthis.in = in;\n\t\t\tthis.curbuf = this.lenbuf = 0;\n\t\t}\n \n\t\tpublic boolean hasNextByte() {\n\t\t\tif (curbuf >= lenbuf) {\n\t\t\t\tcurbuf = 0;\n\t\t\t\ttry {\n\t\t\t\t\tlenbuf = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (lenbuf <= 0)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n \n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[curbuf++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n \n\t\tprivate boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n \n\t\tprivate void skip() {\n\t\t\twhile (hasNextByte() && isSpaceChar(buffer[curbuf]))\n\t\t\t\tcurbuf++;\n\t\t}\n \n\t\tpublic boolean hasNext() {\n\t\t\tskip();\n\t\t\treturn hasNextByte();\n\t\t}\n \n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n \n\t\tpublic int nextInt() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tint c = readByte();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = readByte();\n\t\t\tboolean minus = false;\n\t\t\tif (c == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tc = readByte();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres = res * 10 + c - '0';\n\t\t\t\tc = readByte();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn (minus) ? -res : res;\n\t\t}\n \n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextIntArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic long[] nextLongArray(int n) {\n\t\t\tlong[] a = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n \n\t\tpublic char[][] nextCharMap(int n, int m) {\n\t\t\tchar[][] map = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tmap[i] = next().toCharArray();\n\t\t\treturn map;\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
public class Main {
static int max=0;
public static void main(String[] args){
PrintWriter out = new PrintWriter(System.out);
InputReader sc=new InputReader(System.in);
int N=sc.nextInt();
int K=sc.nextInt();
int[] c=new int[N];
for (int i = 0; i < K; i++) {
int d=sc.nextInt();
for (int j = 0; j < d; j++) {
int a=sc.nextInt()-1;
c[a]++;
}
}
int count=0;
for (int i = 0; i < c.length; i++) {
if (c[i]==0) {
count++;
}
}
System.out.println(count);
}
static class InputReader {
private InputStream in;
private byte[] buffer = new byte[1024];
private int curbuf;
private int lenbuf;
public InputReader(InputStream in) {
this.in = in;
this.curbuf = this.lenbuf = 0;
}
public boolean hasNextByte() {
if (curbuf >= lenbuf) {
curbuf = 0;
try {
lenbuf = in.read(buffer);
} catch (IOException e) {
throw new InputMismatchException();
}
if (lenbuf <= 0)
return false;
}
return true;
}
private int readByte() {
if (hasNextByte())
return buffer[curbuf++];
else
return -1;
}
private boolean isSpaceChar(int c) {
return !(c >= 33 && c <= 126);
}
private void skip() {
while (hasNextByte() && isSpaceChar(buffer[curbuf]))
curbuf++;
}
public boolean hasNext() {
skip();
return hasNextByte();
}
public String next() {
if (!hasNext())
throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while (!isSpaceChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public int nextInt() {
if (!hasNext())
throw new NoSuchElementException();
int c = readByte();
while (isSpaceChar(c))
c = readByte();
boolean minus = false;
if (c == '-') {
minus = true;
c = readByte();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res = res * 10 + c - '0';
c = readByte();
} while (!isSpaceChar(c));
return (minus) ? -res : res;
}
public long nextLong() {
if (!hasNext())
throw new NoSuchElementException();
int c = readByte();
while (isSpaceChar(c))
c = readByte();
boolean minus = false;
if (c == '-') {
minus = true;
c = readByte();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res = res * 10 + c - '0';
c = readByte();
} while (!isSpaceChar(c));
return (minus) ? -res : res;
}
public double nextDouble() {
return Double.parseDouble(next());
}
public int[] nextIntArray(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = nextInt();
return a;
}
public long[] nextLongArray(int n) {
long[] a = new long[n];
for (int i = 0; i < n; i++)
a[i] = nextLong();
return a;
}
public char[][] nextCharMap(int n, int m) {
char[][] map = new char[n][m];
for (int i = 0; i < n; i++)
map[i] = next().toCharArray();
return map;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
4,
18,
13,
17,
0,
18,
13,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
122,
8
],
[
122,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
11,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
35,
39
],
[
11,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
52,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
81,
82
],
[
76,
83
],
[
73,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
11,
89
],
[
89,
90
],
[
89,
91
],
[
11,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
92,
100
],
[
100,
101
],
[
101,
102
],
[
92,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
111,
112
],
[
11,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
9,
119
],
[
119,
120
],
[
0,
121
],
[
121,
122
],
[
121,
123
]
] |
[
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Boolean[] s = new Boolean[n];\n Arrays.fill(s, false);\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }\n }\n int c = 0;\n for (int i = 0; i < n; i++) {\n if (!s[i]) {\n c++;\n }\n }\n System.out.println(c);\n }\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Boolean[] s = new Boolean[n];\n Arrays.fill(s, false);\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }\n }\n int c = 0;\n for (int i = 0; i < n; i++) {\n if (!s[i]) {\n c++;\n }\n }\n System.out.println(c);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Boolean[] s = new Boolean[n];\n Arrays.fill(s, false);\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }\n }\n int c = 0;\n for (int i = 0; i < n; i++) {\n if (!s[i]) {\n c++;\n }\n }\n System.out.println(c);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Boolean[] s = new Boolean[n];\n Arrays.fill(s, false);\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }\n }\n int c = 0;\n for (int i = 0; i < n; i++) {\n if (!s[i]) {\n c++;\n }\n }\n System.out.println(c);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = Integer.parseInt(sc.next());",
"n",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int k = Integer.parseInt(sc.next());",
"k",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"Boolean[] s = new Boolean[n];",
"s",
"new Boolean[n]",
"n",
"Arrays.fill(s, false)",
"Arrays.fill",
"Arrays",
"s",
"false",
"for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }\n }",
"{\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }\n }",
"int d = Integer.parseInt(sc.next());",
"d",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }",
"{\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }",
"int a = Integer.parseInt(sc.next()) - 1;",
"a",
"Integer.parseInt(sc.next()) - 1",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"1",
"s[a] = true",
"s[a]",
"s",
"a",
"true",
"int c = 0;",
"c",
"0",
"for (int i = 0; i < n; i++) {\n if (!s[i]) {\n c++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (!s[i]) {\n c++;\n }\n }",
"{\n if (!s[i]) {\n c++;\n }\n }",
"if (!s[i]) {\n c++;\n }",
"!s[i]",
"s[i]",
"s",
"i",
"{\n c++;\n }",
"c++",
"c",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Boolean[] s = new Boolean[n];\n Arrays.fill(s, false);\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }\n }\n int c = 0;\n for (int i = 0; i < n; i++) {\n if (!s[i]) {\n c++;\n }\n }\n System.out.println(c);\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Boolean[] s = new Boolean[n];\n Arrays.fill(s, false);\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(sc.next()) - 1;\n s[a] = true;\n }\n }\n int c = 0;\n for (int i = 0; i < n; i++) {\n if (!s[i]) {\n c++;\n }\n }\n System.out.println(c);\n }\n}",
"Main"
] |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
int k = Integer.parseInt(sc.next());
Boolean[] s = new Boolean[n];
Arrays.fill(s, false);
for (int i = 0; i < k; i++) {
int d = Integer.parseInt(sc.next());
for (int j = 0; j < d; j++) {
int a = Integer.parseInt(sc.next()) - 1;
s[a] = true;
}
}
int c = 0;
for (int i = 0; i < n; i++) {
if (!s[i]) {
c++;
}
}
System.out.println(c);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
40,
18,
13,
2,
4,
18,
13,
17,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
64,
68
],
[
60,
69
],
[
59,
70
],
[
70,
71
],
[
71,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
] |
[
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n int K = scan.nextInt();\n \n int sunuke[] = new int[N];\n int num;\n \n for(int k = 0; k < K; k++){\n num = scan.nextInt();\n for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }\n }\n \n System.out.println(N);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n int K = scan.nextInt();\n \n int sunuke[] = new int[N];\n int num;\n \n for(int k = 0; k < K; k++){\n num = scan.nextInt();\n for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }\n }\n \n System.out.println(N);\n }\n}",
"Main",
"public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n int K = scan.nextInt();\n \n int sunuke[] = new int[N];\n int num;\n \n for(int k = 0; k < K; k++){\n num = scan.nextInt();\n for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }\n }\n \n System.out.println(N);\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n int K = scan.nextInt();\n \n int sunuke[] = new int[N];\n int num;\n \n for(int k = 0; k < K; k++){\n num = scan.nextInt();\n for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }\n }\n \n System.out.println(N);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int sunuke[] = new int[N];",
"sunuke",
"new int[N]",
"N",
"int num;",
"num",
"for(int k = 0; k < K; k++){\n num = scan.nextInt();\n for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }\n }",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < K",
"k",
"K",
"k++",
"k++",
"k",
"{\n num = scan.nextInt();\n for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }\n }",
"{\n num = scan.nextInt();\n for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }\n }",
"num = scan.nextInt()",
"num",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }",
"int n = 0;",
"int n = 0;",
"n",
"0",
"n < num",
"n",
"num",
"n++",
"n++",
"n",
"{\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }",
"{\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }",
"if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }",
"sunuke[scan.nextInt()-1]++ == 0",
"sunuke[scan.nextInt()-1]++",
"sunuke[scan.nextInt()-1]",
"sunuke",
"scan.nextInt()-1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"0",
"{\n N--;\n }",
"N--",
"N",
"System.out.println(N)",
"System.out.println",
"System.out",
"System",
"System.out",
"N",
"String args[]",
"args",
"public class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n int K = scan.nextInt();\n \n int sunuke[] = new int[N];\n int num;\n \n for(int k = 0; k < K; k++){\n num = scan.nextInt();\n for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }\n }\n \n System.out.println(N);\n }\n}",
"public class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n int K = scan.nextInt();\n \n int sunuke[] = new int[N];\n int num;\n \n for(int k = 0; k < K; k++){\n num = scan.nextInt();\n for(int n = 0; n < num; n++){\n if(sunuke[scan.nextInt()-1]++ == 0){\n N--;\n }\n }\n }\n \n System.out.println(N);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int K = scan.nextInt();
int sunuke[] = new int[N];
int num;
for(int k = 0; k < K; k++){
num = scan.nextInt();
for(int n = 0; n < num; n++){
if(sunuke[scan.nextInt()-1]++ == 0){
N--;
}
}
}
System.out.println(N);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
120,
5
],
[
120,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
81,
85
],
[
8,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
99,
105
],
[
105,
106
],
[
106,
107
],
[
8,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
8,
114
],
[
114,
115
],
[
115,
116
],
[
6,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
] |
[
"\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint ans = 0;\n\n\t\tint number[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tnumber[i] = 0;\n\t\t}\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tscan.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint ans = 0;\n\n\t\tint number[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tnumber[i] = 0;\n\t\t}\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tscan.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint ans = 0;\n\n\t\tint number[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tnumber[i] = 0;\n\t\t}\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tscan.close();\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint ans = 0;\n\n\t\tint number[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tnumber[i] = 0;\n\t\t}\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tscan.close();\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int ans = 0;",
"ans",
"0",
"int number[] = new int[N];",
"number",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n\t\t\tnumber[i] = 0;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tnumber[i] = 0;\n\t\t}",
"{\n\t\t\tnumber[i] = 0;\n\t\t}",
"number[i] = 0",
"number[i]",
"number",
"i",
"0",
"for (int i = 0; i < K; i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}\n\t\t}",
"int d = scan.nextInt();",
"d",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}",
"int j =0;",
"int j =0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}",
"{\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}",
"number[scan.nextInt()-1]++",
"number[scan.nextInt()-1]",
"number",
"scan.nextInt()-1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"for (int i = 0; i < N; i++) {\n\t\t\tif (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tif (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"if (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}",
"number[i] == 0",
"number[i]",
"number",
"i",
"0",
"{\n\t\t\t\tans++;\n\t\t\t}",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint ans = 0;\n\n\t\tint number[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tnumber[i] = 0;\n\t\t}\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tscan.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint K = scan.nextInt();\n\n\t\tint ans = 0;\n\n\t\tint number[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tnumber[i] = 0;\n\t\t}\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = scan.nextInt();\n\t\t\tfor(int j =0;j<d;j++) {\n\t\t\t\tnumber[scan.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (number[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tscan.close();\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int K = scan.nextInt();
int ans = 0;
int number[] = new int[N];
for (int i = 0; i < N; i++) {
number[i] = 0;
}
for (int i = 0; i < K; i++) {
int d = scan.nextInt();
for(int j =0;j<d;j++) {
number[scan.nextInt()-1]++;
}
}
for (int i = 0; i < N; i++) {
if (number[i] == 0) {
ans++;
}
}
System.out.println(ans);
scan.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
68,
78
],
[
78,
79
],
[
79,
80
],
[
68,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
84,
89
],
[
83,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
6,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] |
[
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n =sc.nextInt();\n int k =sc.nextInt();\n ArrayList<Integer> array=new ArrayList<Integer>();\n int cnt=0;\n for(int i =0;i<k;i++) {\n \t\tint d =sc.nextInt();\n \t\tfor(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}\n }\n for(int i = 1 ;i<n+1;i++) { \n if(array.contains(i) ==false) {\n cnt+=1; \n }\n }\nSystem.out.println(cnt);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n =sc.nextInt();\n int k =sc.nextInt();\n ArrayList<Integer> array=new ArrayList<Integer>();\n int cnt=0;\n for(int i =0;i<k;i++) {\n \t\tint d =sc.nextInt();\n \t\tfor(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}\n }\n for(int i = 1 ;i<n+1;i++) { \n if(array.contains(i) ==false) {\n cnt+=1; \n }\n }\nSystem.out.println(cnt);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n =sc.nextInt();\n int k =sc.nextInt();\n ArrayList<Integer> array=new ArrayList<Integer>();\n int cnt=0;\n for(int i =0;i<k;i++) {\n \t\tint d =sc.nextInt();\n \t\tfor(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}\n }\n for(int i = 1 ;i<n+1;i++) { \n if(array.contains(i) ==false) {\n cnt+=1; \n }\n }\nSystem.out.println(cnt);\n\t}",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n =sc.nextInt();\n int k =sc.nextInt();\n ArrayList<Integer> array=new ArrayList<Integer>();\n int cnt=0;\n for(int i =0;i<k;i++) {\n \t\tint d =sc.nextInt();\n \t\tfor(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}\n }\n for(int i = 1 ;i<n+1;i++) { \n if(array.contains(i) ==false) {\n cnt+=1; \n }\n }\nSystem.out.println(cnt);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n =sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k =sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ArrayList<Integer> array=new ArrayList<Integer>();",
"array",
"new ArrayList<Integer>()",
"int cnt=0;",
"cnt",
"0",
"for(int i =0;i<k;i++) {\n \t\tint d =sc.nextInt();\n \t\tfor(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}\n }",
"int i =0;",
"int i =0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n \t\tint d =sc.nextInt();\n \t\tfor(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}\n }",
"{\n \t\tint d =sc.nextInt();\n \t\tfor(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}\n }",
"int d =sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}",
"int j=0 ;",
"int j=0 ;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n int work = sc.nextInt();\n array.add(work);\n \t\t}",
"{\n int work = sc.nextInt();\n array.add(work);\n \t\t}",
"int work = sc.nextInt();",
"work",
"sc.nextInt()",
"sc.nextInt",
"sc",
"array.add(work)",
"array.add",
"array",
"work",
"for(int i = 1 ;i<n+1;i++) { \n if(array.contains(i) ==false) {\n cnt+=1; \n }\n }",
"int i = 1 ;",
"int i = 1 ;",
"i",
"1",
"i<n+1",
"i",
"n+1",
"n",
"1",
"i++",
"i++",
"i",
"{ \n if(array.contains(i) ==false) {\n cnt+=1; \n }\n }",
"{ \n if(array.contains(i) ==false) {\n cnt+=1; \n }\n }",
"if(array.contains(i) ==false) {\n cnt+=1; \n }",
"array.contains(i) ==false",
"array.contains(i)",
"array.contains",
"array",
"i",
"false",
"{\n cnt+=1; \n }",
"cnt+=1",
"cnt",
"1",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n =sc.nextInt();\n int k =sc.nextInt();\n ArrayList<Integer> array=new ArrayList<Integer>();\n int cnt=0;\n for(int i =0;i<k;i++) {\n \t\tint d =sc.nextInt();\n \t\tfor(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}\n }\n for(int i = 1 ;i<n+1;i++) { \n if(array.contains(i) ==false) {\n cnt+=1; \n }\n }\nSystem.out.println(cnt);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n =sc.nextInt();\n int k =sc.nextInt();\n ArrayList<Integer> array=new ArrayList<Integer>();\n int cnt=0;\n for(int i =0;i<k;i++) {\n \t\tint d =sc.nextInt();\n \t\tfor(int j=0 ;j<d ;j++) {\n int work = sc.nextInt();\n array.add(work);\n \t\t}\n }\n for(int i = 1 ;i<n+1;i++) { \n if(array.contains(i) ==false) {\n cnt+=1; \n }\n }\nSystem.out.println(cnt);\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n =sc.nextInt();
int k =sc.nextInt();
ArrayList<Integer> array=new ArrayList<Integer>();
int cnt=0;
for(int i =0;i<k;i++) {
int d =sc.nextInt();
for(int j=0 ;j<d ;j++) {
int work = sc.nextInt();
array.add(work);
}
}
for(int i = 1 ;i<n+1;i++) {
if(array.contains(i) ==false) {
cnt+=1;
}
}
System.out.println(cnt);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
40,
18,
13,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
40,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
42,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
8,
72
],
[
72,
73
],
[
72,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
88,
94
],
[
94,
95
],
[
8,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \tint[] have = new int[n];\n \tint a, d;\n \tfor(int i = 0; i < k; i++){\n \td = sc.nextInt();\n \tfor(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }\n }\n \tint count = 0;\n \tfor(int i = 0; i < n; i++){\n \tif(have[i] == 0) count++;\n }\n \tSystem.out.println(count++);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \tint[] have = new int[n];\n \tint a, d;\n \tfor(int i = 0; i < k; i++){\n \td = sc.nextInt();\n \tfor(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }\n }\n \tint count = 0;\n \tfor(int i = 0; i < n; i++){\n \tif(have[i] == 0) count++;\n }\n \tSystem.out.println(count++);\n }\n}",
"Main",
"public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \tint[] have = new int[n];\n \tint a, d;\n \tfor(int i = 0; i < k; i++){\n \td = sc.nextInt();\n \tfor(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }\n }\n \tint count = 0;\n \tfor(int i = 0; i < n; i++){\n \tif(have[i] == 0) count++;\n }\n \tSystem.out.println(count++);\n }",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \tint[] have = new int[n];\n \tint a, d;\n \tfor(int i = 0; i < k; i++){\n \td = sc.nextInt();\n \tfor(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }\n }\n \tint count = 0;\n \tfor(int i = 0; i < n; i++){\n \tif(have[i] == 0) count++;\n }\n \tSystem.out.println(count++);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] have = new int[n];",
"have",
"new int[n]",
"n",
"int a",
"a",
"d;",
"d",
"for(int i = 0; i < k; i++){\n \td = sc.nextInt();\n \tfor(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n \td = sc.nextInt();\n \tfor(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }\n }",
"{\n \td = sc.nextInt();\n \tfor(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }\n }",
"d = sc.nextInt()",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n \ta = sc.nextInt();\n \thave[a-1]++;\n }",
"{\n \ta = sc.nextInt();\n \thave[a-1]++;\n }",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"have[a-1]++",
"have[a-1]",
"have",
"a-1",
"a",
"1",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++){\n \tif(have[i] == 0) count++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tif(have[i] == 0) count++;\n }",
"{\n \tif(have[i] == 0) count++;\n }",
"if(have[i] == 0) count++;",
"have[i] == 0",
"have[i]",
"have",
"i",
"0",
"count++",
"count",
"System.out.println(count++)",
"System.out.println",
"System.out",
"System",
"System.out",
"count++",
"count",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \tint[] have = new int[n];\n \tint a, d;\n \tfor(int i = 0; i < k; i++){\n \td = sc.nextInt();\n \tfor(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }\n }\n \tint count = 0;\n \tfor(int i = 0; i < n; i++){\n \tif(have[i] == 0) count++;\n }\n \tSystem.out.println(count++);\n }\n}",
"public class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tint k = sc.nextInt();\n \tint[] have = new int[n];\n \tint a, d;\n \tfor(int i = 0; i < k; i++){\n \td = sc.nextInt();\n \tfor(int j = 0; j < d; j++){\n \ta = sc.nextInt();\n \thave[a-1]++;\n }\n }\n \tint count = 0;\n \tfor(int i = 0; i < n; i++){\n \tif(have[i] == 0) count++;\n }\n \tSystem.out.println(count++);\n }\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] have = new int[n];
int a, d;
for(int i = 0; i < k; i++){
d = sc.nextInt();
for(int j = 0; j < d; j++){
a = sc.nextInt();
have[a-1]++;
}
}
int count = 0;
for(int i = 0; i < n; i++){
if(have[i] == 0) count++;
}
System.out.println(count++);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
125,
5
],
[
125,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
68,
78
],
[
78,
79
],
[
79,
80
],
[
68,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
86,
90
],
[
8,
91
],
[
91,
92
],
[
91,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
94,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
114,
115
],
[
8,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
6,
122
],
[
122,
123
],
[
0,
124
],
[
124,
125
],
[
124,
126
]
] |
[
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int kind = sc.nextInt();\n int[] di = new int[kind];\n\n int[] count = new int[n];\n for(int i = 0; i<n; i++){\n count[i] = 0;\n }\n\n for(int i = 0; i<kind; i++){\n di[i] = sc.nextInt();\n for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }\n }\n\n int trickCount = 0;\n for(int i = 0; i<n; i++){\n if(count[i] == 0){\n trickCount++;\n }\n }\n\n System.out.println(trickCount);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int kind = sc.nextInt();\n int[] di = new int[kind];\n\n int[] count = new int[n];\n for(int i = 0; i<n; i++){\n count[i] = 0;\n }\n\n for(int i = 0; i<kind; i++){\n di[i] = sc.nextInt();\n for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }\n }\n\n int trickCount = 0;\n for(int i = 0; i<n; i++){\n if(count[i] == 0){\n trickCount++;\n }\n }\n\n System.out.println(trickCount);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int kind = sc.nextInt();\n int[] di = new int[kind];\n\n int[] count = new int[n];\n for(int i = 0; i<n; i++){\n count[i] = 0;\n }\n\n for(int i = 0; i<kind; i++){\n di[i] = sc.nextInt();\n for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }\n }\n\n int trickCount = 0;\n for(int i = 0; i<n; i++){\n if(count[i] == 0){\n trickCount++;\n }\n }\n\n System.out.println(trickCount);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int kind = sc.nextInt();\n int[] di = new int[kind];\n\n int[] count = new int[n];\n for(int i = 0; i<n; i++){\n count[i] = 0;\n }\n\n for(int i = 0; i<kind; i++){\n di[i] = sc.nextInt();\n for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }\n }\n\n int trickCount = 0;\n for(int i = 0; i<n; i++){\n if(count[i] == 0){\n trickCount++;\n }\n }\n\n System.out.println(trickCount);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int kind = sc.nextInt();",
"kind",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] di = new int[kind];",
"di",
"new int[kind]",
"kind",
"int[] count = new int[n];",
"count",
"new int[n]",
"n",
"for(int i = 0; i<n; i++){\n count[i] = 0;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n count[i] = 0;\n }",
"{\n count[i] = 0;\n }",
"count[i] = 0",
"count[i]",
"count",
"i",
"0",
"for(int i = 0; i<kind; i++){\n di[i] = sc.nextInt();\n for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<kind",
"i",
"kind",
"i++",
"i++",
"i",
"{\n di[i] = sc.nextInt();\n for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }\n }",
"{\n di[i] = sc.nextInt();\n for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }\n }",
"di[i] = sc.nextInt()",
"di[i]",
"di",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j<di[i]",
"j",
"di[i]",
"di",
"i",
"j++",
"j++",
"j",
"{\n count[sc.nextInt() - 1]++;\n }",
"{\n count[sc.nextInt() - 1]++;\n }",
"count[sc.nextInt() - 1]++",
"count[sc.nextInt() - 1]",
"count",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"int trickCount = 0;",
"trickCount",
"0",
"for(int i = 0; i<n; i++){\n if(count[i] == 0){\n trickCount++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(count[i] == 0){\n trickCount++;\n }\n }",
"{\n if(count[i] == 0){\n trickCount++;\n }\n }",
"if(count[i] == 0){\n trickCount++;\n }",
"count[i] == 0",
"count[i]",
"count",
"i",
"0",
"{\n trickCount++;\n }",
"trickCount++",
"trickCount",
"System.out.println(trickCount)",
"System.out.println",
"System.out",
"System",
"System.out",
"trickCount",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int kind = sc.nextInt();\n int[] di = new int[kind];\n\n int[] count = new int[n];\n for(int i = 0; i<n; i++){\n count[i] = 0;\n }\n\n for(int i = 0; i<kind; i++){\n di[i] = sc.nextInt();\n for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }\n }\n\n int trickCount = 0;\n for(int i = 0; i<n; i++){\n if(count[i] == 0){\n trickCount++;\n }\n }\n\n System.out.println(trickCount);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int kind = sc.nextInt();\n int[] di = new int[kind];\n\n int[] count = new int[n];\n for(int i = 0; i<n; i++){\n count[i] = 0;\n }\n\n for(int i = 0; i<kind; i++){\n di[i] = sc.nextInt();\n for(int j = 0; j<di[i]; j++){\n count[sc.nextInt() - 1]++;\n }\n }\n\n int trickCount = 0;\n for(int i = 0; i<n; i++){\n if(count[i] == 0){\n trickCount++;\n }\n }\n\n System.out.println(trickCount);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int kind = sc.nextInt();
int[] di = new int[kind];
int[] count = new int[n];
for(int i = 0; i<n; i++){
count[i] = 0;
}
for(int i = 0; i<kind; i++){
di[i] = sc.nextInt();
for(int j = 0; j<di[i]; j++){
count[sc.nextInt() - 1]++;
}
}
int trickCount = 0;
for(int i = 0; i<n; i++){
if(count[i] == 0){
trickCount++;
}
}
System.out.println(trickCount);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
2,
18,
13,
2,
13,
17,
17,
30,
0,
18,
13,
2,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
53,
63
],
[
63,
64
],
[
64,
65
],
[
53,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
74,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
82,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
89,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
102,
108
],
[
108,
109
],
[
109,
110
],
[
8,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
6,
117
],
[
117,
118
]
] |
[
"import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int N=sc.nextInt();\n int K=sc.nextInt();\n int d[]=new int[K];\n boolean have[]=new boolean[N];\n int sum=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }\n }\n for(int i=0;i<N;i++){\n if(have[i] == false){\n sum++;\n }\n }\n System.out.println(sum);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int N=sc.nextInt();\n int K=sc.nextInt();\n int d[]=new int[K];\n boolean have[]=new boolean[N];\n int sum=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }\n }\n for(int i=0;i<N;i++){\n if(have[i] == false){\n sum++;\n }\n }\n System.out.println(sum);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int N=sc.nextInt();\n int K=sc.nextInt();\n int d[]=new int[K];\n boolean have[]=new boolean[N];\n int sum=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }\n }\n for(int i=0;i<N;i++){\n if(have[i] == false){\n sum++;\n }\n }\n System.out.println(sum);\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int N=sc.nextInt();\n int K=sc.nextInt();\n int d[]=new int[K];\n boolean have[]=new boolean[N];\n int sum=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }\n }\n for(int i=0;i<N;i++){\n if(have[i] == false){\n sum++;\n }\n }\n System.out.println(sum);\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N=sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K=sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d[]=new int[K];",
"d",
"new int[K]",
"K",
"boolean have[]=new boolean[N];",
"have",
"new boolean[N]",
"N",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }\n }",
"{\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }\n }",
"d[i]=sc.nextInt()",
"d[i]",
"d",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0;j<d[i];j++){\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d[i]",
"j",
"d[i]",
"d",
"i",
"j++",
"j++",
"j",
"{\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }",
"{\n int temp=sc.nextInt();\n if(have[temp-1] == false){\n have[temp-1]=true;\n }\n }",
"int temp=sc.nextInt();",
"temp",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(have[temp-1] == false){\n have[temp-1]=true;\n }",
"have[temp-1] == false",
"have[temp-1]",
"have",
"temp-1",
"temp",
"1",
"false",
"{\n have[temp-1]=true;\n }",
"have[temp-1]=true",
"have[temp-1]",
"have",
"temp-1",
"temp",
"1",
"true",
"for(int i=0;i<N;i++){\n if(have[i] == false){\n sum++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n if(have[i] == false){\n sum++;\n }\n }",
"{\n if(have[i] == false){\n sum++;\n }\n }",
"if(have[i] == false){\n sum++;\n }",
"have[i] == false",
"have[i]",
"have",
"i",
"false",
"{\n sum++;\n }",
"sum++",
"sum",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args"
] |
import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int N=sc.nextInt();
int K=sc.nextInt();
int d[]=new int[K];
boolean have[]=new boolean[N];
int sum=0;
for(int i=0;i<K;i++){
d[i]=sc.nextInt();
for(int j=0;j<d[i];j++){
int temp=sc.nextInt();
if(have[temp-1] == false){
have[temp-1]=true;
}
}
}
for(int i=0;i<N;i++){
if(have[i] == false){
sum++;
}
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
40,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
71,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
84,
90
],
[
90,
91
],
[
91,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
6,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] |
[
" import java.util.*;\n \n public class Main {\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n= sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n int cnt = 0;\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }\n }\n \n for (int j = 0; j < n; j++) {\n if (a[j] == 0) {\n cnt++;\n }\n }\n System.out.println(cnt);\n }\n } ",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n= sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n int cnt = 0;\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }\n }\n \n for (int j = 0; j < n; j++) {\n if (a[j] == 0) {\n cnt++;\n }\n }\n System.out.println(cnt);\n }\n }",
"Main",
"public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n= sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n int cnt = 0;\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }\n }\n \n for (int j = 0; j < n; j++) {\n if (a[j] == 0) {\n cnt++;\n }\n }\n System.out.println(cnt);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n= sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n int cnt = 0;\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }\n }\n \n for (int j = 0; j < n; j++) {\n if (a[j] == 0) {\n cnt++;\n }\n }\n System.out.println(cnt);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n= sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }\n }",
"{\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }\n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n int p = sc.nextInt();\n a[p-1]++;\n }",
"{\n int p = sc.nextInt();\n a[p-1]++;\n }",
"int p = sc.nextInt();",
"p",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a[p-1]++",
"a[p-1]",
"a",
"p-1",
"p",
"1",
"for (int j = 0; j < n; j++) {\n if (a[j] == 0) {\n cnt++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if (a[j] == 0) {\n cnt++;\n }\n }",
"{\n if (a[j] == 0) {\n cnt++;\n }\n }",
"if (a[j] == 0) {\n cnt++;\n }",
"a[j] == 0",
"a[j]",
"a",
"j",
"0",
"{\n cnt++;\n }",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String args[]",
"args",
"public class Main {\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n= sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n int cnt = 0;\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }\n }\n \n for (int j = 0; j < n; j++) {\n if (a[j] == 0) {\n cnt++;\n }\n }\n System.out.println(cnt);\n }\n }",
"public class Main {\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n= sc.nextInt();\n int k = sc.nextInt();\n int[] a = new int[n];\n int cnt = 0;\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n int p = sc.nextInt();\n a[p-1]++;\n }\n }\n \n for (int j = 0; j < n; j++) {\n if (a[j] == 0) {\n cnt++;\n }\n }\n System.out.println(cnt);\n }\n }",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n= sc.nextInt();
int k = sc.nextInt();
int[] a = new int[n];
int cnt = 0;
for (int i = 0; i < k; i++) {
int d = sc.nextInt();
for (int j = 0; j < d; j++) {
int p = sc.nextInt();
a[p-1]++;
}
}
for (int j = 0; j < n; j++) {
if (a[j] == 0) {
cnt++;
}
}
System.out.println(cnt);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
17,
41,
13,
20,
42,
2,
40,
13,
17,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
33,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
11,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
9,
73
],
[
73,
74
]
] |
[
"/**\n * \n */\nimport java.util.HashSet;\nimport java.util.Scanner;\n\n/**\n * @author Neeraj\n *\n */\n class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint d;\n\t\tint count=0;\n\t\tHashSet hs=new HashSet();\n\t\twhile(k-->0) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\td=sc.nextInt();\n\t\t\tfor(int i=0;i<d;i++) {\n\t\t\t \ths.add(sc.nextInt());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(n-hs.size());\n\t}\n\n}",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
" class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint d;\n\t\tint count=0;\n\t\tHashSet hs=new HashSet();\n\t\twhile(k-->0) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\td=sc.nextInt();\n\t\t\tfor(int i=0;i<d;i++) {\n\t\t\t \ths.add(sc.nextInt());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(n-hs.size());\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint d;\n\t\tint count=0;\n\t\tHashSet hs=new HashSet();\n\t\twhile(k-->0) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\td=sc.nextInt();\n\t\t\tfor(int i=0;i<d;i++) {\n\t\t\t \ths.add(sc.nextInt());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(n-hs.size());\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tint d;\n\t\tint count=0;\n\t\tHashSet hs=new HashSet();\n\t\twhile(k-->0) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\td=sc.nextInt();\n\t\t\tfor(int i=0;i<d;i++) {\n\t\t\t \ths.add(sc.nextInt());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(n-hs.size());\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k=sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d;",
"d",
"int count=0;",
"count",
"0",
"HashSet hs=new HashSet();",
"hs",
"new HashSet()",
"while(k-->0) {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\td=sc.nextInt();\n\t\t\tfor(int i=0;i<d;i++) {\n\t\t\t \ths.add(sc.nextInt());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"k-->0",
"k--",
"k",
"0",
"{\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\td=sc.nextInt();\n\t\t\tfor(int i=0;i<d;i++) {\n\t\t\t \ths.add(sc.nextInt());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"d=sc.nextInt()",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<d;i++) {\n\t\t\t \ths.add(sc.nextInt());\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<d",
"i",
"d",
"i++",
"i++",
"i",
"{\n\t\t\t \ths.add(sc.nextInt());\n\t\t\t}",
"{\n\t\t\t \ths.add(sc.nextInt());\n\t\t\t}",
"hs.add(sc.nextInt())",
"hs.add",
"hs",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(n-hs.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"n-hs.size()",
"n",
"hs.size()",
"hs.size",
"hs",
"String[] args",
"args"
] |
/**
*
*/
import java.util.HashSet;
import java.util.Scanner;
/**
* @author Neeraj
*
*/
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n=sc.nextInt();
int k=sc.nextInt();
int d;
int count=0;
HashSet hs=new HashSet();
while(k-->0) {
d=sc.nextInt();
for(int i=0;i<d;i++) {
hs.add(sc.nextInt());
}
}
System.out.println(n-hs.size());
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
42,
2,
40,
13,
17,
30,
0,
18,
13,
4,
18,
13,
17,
41,
13,
17,
28,
13,
13,
30,
30,
14,
40,
13,
40,
13,
4,
18,
18,
13,
13,
2,
13,
17,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
18,
13,
13,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
6,
13,
12,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
445,
11
],
[
445,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
31,
32
],
[
31,
33
],
[
14,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
34,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
39,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
45,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
51,
57
],
[
14,
58
],
[
58,
59
],
[
58,
60
],
[
14,
61
],
[
61,
62
],
[
61,
63
],
[
61,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
14,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
12,
79
],
[
79,
80
],
[
445,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
81,
85
],
[
85,
86
],
[
85,
87
],
[
81,
89
],
[
89,
90
],
[
81,
91
],
[
91,
92
],
[
81,
93
],
[
93,
94
],
[
81,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
95,
103
],
[
103,
104
],
[
81,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
108,
113
],
[
113,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
123,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
119,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
141,
142
],
[
107,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
81,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
150,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
150,
164
],
[
164,
165
],
[
164,
166
],
[
150,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
171,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
150,
180
],
[
180,
181
],
[
180,
182
],
[
150,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
183,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
194
],
[
194,
195
],
[
194,
196
],
[
189,
197
],
[
197,
198
],
[
188,
199
],
[
199,
200
],
[
199,
201
],
[
188,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
204,
206
],
[
188,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
150,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
81,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
217,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
222,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
229,
230
],
[
217,
231
],
[
231,
232
],
[
231,
233
],
[
217,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
234,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
238,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
217,
247
],
[
247,
248
],
[
247,
249
],
[
217,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
250,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
257,
261
],
[
261,
262
],
[
261,
263
],
[
256,
264
],
[
264,
265
],
[
255,
266
],
[
266,
267
],
[
266,
268
],
[
255,
269
],
[
269,
270
],
[
269,
271
],
[
271,
272
],
[
271,
273
],
[
255,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
217,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
81,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
284,
289
],
[
289,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
289,
294
],
[
294,
295
],
[
294,
296
],
[
289,
297
],
[
297,
298
],
[
298,
299
],
[
289,
300
],
[
301,
301
],
[
301,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
302,
306
],
[
306,
307
],
[
284,
308
],
[
308,
309
],
[
282,
310
],
[
310,
311
],
[
81,
312
],
[
312,
313
],
[
312,
314
],
[
314,
315
],
[
315,
316
],
[
315,
317
],
[
317,
318
],
[
314,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
319,
323
],
[
323,
324
],
[
324,
325
],
[
324,
326
],
[
326,
327
],
[
314,
328
],
[
328,
329
],
[
328,
330
],
[
314,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
331,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
337,
340
],
[
336,
341
],
[
341,
342
],
[
341,
343
],
[
343,
344
],
[
314,
345
],
[
345,
346
],
[
346,
347
],
[
347,
348
],
[
81,
349
],
[
349,
350
],
[
349,
351
],
[
351,
352
],
[
352,
353
],
[
352,
354
],
[
354,
355
],
[
351,
356
],
[
356,
357
],
[
357,
358
],
[
357,
359
],
[
356,
360
],
[
360,
361
],
[
360,
362
],
[
362,
363
],
[
351,
364
],
[
364,
365
],
[
364,
366
],
[
351,
367
],
[
367,
368
],
[
368,
369
],
[
369,
370
],
[
369,
371
],
[
367,
372
],
[
372,
373
],
[
373,
374
],
[
374,
375
],
[
373,
376
],
[
372,
377
],
[
377,
378
],
[
377,
379
],
[
379,
380
],
[
351,
381
],
[
381,
382
],
[
382,
383
],
[
383,
384
],
[
81,
385
],
[
385,
386
],
[
385,
387
],
[
387,
388
],
[
388,
389
],
[
389,
390
],
[
389,
391
],
[
388,
392
],
[
392,
393
],
[
393,
394
],
[
394,
395
],
[
393,
396
],
[
387,
397
],
[
397,
398
],
[
401,
399
],
[
411,
400
],
[
408,
401
],
[
401,
402
],
[
402,
403
],
[
402,
404
],
[
401,
405
],
[
405,
406
],
[
405,
407
],
[
408,
408
],
[
408,
409
],
[
408,
410
],
[
411,
411
],
[
411,
412
],
[
411,
413
],
[
401,
414
],
[
414,
415
],
[
414,
416
],
[
416,
417
],
[
385,
418
],
[
418,
419
],
[
81,
420
],
[
420,
421
],
[
420,
422
],
[
422,
423
],
[
423,
424
],
[
425,
425
],
[
425,
426
],
[
426,
427
],
[
426,
428
],
[
425,
429
],
[
429,
430
],
[
429,
431
],
[
425,
432
],
[
432,
433
],
[
432,
434
],
[
434,
435
],
[
420,
436
],
[
436,
437
],
[
81,
438
],
[
438,
439
],
[
438,
440
],
[
440,
441
],
[
440,
442
],
[
442,
443
],
[
0,
444
],
[
444,
445
],
[
444,
446
]
] |
[
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.InputMismatchException;\n\npublic class Main {\n\n public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n\n int n = in.nextInt();\n int k = in.nextInt();\n boolean[] hasSnack = new boolean[n+1];\n while (k-- > 0) {\n int dk = in.nextInt();\n while (dk-- > 0) {\n hasSnack[in.nextInt()] = true;\n }\n }\n int count = 0;\n for (boolean val: hasSnack) {\n if (!val) count++;\n }\n System.out.println(count-1);\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1) throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0) return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c)) c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n\n int n = in.nextInt();\n int k = in.nextInt();\n boolean[] hasSnack = new boolean[n+1];\n while (k-- > 0) {\n int dk = in.nextInt();\n while (dk-- > 0) {\n hasSnack[in.nextInt()] = true;\n }\n }\n int count = 0;\n for (boolean val: hasSnack) {\n if (!val) count++;\n }\n System.out.println(count-1);\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1) throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0) return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c)) c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n\n int n = in.nextInt();\n int k = in.nextInt();\n boolean[] hasSnack = new boolean[n+1];\n while (k-- > 0) {\n int dk = in.nextInt();\n while (dk-- > 0) {\n hasSnack[in.nextInt()] = true;\n }\n }\n int count = 0;\n for (boolean val: hasSnack) {\n if (!val) count++;\n }\n System.out.println(count-1);\n }",
"main",
"{\n InputReader in = new InputReader(System.in);\n\n int n = in.nextInt();\n int k = in.nextInt();\n boolean[] hasSnack = new boolean[n+1];\n while (k-- > 0) {\n int dk = in.nextInt();\n while (dk-- > 0) {\n hasSnack[in.nextInt()] = true;\n }\n }\n int count = 0;\n for (boolean val: hasSnack) {\n if (!val) count++;\n }\n System.out.println(count-1);\n }",
"InputReader in = new InputReader(System.in);",
"in",
"new InputReader(System.in)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int k = in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"boolean[] hasSnack = new boolean[n+1];",
"hasSnack",
"new boolean[n+1]",
"n+1",
"n",
"1",
"while (k-- > 0) {\n int dk = in.nextInt();\n while (dk-- > 0) {\n hasSnack[in.nextInt()] = true;\n }\n }",
"k-- > 0",
"k--",
"k",
"0",
"{\n int dk = in.nextInt();\n while (dk-- > 0) {\n hasSnack[in.nextInt()] = true;\n }\n }",
"int dk = in.nextInt();",
"dk",
"in.nextInt()",
"in.nextInt",
"in",
"while (dk-- > 0) {\n hasSnack[in.nextInt()] = true;\n }",
"dk-- > 0",
"dk--",
"dk",
"0",
"{\n hasSnack[in.nextInt()] = true;\n }",
"hasSnack[in.nextInt()] = true",
"hasSnack[in.nextInt()]",
"hasSnack",
"in.nextInt()",
"in.nextInt",
"in",
"true",
"int count = 0;",
"count",
"0",
"for (boolean val: hasSnack) {\n if (!val) count++;\n }",
"boolean val",
"hasSnack",
"{\n if (!val) count++;\n }",
"{\n if (!val) count++;\n }",
"if (!val) count++;",
"!val",
"val",
"count++",
"count",
"System.out.println(count-1)",
"System.out.println",
"System.out",
"System",
"System.out",
"count-1",
"count",
"1",
"String[] args",
"args",
"static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1) throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0) return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c)) c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }",
"InputReader",
"private final InputStream stream;",
"stream",
"private final byte[] buf = new byte[8192];",
"buf",
"new byte[8192]",
"8192",
"private int curChar",
"curChar",
"snumChars;",
"snumChars",
"private SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int snext() {\n if (snumChars == -1) throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0) return -1;\n }\n return buf[curChar++];\n }",
"snext",
"{\n if (snumChars == -1) throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0) return -1;\n }\n return buf[curChar++];\n }",
"if (snumChars == -1) throw new InputMismatchException();",
"snumChars == -1",
"snumChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0) return -1;\n }",
"curChar >= snumChars",
"curChar",
"snumChars",
"{\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0) return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n snumChars = stream.read(buf);\n }",
"snumChars = stream.read(buf)",
"snumChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (snumChars <= 0) return -1;",
"snumChars <= 0",
"snumChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextInt",
"{\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) {\n c = snext();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = snext();\n }",
"c = snext()",
"c",
"snext()",
"snext",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = snext();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = snext();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = snext()",
"c",
"snext()",
"snext",
"int res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n }",
"if (c < '0' || c > '9') throw new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = snext()",
"c",
"snext()",
"snext",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextLong",
"{\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) {\n c = snext();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = snext();\n }",
"c = snext()",
"c",
"snext()",
"snext",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = snext();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = snext();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = snext()",
"c",
"snext()",
"snext",
"long res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n }",
"if (c < '0' || c > '9') throw new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = snext()",
"c",
"snext()",
"snext",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"nextIntArray",
"{\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"int a[] = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = nextInt();\n }",
"{\n a[i] = nextInt();\n }",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"readString",
"{\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) {\n c = snext();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = snext();\n }",
"c = snext()",
"c",
"snext()",
"snext",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res.appendCodePoint(c);\n c = snext();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = snext()",
"c",
"snext()",
"snext",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public String nextLine() {\n int c = snext();\n while (isSpaceChar(c)) c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"nextLine",
"{\n int c = snext();\n while (isSpaceChar(c)) c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) c = snext();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = snext()",
"c",
"snext()",
"snext",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));",
"!isEndOfLine(c)",
"isEndOfLine(c)",
"isEndOfLine",
"c",
"{\n res.appendCodePoint(c);\n c = snext();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = snext()",
"c",
"snext()",
"snext",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public boolean isSpaceChar(int c) {\n if (filter != null) return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\n if (filter != null) return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"if (filter != null) return filter.isSpaceChar(c);",
"filter != null",
"filter",
"null",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"isEndOfLine",
"{\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"return c == '\\n' || c == '\\r' || c == -1;",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"public class Main {\n\n public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n\n int n = in.nextInt();\n int k = in.nextInt();\n boolean[] hasSnack = new boolean[n+1];\n while (k-- > 0) {\n int dk = in.nextInt();\n while (dk-- > 0) {\n hasSnack[in.nextInt()] = true;\n }\n }\n int count = 0;\n for (boolean val: hasSnack) {\n if (!val) count++;\n }\n System.out.println(count-1);\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1) throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0) return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c)) c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n\n int n = in.nextInt();\n int k = in.nextInt();\n boolean[] hasSnack = new boolean[n+1];\n while (k-- > 0) {\n int dk = in.nextInt();\n while (dk-- > 0) {\n hasSnack[in.nextInt()] = true;\n }\n }\n int count = 0;\n for (boolean val: hasSnack) {\n if (!val) count++;\n }\n System.out.println(count-1);\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1) throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0) return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c)) c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n }\n}",
"Main"
] |
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
public class Main {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
int n = in.nextInt();
int k = in.nextInt();
boolean[] hasSnack = new boolean[n+1];
while (k-- > 0) {
int dk = in.nextInt();
while (dk-- > 0) {
hasSnack[in.nextInt()] = true;
}
}
int count = 0;
for (boolean val: hasSnack) {
if (!val) count++;
}
System.out.println(count-1);
}
static class InputReader {
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
private SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int snext() {
if (snumChars == -1) throw new InputMismatchException();
if (curChar >= snumChars) {
curChar = 0;
try {
snumChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (snumChars <= 0) return -1;
}
return buf[curChar++];
}
public int nextInt() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
int res = 0;
do {
if (c < '0' || c > '9') throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
long res = 0;
do {
if (c < '0' || c > '9') throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public int[] nextIntArray(int n) {
int a[] = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public String readString() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isSpaceChar(c));
return res.toString();
}
public String nextLine() {
int c = snext();
while (isSpaceChar(c)) c = snext();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isEndOfLine(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
if (filter != null) return filter.isSpaceChar(c);
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
20,
11,
1,
41,
13,
17,
2,
13,
2,
17,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
17,
17,
30,
0,
13,
4,
18,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
4,
18,
13,
2,
4,
18,
13,
17,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
4,
18,
13,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
138,
8
],
[
138,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
11,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
11,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
48,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
63,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
76,
84
],
[
84,
85
],
[
85,
86
],
[
76,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
94,
98
],
[
89,
99
],
[
11,
100
],
[
100,
101
],
[
100,
102
],
[
11,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
103,
111
],
[
111,
112
],
[
112,
113
],
[
103,
114
],
[
115,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
117,
124
],
[
116,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
11,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
9,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
]
] |
[
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int K = scanner.nextInt();\n int d = 0;\n ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);\n \n for(int i = 0;i < N;i++) {\n arraylist.add(new ArrayList<Integer>());\n }\n\n for(int i = 0; i < (2 * K); i++){\n if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }\n }\n \n int count = 0;\n for(int i = 0;i < N;i++) {\n if(arraylist.get(i).size() == 0) {\n count += 1;\n }\n }\n\n System.out.println(count);\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int K = scanner.nextInt();\n int d = 0;\n ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);\n \n for(int i = 0;i < N;i++) {\n arraylist.add(new ArrayList<Integer>());\n }\n\n for(int i = 0; i < (2 * K); i++){\n if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }\n }\n \n int count = 0;\n for(int i = 0;i < N;i++) {\n if(arraylist.get(i).size() == 0) {\n count += 1;\n }\n }\n\n System.out.println(count);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int K = scanner.nextInt();\n int d = 0;\n ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);\n \n for(int i = 0;i < N;i++) {\n arraylist.add(new ArrayList<Integer>());\n }\n\n for(int i = 0; i < (2 * K); i++){\n if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }\n }\n \n int count = 0;\n for(int i = 0;i < N;i++) {\n if(arraylist.get(i).size() == 0) {\n count += 1;\n }\n }\n\n System.out.println(count);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int K = scanner.nextInt();\n int d = 0;\n ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);\n \n for(int i = 0;i < N;i++) {\n arraylist.add(new ArrayList<Integer>());\n }\n\n for(int i = 0; i < (2 * K); i++){\n if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }\n }\n \n int count = 0;\n for(int i = 0;i < N;i++) {\n if(arraylist.get(i).size() == 0) {\n count += 1;\n }\n }\n\n System.out.println(count);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int N = scanner.nextInt();",
"N",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int K = scanner.nextInt();",
"K",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int d = 0;",
"d",
"0",
"ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);",
"arraylist",
"new ArrayList<ArrayList<Integer>>(N)",
"for(int i = 0;i < N;i++) {\n arraylist.add(new ArrayList<Integer>());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n arraylist.add(new ArrayList<Integer>());\n }",
"{\n arraylist.add(new ArrayList<Integer>());\n }",
"arraylist.add(new ArrayList<Integer>())",
"arraylist.add",
"arraylist",
"new ArrayList<Integer>()",
"for(int i = 0; i < (2 * K); i++){\n if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < (2 * K)",
"i",
"(2 * K)",
"2",
"K",
"i++",
"i++",
"i",
"{\n if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }\n }",
"{\n if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }\n }",
"if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }",
"i % 2 == 0",
"i % 2",
"i",
"2",
"0",
"{\n d = scanner.nextInt();\n }",
"d = scanner.nextInt()",
"d",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }",
"for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }",
"int s = 0;",
"int s = 0;",
"s",
"0",
"s < d",
"s",
"d",
"s++",
"s++",
"s",
"{\n arraylist.get(scanner.nextInt() - 1).add(i);\n }",
"{\n arraylist.get(scanner.nextInt() - 1).add(i);\n }",
"arraylist.get(scanner.nextInt() - 1).add(i)",
"arraylist.get(scanner.nextInt() - 1).add",
"arraylist.get(scanner.nextInt() - 1)",
"arraylist.get",
"arraylist",
"scanner.nextInt() - 1",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"1",
"i",
"int count = 0;",
"count",
"0",
"for(int i = 0;i < N;i++) {\n if(arraylist.get(i).size() == 0) {\n count += 1;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n if(arraylist.get(i).size() == 0) {\n count += 1;\n }\n }",
"{\n if(arraylist.get(i).size() == 0) {\n count += 1;\n }\n }",
"if(arraylist.get(i).size() == 0) {\n count += 1;\n }",
"arraylist.get(i).size() == 0",
"arraylist.get(i).size()",
"arraylist.get(i).size",
"arraylist.get(i)",
"arraylist.get",
"arraylist",
"i",
"0",
"{\n count += 1;\n }",
"count += 1",
"count",
"1",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int K = scanner.nextInt();\n int d = 0;\n ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);\n \n for(int i = 0;i < N;i++) {\n arraylist.add(new ArrayList<Integer>());\n }\n\n for(int i = 0; i < (2 * K); i++){\n if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }\n }\n \n int count = 0;\n for(int i = 0;i < N;i++) {\n if(arraylist.get(i).size() == 0) {\n count += 1;\n }\n }\n\n System.out.println(count);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int K = scanner.nextInt();\n int d = 0;\n ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);\n \n for(int i = 0;i < N;i++) {\n arraylist.add(new ArrayList<Integer>());\n }\n\n for(int i = 0; i < (2 * K); i++){\n if(i % 2 == 0){\n d = scanner.nextInt();\n }else{\n for(int s = 0; s < d; s++){\n arraylist.get(scanner.nextInt() - 1).add(i);\n }\n }\n }\n \n int count = 0;\n for(int i = 0;i < N;i++) {\n if(arraylist.get(i).size() == 0) {\n count += 1;\n }\n }\n\n System.out.println(count);\n }\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int K = scanner.nextInt();
int d = 0;
ArrayList<ArrayList<Integer>> arraylist = new ArrayList<ArrayList<Integer>>(N);
for(int i = 0;i < N;i++) {
arraylist.add(new ArrayList<Integer>());
}
for(int i = 0; i < (2 * K); i++){
if(i % 2 == 0){
d = scanner.nextInt();
}else{
for(int s = 0; s < d; s++){
arraylist.get(scanner.nextInt() - 1).add(i);
}
}
}
int count = 0;
for(int i = 0;i < N;i++) {
if(arraylist.get(i).size() == 0) {
count += 1;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
4,
18,
13,
17,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
114,
5
],
[
114,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
70,
74
],
[
67,
75
],
[
8,
76
],
[
76,
77
],
[
77,
78
],
[
8,
79
],
[
79,
80
],
[
79,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
82,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
8,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
6,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
] |
[
"import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tString str = sc.nextLine();\n\t\tint [] a = new int[n];\n\t\tfor (int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tstr = sc.nextLine();\n\t\t\tfor (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tint ans = 0;\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tString str = sc.nextLine();\n\t\tint [] a = new int[n];\n\t\tfor (int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tstr = sc.nextLine();\n\t\t\tfor (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tint ans = 0;\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tString str = sc.nextLine();\n\t\tint [] a = new int[n];\n\t\tfor (int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tstr = sc.nextLine();\n\t\t\tfor (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tint ans = 0;\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tString str = sc.nextLine();\n\t\tint [] a = new int[n];\n\t\tfor (int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tstr = sc.nextLine();\n\t\t\tfor (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tint ans = 0;\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String str = sc.nextLine();",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int [] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tstr = sc.nextLine();\n\t\t\tfor (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tstr = sc.nextLine();\n\t\t\tfor (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tstr = sc.nextLine();\n\t\t\tfor (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}\n\t\t}",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"str = sc.nextLine()",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"for (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}",
"{\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}",
"a[sc.nextInt() - 1] = 1",
"a[sc.nextInt() - 1]",
"a",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"1",
"sc.close()",
"sc.close",
"sc",
"int ans = 0;",
"ans",
"0",
"for (int i=0; i<n; i++) {\n\t\t\tif (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}\n\t\t}",
"if (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}",
"a[i]== 0",
"a[i]",
"a",
"i",
"0",
"{\n\t\t\t\tans+=1;\n\t\t\t}",
"ans+=1",
"ans",
"1",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tString str = sc.nextLine();\n\t\tint [] a = new int[n];\n\t\tfor (int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tstr = sc.nextLine();\n\t\t\tfor (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tint ans = 0;\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tString str = sc.nextLine();\n\t\tint [] a = new int[n];\n\t\tfor (int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tstr = sc.nextLine();\n\t\t\tfor (int j=0; j<d; j++) {\n\t\t\t\ta[sc.nextInt() - 1] = 1;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\t\tint ans = 0;\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (a[i]== 0) {\n\t\t\t\tans+=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
String str = sc.nextLine();
int [] a = new int[n];
for (int i=0; i<k; i++) {
int d = sc.nextInt();
str = sc.nextLine();
for (int j=0; j<d; j++) {
a[sc.nextInt() - 1] = 1;
}
}
sc.close();
int ans = 0;
for (int i=0; i<n; i++) {
if (a[i]== 0) {
ans+=1;
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
13,
17,
29,
41,
13,
20,
2,
13,
17,
17,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
13,
17,
29,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
13,
13,
29,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
18,
13,
13,
17,
2,
18,
18,
13,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
152,
5
],
[
152,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
12,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
12,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
23,
38
],
[
38,
39
],
[
38,
40
],
[
41,
42
],
[
41,
43
],
[
23,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
23,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
23,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
71,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
98,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
104,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
110,
116
],
[
23,
117
],
[
117,
118
],
[
117,
119
],
[
23,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
120,
128
],
[
128,
129
],
[
129,
130
],
[
120,
131
],
[
132,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
134,
140
],
[
133,
141
],
[
141,
142
],
[
23,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
143,
148
],
[
6,
149
],
[
149,
150
],
[
0,
151
],
[
151,
152
],
[
151,
153
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n try {\n int childrenNum = stdIn.nextInt();\n if (childrenNum < 1 || childrenNum > 100) return;\n int[][] childrenSnack = new int[childrenNum + 1][2];\n int snackNum = stdIn.nextInt();\n if (snackNum < 1 || snackNum > 100) return;\n for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }\n int notHavingNum = 0;\n for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }\n System.out.println(notHavingNum);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n stdIn.close();\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n try {\n int childrenNum = stdIn.nextInt();\n if (childrenNum < 1 || childrenNum > 100) return;\n int[][] childrenSnack = new int[childrenNum + 1][2];\n int snackNum = stdIn.nextInt();\n if (snackNum < 1 || snackNum > 100) return;\n for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }\n int notHavingNum = 0;\n for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }\n System.out.println(notHavingNum);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n stdIn.close();\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n try {\n int childrenNum = stdIn.nextInt();\n if (childrenNum < 1 || childrenNum > 100) return;\n int[][] childrenSnack = new int[childrenNum + 1][2];\n int snackNum = stdIn.nextInt();\n if (snackNum < 1 || snackNum > 100) return;\n for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }\n int notHavingNum = 0;\n for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }\n System.out.println(notHavingNum);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n stdIn.close();\n }\n }",
"main",
"{\n Scanner stdIn = new Scanner(System.in);\n try {\n int childrenNum = stdIn.nextInt();\n if (childrenNum < 1 || childrenNum > 100) return;\n int[][] childrenSnack = new int[childrenNum + 1][2];\n int snackNum = stdIn.nextInt();\n if (snackNum < 1 || snackNum > 100) return;\n for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }\n int notHavingNum = 0;\n for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }\n System.out.println(notHavingNum);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n stdIn.close();\n }\n }",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"try {\n int childrenNum = stdIn.nextInt();\n if (childrenNum < 1 || childrenNum > 100) return;\n int[][] childrenSnack = new int[childrenNum + 1][2];\n int snackNum = stdIn.nextInt();\n if (snackNum < 1 || snackNum > 100) return;\n for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }\n int notHavingNum = 0;\n for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }\n System.out.println(notHavingNum);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n stdIn.close();\n }",
"catch (Exception e) {\n e.printStackTrace();\n }",
"Exception e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n stdIn.close();\n }",
"stdIn.close()",
"stdIn.close",
"stdIn",
"{\n int childrenNum = stdIn.nextInt();\n if (childrenNum < 1 || childrenNum > 100) return;\n int[][] childrenSnack = new int[childrenNum + 1][2];\n int snackNum = stdIn.nextInt();\n if (snackNum < 1 || snackNum > 100) return;\n for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }\n int notHavingNum = 0;\n for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }\n System.out.println(notHavingNum);\n }",
"int childrenNum = stdIn.nextInt();",
"childrenNum",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"if (childrenNum < 1 || childrenNum > 100) return;",
"childrenNum < 1 || childrenNum > 100",
"childrenNum < 1",
"childrenNum",
"1",
"childrenNum > 100",
"childrenNum",
"100",
"return;",
"int[][] childrenSnack = new int[childrenNum + 1][2];",
"childrenSnack",
"new int[childrenNum + 1][2]",
"childrenNum + 1",
"childrenNum",
"1",
"2",
"int snackNum = stdIn.nextInt();",
"snackNum",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"if (snackNum < 1 || snackNum > 100) return;",
"snackNum < 1 || snackNum > 100",
"snackNum < 1",
"snackNum",
"1",
"snackNum > 100",
"snackNum",
"100",
"return;",
"for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }",
"int snackCnt = 0;",
"int snackCnt = 0;",
"snackCnt",
"0",
"snackCnt < snackNum",
"snackCnt",
"snackNum",
"snackCnt++",
"snackCnt++",
"snackCnt",
"{\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }",
"{\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }",
"int havingSnackNum = stdIn.nextInt();",
"havingSnackNum",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;",
"havingSnackNum < 1 || havingSnackNum > childrenNum",
"havingSnackNum < 1",
"havingSnackNum",
"1",
"havingSnackNum > childrenNum",
"havingSnackNum",
"childrenNum",
"return;",
"for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }",
"int cnt = 0;",
"int cnt = 0;",
"cnt",
"0",
"cnt < havingSnackNum",
"cnt",
"havingSnackNum",
"cnt++",
"cnt++",
"cnt",
"{\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }",
"{\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }",
"int temphavingChild = stdIn.nextInt();",
"temphavingChild",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1",
"childrenSnack[temphavingChild][0]",
"childrenSnack[temphavingChild]",
"childrenSnack",
"temphavingChild",
"0",
"childrenSnack[temphavingChild][0] + 1",
"childrenSnack[temphavingChild][0]",
"childrenSnack[temphavingChild]",
"childrenSnack",
"temphavingChild",
"0",
"1",
"int notHavingNum = 0;",
"notHavingNum",
"0",
"for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }",
"int searchCnt = 1;",
"int searchCnt = 1;",
"searchCnt",
"1",
"searchCnt <= childrenNum",
"searchCnt",
"childrenNum",
"searchCnt++",
"searchCnt++",
"searchCnt",
"{\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }",
"{\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }",
"if (childrenSnack[searchCnt][0] == 0) notHavingNum++;",
"childrenSnack[searchCnt][0] == 0",
"childrenSnack[searchCnt][0]",
"childrenSnack[searchCnt]",
"childrenSnack",
"searchCnt",
"0",
"0",
"notHavingNum++",
"notHavingNum",
"System.out.println(notHavingNum)",
"System.out.println",
"System.out",
"System",
"System.out",
"notHavingNum",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n try {\n int childrenNum = stdIn.nextInt();\n if (childrenNum < 1 || childrenNum > 100) return;\n int[][] childrenSnack = new int[childrenNum + 1][2];\n int snackNum = stdIn.nextInt();\n if (snackNum < 1 || snackNum > 100) return;\n for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }\n int notHavingNum = 0;\n for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }\n System.out.println(notHavingNum);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n stdIn.close();\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n try {\n int childrenNum = stdIn.nextInt();\n if (childrenNum < 1 || childrenNum > 100) return;\n int[][] childrenSnack = new int[childrenNum + 1][2];\n int snackNum = stdIn.nextInt();\n if (snackNum < 1 || snackNum > 100) return;\n for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {\n int havingSnackNum = stdIn.nextInt();\n if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;\n for (int cnt = 0; cnt < havingSnackNum; cnt++) {\n int temphavingChild = stdIn.nextInt();\n childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;\n }\n }\n int notHavingNum = 0;\n for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {\n if (childrenSnack[searchCnt][0] == 0) notHavingNum++;\n }\n System.out.println(notHavingNum);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n stdIn.close();\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
try {
int childrenNum = stdIn.nextInt();
if (childrenNum < 1 || childrenNum > 100) return;
int[][] childrenSnack = new int[childrenNum + 1][2];
int snackNum = stdIn.nextInt();
if (snackNum < 1 || snackNum > 100) return;
for (int snackCnt = 0; snackCnt < snackNum; snackCnt++) {
int havingSnackNum = stdIn.nextInt();
if (havingSnackNum < 1 || havingSnackNum > childrenNum) return;
for (int cnt = 0; cnt < havingSnackNum; cnt++) {
int temphavingChild = stdIn.nextInt();
childrenSnack[temphavingChild][0] = childrenSnack[temphavingChild][0] + 1;
}
}
int notHavingNum = 0;
for (int searchCnt = 1; searchCnt <= childrenNum; searchCnt++) {
if (childrenSnack[searchCnt][0] == 0) notHavingNum++;
}
System.out.println(notHavingNum);
} catch (Exception e) {
e.printStackTrace();
} finally {
stdIn.close();
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
4,
18,
13,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
84,
94
],
[
94,
95
],
[
95,
96
],
[
84,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
100,
108
],
[
99,
109
],
[
109,
110
],
[
110,
111
],
[
80,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
117,
118
],
[
8,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
6,
125
],
[
125,
126
]
] |
[
"import java.util.*;\n\nclass Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n ArrayList<String> param = new ArrayList<String>();\n \n for (int i = 0; i < k; i++) {\n int num = sc.nextInt();\n for (int h = 0; h < num; h++) {\n String input = sc.next();\n param.add(input);\n }\n }\n \n int fc = 0;\n for (int i = 1; i <= n; i++) {\n int count = 0;\n for (int h = 0; h < param.size(); h++) {\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }\n if (count == 0) {\n fc++;\n }\n }\n \n System.out.println(fc);\n }\n}\n \n ",
"import java.util.*;",
"util.*",
"java",
"class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n ArrayList<String> param = new ArrayList<String>();\n \n for (int i = 0; i < k; i++) {\n int num = sc.nextInt();\n for (int h = 0; h < num; h++) {\n String input = sc.next();\n param.add(input);\n }\n }\n \n int fc = 0;\n for (int i = 1; i <= n; i++) {\n int count = 0;\n for (int h = 0; h < param.size(); h++) {\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }\n if (count == 0) {\n fc++;\n }\n }\n \n System.out.println(fc);\n }\n}",
"Main",
"public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n ArrayList<String> param = new ArrayList<String>();\n \n for (int i = 0; i < k; i++) {\n int num = sc.nextInt();\n for (int h = 0; h < num; h++) {\n String input = sc.next();\n param.add(input);\n }\n }\n \n int fc = 0;\n for (int i = 1; i <= n; i++) {\n int count = 0;\n for (int h = 0; h < param.size(); h++) {\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }\n if (count == 0) {\n fc++;\n }\n }\n \n System.out.println(fc);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n ArrayList<String> param = new ArrayList<String>();\n \n for (int i = 0; i < k; i++) {\n int num = sc.nextInt();\n for (int h = 0; h < num; h++) {\n String input = sc.next();\n param.add(input);\n }\n }\n \n int fc = 0;\n for (int i = 1; i <= n; i++) {\n int count = 0;\n for (int h = 0; h < param.size(); h++) {\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }\n if (count == 0) {\n fc++;\n }\n }\n \n System.out.println(fc);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ArrayList<String> param = new ArrayList<String>();",
"param",
"new ArrayList<String>()",
"for (int i = 0; i < k; i++) {\n int num = sc.nextInt();\n for (int h = 0; h < num; h++) {\n String input = sc.next();\n param.add(input);\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int num = sc.nextInt();\n for (int h = 0; h < num; h++) {\n String input = sc.next();\n param.add(input);\n }\n }",
"{\n int num = sc.nextInt();\n for (int h = 0; h < num; h++) {\n String input = sc.next();\n param.add(input);\n }\n }",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int h = 0; h < num; h++) {\n String input = sc.next();\n param.add(input);\n }",
"int h = 0;",
"int h = 0;",
"h",
"0",
"h < num",
"h",
"num",
"h++",
"h++",
"h",
"{\n String input = sc.next();\n param.add(input);\n }",
"{\n String input = sc.next();\n param.add(input);\n }",
"String input = sc.next();",
"input",
"sc.next()",
"sc.next",
"sc",
"param.add(input)",
"param.add",
"param",
"input",
"int fc = 0;",
"fc",
"0",
"for (int i = 1; i <= n; i++) {\n int count = 0;\n for (int h = 0; h < param.size(); h++) {\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }\n if (count == 0) {\n fc++;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int count = 0;\n for (int h = 0; h < param.size(); h++) {\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }\n if (count == 0) {\n fc++;\n }\n }",
"{\n int count = 0;\n for (int h = 0; h < param.size(); h++) {\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }\n if (count == 0) {\n fc++;\n }\n }",
"int count = 0;",
"count",
"0",
"for (int h = 0; h < param.size(); h++) {\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }",
"int h = 0;",
"int h = 0;",
"h",
"0",
"h < param.size()",
"h",
"param.size()",
"param.size",
"param",
"h++",
"h++",
"h",
"{\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }",
"{\n \n if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }\n }",
"if (Integer.parseInt(param.get(h)) == i) {\n count++;\n }",
"Integer.parseInt(param.get(h)) == i",
"Integer.parseInt(param.get(h))",
"Integer.parseInt",
"Integer",
"param.get(h)",
"param.get",
"param",
"h",
"i",
"{\n count++;\n }",
"count++",
"count",
"if (count == 0) {\n fc++;\n }",
"count == 0",
"count",
"0",
"{\n fc++;\n }",
"fc++",
"fc",
"System.out.println(fc)",
"System.out.println",
"System.out",
"System",
"System.out",
"fc",
"String[] args",
"args"
] |
import java.util.*;
class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
ArrayList<String> param = new ArrayList<String>();
for (int i = 0; i < k; i++) {
int num = sc.nextInt();
for (int h = 0; h < num; h++) {
String input = sc.next();
param.add(input);
}
}
int fc = 0;
for (int i = 1; i <= n; i++) {
int count = 0;
for (int h = 0; h < param.size(); h++) {
if (Integer.parseInt(param.get(h)) == i) {
count++;
}
}
if (count == 0) {
fc++;
}
}
System.out.println(fc);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
4,
18,
13,
4,
18,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
133,
5
],
[
133,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
69,
70
],
[
62,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
71,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
92,
93
],
[
87,
94
],
[
84,
95
],
[
8,
96
],
[
96,
97
],
[
96,
98
],
[
8,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
99,
107
],
[
107,
108
],
[
108,
109
],
[
99,
110
],
[
111,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
112,
118
],
[
118,
119
],
[
119,
120
],
[
8,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
8,
127
],
[
127,
128
],
[
128,
129
],
[
6,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
] |
[
"import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint A[] = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint loop = Integer.parseInt(sc.next());\n\t\t\tfor (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}\n\t\t}\n\n\t\t//ใใใพใงinput\n\t\tint count = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint A[] = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint loop = Integer.parseInt(sc.next());\n\t\t\tfor (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}\n\t\t}\n\n\t\t//ใใใพใงinput\n\t\tint count = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint A[] = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint loop = Integer.parseInt(sc.next());\n\t\t\tfor (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}\n\t\t}\n\n\t\t//ใใใพใงinput\n\t\tint count = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint A[] = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint loop = Integer.parseInt(sc.next());\n\t\t\tfor (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}\n\t\t}\n\n\t\t//ใใใพใงinput\n\t\tint count = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = Integer.parseInt(sc.next());",
"N",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int K = Integer.parseInt(sc.next());",
"K",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int A[] = new int[N];",
"A",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tA[i] = 0;\n\t\t}",
"{\n\t\t\tA[i] = 0;\n\t\t}",
"A[i] = 0",
"A[i]",
"A",
"i",
"0",
"for (int i = 0; i < K; i++) {\n\t\t\tint loop = Integer.parseInt(sc.next());\n\t\t\tfor (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tint loop = Integer.parseInt(sc.next());\n\t\t\tfor (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint loop = Integer.parseInt(sc.next());\n\t\t\tfor (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}\n\t\t}",
"int loop = Integer.parseInt(sc.next());",
"loop",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"for (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < loop",
"j",
"loop",
"j++",
"j++",
"j",
"{\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}",
"{\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}",
"A[Integer.parseInt(sc.next()) - 1] = 1",
"A[Integer.parseInt(sc.next()) - 1]",
"A",
"Integer.parseInt(sc.next()) - 1",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"1",
"1",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tif (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}",
"A[i] == 0",
"A[i]",
"A",
"i",
"0",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint A[] = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint loop = Integer.parseInt(sc.next());\n\t\t\tfor (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}\n\t\t}\n\n\t\t//ใใใพใงinput\n\t\tint count = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint A[] = new int[N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint loop = Integer.parseInt(sc.next());\n\t\t\tfor (int j = 0; j < loop; j++) {\n\t\t\t\tA[Integer.parseInt(sc.next()) - 1] = 1;\n\t\t\t}\n\t\t}\n\n\t\t//ใใใพใงinput\n\t\tint count = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int K = Integer.parseInt(sc.next());
int A[] = new int[N];
for (int i = 0; i < N; i++) {
A[i] = 0;
}
for (int i = 0; i < K; i++) {
int loop = Integer.parseInt(sc.next());
for (int j = 0; j < loop; j++) {
A[Integer.parseInt(sc.next()) - 1] = 1;
}
}
//ใใใพใงinput
int count = 0;
for (int i = 0; i < N; i++) {
if (A[i] == 0) {
count++;
}
}
System.out.println(count);
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
2,
13,
17,
17,
41,
13,
17,
28,
13,
13,
30,
30,
14,
40,
13,
40,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
30,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
4,
18,
13,
13,
29,
4,
13,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
6,
13,
12,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
331,
23
],
[
331,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
26,
37
],
[
37,
38
],
[
37,
39
],
[
26,
40
],
[
40,
41
],
[
40,
42
],
[
26,
43
],
[
43,
44
],
[
43,
45
],
[
26,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
46,
50
],
[
46,
51
],
[
26,
52
],
[
52,
53
],
[
53,
54
],
[
24,
55
],
[
55,
56
],
[
331,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
72,
73
],
[
72,
74
],
[
61,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
76,
84
],
[
84,
85
],
[
85,
86
],
[
76,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
94,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
106,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
112,
118
],
[
61,
119
],
[
119,
120
],
[
119,
121
],
[
61,
122
],
[
122,
123
],
[
122,
124
],
[
122,
125
],
[
126,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
130,
131
],
[
61,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
59,
136
],
[
136,
137
],
[
59,
138
],
[
138,
139
],
[
59,
140
],
[
140,
141
],
[
331,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
142,
146
],
[
146,
147
],
[
146,
148
],
[
142,
150
],
[
150,
151
],
[
142,
152
],
[
152,
153
],
[
142,
154
],
[
154,
155
],
[
142,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
156,
164
],
[
164,
165
],
[
142,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
169,
174
],
[
174,
175
],
[
175,
176
],
[
168,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
181,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
185,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
194,
197
],
[
181,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
168,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
142,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
213,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
218,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
213,
227
],
[
227,
228
],
[
227,
229
],
[
213,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
230,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
234,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
213,
243
],
[
243,
244
],
[
243,
245
],
[
213,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
246,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
253,
257
],
[
257,
258
],
[
257,
259
],
[
252,
260
],
[
260,
261
],
[
261,
262
],
[
251,
263
],
[
263,
264
],
[
263,
265
],
[
251,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
268,
270
],
[
251,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
213,
275
],
[
275,
276
],
[
276,
277
],
[
276,
278
],
[
142,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
282,
286
],
[
286,
287
],
[
287,
288
],
[
288,
289
],
[
289,
290
],
[
288,
291
],
[
281,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
279,
296
],
[
296,
297
],
[
142,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
301,
302
],
[
305,
303
],
[
315,
304
],
[
312,
305
],
[
305,
306
],
[
306,
307
],
[
306,
308
],
[
305,
309
],
[
309,
310
],
[
309,
311
],
[
312,
312
],
[
312,
313
],
[
312,
314
],
[
315,
315
],
[
315,
316
],
[
315,
317
],
[
305,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
298,
322
],
[
322,
323
],
[
142,
324
],
[
324,
325
],
[
324,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
0,
330
],
[
330,
331
],
[
330,
332
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author Schitiz\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C_166 solver = new C_166();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C_166 {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.ni();\n int k = in.ni();\n\n boolean[] arr = new boolean[n];\n for(int i = 0; i < k; i++) {\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }\n int count = 0;\n for(boolean b : arr) {\n if(!b) count++;\n }\n out.println(count);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if(numChars == -1) {\n throw new InputMismatchException();\n }\n if(curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }\n if(numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int ni() {\n int c = read();\n while(isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if(c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while(!isSpaceChar(c));\n return res * sgn;\n }\n\n private boolean isSpaceChar(int c) {\n if(filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n private static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C_166 solver = new C_166();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C_166 {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.ni();\n int k = in.ni();\n\n boolean[] arr = new boolean[n];\n for(int i = 0; i < k; i++) {\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }\n int count = 0;\n for(boolean b : arr) {\n if(!b) count++;\n }\n out.println(count);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if(numChars == -1) {\n throw new InputMismatchException();\n }\n if(curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }\n if(numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int ni() {\n int c = read();\n while(isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if(c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while(!isSpaceChar(c));\n return res * sgn;\n }\n\n private boolean isSpaceChar(int c) {\n if(filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n private static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C_166 solver = new C_166();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C_166 solver = new C_166();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"C_166 solver = new C_166();",
"solver",
"new C_166()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class C_166 {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.ni();\n int k = in.ni();\n\n boolean[] arr = new boolean[n];\n for(int i = 0; i < k; i++) {\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }\n int count = 0;\n for(boolean b : arr) {\n if(!b) count++;\n }\n out.println(count);\n }\n\n }",
"C_166",
"public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.ni();\n int k = in.ni();\n\n boolean[] arr = new boolean[n];\n for(int i = 0; i < k; i++) {\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }\n int count = 0;\n for(boolean b : arr) {\n if(!b) count++;\n }\n out.println(count);\n }",
"solve",
"{\n int n = in.ni();\n int k = in.ni();\n\n boolean[] arr = new boolean[n];\n for(int i = 0; i < k; i++) {\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }\n int count = 0;\n for(boolean b : arr) {\n if(!b) count++;\n }\n out.println(count);\n }",
"int n = in.ni();",
"n",
"in.ni()",
"in.ni",
"in",
"int k = in.ni();",
"k",
"in.ni()",
"in.ni",
"in",
"boolean[] arr = new boolean[n];",
"arr",
"new boolean[n]",
"n",
"for(int i = 0; i < k; i++) {\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }",
"{\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }",
"int count = in.ni();",
"count",
"in.ni()",
"in.ni",
"in",
"for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < count",
"j",
"count",
"j++",
"j++",
"j",
"{\n int index = in.ni();\n arr[index - 1] = true;\n }",
"{\n int index = in.ni();\n arr[index - 1] = true;\n }",
"int index = in.ni();",
"index",
"in.ni()",
"in.ni",
"in",
"arr[index - 1] = true",
"arr[index - 1]",
"arr",
"index - 1",
"index",
"1",
"true",
"int count = 0;",
"count",
"0",
"for(boolean b : arr) {\n if(!b) count++;\n }",
"boolean b",
"arr",
"{\n if(!b) count++;\n }",
"{\n if(!b) count++;\n }",
"if(!b) count++;",
"!b",
"b",
"count++",
"count",
"out.println(count)",
"out.println",
"out",
"count",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"PrintWriter out",
"out",
"static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if(numChars == -1) {\n throw new InputMismatchException();\n }\n if(curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }\n if(numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int ni() {\n int c = read();\n while(isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if(c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while(!isSpaceChar(c));\n return res * sgn;\n }\n\n private boolean isSpaceChar(int c) {\n if(filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n private static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }",
"InputReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private InputReader.SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int read() {\n if(numChars == -1) {\n throw new InputMismatchException();\n }\n if(curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }\n if(numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"read",
"{\n if(numChars == -1) {\n throw new InputMismatchException();\n }\n if(curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }\n if(numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"if(numChars == -1) {\n throw new InputMismatchException();\n }",
"numChars == -1",
"numChars",
"-1",
"1",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if(curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }\n if(numChars <= 0) {\n return -1;\n }\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }\n if(numChars <= 0) {\n return -1;\n }\n }",
"curChar = 0",
"curChar",
"0",
"try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }",
"catch(IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if(numChars <= 0) {\n return -1;\n }",
"numChars <= 0",
"numChars",
"0",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int ni() {\n int c = read();\n while(isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if(c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while(!isSpaceChar(c));\n return res * sgn;\n }",
"ni",
"{\n int c = read();\n while(isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if(c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while(!isSpaceChar(c));\n return res * sgn;\n }",
"int c = read();",
"c",
"read()",
"read",
"while(isSpaceChar(c)) {\n c = read();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if(c == '-') {\n sgn = -1;\n c = read();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = read();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"int res = 0;",
"res",
"0",
"do {\n if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while(!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n }",
"if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"private boolean isSpaceChar(int c) {\n if(filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"isSpaceChar",
"{\n if(filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"if(filter != null) {\n return filter.isSpaceChar(c);\n }",
"filter != null",
"filter",
"null",
"{\n return filter.isSpaceChar(c);\n }",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return isWhitespace(c);",
"isWhitespace(c)",
"isWhitespace",
"c",
"int c",
"c",
"private static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isWhitespace",
"{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C_166 solver = new C_166();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C_166 {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.ni();\n int k = in.ni();\n\n boolean[] arr = new boolean[n];\n for(int i = 0; i < k; i++) {\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }\n int count = 0;\n for(boolean b : arr) {\n if(!b) count++;\n }\n out.println(count);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if(numChars == -1) {\n throw new InputMismatchException();\n }\n if(curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }\n if(numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int ni() {\n int c = read();\n while(isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if(c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while(!isSpaceChar(c));\n return res * sgn;\n }\n\n private boolean isSpaceChar(int c) {\n if(filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n private static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C_166 solver = new C_166();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C_166 {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.ni();\n int k = in.ni();\n\n boolean[] arr = new boolean[n];\n for(int i = 0; i < k; i++) {\n int count = in.ni();\n for(int j = 0; j < count; j++) {\n int index = in.ni();\n arr[index - 1] = true;\n }\n }\n int count = 0;\n for(boolean b : arr) {\n if(!b) count++;\n }\n out.println(count);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if(numChars == -1) {\n throw new InputMismatchException();\n }\n if(curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch(IOException e) {\n throw new InputMismatchException();\n }\n if(numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int ni() {\n int c = read();\n while(isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if(c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if(c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while(!isSpaceChar(c));\n return res * sgn;\n }\n\n private boolean isSpaceChar(int c) {\n if(filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n private static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}",
"Main"
] |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Schitiz
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
C_166 solver = new C_166();
solver.solve(1, in, out);
out.close();
}
static class C_166 {
public void solve(int testNumber, InputReader in, PrintWriter out) {
int n = in.ni();
int k = in.ni();
boolean[] arr = new boolean[n];
for(int i = 0; i < k; i++) {
int count = in.ni();
for(int j = 0; j < count; j++) {
int index = in.ni();
arr[index - 1] = true;
}
}
int count = 0;
for(boolean b : arr) {
if(!b) count++;
}
out.println(count);
}
}
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private InputReader.SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int read() {
if(numChars == -1) {
throw new InputMismatchException();
}
if(curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch(IOException e) {
throw new InputMismatchException();
}
if(numChars <= 0) {
return -1;
}
}
return buf[curChar++];
}
public int ni() {
int c = read();
while(isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if(c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
if(c < '0' || c > '9') {
throw new InputMismatchException();
}
res *= 10;
res += c - '0';
c = read();
} while(!isSpaceChar(c));
return res * sgn;
}
private boolean isSpaceChar(int c) {
if(filter != null) {
return filter.isSpaceChar(c);
}
return isWhitespace(c);
}
private static boolean isWhitespace(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
80,
8
],
[
80,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
13,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
13,
27
],
[
27,
28
],
[
27,
29
],
[
13,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
42,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
13,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
9,
77
],
[
77,
78
],
[
0,
79
],
[
79,
80
],
[
79,
81
]
] |
[
"import java.util.HashSet;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int K = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(N - set.size());\n }\n }\n}",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int K = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(N - set.size());\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int K = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(N - set.size());\n }\n }",
"main",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int K = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(N - set.size());\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int K = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(N - set.size());\n }",
"{\n int N = sc.nextInt();\n int K = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(N - set.size());\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"HashSet<Integer> set = new HashSet<Integer>();",
"set",
"new HashSet<Integer>()",
"for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }",
"{\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n set.add(sc.nextInt());\n }",
"{\n set.add(sc.nextInt());\n }",
"set.add(sc.nextInt())",
"set.add",
"set",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(N - set.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"N - set.size()",
"N",
"set.size()",
"set.size",
"set",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int K = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(N - set.size());\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int K = sc.nextInt();\n HashSet<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(N - set.size());\n }\n }\n}",
"Main"
] |
import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int N = sc.nextInt();
int K = sc.nextInt();
HashSet<Integer> set = new HashSet<Integer>();
for (int i = 0; i < K; i++) {
int d = sc.nextInt();
for (int j = 0; j < d; j++) {
set.add(sc.nextInt());
}
}
System.out.println(N - set.size());
}
}
}
|
[
7,
6,
12,
13,
30,
29,
2,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
4,
18,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
2,
13,
13,
2,
13,
4,
13,
2,
13,
13,
29,
17,
29,
17,
23,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
40,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
41,
13,
4,
13,
13,
2,
13,
17,
41,
13,
2,
2,
13,
13,
13,
14,
2,
2,
13,
17,
17,
29,
13,
29,
2,
2,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
23,
13,
12,
13,
30,
42,
40,
4,
18,
13,
30,
38,
5,
13,
30,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
6,
13,
12,
13,
30,
4,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
13,
2,
18,
13,
13,
17,
4,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
13,
2,
18,
13,
13,
17,
4,
13,
23,
13,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
2,
3
],
[
2,
4
],
[
4,
5
],
[
5,
6
],
[
6,
7
],
[
7,
8
],
[
7,
9
],
[
6,
10
],
[
10,
11
],
[
10,
12
],
[
2,
13
],
[
13,
14
],
[
2,
15
],
[
15,
16
],
[
0,
17
],
[
17,
18
],
[
17,
19
],
[
0,
20
],
[
20,
21
],
[
20,
22
],
[
0,
23
],
[
500,
24
],
[
500,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
500,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
36,
38
],
[
32,
39
],
[
39,
40
],
[
39,
41
],
[
32,
42
],
[
42,
43
],
[
43,
44
],
[
30,
45
],
[
45,
46
],
[
500,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
51,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
50,
64
],
[
64,
65
],
[
49,
66
],
[
66,
67
],
[
47,
68
],
[
68,
69
],
[
47,
70
],
[
70,
71
],
[
47,
72
],
[
72,
73
],
[
500,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
78,
83
],
[
83,
84
],
[
74,
85
],
[
85,
86
],
[
500,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
91,
96
],
[
87,
97
],
[
97,
98
],
[
87,
99
],
[
99,
100
],
[
500,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
103,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
112,
115
],
[
115,
116
],
[
115,
117
],
[
103,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
103,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
125,
131
],
[
131,
132
],
[
103,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
101,
139
],
[
139,
140
],
[
101,
141
],
[
141,
142
],
[
500,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
149,
150
],
[
149,
151
],
[
149,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
145,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
145,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
161,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
168,
170
],
[
161,
171
],
[
171,
172
],
[
172,
173
],
[
161,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
179,
180
],
[
180,
181
],
[
179,
182
],
[
143,
183
],
[
183,
184
],
[
500,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
191,
192
],
[
191,
193
],
[
191,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
195,
198
],
[
187,
199
],
[
199,
200
],
[
200,
201
],
[
199,
202
],
[
187,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
203,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
210,
212
],
[
203,
213
],
[
213,
214
],
[
214,
215
],
[
203,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
218,
220
],
[
217,
221
],
[
221,
222
],
[
222,
223
],
[
221,
224
],
[
185,
225
],
[
225,
226
],
[
500,
227
],
[
227,
228
],
[
227,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
234
],
[
234,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
234,
239
],
[
239,
240
],
[
239,
241
],
[
234,
242
],
[
242,
243
],
[
243,
244
],
[
234,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
247,
249
],
[
246,
250
],
[
229,
251
],
[
251,
252
],
[
227,
253
],
[
253,
254
],
[
227,
255
],
[
255,
256
],
[
500,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
257,
261
],
[
261,
262
],
[
257,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
266,
270
],
[
265,
271
],
[
271,
272
],
[
272,
273
],
[
272,
274
],
[
271,
275
],
[
263,
276
],
[
276,
277
],
[
263,
278
],
[
278,
279
],
[
257,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
282,
286
],
[
286,
287
],
[
287,
288
],
[
286,
289
],
[
286,
290
],
[
282,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
291,
296
],
[
296,
297
],
[
296,
298
],
[
298,
299
],
[
299,
300
],
[
291,
301
],
[
301,
302
],
[
302,
303
],
[
291,
304
],
[
305,
305
],
[
305,
306
],
[
306,
307
],
[
307,
308
],
[
307,
309
],
[
306,
310
],
[
310,
311
],
[
311,
312
],
[
310,
313
],
[
280,
314
],
[
314,
315
],
[
500,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
316,
320
],
[
320,
321
],
[
316,
322
],
[
322,
323
],
[
322,
324
],
[
324,
325
],
[
325,
326
],
[
325,
327
],
[
324,
328
],
[
328,
329
],
[
328,
330
],
[
322,
331
],
[
331,
332
],
[
316,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
339,
340
],
[
336,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
342,
346
],
[
346,
347
],
[
347,
348
],
[
347,
349
],
[
335,
350
],
[
350,
351
],
[
351,
352
],
[
352,
353
],
[
316,
354
],
[
354,
355
],
[
354,
356
],
[
356,
357
],
[
357,
358
],
[
358,
359
],
[
359,
360
],
[
358,
361
],
[
361,
362
],
[
316,
363
],
[
363,
364
],
[
363,
365
],
[
365,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
367,
370
],
[
370,
371
],
[
316,
372
],
[
372,
373
],
[
372,
374
],
[
374,
375
],
[
375,
376
],
[
375,
377
],
[
374,
379
],
[
379,
380
],
[
380,
381
],
[
381,
382
],
[
381,
383
],
[
379,
384
],
[
384,
385
],
[
384,
386
],
[
379,
387
],
[
387,
388
],
[
388,
389
],
[
379,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
391,
395
],
[
395,
396
],
[
374,
397
],
[
397,
398
],
[
372,
399
],
[
399,
400
],
[
316,
401
],
[
401,
402
],
[
401,
403
],
[
403,
404
],
[
404,
405
],
[
404,
406
],
[
403,
408
],
[
408,
409
],
[
409,
410
],
[
410,
411
],
[
410,
412
],
[
408,
413
],
[
413,
414
],
[
413,
415
],
[
408,
416
],
[
416,
417
],
[
417,
418
],
[
408,
419
],
[
419,
420
],
[
420,
421
],
[
421,
422
],
[
421,
423
],
[
420,
424
],
[
424,
425
],
[
403,
426
],
[
426,
427
],
[
401,
428
],
[
428,
429
],
[
500,
430
],
[
430,
431
],
[
430,
432
],
[
432,
433
],
[
432,
434
],
[
434,
435
],
[
435,
436
],
[
435,
437
],
[
432,
438
],
[
438,
439
],
[
430,
440
],
[
440,
441
],
[
440,
442
],
[
442,
443
],
[
443,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
443,
448
],
[
448,
449
],
[
448,
450
],
[
450,
451
],
[
450,
452
],
[
443,
453
],
[
453,
454
],
[
454,
455
],
[
443,
456
],
[
457,
457
],
[
457,
458
],
[
458,
459
],
[
458,
460
],
[
460,
461
],
[
461,
462
],
[
461,
463
],
[
460,
464
],
[
442,
465
],
[
465,
466
],
[
440,
467
],
[
467,
468
],
[
430,
469
],
[
469,
470
],
[
469,
471
],
[
471,
472
],
[
472,
473
],
[
473,
474
],
[
474,
475
],
[
474,
476
],
[
472,
477
],
[
477,
478
],
[
477,
479
],
[
479,
480
],
[
479,
481
],
[
472,
482
],
[
482,
483
],
[
483,
484
],
[
472,
485
],
[
486,
486
],
[
486,
487
],
[
487,
488
],
[
487,
489
],
[
489,
490
],
[
490,
491
],
[
490,
492
],
[
489,
493
],
[
471,
494
],
[
494,
495
],
[
469,
496
],
[
496,
497
],
[
430,
498
],
[
0,
499
],
[
499,
500
],
[
499,
501
]
] |
[
"import java.io.*;\nimport java.util.*;\n\npublic class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt(); int k=in.nextInt();\n\t\t\tSet<Integer> set=new HashSet<>();\n\t\t\tfor(int i=1; i<=n; i++) set.add(i);\n\t\t\tfor(int i=0; i<k; i++) {\n\t\t\t\tint d=in.nextInt();\n\t\t\t\tint a[]=in.readArray(d);\n\t\t\t\tfor(int j: a) if(set.contains(j)) set.remove(j);\n\t\t\t}\n\t\t\tout.println(set.size());\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}",
"Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t}",
"public int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}",
"compare",
"{\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}",
"return p1.u-p2.u;",
"p1.u-p2.u",
"p1.u",
"p1",
"p1.u",
"p2.u",
"p2",
"p2.u",
"Pair p1",
"p1",
"Pair p2",
"p2",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt(); int k=in.nextInt();\n\t\t\tSet<Integer> set=new HashSet<>();\n\t\t\tfor(int i=1; i<=n; i++) set.add(i);\n\t\t\tfor(int i=0; i<k; i++) {\n\t\t\t\tint d=in.nextInt();\n\t\t\t\tint a[]=in.readArray(d);\n\t\t\t\tfor(int j: a) if(set.contains(j)) set.remove(j);\n\t\t\t}\n\t\t\tout.println(set.size());\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}",
"Main",
"static long mod=(long)1e9+7;",
"mod",
"(long)1e9+7",
"(long)1e9",
"7",
"public static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt(); int k=in.nextInt();\n\t\t\tSet<Integer> set=new HashSet<>();\n\t\t\tfor(int i=1; i<=n; i++) set.add(i);\n\t\t\tfor(int i=0; i<k; i++) {\n\t\t\t\tint d=in.nextInt();\n\t\t\t\tint a[]=in.readArray(d);\n\t\t\t\tfor(int j: a) if(set.contains(j)) set.remove(j);\n\t\t\t}\n\t\t\tout.println(set.size());\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}",
"main",
"{\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt(); int k=in.nextInt();\n\t\t\tSet<Integer> set=new HashSet<>();\n\t\t\tfor(int i=1; i<=n; i++) set.add(i);\n\t\t\tfor(int i=0; i<k; i++) {\n\t\t\t\tint d=in.nextInt();\n\t\t\t\tint a[]=in.readArray(d);\n\t\t\t\tfor(int j: a) if(set.contains(j)) set.remove(j);\n\t\t\t}\n\t\t\tout.println(set.size());\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}",
"Writer out=new Writer(System.out);",
"out",
"new Writer(System.out)",
"Reader in=new Reader(System.in);",
"in",
"new Reader(System.in)",
"int ts=1;",
"ts",
"1",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}",
"tri",
"{\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}",
"if(c<a+b && c>abs(a-b)) return true;",
"c<a+b && c>abs(a-b)",
"c<a+b",
"c",
"a+b",
"a",
"b",
"c>abs(a-b)",
"c",
"abs(a-b)",
"abs",
"a-b",
"a",
"b",
"return true;",
"true",
"return false;",
"false",
"int a",
"a",
"int b",
"b",
"int c",
"c",
"/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}",
"abs",
"{\n\t\treturn a>0 ? a : -a;\n\t}",
"return a>0 ? a : -a;",
"a>0 ? a : -a",
"a>0",
"a",
"0",
"a",
"-a",
"a",
"int a",
"a",
"static int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}",
"max",
"{\n\t\treturn a>b ? a : b;\n\t}",
"return a>b ? a : b;",
"a>b ? a : b",
"a>b",
"a",
"b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"static int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}",
"pow",
"{\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}",
"if(m==0) return 1;",
"m==0",
"m",
"0",
"return 1;",
"1",
"int temp=pow(n,m/2);",
"temp",
"pow(n,m/2)",
"pow",
"n",
"m/2",
"m",
"2",
"long res=(((long)temp*temp)%mod);",
"res",
"(((long)temp*temp)%mod)",
"((long)temp*temp)",
"(long)temp",
"temp",
"mod",
"if(m%2==0) return (int)res;",
"m%2==0",
"m%2",
"m",
"2",
"0",
"return (int)res;",
"(int)res",
"return (int)((res*n)%mod);",
"(int)((res*n)%mod)",
"(res*n)",
"res",
"n",
"mod",
"int n",
"n",
"int m",
"m",
"static void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}",
"sort",
"{\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}",
"ArrayList<Integer> list=new ArrayList<>();",
"list",
"new ArrayList<>()",
"for (int i:a) list.add(i);",
"int i",
"a",
"list.add(i);",
"list.add(i)",
"list.add",
"list",
"i",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"for (int i=0; i<a.length; i++) a[i]=list.get(i);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"a[i]=list.get(i);",
"a[i]=list.get(i)",
"a[i]",
"a",
"i",
"list.get(i)",
"list.get",
"list",
"i",
"int[] a",
"a",
"static void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}",
"sort",
"{\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}",
"ArrayList<Long> list=new ArrayList<>();",
"list",
"new ArrayList<>()",
"for(long i: a) list.add(i);",
"long i",
"a",
"list.add(i);",
"list.add(i)",
"list.add",
"list",
"i",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"for(int i=0; i<a.length; i++) a[i]=list.get(i);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"a[i]=list.get(i);",
"a[i]=list.get(i)",
"a[i]",
"a",
"i",
"list.get(i)",
"list.get",
"list",
"i",
"long a[]",
"a",
"static int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}",
"array",
"{\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}",
"int a[]=new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0; i<n; i++) a[i]=value;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=value;",
"a[i]=value",
"a[i]",
"a",
"i",
"value",
"return a;",
"a",
"int n",
"n",
"int value",
"value",
"static class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"Pair",
"int u",
"u",
"v;",
"v",
"Pair(int u, int v){this.u=u; this.v=v;}",
"Pair",
"{this.u=u; this.v=v;}",
"this.u=u",
"this.u",
"this",
"this.u",
"u",
"this.v=v",
"this.v",
"this",
"this.v",
"v",
"int u",
"u",
"int v",
"v",
"static void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}",
"sort",
"{\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}",
"List<Pair> al=new ArrayList<>(Arrays.asList(coll));",
"al",
"new ArrayList<>(Arrays.asList(coll))",
"Collections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t})",
"Collections.sort",
"Collections",
"al",
"new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t}",
"for(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<al.size()",
"i",
"al.size()",
"al.size",
"al",
"i++",
"i++",
"i",
"{\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}",
"{\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}",
"coll[i]=al.get(i)",
"coll[i]",
"coll",
"i",
"al.get(i)",
"al.get",
"al",
"i",
"Pair [] coll",
"coll",
"static class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}",
"Reader",
"BufferedReader br;",
"br",
"StringTokenizer to;",
"to",
"Reader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}",
"Reader",
"{\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}",
"br=new BufferedReader(new InputStreamReader(stream))",
"br",
"new BufferedReader(new InputStreamReader(stream))",
"to=new StringTokenizer(\"\")",
"to",
"new StringTokenizer(\"\")",
"InputStream stream",
"stream",
"String next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}",
"next",
"{\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}",
"while(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}",
"!to.hasMoreTokens()",
"to.hasMoreTokens()",
"to.hasMoreTokens",
"to",
"{\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}",
"try {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}",
"catch(IOException e) {}",
"IOException e",
"{}",
"{\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}",
"to=new StringTokenizer(br.readLine())",
"to",
"new StringTokenizer(br.readLine())",
"return to.nextToken();",
"to.nextToken()",
"to.nextToken",
"to",
"int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"int [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"readArray",
"{\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"int a[]=new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0; i<n ;i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"long [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}",
"readLongArray",
"{\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}",
"long a[]=new long[n];",
"a",
"new long[n]",
"n",
"for(int i=0; i<n ;i++) a[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextLong();",
"a[i]=nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"static class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}",
"Writer",
"Writer(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}",
"Writer",
"{\n\t\t\tsuper(stream);\n\t\t}",
"super(stream)",
"super",
"stream",
"OutputStream stream",
"stream",
"void println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}",
"println",
"{\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}",
"for(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"print(array[i]+\" \")",
"print",
"array[i]+\" \"",
"array[i]",
"array",
"i",
"\" \"",
"println()",
"println",
"int [] array",
"array",
"void println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}",
"println",
"{\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}",
"for(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<array.length",
"i",
"array.length",
"array",
"array.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"{\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}",
"print(array[i]+\" \")",
"print",
"array[i]+\" \"",
"array[i]",
"array",
"i",
"\" \"",
"println()",
"println",
"long [] array",
"array",
"PrintWriter",
"public class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt(); int k=in.nextInt();\n\t\t\tSet<Integer> set=new HashSet<>();\n\t\t\tfor(int i=1; i<=n; i++) set.add(i);\n\t\t\tfor(int i=0; i<k; i++) {\n\t\t\t\tint d=in.nextInt();\n\t\t\t\tint a[]=in.readArray(d);\n\t\t\t\tfor(int j: a) if(set.contains(j)) set.remove(j);\n\t\t\t}\n\t\t\tout.println(set.size());\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}",
"public class Main{\n\t\n\tstatic long mod=(long)1e9+7;\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tWriter out=new Writer(System.out);\n\t\tReader in=new Reader(System.in);\n\t\tint ts=1;\n\t\t\n\t\touter: while(ts-->0) {\t\n\t\t\tint n=in.nextInt(); int k=in.nextInt();\n\t\t\tSet<Integer> set=new HashSet<>();\n\t\t\tfor(int i=1; i<=n; i++) set.add(i);\n\t\t\tfor(int i=0; i<k; i++) {\n\t\t\t\tint d=in.nextInt();\n\t\t\t\tint a[]=in.readArray(d);\n\t\t\t\tfor(int j: a) if(set.contains(j)) set.remove(j);\n\t\t\t}\n\t\t\tout.println(set.size());\n\t\t}\n\t\tout.close();\t\t\n\t\t\n\t}\n\n\tstatic boolean tri(int a, int b, int c) {\n\t\tif(c<a+b && c>abs(a-b)) return true;\n\t\treturn false;\n\t}\n\t\n\t\n/*********************************** UTILITY CODE BELOW **************************************/\t\n\t\t\n\tstatic int abs(int a) {\n\t\treturn a>0 ? a : -a;\n\t}\n\t\n\tstatic int max(int a, int b) {\n\t\treturn a>b ? a : b;\n\t}\n\t\n\tstatic int pow(int n, int m) {\n\t\tif(m==0) return 1;\n\t\tint temp=pow(n,m/2);\n\t\tlong res=(((long)temp*temp)%mod);\n\t\tif(m%2==0) return (int)res;\n\t\treturn (int)((res*n)%mod);\n\t}\n\t\n\tstatic class Pair{\n\t\tint u, v;\n\t\t\n\t\tPair(int u, int v){this.u=u; this.v=v;}\n\t\t\n\t\tstatic void sort(Pair [] coll) {\t\t\n\t\t\tList<Pair> al=new ArrayList<>(Arrays.asList(coll));\n\t\t\tCollections.sort(al,new Comparator<Pair>() {\n\t\t\t\tpublic int compare(Pair p1, Pair p2) {\n\t\t\t\t\treturn p1.u-p2.u;\n\t\t\t\t}\t\n\t\t\t});\n\t\t\tfor(int i=0; i<al.size(); i++) {\n\t\t\t\tcoll[i]=al.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> list=new ArrayList<>();\n\t\tfor (int i:a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor (int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic void sort(long a[]) {\n\t\tArrayList<Long> list=new ArrayList<>();\n\t\tfor(long i: a) list.add(i);\n\t\tCollections.sort(list);\n\t\tfor(int i=0; i<a.length; i++) a[i]=list.get(i);\n\t}\n\t\n\tstatic int [] array(int n, int value) {\t\n\t\tint a[]=new int[n];\n\t\tfor(int i=0; i<n; i++) a[i]=value;\n\t\treturn a;\n\t}\n\t\n\tstatic class Reader{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer to;\n\t\t\n\t\tReader(InputStream stream){\n\t\t\tbr=new BufferedReader(new InputStreamReader(stream));\n\t\t\tto=new StringTokenizer(\"\");\n\t\t}\n\t\t\n\t\tString next() {\n\t\t\twhile(!to.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tto=new StringTokenizer(br.readLine());\t\n\t\t\t\t}catch(IOException e) {}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn to.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint [] readArray(int n) {\n\t\t\tint a[]=new int[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong [] readLongArray(int n) {\n\t\t\tlong a[]=new long[n];\n\t\t\tfor(int i=0; i<n ;i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Writer extends PrintWriter{\n\t\tWriter(OutputStream stream){\n\t\t\tsuper(stream);\n\t\t}\n\t\tvoid println(int [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t\tvoid println(long [] array) {\n\t\t\tfor(int i=0; i<array.length; i++) {\n\t\t\t\tprint(array[i]+\" \");\n\t\t\t}\n\t\t\tprintln();\n\t\t}\n\t}\n\t\n}",
"Main"
] |
import java.io.*;
import java.util.*;
public class Main{
static long mod=(long)1e9+7;
public static void main(String[] args) throws IOException {
Writer out=new Writer(System.out);
Reader in=new Reader(System.in);
int ts=1;
outer: while(ts-->0) {
int n=in.nextInt(); int k=in.nextInt();
Set<Integer> set=new HashSet<>();
for(int i=1; i<=n; i++) set.add(i);
for(int i=0; i<k; i++) {
int d=in.nextInt();
int a[]=in.readArray(d);
for(int j: a) if(set.contains(j)) set.remove(j);
}
out.println(set.size());
}
out.close();
}
static boolean tri(int a, int b, int c) {
if(c<a+b && c>abs(a-b)) return true;
return false;
}
/*********************************** UTILITY CODE BELOW **************************************/
static int abs(int a) {
return a>0 ? a : -a;
}
static int max(int a, int b) {
return a>b ? a : b;
}
static int pow(int n, int m) {
if(m==0) return 1;
int temp=pow(n,m/2);
long res=(((long)temp*temp)%mod);
if(m%2==0) return (int)res;
return (int)((res*n)%mod);
}
static class Pair{
int u, v;
Pair(int u, int v){this.u=u; this.v=v;}
static void sort(Pair [] coll) {
List<Pair> al=new ArrayList<>(Arrays.asList(coll));
Collections.sort(al,new Comparator<Pair>() {
public int compare(Pair p1, Pair p2) {
return p1.u-p2.u;
}
});
for(int i=0; i<al.size(); i++) {
coll[i]=al.get(i);
}
}
}
static void sort(int[] a) {
ArrayList<Integer> list=new ArrayList<>();
for (int i:a) list.add(i);
Collections.sort(list);
for (int i=0; i<a.length; i++) a[i]=list.get(i);
}
static void sort(long a[]) {
ArrayList<Long> list=new ArrayList<>();
for(long i: a) list.add(i);
Collections.sort(list);
for(int i=0; i<a.length; i++) a[i]=list.get(i);
}
static int [] array(int n, int value) {
int a[]=new int[n];
for(int i=0; i<n; i++) a[i]=value;
return a;
}
static class Reader{
BufferedReader br;
StringTokenizer to;
Reader(InputStream stream){
br=new BufferedReader(new InputStreamReader(stream));
to=new StringTokenizer("");
}
String next() {
while(!to.hasMoreTokens()) {
try {
to=new StringTokenizer(br.readLine());
}catch(IOException e) {}
}
return to.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
int [] readArray(int n) {
int a[]=new int[n];
for(int i=0; i<n ;i++) a[i]=nextInt();
return a;
}
long [] readLongArray(int n) {
long a[]=new long[n];
for(int i=0; i<n ;i++) a[i]=nextLong();
return a;
}
}
static class Writer extends PrintWriter{
Writer(OutputStream stream){
super(stream);
}
void println(int [] array) {
for(int i=0; i<array.length; i++) {
print(array[i]+" ");
}
println();
}
void println(long [] array) {
for(int i=0; i<array.length; i++) {
print(array[i]+" ");
}
println();
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
13,
4,
18,
13,
13,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
40,
17,
41,
13,
18,
13,
13,
41,
13,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
2,
13,
13,
17,
14,
2,
18,
13,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
40,
17,
41,
13,
4,
18,
13,
41,
13,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
2,
13,
13,
17,
14,
2,
4,
18,
13,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
261,
14
],
[
261,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
34,
35
],
[
34,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
17,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
41,
45
],
[
17,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
17,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
71,
81
],
[
81,
82
],
[
82,
83
],
[
71,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
17,
92
],
[
92,
93
],
[
92,
94
],
[
17,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
100,
102
],
[
95,
103
],
[
103,
104
],
[
104,
105
],
[
95,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
17,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
15,
123
],
[
123,
124
],
[
261,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
127,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
127,
137
],
[
137,
138
],
[
127,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
139,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
145,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
153,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
153,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
127,
167
],
[
167,
168
],
[
125,
169
],
[
169,
170
],
[
125,
171
],
[
171,
172
],
[
261,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
175,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
175,
185
],
[
185,
186
],
[
175,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
192
],
[
187,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
196,
200
],
[
193,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
203,
206
],
[
202,
207
],
[
201,
208
],
[
208,
209
],
[
209,
210
],
[
209,
211
],
[
201,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
175,
216
],
[
216,
217
],
[
173,
218
],
[
218,
219
],
[
173,
220
],
[
220,
221
],
[
261,
222
],
[
222,
223
],
[
222,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
226,
230
],
[
226,
231
],
[
231,
232
],
[
231,
233
],
[
231,
234
],
[
234,
235
],
[
234,
236
],
[
222,
237
],
[
237,
238
],
[
222,
239
],
[
239,
240
],
[
261,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
244,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
245,
249
],
[
245,
250
],
[
250,
251
],
[
250,
252
],
[
250,
253
],
[
253,
254
],
[
253,
255
],
[
241,
256
],
[
256,
257
],
[
241,
258
],
[
258,
259
],
[
0,
260
],
[
260,
261
],
[
260,
262
]
] |
[
"import java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\t//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t//\t\tString W\t = in.readLine();\n\t\t//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal int N = sc.nextInt();\n\t\tfinal int K = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\t\tint[] d = new int[K];\n\t\tArrays.fill(A, 0);\n\t\tA[0]=100;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td[i] = sc.nextInt();\n\t\t\tfor (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t}\n\n\t//\t//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎ้
ๅ่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, long[] orderedArray) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedArray[mid] <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎList่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedList.get(mid) <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aใจbใฎๆๅฐๅ
ฌๅๆฐใๆฑใใ\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}\n\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\t//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t//\t\tString W\t = in.readLine();\n\t\t//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal int N = sc.nextInt();\n\t\tfinal int K = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\t\tint[] d = new int[K];\n\t\tArrays.fill(A, 0);\n\t\tA[0]=100;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td[i] = sc.nextInt();\n\t\t\tfor (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t}\n\n\t//\t//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎ้
ๅ่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, long[] orderedArray) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedArray[mid] <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎList่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedList.get(mid) <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aใจbใฎๆๅฐๅ
ฌๅๆฐใๆฑใใ\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\t//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t//\t\tString W\t = in.readLine();\n\t\t//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal int N = sc.nextInt();\n\t\tfinal int K = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\t\tint[] d = new int[K];\n\t\tArrays.fill(A, 0);\n\t\tA[0]=100;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td[i] = sc.nextInt();\n\t\t\tfor (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t}",
"main",
"{\n\t\t//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t//\t\tString W\t = in.readLine();\n\t\t//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal int N = sc.nextInt();\n\t\tfinal int K = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\t\tint[] d = new int[K];\n\t\tArrays.fill(A, 0);\n\t\tA[0]=100;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td[i] = sc.nextInt();\n\t\t\tfor (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"final int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"final int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] A = new int[N + 1];",
"A",
"new int[N + 1]",
"N + 1",
"N",
"1",
"int[] d = new int[K];",
"d",
"new int[K]",
"K",
"Arrays.fill(A, 0)",
"Arrays.fill",
"Arrays",
"A",
"0",
"A[0]=100",
"A[0]",
"A",
"0",
"100",
"for (int i = 0; i < K; i++) {\n\t\t\td[i] = sc.nextInt();\n\t\t\tfor (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\td[i] = sc.nextInt();\n\t\t\tfor (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\td[i] = sc.nextInt();\n\t\t\tfor (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}\n\t\t}",
"d[i] = sc.nextInt()",
"d[i]",
"d",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}",
"int j =0;",
"int j =0;",
"j",
"0",
"j < d[i]",
"j",
"d[i]",
"d",
"i",
"j++",
"j++",
"j",
"{\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}",
"{\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}",
"A[sc.nextInt()]++",
"A[sc.nextInt()]",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"for (int i = 1; i <= N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tif (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"if (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}",
"A[i] == 0",
"A[i]",
"A",
"i",
"0",
"{\n\t\t\t\tans++;\n\t\t\t}",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"//\t//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎ้
ๅ่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, long[] orderedArray) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedArray[mid] <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"binarySearch",
"{\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedArray[mid] <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"int lowerBorder = -1;",
"lowerBorder",
"-1",
"1",
"int upperBorder = orderedArray.length;",
"upperBorder",
"orderedArray.length",
"orderedArray",
"orderedArray.length",
"int mid;",
"mid",
"while (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedArray[mid] <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"upperBorder - lowerBorder > 1",
"upperBorder - lowerBorder",
"upperBorder",
"lowerBorder",
"1",
"{\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedArray[mid] <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"mid = (upperBorder + lowerBorder) / 2",
"mid",
"(upperBorder + lowerBorder) / 2",
"(upperBorder + lowerBorder)",
"upperBorder",
"lowerBorder",
"2",
"if (orderedArray[mid] <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"orderedArray[mid] <= num",
"orderedArray[mid]",
"orderedArray",
"mid",
"num",
"{\n\t\t\t\tlowerBorder = mid;\n\t\t\t}",
"lowerBorder = mid",
"lowerBorder",
"mid",
"{\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"upperBorder = mid",
"upperBorder",
"mid",
"return lowerBorder;",
"lowerBorder",
"long num",
"num",
"long[] orderedArray",
"orderedArray",
"//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎList่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedList.get(mid) <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"binarySearch",
"{\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedList.get(mid) <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"int lowerBorder = -1;",
"lowerBorder",
"-1",
"1",
"int upperBorder = orderedList.size();",
"upperBorder",
"orderedList.size()",
"orderedList.size",
"orderedList",
"int mid;",
"mid",
"while (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedList.get(mid) <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"upperBorder - lowerBorder > 1",
"upperBorder - lowerBorder",
"upperBorder",
"lowerBorder",
"1",
"{\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedList.get(mid) <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"mid = (upperBorder + lowerBorder) / 2",
"mid",
"(upperBorder + lowerBorder) / 2",
"(upperBorder + lowerBorder)",
"upperBorder",
"lowerBorder",
"2",
"if (orderedList.get(mid) <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"orderedList.get(mid) <= num",
"orderedList.get(mid)",
"orderedList.get",
"orderedList",
"mid",
"num",
"{\n\t\t\t\tlowerBorder = mid;\n\t\t\t}",
"lowerBorder = mid",
"lowerBorder",
"mid",
"{\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"upperBorder = mid",
"upperBorder",
"mid",
"return lowerBorder;",
"lowerBorder",
"long num",
"num",
"ArrayList<Long> orderedList",
"orderedList",
"//aใจbใฎๆๅฐๅ
ฌๅๆฐใๆฑใใ\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}",
"gcd",
"{\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}",
"return b == 0 ? a : gcd(b, a % b);",
"b == 0 ? a : gcd(b, a % b)",
"b == 0",
"b",
"0",
"a",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public static long gcd(long a, long b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}",
"gcd",
"{\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}",
"return b == 0 ? a : gcd(b, a % b);",
"b == 0 ? a : gcd(b, a % b)",
"b == 0",
"b",
"0",
"a",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\t//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t//\t\tString W\t = in.readLine();\n\t\t//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal int N = sc.nextInt();\n\t\tfinal int K = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\t\tint[] d = new int[K];\n\t\tArrays.fill(A, 0);\n\t\tA[0]=100;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td[i] = sc.nextInt();\n\t\t\tfor (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t}\n\n\t//\t//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎ้
ๅ่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, long[] orderedArray) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedArray[mid] <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎList่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedList.get(mid) <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aใจbใฎๆๅฐๅ
ฌๅๆฐใๆฑใใ\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\t//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\t//\t\tString W\t = in.readLine();\n\t\t//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal int N = sc.nextInt();\n\t\tfinal int K = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\t\tint[] d = new int[K];\n\t\tArrays.fill(A, 0);\n\t\tA[0]=100;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\td[i] = sc.nextInt();\n\t\t\tfor (int j =0; j < d[i]; j++) {\n\t\t\t\tA[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tif (A[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n\t}\n\n\t//\t//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎ้
ๅ่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, long[] orderedArray) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedArray[mid] <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//ไบๅๆข็ดข\n\t//k <= num ใจใชใๆๅฐใฎList่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList) {\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile (upperBorder - lowerBorder > 1) {\n\t\t\tmid = (upperBorder + lowerBorder) / 2;\n\t\t\tif (orderedList.get(mid) <= num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t} else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aใจbใฎๆๅฐๅ
ฌๅๆฐใๆฑใใ\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\treturn b == 0 ? a : gcd(b, a % b);\n\t}\n\n}",
"Main"
] |
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
// BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
// String W = in.readLine();
// int num = Integer.parseInt(W.split(" ")[0]);
Scanner sc = new Scanner(System.in);
final int N = sc.nextInt();
final int K = sc.nextInt();
int[] A = new int[N + 1];
int[] d = new int[K];
Arrays.fill(A, 0);
A[0]=100;
for (int i = 0; i < K; i++) {
d[i] = sc.nextInt();
for (int j =0; j < d[i]; j++) {
A[sc.nextInt()]++;
}
}
int ans = 0;
for (int i = 1; i <= N; i++) {
if (A[i] == 0) {
ans++;
}
}
System.out.println(ans);
}
// //ไบๅๆข็ดข
//k <= num ใจใชใๆๅฐใฎ้
ๅ่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ
static private int binarySearch(long num, long[] orderedArray) {
int lowerBorder = -1;
int upperBorder = orderedArray.length;
int mid;
while (upperBorder - lowerBorder > 1) {
mid = (upperBorder + lowerBorder) / 2;
if (orderedArray[mid] <= num) {
lowerBorder = mid;
} else {
upperBorder = mid;
}
}
return lowerBorder;
}
//ไบๅๆข็ดข
//k <= num ใจใชใๆๅฐใฎList่ฆ็ด kใฎใคใณใใใฏในใ่ฟใ
static private int binarySearch(long num, ArrayList<Long> orderedList) {
int lowerBorder = -1;
int upperBorder = orderedList.size();
int mid;
while (upperBorder - lowerBorder > 1) {
mid = (upperBorder + lowerBorder) / 2;
if (orderedList.get(mid) <= num) {
lowerBorder = mid;
} else {
upperBorder = mid;
}
}
return lowerBorder;
}
//aใจbใฎๆๅฐๅ
ฌๅๆฐใๆฑใใ
public static int gcd(int a, int b) {
return b == 0 ? a : gcd(b, a % b);
}
public static long gcd(long a, long b) {
return b == 0 ? a : gcd(b, a % b);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
40,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
65,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
8,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
77,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
8,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
8,
104
],
[
104,
105
],
[
105,
106
],
[
6,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\tint K = sc.nextInt();\n\tint d = 0;\n\tint a = 0;\n\tint[] c = new int[N]; \n\tint ans = 0;\n\n\tfor (int i = 0; i < K; i++) {\n\t\td = sc.nextInt();\n\t\tfor (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < N; i++) {\n\t\tif (c[i] == 0) ans++;\n\t}\n\n\n\tSystem.out.println(ans);\n\n sc.close();\n } \n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\tint K = sc.nextInt();\n\tint d = 0;\n\tint a = 0;\n\tint[] c = new int[N]; \n\tint ans = 0;\n\n\tfor (int i = 0; i < K; i++) {\n\t\td = sc.nextInt();\n\t\tfor (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < N; i++) {\n\t\tif (c[i] == 0) ans++;\n\t}\n\n\n\tSystem.out.println(ans);\n\n sc.close();\n } \n}",
"Main",
"public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\tint K = sc.nextInt();\n\tint d = 0;\n\tint a = 0;\n\tint[] c = new int[N]; \n\tint ans = 0;\n\n\tfor (int i = 0; i < K; i++) {\n\t\td = sc.nextInt();\n\t\tfor (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < N; i++) {\n\t\tif (c[i] == 0) ans++;\n\t}\n\n\n\tSystem.out.println(ans);\n\n sc.close();\n }",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\tint K = sc.nextInt();\n\tint d = 0;\n\tint a = 0;\n\tint[] c = new int[N]; \n\tint ans = 0;\n\n\tfor (int i = 0; i < K; i++) {\n\t\td = sc.nextInt();\n\t\tfor (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < N; i++) {\n\t\tif (c[i] == 0) ans++;\n\t}\n\n\n\tSystem.out.println(ans);\n\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d = 0;",
"d",
"0",
"int a = 0;",
"a",
"0",
"int[] c = new int[N];",
"c",
"new int[N]",
"N",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i < K; i++) {\n\t\td = sc.nextInt();\n\t\tfor (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\td = sc.nextInt();\n\t\tfor (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}\n\t}",
"{\n\t\td = sc.nextInt();\n\t\tfor (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}\n\t}",
"d = sc.nextInt()",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}",
"{\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c[a-1]++",
"c[a-1]",
"c",
"a-1",
"a",
"1",
"for (int i = 0; i < N; i++) {\n\t\tif (c[i] == 0) ans++;\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\tif (c[i] == 0) ans++;\n\t}",
"{\n\t\tif (c[i] == 0) ans++;\n\t}",
"if (c[i] == 0) ans++;",
"c[i] == 0",
"c[i]",
"c",
"i",
"0",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\tint K = sc.nextInt();\n\tint d = 0;\n\tint a = 0;\n\tint[] c = new int[N]; \n\tint ans = 0;\n\n\tfor (int i = 0; i < K; i++) {\n\t\td = sc.nextInt();\n\t\tfor (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < N; i++) {\n\t\tif (c[i] == 0) ans++;\n\t}\n\n\n\tSystem.out.println(ans);\n\n sc.close();\n } \n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\tint K = sc.nextInt();\n\tint d = 0;\n\tint a = 0;\n\tint[] c = new int[N]; \n\tint ans = 0;\n\n\tfor (int i = 0; i < K; i++) {\n\t\td = sc.nextInt();\n\t\tfor (int j = 0; j < d; j++) {\n\t\t\ta = sc.nextInt();\n\t\t\tc[a-1]++;\n\t\t}\n\t}\n\n\tfor (int i = 0; i < N; i++) {\n\t\tif (c[i] == 0) ans++;\n\t}\n\n\n\tSystem.out.println(ans);\n\n sc.close();\n } \n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int d = 0;
int a = 0;
int[] c = new int[N];
int ans = 0;
for (int i = 0; i < K; i++) {
d = sc.nextInt();
for (int j = 0; j < d; j++) {
a = sc.nextInt();
c[a-1]++;
}
}
for (int i = 0; i < N; i++) {
if (c[i] == 0) ans++;
}
System.out.println(ans);
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
84,
11
],
[
84,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
14,
68
],
[
68,
69
],
[
69,
70
],
[
14,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
12,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
] |
[
"import java.util.HashSet;\nimport java.util.Scanner;\nimport java.util.Set;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\tSystem.out.println(n - set.size());\n\t}\n}",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\tSystem.out.println(n - set.size());\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\tSystem.out.println(n - set.size());\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\tSystem.out.println(n - set.size());\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Set<Integer> set = new HashSet<>();",
"set",
"new HashSet<>()",
"for (int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}",
"{\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}",
"set.add(sc.nextInt())",
"set.add",
"set",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"System.out.println(n - set.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"n - set.size()",
"n",
"set.size()",
"set.size",
"set",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\tSystem.out.println(n - set.size());\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tset.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\tSystem.out.println(n - set.size());\n\t}\n}",
"Main"
] |
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
Set<Integer> set = new HashSet<>();
for (int i = 0; i < k; i++) {
int d = sc.nextInt();
for (int j = 0; j < d; j++) {
set.add(sc.nextInt());
}
}
sc.close();
System.out.println(n - set.size());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
4,
18,
13,
17,
17,
0,
13,
4,
18,
13,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
29,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
152,
5
],
[
152,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
43,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
75,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
102,
106
],
[
99,
107
],
[
75,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
8,
113
],
[
113,
114
],
[
113,
115
],
[
8,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
116,
126
],
[
126,
127
],
[
127,
128
],
[
116,
129
],
[
130,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
136,
137
],
[
137,
138
],
[
8,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
8,
145
],
[
145,
146
],
[
146,
147
],
[
8,
148
],
[
6,
149
],
[
149,
150
],
[
0,
151
],
[
151,
152
],
[
151,
153
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n String newLine;\n int ppl, snackKind, havingSnackTotal, treated;\n boolean hasSnack[];\n\n ppl = scan.nextInt();\n snackKind = scan.nextInt();\n newLine = scan.nextLine();\n \n hasSnack = new boolean[ppl];\n for(int i = 0; i < hasSnack.length; i++) {\n hasSnack[i] = false;\n }\n\n for(int k = 0; k < snackKind; k++) {\n havingSnackTotal = scan.nextInt();\n newLine = scan.nextLine();\n \n for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }\n newLine = scan.nextLine();\n }\n\n treated = 0;\n for(int i = 0; i < hasSnack.length; i++) {\n if(!hasSnack[i]) {\n treated++;\n }\n }\n System.out.println(treated);\n scan.close();\n return;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n String newLine;\n int ppl, snackKind, havingSnackTotal, treated;\n boolean hasSnack[];\n\n ppl = scan.nextInt();\n snackKind = scan.nextInt();\n newLine = scan.nextLine();\n \n hasSnack = new boolean[ppl];\n for(int i = 0; i < hasSnack.length; i++) {\n hasSnack[i] = false;\n }\n\n for(int k = 0; k < snackKind; k++) {\n havingSnackTotal = scan.nextInt();\n newLine = scan.nextLine();\n \n for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }\n newLine = scan.nextLine();\n }\n\n treated = 0;\n for(int i = 0; i < hasSnack.length; i++) {\n if(!hasSnack[i]) {\n treated++;\n }\n }\n System.out.println(treated);\n scan.close();\n return;\n }\n}",
"Main",
"public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n String newLine;\n int ppl, snackKind, havingSnackTotal, treated;\n boolean hasSnack[];\n\n ppl = scan.nextInt();\n snackKind = scan.nextInt();\n newLine = scan.nextLine();\n \n hasSnack = new boolean[ppl];\n for(int i = 0; i < hasSnack.length; i++) {\n hasSnack[i] = false;\n }\n\n for(int k = 0; k < snackKind; k++) {\n havingSnackTotal = scan.nextInt();\n newLine = scan.nextLine();\n \n for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }\n newLine = scan.nextLine();\n }\n\n treated = 0;\n for(int i = 0; i < hasSnack.length; i++) {\n if(!hasSnack[i]) {\n treated++;\n }\n }\n System.out.println(treated);\n scan.close();\n return;\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n String newLine;\n int ppl, snackKind, havingSnackTotal, treated;\n boolean hasSnack[];\n\n ppl = scan.nextInt();\n snackKind = scan.nextInt();\n newLine = scan.nextLine();\n \n hasSnack = new boolean[ppl];\n for(int i = 0; i < hasSnack.length; i++) {\n hasSnack[i] = false;\n }\n\n for(int k = 0; k < snackKind; k++) {\n havingSnackTotal = scan.nextInt();\n newLine = scan.nextLine();\n \n for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }\n newLine = scan.nextLine();\n }\n\n treated = 0;\n for(int i = 0; i < hasSnack.length; i++) {\n if(!hasSnack[i]) {\n treated++;\n }\n }\n System.out.println(treated);\n scan.close();\n return;\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String newLine;",
"newLine",
"int ppl",
"ppl",
"snackKind",
"snackKind",
"havingSnackTotal",
"havingSnackTotal",
"treated;",
"treated",
"boolean hasSnack[];",
"hasSnack",
"ppl = scan.nextInt()",
"ppl",
"scan.nextInt()",
"scan.nextInt",
"scan",
"snackKind = scan.nextInt()",
"snackKind",
"scan.nextInt()",
"scan.nextInt",
"scan",
"newLine = scan.nextLine()",
"newLine",
"scan.nextLine()",
"scan.nextLine",
"scan",
"hasSnack = new boolean[ppl]",
"hasSnack",
"new boolean[ppl]",
"ppl",
"for(int i = 0; i < hasSnack.length; i++) {\n hasSnack[i] = false;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < hasSnack.length",
"i",
"hasSnack.length",
"hasSnack",
"hasSnack.length",
"i++",
"i++",
"i",
"{\n hasSnack[i] = false;\n }",
"{\n hasSnack[i] = false;\n }",
"hasSnack[i] = false",
"hasSnack[i]",
"hasSnack",
"i",
"false",
"for(int k = 0; k < snackKind; k++) {\n havingSnackTotal = scan.nextInt();\n newLine = scan.nextLine();\n \n for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }\n newLine = scan.nextLine();\n }",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < snackKind",
"k",
"snackKind",
"k++",
"k++",
"k",
"{\n havingSnackTotal = scan.nextInt();\n newLine = scan.nextLine();\n \n for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }\n newLine = scan.nextLine();\n }",
"{\n havingSnackTotal = scan.nextInt();\n newLine = scan.nextLine();\n \n for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }\n newLine = scan.nextLine();\n }",
"havingSnackTotal = scan.nextInt()",
"havingSnackTotal",
"scan.nextInt()",
"scan.nextInt",
"scan",
"newLine = scan.nextLine()",
"newLine",
"scan.nextLine()",
"scan.nextLine",
"scan",
"for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }",
"int p = 0;",
"int p = 0;",
"p",
"0",
"p < havingSnackTotal",
"p",
"havingSnackTotal",
"p++",
"p++",
"p",
"{\n hasSnack[scan.nextInt() - 1] = true;\n }",
"{\n hasSnack[scan.nextInt() - 1] = true;\n }",
"hasSnack[scan.nextInt() - 1] = true",
"hasSnack[scan.nextInt() - 1]",
"hasSnack",
"scan.nextInt() - 1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"true",
"newLine = scan.nextLine()",
"newLine",
"scan.nextLine()",
"scan.nextLine",
"scan",
"treated = 0",
"treated",
"0",
"for(int i = 0; i < hasSnack.length; i++) {\n if(!hasSnack[i]) {\n treated++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < hasSnack.length",
"i",
"hasSnack.length",
"hasSnack",
"hasSnack.length",
"i++",
"i++",
"i",
"{\n if(!hasSnack[i]) {\n treated++;\n }\n }",
"{\n if(!hasSnack[i]) {\n treated++;\n }\n }",
"if(!hasSnack[i]) {\n treated++;\n }",
"!hasSnack[i]",
"hasSnack[i]",
"hasSnack",
"i",
"{\n treated++;\n }",
"treated++",
"treated",
"System.out.println(treated)",
"System.out.println",
"System.out",
"System",
"System.out",
"treated",
"scan.close()",
"scan.close",
"scan",
"return;",
"String args[]",
"args",
"public class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n String newLine;\n int ppl, snackKind, havingSnackTotal, treated;\n boolean hasSnack[];\n\n ppl = scan.nextInt();\n snackKind = scan.nextInt();\n newLine = scan.nextLine();\n \n hasSnack = new boolean[ppl];\n for(int i = 0; i < hasSnack.length; i++) {\n hasSnack[i] = false;\n }\n\n for(int k = 0; k < snackKind; k++) {\n havingSnackTotal = scan.nextInt();\n newLine = scan.nextLine();\n \n for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }\n newLine = scan.nextLine();\n }\n\n treated = 0;\n for(int i = 0; i < hasSnack.length; i++) {\n if(!hasSnack[i]) {\n treated++;\n }\n }\n System.out.println(treated);\n scan.close();\n return;\n }\n}",
"public class Main {\n public static void main(String args[]) {\n Scanner scan = new Scanner(System.in);\n String newLine;\n int ppl, snackKind, havingSnackTotal, treated;\n boolean hasSnack[];\n\n ppl = scan.nextInt();\n snackKind = scan.nextInt();\n newLine = scan.nextLine();\n \n hasSnack = new boolean[ppl];\n for(int i = 0; i < hasSnack.length; i++) {\n hasSnack[i] = false;\n }\n\n for(int k = 0; k < snackKind; k++) {\n havingSnackTotal = scan.nextInt();\n newLine = scan.nextLine();\n \n for(int p = 0; p < havingSnackTotal; p++) {\n hasSnack[scan.nextInt() - 1] = true;\n }\n newLine = scan.nextLine();\n }\n\n treated = 0;\n for(int i = 0; i < hasSnack.length; i++) {\n if(!hasSnack[i]) {\n treated++;\n }\n }\n System.out.println(treated);\n scan.close();\n return;\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
String newLine;
int ppl, snackKind, havingSnackTotal, treated;
boolean hasSnack[];
ppl = scan.nextInt();
snackKind = scan.nextInt();
newLine = scan.nextLine();
hasSnack = new boolean[ppl];
for(int i = 0; i < hasSnack.length; i++) {
hasSnack[i] = false;
}
for(int k = 0; k < snackKind; k++) {
havingSnackTotal = scan.nextInt();
newLine = scan.nextLine();
for(int p = 0; p < havingSnackTotal; p++) {
hasSnack[scan.nextInt() - 1] = true;
}
newLine = scan.nextLine();
}
treated = 0;
for(int i = 0; i < hasSnack.length; i++) {
if(!hasSnack[i]) {
treated++;
}
}
System.out.println(treated);
scan.close();
return;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
18,
13,
13,
14,
40,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
124,
14
],
[
124,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
23,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
34,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
42,
44
],
[
17,
45
],
[
45,
46
],
[
45,
47
],
[
17,
48
],
[
48,
49
],
[
48,
50
],
[
17,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
70,
71
],
[
63,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
74,
79
],
[
63,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
80,
91
],
[
92,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
98,
100
],
[
92,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
101,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
17,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
15,
121
],
[
121,
122
],
[
0,
123
],
[
123,
124
],
[
123,
125
]
] |
[
"import java.util.HashSet;\nimport java.util.List;\nimport java.util.Scanner;\nimport java.util.Set;\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] tmp = scanner.nextLine().split(\" \");\n\t\tlong n = Long.parseLong(tmp[0]);\n\t\tlong k = Long.parseLong(tmp[1]);\n\t\tSet<Integer> map = new HashSet<>();\n\n\t\tint num = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\n\t\t\tint now = Integer.parseInt(scanner.nextLine());\n\t\t\tString[] temp = scanner.nextLine().split(\" \");\n\t\t\tfor(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tSystem.out.println(n - map.size());\n\n\n\t}\n\n}",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] tmp = scanner.nextLine().split(\" \");\n\t\tlong n = Long.parseLong(tmp[0]);\n\t\tlong k = Long.parseLong(tmp[1]);\n\t\tSet<Integer> map = new HashSet<>();\n\n\t\tint num = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\n\t\t\tint now = Integer.parseInt(scanner.nextLine());\n\t\t\tString[] temp = scanner.nextLine().split(\" \");\n\t\t\tfor(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tSystem.out.println(n - map.size());\n\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] tmp = scanner.nextLine().split(\" \");\n\t\tlong n = Long.parseLong(tmp[0]);\n\t\tlong k = Long.parseLong(tmp[1]);\n\t\tSet<Integer> map = new HashSet<>();\n\n\t\tint num = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\n\t\t\tint now = Integer.parseInt(scanner.nextLine());\n\t\t\tString[] temp = scanner.nextLine().split(\" \");\n\t\t\tfor(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tSystem.out.println(n - map.size());\n\n\n\t}",
"main",
"{\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] tmp = scanner.nextLine().split(\" \");\n\t\tlong n = Long.parseLong(tmp[0]);\n\t\tlong k = Long.parseLong(tmp[1]);\n\t\tSet<Integer> map = new HashSet<>();\n\n\t\tint num = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\n\t\t\tint now = Integer.parseInt(scanner.nextLine());\n\t\t\tString[] temp = scanner.nextLine().split(\" \");\n\t\t\tfor(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tSystem.out.println(n - map.size());\n\n\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String[] tmp = scanner.nextLine().split(\" \");",
"tmp",
"scanner.nextLine().split(\" \")",
"scanner.nextLine().split",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"\" \"",
"long n = Long.parseLong(tmp[0]);",
"n",
"Long.parseLong(tmp[0])",
"Long.parseLong",
"Long",
"tmp[0]",
"tmp",
"0",
"long k = Long.parseLong(tmp[1]);",
"k",
"Long.parseLong(tmp[1])",
"Long.parseLong",
"Long",
"tmp[1]",
"tmp",
"1",
"Set<Integer> map = new HashSet<>();",
"map",
"new HashSet<>()",
"int num = 0;",
"num",
"0",
"for(int i = 0; i < k; i++) {\n\n\t\t\tint now = Integer.parseInt(scanner.nextLine());\n\t\t\tString[] temp = scanner.nextLine().split(\" \");\n\t\t\tfor(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}\n\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\n\t\t\tint now = Integer.parseInt(scanner.nextLine());\n\t\t\tString[] temp = scanner.nextLine().split(\" \");\n\t\t\tfor(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}\n\n\n\t\t}",
"{\n\n\t\t\tint now = Integer.parseInt(scanner.nextLine());\n\t\t\tString[] temp = scanner.nextLine().split(\" \");\n\t\t\tfor(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}\n\n\n\t\t}",
"int now = Integer.parseInt(scanner.nextLine());",
"now",
"Integer.parseInt(scanner.nextLine())",
"Integer.parseInt",
"Integer",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"String[] temp = scanner.nextLine().split(\" \");",
"temp",
"scanner.nextLine().split(\" \")",
"scanner.nextLine().split",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"\" \"",
"for(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < now",
"j",
"now",
"j++",
"j++",
"j",
"{\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}",
"{\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}",
"num = Integer.parseInt(temp[j])",
"num",
"Integer.parseInt(temp[j])",
"Integer.parseInt",
"Integer",
"temp[j]",
"temp",
"j",
"if(!map.contains(num)) map.add(num);",
"!map.contains(num)",
"map.contains(num)",
"map.contains",
"map",
"num",
"map.add(num)",
"map.add",
"map",
"num",
"System.out.println(n - map.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"n - map.size()",
"n",
"map.size()",
"map.size",
"map",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] tmp = scanner.nextLine().split(\" \");\n\t\tlong n = Long.parseLong(tmp[0]);\n\t\tlong k = Long.parseLong(tmp[1]);\n\t\tSet<Integer> map = new HashSet<>();\n\n\t\tint num = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\n\t\t\tint now = Integer.parseInt(scanner.nextLine());\n\t\t\tString[] temp = scanner.nextLine().split(\" \");\n\t\t\tfor(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tSystem.out.println(n - map.size());\n\n\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString[] tmp = scanner.nextLine().split(\" \");\n\t\tlong n = Long.parseLong(tmp[0]);\n\t\tlong k = Long.parseLong(tmp[1]);\n\t\tSet<Integer> map = new HashSet<>();\n\n\t\tint num = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\n\t\t\tint now = Integer.parseInt(scanner.nextLine());\n\t\t\tString[] temp = scanner.nextLine().split(\" \");\n\t\t\tfor(int j = 0; j < now; j++) {\n\n\t\t\t\tnum = Integer.parseInt(temp[j]);\n\t\t\t\tif(!map.contains(num)) map.add(num);\n\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tSystem.out.println(n - map.size());\n\n\n\t}\n\n}",
"Main"
] |
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class Main{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String[] tmp = scanner.nextLine().split(" ");
long n = Long.parseLong(tmp[0]);
long k = Long.parseLong(tmp[1]);
Set<Integer> map = new HashSet<>();
int num = 0;
for(int i = 0; i < k; i++) {
int now = Integer.parseInt(scanner.nextLine());
String[] temp = scanner.nextLine().split(" ");
for(int j = 0; j < now; j++) {
num = Integer.parseInt(temp[j]);
if(!map.contains(num)) map.add(num);
}
}
System.out.println(n - map.size());
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
17,
14,
40,
18,
13,
13,
30,
0,
18,
13,
13,
17,
40,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
118,
8
],
[
118,
9
],
[
9,
10
],
[
9,
11
],
[
118,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
17,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
36,
38
],
[
14,
39
],
[
39,
40
],
[
39,
41
],
[
14,
42
],
[
42,
43
],
[
42,
44
],
[
14,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
58,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
69,
74
],
[
58,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
94,
96
],
[
90,
97
],
[
87,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
103,
109
],
[
109,
110
],
[
14,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
12,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
] |
[
"import java.io.*;\nimport static java.lang.System.out;\n\npublic class Main {\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n public static void main(String[] args) throws IOException {\n String[] s = in.readLine().split(\" \");\n int N = Integer.parseInt(s[0]);\n int K = Integer.parseInt(s[1]);\n int ans = N;\n boolean[] b = new boolean[N];\n\n for (int i = 0; i < K; i++) {\n int d = Integer.parseInt(in.readLine());\n s = in.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }\n }\n \n out.println(ans);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"public class Main {\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n public static void main(String[] args) throws IOException {\n String[] s = in.readLine().split(\" \");\n int N = Integer.parseInt(s[0]);\n int K = Integer.parseInt(s[1]);\n int ans = N;\n boolean[] b = new boolean[N];\n\n for (int i = 0; i < K; i++) {\n int d = Integer.parseInt(in.readLine());\n s = in.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }\n }\n \n out.println(ans);\n }\n}",
"Main",
"static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"public static void main(String[] args) throws IOException {\n String[] s = in.readLine().split(\" \");\n int N = Integer.parseInt(s[0]);\n int K = Integer.parseInt(s[1]);\n int ans = N;\n boolean[] b = new boolean[N];\n\n for (int i = 0; i < K; i++) {\n int d = Integer.parseInt(in.readLine());\n s = in.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }\n }\n \n out.println(ans);\n }",
"main",
"{\n String[] s = in.readLine().split(\" \");\n int N = Integer.parseInt(s[0]);\n int K = Integer.parseInt(s[1]);\n int ans = N;\n boolean[] b = new boolean[N];\n\n for (int i = 0; i < K; i++) {\n int d = Integer.parseInt(in.readLine());\n s = in.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }\n }\n \n out.println(ans);\n }",
"String[] s = in.readLine().split(\" \");",
"s",
"in.readLine().split(\" \")",
"in.readLine().split",
"in.readLine()",
"in.readLine",
"in",
"\" \"",
"int N = Integer.parseInt(s[0]);",
"N",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"int K = Integer.parseInt(s[1]);",
"K",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"int ans = N;",
"ans",
"N",
"boolean[] b = new boolean[N];",
"b",
"new boolean[N]",
"N",
"for (int i = 0; i < K; i++) {\n int d = Integer.parseInt(in.readLine());\n s = in.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int d = Integer.parseInt(in.readLine());\n s = in.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }\n }",
"{\n int d = Integer.parseInt(in.readLine());\n s = in.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }\n }",
"int d = Integer.parseInt(in.readLine());",
"d",
"Integer.parseInt(in.readLine())",
"Integer.parseInt",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"s = in.readLine().split(\" \")",
"s",
"in.readLine().split(\" \")",
"in.readLine().split",
"in.readLine()",
"in.readLine",
"in",
"\" \"",
"for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }",
"{\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }",
"int a = Integer.parseInt(s[j]) - 1;",
"a",
"Integer.parseInt(s[j]) - 1",
"Integer.parseInt(s[j])",
"Integer.parseInt",
"Integer",
"s[j]",
"s",
"j",
"1",
"if (!b[a]) {\n b[a] = true;\n ans--;\n }",
"!b[a]",
"b[a]",
"b",
"a",
"{\n b[a] = true;\n ans--;\n }",
"b[a] = true",
"b[a]",
"b",
"a",
"true",
"ans--",
"ans",
"out.println(ans)",
"out.println",
"out",
"ans",
"String[] args",
"args",
"public class Main {\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n public static void main(String[] args) throws IOException {\n String[] s = in.readLine().split(\" \");\n int N = Integer.parseInt(s[0]);\n int K = Integer.parseInt(s[1]);\n int ans = N;\n boolean[] b = new boolean[N];\n\n for (int i = 0; i < K; i++) {\n int d = Integer.parseInt(in.readLine());\n s = in.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }\n }\n \n out.println(ans);\n }\n}",
"public class Main {\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n public static void main(String[] args) throws IOException {\n String[] s = in.readLine().split(\" \");\n int N = Integer.parseInt(s[0]);\n int K = Integer.parseInt(s[1]);\n int ans = N;\n boolean[] b = new boolean[N];\n\n for (int i = 0; i < K; i++) {\n int d = Integer.parseInt(in.readLine());\n s = in.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n int a = Integer.parseInt(s[j]) - 1;\n if (!b[a]) {\n b[a] = true;\n ans--;\n }\n }\n }\n \n out.println(ans);\n }\n}",
"Main"
] |
import java.io.*;
import static java.lang.System.out;
public class Main {
static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException {
String[] s = in.readLine().split(" ");
int N = Integer.parseInt(s[0]);
int K = Integer.parseInt(s[1]);
int ans = N;
boolean[] b = new boolean[N];
for (int i = 0; i < K; i++) {
int d = Integer.parseInt(in.readLine());
s = in.readLine().split(" ");
for (int j = 0; j < d; j++) {
int a = Integer.parseInt(s[j]) - 1;
if (!b[a]) {
b[a] = true;
ans--;
}
}
}
out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
40,
4,
18,
13,
13,
30,
4,
18,
13,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
88,
8
],
[
88,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
64,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
11,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
9,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
] |
[
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\n\t\tScanner sc=new Scanner(System.in);\n\t //ใใฌใๅใฎไบบๆฐ\n\t\tint N=sc.nextInt();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๆฐ\n\t\tint K=sc.nextInt();\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๅ็นฐใ่ฟใ\n\t\tfor(int i=0;i<K;i++) {\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n\t\t\tint\td=sc.nextInt();\n\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t\tSystem.out.println(N-array.size());\n\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\n\t\tScanner sc=new Scanner(System.in);\n\t //ใใฌใๅใฎไบบๆฐ\n\t\tint N=sc.nextInt();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๆฐ\n\t\tint K=sc.nextInt();\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๅ็นฐใ่ฟใ\n\t\tfor(int i=0;i<K;i++) {\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n\t\t\tint\td=sc.nextInt();\n\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t\tSystem.out.println(N-array.size());\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\n\t\tScanner sc=new Scanner(System.in);\n\t //ใใฌใๅใฎไบบๆฐ\n\t\tint N=sc.nextInt();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๆฐ\n\t\tint K=sc.nextInt();\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๅ็นฐใ่ฟใ\n\t\tfor(int i=0;i<K;i++) {\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n\t\t\tint\td=sc.nextInt();\n\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t\tSystem.out.println(N-array.size());\n\n\t}",
"main",
"{\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\n\t\tScanner sc=new Scanner(System.in);\n\t //ใใฌใๅใฎไบบๆฐ\n\t\tint N=sc.nextInt();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๆฐ\n\t\tint K=sc.nextInt();\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๅ็นฐใ่ฟใ\n\t\tfor(int i=0;i<K;i++) {\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n\t\t\tint\td=sc.nextInt();\n\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t\tSystem.out.println(N-array.size());\n\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N=sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K=sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ArrayList<Integer>array=new ArrayList<>();",
"array",
"new ArrayList<>()",
"for(int i=0;i<K;i++) {\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n\t\t\tint\td=sc.nextInt();\n\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n\t\t\tint\td=sc.nextInt();\n\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}",
"{\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n\t\t\tint\td=sc.nextInt();\n\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}",
"int\td=sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}",
"int checkint=sc.nextInt();",
"checkint",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}",
"!array.contains(checkint)",
"array.contains(checkint)",
"array.contains",
"array",
"checkint",
"{\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}",
"array.add(checkint)",
"array.add",
"array",
"checkint",
"System.out.println(N-array.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"N-array.size()",
"N",
"array.size()",
"array.size",
"array",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\n\t\tScanner sc=new Scanner(System.in);\n\t //ใใฌใๅใฎไบบๆฐ\n\t\tint N=sc.nextInt();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๆฐ\n\t\tint K=sc.nextInt();\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๅ็นฐใ่ฟใ\n\t\tfor(int i=0;i<K;i++) {\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n\t\t\tint\td=sc.nextInt();\n\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t\tSystem.out.println(N-array.size());\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ\n\n\t\tScanner sc=new Scanner(System.in);\n\t //ใใฌใๅใฎไบบๆฐ\n\t\tint N=sc.nextInt();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๆฐ\n\t\tint K=sc.nextInt();\n\n\t\tArrayList<Integer>array=new ArrayList<>();\n\n\t\t//ใ่ๅญใฎ็จฎ้กๅ็นฐใ่ฟใ\n\t\tfor(int i=0;i<K;i++) {\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n\t\t\tint\td=sc.nextInt();\n\n\t\t\t//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ\n\t\t\tfor(int j=0;j<d;j++) {\n\t\t\t\tint checkint=sc.nextInt();\n\t\t\t\tif(!array.contains(checkint)) {\n\t\t\t\t\t//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด\n\t\t\t\t\tarray.add(checkint);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t\tSystem.out.println(N-array.size());\n\n\t}\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ่ชๅ็ๆใใใใกใฝใใใปในใฟใ
Scanner sc=new Scanner(System.in);
//ใใฌใๅใฎไบบๆฐ
int N=sc.nextInt();
//ใ่ๅญใฎ็จฎ้กๆฐ
int K=sc.nextInt();
ArrayList<Integer>array=new ArrayList<>();
//ใ่ๅญใฎ็จฎ้กๅ็นฐใ่ฟใ
for(int i=0;i<K;i++) {
//ใใฎใ่ๅญใๆใฃใฆใใไบบๆฐ
int d=sc.nextInt();
//ใใฎใ่ๅญใๆใฃใฆใใไบบใฎๅๅใฎๅ
ฅๅ็นฐใ่ฟใ
for(int j=0;j<d;j++) {
int checkint=sc.nextInt();
if(!array.contains(checkint)) {
//ใใฎใ่ๅญใใใฃใฆใใไบบใฎๅๅใ้
ๅใซๆ ผ็ด
array.add(checkint);
}
}
}
System.out.println(N-array.size());
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
20,
13,
41,
13,
20,
13,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
0,
18,
13,
2,
18,
18,
13,
13,
13,
17,
17,
41,
13,
17,
28,
13,
13,
30,
0,
13,
8,
13,
17,
17,
4,
18,
18,
13,
13,
13,
12,
13,
30,
0,
13,
20,
41,
13,
4,
18,
13,
17,
14,
2,
13,
17,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
41,
13,
17,
42,
13,
30,
4,
13,
38,
5,
13,
30,
37,
20,
30,
4,
18,
13,
17,
14,
2,
4,
18,
13,
17,
30,
4,
18,
13,
4,
18,
18,
13,
13,
17,
30,
0,
13,
17,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
299,
8
],
[
299,
9
],
[
9,
10
],
[
299,
11
],
[
11,
12
],
[
11,
13
],
[
299,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
16,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
16,
25
],
[
25,
26
],
[
25,
27
],
[
16,
29
],
[
29,
30
],
[
29,
31
],
[
16,
34
],
[
34,
35
],
[
34,
36
],
[
16,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
50,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
57,
67
],
[
67,
68
],
[
68,
69
],
[
57,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
72,
78
],
[
78,
79
],
[
71,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
80,
90
],
[
16,
91
],
[
91,
92
],
[
91,
93
],
[
16,
94
],
[
94,
95
],
[
94,
96
],
[
94,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
100,
103
],
[
16,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
299,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
118,
121
],
[
112,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
127,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
112,
137
],
[
137,
138
],
[
137,
139
],
[
112,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
142,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
145,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
151,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
157,
161
],
[
156,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
162,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
166,
171
],
[
156,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
110,
176
],
[
176,
177
],
[
299,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
181,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
191,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
180,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
299,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
209,
212
],
[
212,
213
],
[
299,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
218,
221
],
[
221,
222
],
[
299,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
227,
230
],
[
230,
231
],
[
299,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
234,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
239,
244
],
[
244,
245
],
[
244,
246
],
[
239,
247
],
[
247,
248
],
[
248,
249
],
[
239,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
251,
255
],
[
255,
256
],
[
234,
257
],
[
257,
258
],
[
232,
259
],
[
259,
260
],
[
299,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
299,
269
],
[
269,
270
],
[
269,
271
],
[
271,
272
],
[
272,
273
],
[
272,
274
],
[
271,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
278,
280
],
[
276,
281
],
[
281,
282
],
[
281,
283
],
[
276,
284
],
[
284,
285
],
[
285,
286
],
[
276,
287
],
[
287,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
288,
292
],
[
292,
293
],
[
271,
294
],
[
294,
295
],
[
269,
296
],
[
296,
297
],
[
0,
298
],
[
298,
299
],
[
298,
300
]
] |
[
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\t\n\t\n\tprivate static void solve(){\n\t\t//Implement solution here.\n\t\tint N = ni();\n\t\tint K = ni();\n\t\tint[] d = new int[K];\n\t\tint[][] A = new int[K][N];\n\t\tboolean[] ans = new boolean[N];\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = ni();\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint result = 0;\n\t\tfor(boolean b:ans)result += b ? 0 : 1;\n\t\tSystem.out.println(result);\n\t}\n\n\t//Switch input source (stdin/file)\n\tprivate static BufferedReader br;\n\tpublic static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}\n\n\t//Input read utility\n\tprivate static StringTokenizer tokenizer = null;\n\tpublic static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}\n\t//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}\n\t//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}\n\t//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\t\n\t\n\tprivate static void solve(){\n\t\t//Implement solution here.\n\t\tint N = ni();\n\t\tint K = ni();\n\t\tint[] d = new int[K];\n\t\tint[][] A = new int[K][N];\n\t\tboolean[] ans = new boolean[N];\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = ni();\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint result = 0;\n\t\tfor(boolean b:ans)result += b ? 0 : 1;\n\t\tSystem.out.println(result);\n\t}\n\n\t//Switch input source (stdin/file)\n\tprivate static BufferedReader br;\n\tpublic static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}\n\n\t//Input read utility\n\tprivate static StringTokenizer tokenizer = null;\n\tpublic static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}\n\t//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}\n\t//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}\n\t//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n}",
"Main",
"//Switch input source (stdin/file)\n\tprivate static BufferedReader br;",
"br",
"//Input read utility\n\tprivate static StringTokenizer tokenizer = null;",
"tokenizer",
"null",
"private static void solve(){\n\t\t//Implement solution here.\n\t\tint N = ni();\n\t\tint K = ni();\n\t\tint[] d = new int[K];\n\t\tint[][] A = new int[K][N];\n\t\tboolean[] ans = new boolean[N];\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = ni();\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint result = 0;\n\t\tfor(boolean b:ans)result += b ? 0 : 1;\n\t\tSystem.out.println(result);\n\t}",
"solve",
"{\n\t\t//Implement solution here.\n\t\tint N = ni();\n\t\tint K = ni();\n\t\tint[] d = new int[K];\n\t\tint[][] A = new int[K][N];\n\t\tboolean[] ans = new boolean[N];\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = ni();\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint result = 0;\n\t\tfor(boolean b:ans)result += b ? 0 : 1;\n\t\tSystem.out.println(result);\n\t}",
"int N = ni();",
"N",
"ni()",
"ni",
"int K = ni();",
"K",
"ni()",
"ni",
"int[] d = new int[K];",
"d",
"new int[K]",
"K",
"int[][] A = new int[K][N];",
"A",
"new int[K][N]",
"K",
"N",
"boolean[] ans = new boolean[N];",
"ans",
"new boolean[N]",
"N",
"for(int i = 0; i < K; i++) {\n\t\t\td[i] = ni();\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\td[i] = ni();\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}\n\t\t}",
"{\n\t\t\td[i] = ni();\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}\n\t\t}",
"d[i] = ni()",
"d[i]",
"d",
"i",
"ni()",
"ni",
"for(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d[i]",
"j",
"d[i]",
"d",
"i",
"j++",
"j++",
"j",
"{\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}",
"{\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}",
"A[i][j] = ni()",
"A[i][j]",
"A[i]",
"A",
"i",
"j",
"ni()",
"ni",
"ans[A[i][j] - 1] = true",
"ans[A[i][j] - 1]",
"ans",
"A[i][j] - 1",
"A[i][j]",
"A[i]",
"A",
"i",
"j",
"1",
"true",
"int result = 0;",
"result",
"0",
"for(boolean b:ans)result += b ? 0 : 1;",
"boolean b",
"ans",
"result += b ? 0 : 1;",
"result += b ? 0 : 1",
"result",
"b ? 0 : 1",
"b",
"0",
"1",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"public static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}",
"main",
"{\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String debugDataPath = System.getenv(\"DD_PATH\");",
"debugDataPath",
"System.getenv(\"DD_PATH\")",
"System.getenv",
"System",
"\"DD_PATH\"",
"if(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}",
"debugDataPath != null",
"debugDataPath",
"null",
"{\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}",
"try{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}",
"catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}",
"Exception e",
"{\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}",
"br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))))",
"br",
"new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))))",
"boolean hasNext = true;",
"hasNext",
"true",
"while(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}",
"hasNext",
"{\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}",
"solve()",
"solve",
"try{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}",
"catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}",
"Exception e",
"{\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}",
"br.mark(1)",
"br.mark",
"br",
"1",
"if(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}",
"br.read() > 0",
"br.read()",
"br.read",
"br",
"0",
"{\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t}",
"br.reset()",
"br.reset",
"br",
"System.out.println(\"---\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"---\"",
"{\n\t\t\t\t\thasNext = false;\n\t\t\t\t}",
"hasNext = false",
"hasNext",
"false",
"String[] args",
"args",
"public static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}",
"next",
"{\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}",
"while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}",
"try {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}",
"catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}",
"Exception e",
"{\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t}",
"tokenizer = new StringTokenizer(br.readLine())",
"tokenizer",
"new StringTokenizer(br.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}",
"ni",
"{\n\t\treturn Integer.parseInt(next());\n\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}",
"nl",
"{\n\t\treturn Long.parseLong(next());\n\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}",
"nd",
"{\n\t\treturn Double.parseDouble(next());\n\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}",
"na",
"{\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = ni();",
"a[i] = ni()",
"a[i]",
"a",
"i",
"ni()",
"ni",
"return a;",
"a",
"int n",
"n",
"//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}",
"ns",
"{\n\t\treturn next().toCharArray();\n\t}",
"return next().toCharArray();",
"next().toCharArray()",
"next().toCharArray",
"next()",
"next",
"//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}",
"nal",
"{\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nl();",
"a[i] = nl()",
"a[i]",
"a",
"i",
"nl()",
"nl",
"return a;",
"a",
"int n",
"n",
"public class Main {\t\n\t\n\tprivate static void solve(){\n\t\t//Implement solution here.\n\t\tint N = ni();\n\t\tint K = ni();\n\t\tint[] d = new int[K];\n\t\tint[][] A = new int[K][N];\n\t\tboolean[] ans = new boolean[N];\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = ni();\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint result = 0;\n\t\tfor(boolean b:ans)result += b ? 0 : 1;\n\t\tSystem.out.println(result);\n\t}\n\n\t//Switch input source (stdin/file)\n\tprivate static BufferedReader br;\n\tpublic static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}\n\n\t//Input read utility\n\tprivate static StringTokenizer tokenizer = null;\n\tpublic static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}\n\t//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}\n\t//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}\n\t//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n}",
"public class Main {\t\n\t\n\tprivate static void solve(){\n\t\t//Implement solution here.\n\t\tint N = ni();\n\t\tint K = ni();\n\t\tint[] d = new int[K];\n\t\tint[][] A = new int[K][N];\n\t\tboolean[] ans = new boolean[N];\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = ni();\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tA[i][j] = ni();\n\t\t\t\tans[A[i][j] - 1] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint result = 0;\n\t\tfor(boolean b:ans)result += b ? 0 : 1;\n\t\tSystem.out.println(result);\n\t}\n\n\t//Switch input source (stdin/file)\n\tprivate static BufferedReader br;\n\tpublic static void main(String[] args){\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tString debugDataPath = System.getenv(\"DD_PATH\"); \n\t\tif(debugDataPath != null){\n\t\t\ttry{\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\tboolean hasNext = true;\n\t\twhile(hasNext){\n\t\t\tsolve();\t\n\t\t\ttry{\n\t\t\t\tbr.mark(1);\n\t\t\t\tif(br.read() > 0){\n\t\t\t\t\tbr.reset();\t\t\t\n\t\t\t\t\tSystem.out.println(\"---\");\n\t\t\t\t} else {\n\t\t\t\t\thasNext = false;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} \n\t\t}\n\t}\n\n\t//Input read utility\n\tprivate static StringTokenizer tokenizer = null;\n\tpublic static String next() {\n\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn tokenizer.nextToken();\n\t}\n\t//Get next single int\n\tprivate static int ni() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t//Get next single long\n\tprivate static long nl() {\n\t\treturn Long.parseLong(next());\n\t}\n\t//Get next single double\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t//Get next int array from one line\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t//Get next char array from one line\n\tprivate static char[] ns() {\n\t\treturn next().toCharArray();\n\t}\n\t//Get next long array from one line\n\tprivate static long[] nal(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n}",
"Main"
] |
import java.util.*;
import java.io.*;
public class Main {
private static void solve(){
//Implement solution here.
int N = ni();
int K = ni();
int[] d = new int[K];
int[][] A = new int[K][N];
boolean[] ans = new boolean[N];
for(int i = 0; i < K; i++) {
d[i] = ni();
for(int j = 0; j < d[i]; j++) {
A[i][j] = ni();
ans[A[i][j] - 1] = true;
}
}
int result = 0;
for(boolean b:ans)result += b ? 0 : 1;
System.out.println(result);
}
//Switch input source (stdin/file)
private static BufferedReader br;
public static void main(String[] args){
br = new BufferedReader(new InputStreamReader(System.in));
String debugDataPath = System.getenv("DD_PATH");
if(debugDataPath != null){
try{
br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
}catch(Exception e){
throw new RuntimeException(e);
}
}
boolean hasNext = true;
while(hasNext){
solve();
try{
br.mark(1);
if(br.read() > 0){
br.reset();
System.out.println("---");
} else {
hasNext = false;
}
}catch(Exception e){
throw new RuntimeException(e);
}
}
}
//Input read utility
private static StringTokenizer tokenizer = null;
public static String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(br.readLine());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
//Get next single int
private static int ni() {
return Integer.parseInt(next());
}
//Get next single long
private static long nl() {
return Long.parseLong(next());
}
//Get next single double
private static double nd() {
return Double.parseDouble(next());
}
//Get next int array from one line
private static int[] na(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = ni();
return a;
}
//Get next char array from one line
private static char[] ns() {
return next().toCharArray();
}
//Get next long array from one line
private static long[] nal(int n) {
long[] a = new long[n];
for (int i = 0; i < n; i++)
a[i] = nl();
return a;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
0,
13,
20,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
101,
14
],
[
101,
15
],
[
15,
16
],
[
101,
17
],
[
17,
18
],
[
101,
19
],
[
19,
20
],
[
101,
21
],
[
21,
22
],
[
101,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
25,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
25,
39
],
[
39,
40
],
[
39,
41
],
[
25,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
54,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
60,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
77,
78
],
[
25,
79
],
[
79,
80
],
[
79,
81
],
[
25,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
25,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
25,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
23,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
] |
[
"import java.util.ArrayList;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\tstatic int N;\n\tstatic int K;\n\tstatic int a;\n\tstatic int b;\n\tpublic static void main(String[]args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tList<Integer> list =new ArrayList<Integer>();\n\t\tfor(int n=0;n<K;n++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tlist=new ArrayList<Integer>(new HashSet<>(list));\n\t\ta=list.size();\n\t\tb=N-a;\n\t\tSystem.out.println(b);\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tstatic int N;\n\tstatic int K;\n\tstatic int a;\n\tstatic int b;\n\tpublic static void main(String[]args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tList<Integer> list =new ArrayList<Integer>();\n\t\tfor(int n=0;n<K;n++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tlist=new ArrayList<Integer>(new HashSet<>(list));\n\t\ta=list.size();\n\t\tb=N-a;\n\t\tSystem.out.println(b);\n\t}\n}",
"Main",
"static int N;",
"N",
"static int K;",
"K",
"static int a;",
"a",
"static int b;",
"b",
"public static void main(String[]args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tList<Integer> list =new ArrayList<Integer>();\n\t\tfor(int n=0;n<K;n++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tlist=new ArrayList<Integer>(new HashSet<>(list));\n\t\ta=list.size();\n\t\tb=N-a;\n\t\tSystem.out.println(b);\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tList<Integer> list =new ArrayList<Integer>();\n\t\tfor(int n=0;n<K;n++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tlist=new ArrayList<Integer>(new HashSet<>(list));\n\t\ta=list.size();\n\t\tb=N-a;\n\t\tSystem.out.println(b);\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"N=sc.nextInt()",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"K=sc.nextInt()",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> list =new ArrayList<Integer>();",
"list",
"new ArrayList<Integer>()",
"for(int n=0;n<K;n++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"int n=0;",
"int n=0;",
"n",
"0",
"n<K",
"n",
"K",
"n++",
"n++",
"n",
"{\n\t\t\tint d=sc.nextInt();\n\t\t\tfor(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d=sc.nextInt();\n\t\t\tfor(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"int d=sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}",
"int m=0;",
"int m=0;",
"m",
"0",
"m<d",
"m",
"d",
"m++",
"m++",
"m",
"{\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}",
"{\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}",
"list.add(sc.nextInt())",
"list.add",
"list",
"sc.nextInt()",
"sc.nextInt",
"sc",
"list=new ArrayList<Integer>(new HashSet<>(list))",
"list",
"new ArrayList<Integer>(new HashSet<>(list))",
"a=list.size()",
"a",
"list.size()",
"list.size",
"list",
"b=N-a",
"b",
"N-a",
"N",
"a",
"System.out.println(b)",
"System.out.println",
"System.out",
"System",
"System.out",
"b",
"String[]args",
"args",
"public class Main {\n\tstatic int N;\n\tstatic int K;\n\tstatic int a;\n\tstatic int b;\n\tpublic static void main(String[]args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tList<Integer> list =new ArrayList<Integer>();\n\t\tfor(int n=0;n<K;n++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tlist=new ArrayList<Integer>(new HashSet<>(list));\n\t\ta=list.size();\n\t\tb=N-a;\n\t\tSystem.out.println(b);\n\t}\n}",
"public class Main {\n\tstatic int N;\n\tstatic int K;\n\tstatic int a;\n\tstatic int b;\n\tpublic static void main(String[]args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tK=sc.nextInt();\n\t\tList<Integer> list =new ArrayList<Integer>();\n\t\tfor(int n=0;n<K;n++) {\n\t\t\tint d=sc.nextInt();\n\t\t\tfor(int m=0;m<d;m++) {\n\t\t\t\tlist.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tlist=new ArrayList<Integer>(new HashSet<>(list));\n\t\ta=list.size();\n\t\tb=N-a;\n\t\tSystem.out.println(b);\n\t}\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class Main {
static int N;
static int K;
static int a;
static int b;
public static void main(String[]args) {
Scanner sc=new Scanner(System.in);
N=sc.nextInt();
K=sc.nextInt();
List<Integer> list =new ArrayList<Integer>();
for(int n=0;n<K;n++) {
int d=sc.nextInt();
for(int m=0;m<d;m++) {
list.add(sc.nextInt());
}
}
list=new ArrayList<Integer>(new HashSet<>(list));
a=list.size();
b=N-a;
System.out.println(b);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
18,
18,
13,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
18,
18,
13,
13,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
196,
14
],
[
196,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
26,
27
],
[
27,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
35,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
17,
41
],
[
41,
42
],
[
41,
43
],
[
17,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
17,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
82,
83
],
[
75,
84
],
[
84,
85
],
[
84,
86
],
[
75,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
87,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
107,
108
],
[
75,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
17,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
118,
128
],
[
128,
129
],
[
129,
130
],
[
118,
131
],
[
132,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
133,
145
],
[
145,
146
],
[
146,
147
],
[
133,
148
],
[
149,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
153,
159
],
[
150,
160
],
[
17,
161
],
[
161,
162
],
[
161,
163
],
[
17,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
164,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
171,
173
],
[
164,
174
],
[
174,
175
],
[
175,
176
],
[
164,
177
],
[
178,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
179,
185
],
[
185,
186
],
[
17,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
187,
192
],
[
15,
193
],
[
193,
194
],
[
0,
195
],
[
195,
196
],
[
195,
197
]
] |
[
"import java.lang.reflect.Array;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n //ใณใผใ\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer k = Integer.parseInt(scanner.next());\n Integer da[][] = new Integer[k][];\n Boolean[] total = new Boolean[n];\n\n for(int i= 0; i < n; i++) {\n total[i] = false;\n }\n\n for(int i = 0; i < k; i++) {\n int tmp = Integer.parseInt(scanner.next());\n ArrayList list = new ArrayList();\n for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n da[i] = (Integer[])list.toArray(new Integer[tmp]);\n }\n\n for(int i = 0; i < da.length; i++) {\n for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }\n }\n int count = 0;\n for(int i =0; i < total.length; i++){\n if(total[i] == false) count++;\n }\n\n System.out.println(count);\n }\n}",
"import java.lang.reflect.Array;",
"Array",
"java.lang.reflect",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n //ใณใผใ\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer k = Integer.parseInt(scanner.next());\n Integer da[][] = new Integer[k][];\n Boolean[] total = new Boolean[n];\n\n for(int i= 0; i < n; i++) {\n total[i] = false;\n }\n\n for(int i = 0; i < k; i++) {\n int tmp = Integer.parseInt(scanner.next());\n ArrayList list = new ArrayList();\n for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n da[i] = (Integer[])list.toArray(new Integer[tmp]);\n }\n\n for(int i = 0; i < da.length; i++) {\n for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }\n }\n int count = 0;\n for(int i =0; i < total.length; i++){\n if(total[i] == false) count++;\n }\n\n System.out.println(count);\n }\n}",
"Main",
"public static void main(String[] args) {\n //ใณใผใ\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer k = Integer.parseInt(scanner.next());\n Integer da[][] = new Integer[k][];\n Boolean[] total = new Boolean[n];\n\n for(int i= 0; i < n; i++) {\n total[i] = false;\n }\n\n for(int i = 0; i < k; i++) {\n int tmp = Integer.parseInt(scanner.next());\n ArrayList list = new ArrayList();\n for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n da[i] = (Integer[])list.toArray(new Integer[tmp]);\n }\n\n for(int i = 0; i < da.length; i++) {\n for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }\n }\n int count = 0;\n for(int i =0; i < total.length; i++){\n if(total[i] == false) count++;\n }\n\n System.out.println(count);\n }",
"main",
"{\n //ใณใผใ\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer k = Integer.parseInt(scanner.next());\n Integer da[][] = new Integer[k][];\n Boolean[] total = new Boolean[n];\n\n for(int i= 0; i < n; i++) {\n total[i] = false;\n }\n\n for(int i = 0; i < k; i++) {\n int tmp = Integer.parseInt(scanner.next());\n ArrayList list = new ArrayList();\n for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n da[i] = (Integer[])list.toArray(new Integer[tmp]);\n }\n\n for(int i = 0; i < da.length; i++) {\n for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }\n }\n int count = 0;\n for(int i =0; i < total.length; i++){\n if(total[i] == false) count++;\n }\n\n System.out.println(count);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"Integer n = Integer.parseInt(scanner.next());",
"n",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"Integer k = Integer.parseInt(scanner.next());",
"k",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"Integer da[][] = new Integer[k][];",
"da",
"new Integer[k][]",
"k",
"Boolean[] total = new Boolean[n];",
"total",
"new Boolean[n]",
"n",
"for(int i= 0; i < n; i++) {\n total[i] = false;\n }",
"int i= 0;",
"int i= 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n total[i] = false;\n }",
"{\n total[i] = false;\n }",
"total[i] = false",
"total[i]",
"total",
"i",
"false",
"for(int i = 0; i < k; i++) {\n int tmp = Integer.parseInt(scanner.next());\n ArrayList list = new ArrayList();\n for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n da[i] = (Integer[])list.toArray(new Integer[tmp]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int tmp = Integer.parseInt(scanner.next());\n ArrayList list = new ArrayList();\n for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n da[i] = (Integer[])list.toArray(new Integer[tmp]);\n }",
"{\n int tmp = Integer.parseInt(scanner.next());\n ArrayList list = new ArrayList();\n for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n da[i] = (Integer[])list.toArray(new Integer[tmp]);\n }",
"int tmp = Integer.parseInt(scanner.next());",
"tmp",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"ArrayList list = new ArrayList();",
"list",
"new ArrayList()",
"for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < tmp",
"j",
"tmp",
"j++",
"j++",
"j",
"{\n list.add(Integer.parseInt(scanner.next()));\n }",
"{\n list.add(Integer.parseInt(scanner.next()));\n }",
"list.add(Integer.parseInt(scanner.next()))",
"list.add",
"list",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"da[i] = (Integer[])list.toArray(new Integer[tmp])",
"da[i]",
"da",
"i",
"(Integer[])list.toArray(new Integer[tmp])",
"list.toArray",
"list",
"new Integer[tmp]",
"tmp",
"for(int i = 0; i < da.length; i++) {\n for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < da.length",
"i",
"da.length",
"da",
"da.length",
"i++",
"i++",
"i",
"{\n for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }\n }",
"{\n for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }\n }",
"for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < da[i].length",
"j",
"da[i].length",
"da[i]",
"da",
"i",
"da[i].length",
"j++",
"j++",
"j",
"{\n total[da[i][j] -1] = true;\n }",
"{\n total[da[i][j] -1] = true;\n }",
"total[da[i][j] -1] = true",
"total[da[i][j] -1]",
"total",
"da[i][j] -1",
"da[i][j]",
"da[i]",
"da",
"i",
"j",
"1",
"true",
"int count = 0;",
"count",
"0",
"for(int i =0; i < total.length; i++){\n if(total[i] == false) count++;\n }",
"int i =0;",
"int i =0;",
"i",
"0",
"i < total.length",
"i",
"total.length",
"total",
"total.length",
"i++",
"i++",
"i",
"{\n if(total[i] == false) count++;\n }",
"{\n if(total[i] == false) count++;\n }",
"if(total[i] == false) count++;",
"total[i] == false",
"total[i]",
"total",
"i",
"false",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n //ใณใผใ\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer k = Integer.parseInt(scanner.next());\n Integer da[][] = new Integer[k][];\n Boolean[] total = new Boolean[n];\n\n for(int i= 0; i < n; i++) {\n total[i] = false;\n }\n\n for(int i = 0; i < k; i++) {\n int tmp = Integer.parseInt(scanner.next());\n ArrayList list = new ArrayList();\n for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n da[i] = (Integer[])list.toArray(new Integer[tmp]);\n }\n\n for(int i = 0; i < da.length; i++) {\n for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }\n }\n int count = 0;\n for(int i =0; i < total.length; i++){\n if(total[i] == false) count++;\n }\n\n System.out.println(count);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n //ใณใผใ\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer k = Integer.parseInt(scanner.next());\n Integer da[][] = new Integer[k][];\n Boolean[] total = new Boolean[n];\n\n for(int i= 0; i < n; i++) {\n total[i] = false;\n }\n\n for(int i = 0; i < k; i++) {\n int tmp = Integer.parseInt(scanner.next());\n ArrayList list = new ArrayList();\n for(int j = 0; j < tmp; j++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n da[i] = (Integer[])list.toArray(new Integer[tmp]);\n }\n\n for(int i = 0; i < da.length; i++) {\n for(int j = 0; j < da[i].length; j++) {\n total[da[i][j] -1] = true;\n }\n }\n int count = 0;\n for(int i =0; i < total.length; i++){\n if(total[i] == false) count++;\n }\n\n System.out.println(count);\n }\n}",
"Main"
] |
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//ใณใผใ
Scanner scanner = new Scanner(System.in);
Integer n = Integer.parseInt(scanner.next());
Integer k = Integer.parseInt(scanner.next());
Integer da[][] = new Integer[k][];
Boolean[] total = new Boolean[n];
for(int i= 0; i < n; i++) {
total[i] = false;
}
for(int i = 0; i < k; i++) {
int tmp = Integer.parseInt(scanner.next());
ArrayList list = new ArrayList();
for(int j = 0; j < tmp; j++) {
list.add(Integer.parseInt(scanner.next()));
}
da[i] = (Integer[])list.toArray(new Integer[tmp]);
}
for(int i = 0; i < da.length; i++) {
for(int j = 0; j < da[i].length; j++) {
total[da[i][j] -1] = true;
}
}
int count = 0;
for(int i =0; i < total.length; i++){
if(total[i] == false) count++;
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
40,
18,
13,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
29,
23,
13,
6,
13,
41,
13,
2,
17,
17,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
12,
13,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
23,
13,
12,
13,
30,
14,
2,
13,
13,
4,
13,
29,
18,
13,
40,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
18,
13,
12,
13,
30,
0,
13,
4,
18,
13,
13,
0,
13,
17,
13,
14,
2,
13,
40,
17,
0,
18,
13,
17,
40,
17,
12,
13,
30,
41,
13,
4,
13,
42,
4,
18,
13,
13,
30,
0,
13,
4,
13,
29,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
18,
13,
13,
30,
0,
13,
4,
13,
41,
13,
20,
4,
18,
13,
13,
0,
13,
4,
13,
42,
40,
4,
18,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
2,
13,
17,
30,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
0,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
560,
8
],
[
560,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
29,
33
],
[
11,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
46,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
71,
78
],
[
11,
79
],
[
79,
80
],
[
79,
81
],
[
11,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
82,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
11,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
11,
105
],
[
9,
106
],
[
106,
107
],
[
560,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
108,
115
],
[
115,
116
],
[
108,
117
],
[
117,
118
],
[
108,
119
],
[
119,
120
],
[
108,
121
],
[
121,
122
],
[
108,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
129,
131
],
[
125,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
135,
137
],
[
108,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
144,
146
],
[
140,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
150,
152
],
[
138,
153
],
[
153,
154
],
[
108,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
158,
162
],
[
162,
163
],
[
157,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
108,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
171,
177
],
[
177,
178
],
[
178,
179
],
[
108,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
185,
189
],
[
189,
190
],
[
189,
191
],
[
185,
192
],
[
182,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
193,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
108,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
206,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
212,
215
],
[
211,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
206,
221
],
[
221,
222
],
[
108,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
225,
230
],
[
230,
231
],
[
231,
232
],
[
232,
233
],
[
231,
234
],
[
230,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
225,
240
],
[
240,
241
],
[
240,
242
],
[
225,
243
],
[
243,
244
],
[
244,
245
],
[
243,
246
],
[
225,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
225,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
253,
256
],
[
251,
257
],
[
257,
258
],
[
258,
259
],
[
259,
260
],
[
258,
261
],
[
257,
262
],
[
262,
263
],
[
262,
264
],
[
264,
265
],
[
225,
266
],
[
266,
267
],
[
267,
268
],
[
268,
269
],
[
108,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
272,
276
],
[
276,
277
],
[
276,
278
],
[
278,
279
],
[
272,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
280,
284
],
[
284,
285
],
[
284,
286
],
[
286,
287
],
[
272,
288
],
[
288,
289
],
[
288,
290
],
[
290,
291
],
[
290,
292
],
[
272,
293
],
[
293,
294
],
[
293,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
272,
299
],
[
299,
300
],
[
300,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
304,
305
],
[
301,
306
],
[
300,
307
],
[
307,
308
],
[
307,
309
],
[
299,
310
],
[
310,
311
],
[
311,
312
],
[
311,
313
],
[
313,
314
],
[
314,
315
],
[
315,
316
],
[
315,
317
],
[
314,
318
],
[
313,
319
],
[
272,
320
],
[
320,
321
],
[
320,
322
],
[
322,
323
],
[
323,
324
],
[
272,
325
],
[
325,
326
],
[
108,
327
],
[
327,
328
],
[
327,
329
],
[
329,
330
],
[
330,
331
],
[
330,
332
],
[
329,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
329,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
337,
341
],
[
341,
342
],
[
341,
343
],
[
343,
344
],
[
329,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
347,
349
],
[
329,
350
],
[
350,
351
],
[
350,
352
],
[
352,
353
],
[
352,
354
],
[
354,
355
],
[
329,
356
],
[
356,
357
],
[
357,
358
],
[
358,
359
],
[
359,
360
],
[
359,
361
],
[
361,
362
],
[
358,
363
],
[
357,
364
],
[
364,
365
],
[
364,
366
],
[
356,
367
],
[
367,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
371,
375
],
[
370,
376
],
[
329,
377
],
[
377,
378
],
[
377,
379
],
[
379,
380
],
[
380,
381
],
[
329,
382
],
[
382,
383
],
[
108,
384
],
[
384,
385
],
[
384,
386
],
[
386,
387
],
[
387,
388
],
[
387,
389
],
[
386,
390
],
[
390,
391
],
[
390,
392
],
[
386,
393
],
[
393,
394
],
[
393,
395
],
[
395,
396
],
[
386,
397
],
[
397,
398
],
[
398,
399
],
[
398,
400
],
[
397,
401
],
[
401,
402
],
[
401,
403
],
[
403,
404
],
[
386,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
407,
409
],
[
386,
410
],
[
410,
411
],
[
410,
412
],
[
412,
413
],
[
412,
414
],
[
414,
415
],
[
386,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
419,
420
],
[
419,
421
],
[
421,
422
],
[
418,
423
],
[
417,
424
],
[
424,
425
],
[
424,
426
],
[
416,
427
],
[
427,
428
],
[
428,
429
],
[
428,
430
],
[
430,
431
],
[
431,
432
],
[
432,
433
],
[
432,
434
],
[
431,
435
],
[
430,
436
],
[
386,
437
],
[
437,
438
],
[
438,
439
],
[
438,
440
],
[
437,
441
],
[
441,
442
],
[
442,
443
],
[
443,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
447,
448
],
[
444,
449
],
[
443,
450
],
[
450,
451
],
[
450,
452
],
[
442,
453
],
[
453,
454
],
[
454,
455
],
[
454,
456
],
[
456,
457
],
[
457,
458
],
[
457,
459
],
[
456,
460
],
[
460,
461
],
[
460,
462
],
[
386,
463
],
[
463,
464
],
[
463,
465
],
[
465,
466
],
[
466,
467
],
[
386,
468
],
[
468,
469
],
[
108,
470
],
[
470,
471
],
[
470,
472
],
[
472,
473
],
[
473,
474
],
[
473,
475
],
[
472,
477
],
[
477,
478
],
[
478,
479
],
[
479,
480
],
[
479,
481
],
[
477,
482
],
[
482,
483
],
[
482,
484
],
[
477,
485
],
[
485,
486
],
[
486,
487
],
[
477,
488
],
[
489,
489
],
[
489,
490
],
[
490,
491
],
[
491,
492
],
[
491,
493
],
[
490,
494
],
[
494,
495
],
[
472,
496
],
[
496,
497
],
[
470,
498
],
[
498,
499
],
[
108,
500
],
[
500,
501
],
[
500,
502
],
[
502,
503
],
[
503,
504
],
[
503,
505
],
[
502,
507
],
[
507,
508
],
[
508,
509
],
[
509,
510
],
[
509,
511
],
[
507,
512
],
[
512,
513
],
[
512,
514
],
[
507,
515
],
[
515,
516
],
[
516,
517
],
[
507,
518
],
[
519,
519
],
[
519,
520
],
[
520,
521
],
[
521,
522
],
[
521,
523
],
[
520,
524
],
[
524,
525
],
[
502,
526
],
[
526,
527
],
[
500,
528
],
[
528,
529
],
[
108,
530
],
[
530,
531
],
[
530,
532
],
[
532,
533
],
[
533,
534
],
[
533,
535
],
[
532,
537
],
[
537,
538
],
[
538,
539
],
[
539,
540
],
[
539,
541
],
[
537,
542
],
[
542,
543
],
[
542,
544
],
[
537,
545
],
[
545,
546
],
[
546,
547
],
[
537,
548
],
[
548,
549
],
[
549,
550
],
[
550,
551
],
[
550,
552
],
[
549,
553
],
[
553,
554
],
[
532,
555
],
[
555,
556
],
[
530,
557
],
[
557,
558
],
[
0,
559
],
[
559,
560
],
[
559,
561
]
] |
[
"import java.io.*;\n// import java.math.*;\nimport java.util.*;\n// import java.util.Map.*;\n// import java.util.stream.*;\n\npublic class Main {\n public static void main (String[] args) throws IOException {\n FastScanner sc = new FastScanner();\n final int N = sc.nextInt();\n final int K = sc.nextInt();\n int[] A = new int[N];\n Arrays.fill (A, 1);\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n int[] arr = sc.intArray (d);\n for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }\n }\n int ans = 0;\n for (int i = 0; i < N; i++)\n ans += A[i];\n System.out.println (ans);\n return;\n }\n\n // FastScanner start\n static class FastScanner {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public FastScanner() {\n din = new DataInputStream (System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public FastScanner (String file_name) throws IOException {\n din = new DataInputStream (new FileInputStream (file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n public char nextChar() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n return (char)c;\n }\n\n public String nextString() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n StringBuilder builder = new StringBuilder();\n builder.append ((char)c);\n c = read();\n while (!Character.isWhitespace (c)) {\n builder.append ((char)c);\n c = read();\n }\n return builder.toString();\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n if (neg)\n return -ret;\n return ret;\n }\n\n public int[] intArray (int n) throws IOException {\n int arr[] = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextInt();\n }\n return arr;\n }\n\n public long[] longArray (int n) throws IOException {\n long arr[] = new long[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextLong();\n }\n return arr;\n }\n\n public double[] doubleArray (int n) throws IOException {\n double arr[] = new double[n];\n for (int i = 0; i < n; i++)\n arr[i] = nextDouble();\n return arr;\n }\n }\n // FastScanner end\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main (String[] args) throws IOException {\n FastScanner sc = new FastScanner();\n final int N = sc.nextInt();\n final int K = sc.nextInt();\n int[] A = new int[N];\n Arrays.fill (A, 1);\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n int[] arr = sc.intArray (d);\n for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }\n }\n int ans = 0;\n for (int i = 0; i < N; i++)\n ans += A[i];\n System.out.println (ans);\n return;\n }\n\n // FastScanner start\n static class FastScanner {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public FastScanner() {\n din = new DataInputStream (System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public FastScanner (String file_name) throws IOException {\n din = new DataInputStream (new FileInputStream (file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n public char nextChar() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n return (char)c;\n }\n\n public String nextString() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n StringBuilder builder = new StringBuilder();\n builder.append ((char)c);\n c = read();\n while (!Character.isWhitespace (c)) {\n builder.append ((char)c);\n c = read();\n }\n return builder.toString();\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n if (neg)\n return -ret;\n return ret;\n }\n\n public int[] intArray (int n) throws IOException {\n int arr[] = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextInt();\n }\n return arr;\n }\n\n public long[] longArray (int n) throws IOException {\n long arr[] = new long[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextLong();\n }\n return arr;\n }\n\n public double[] doubleArray (int n) throws IOException {\n double arr[] = new double[n];\n for (int i = 0; i < n; i++)\n arr[i] = nextDouble();\n return arr;\n }\n }\n // FastScanner end\n}",
"Main",
"public static void main (String[] args) throws IOException {\n FastScanner sc = new FastScanner();\n final int N = sc.nextInt();\n final int K = sc.nextInt();\n int[] A = new int[N];\n Arrays.fill (A, 1);\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n int[] arr = sc.intArray (d);\n for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }\n }\n int ans = 0;\n for (int i = 0; i < N; i++)\n ans += A[i];\n System.out.println (ans);\n return;\n }",
"main",
"{\n FastScanner sc = new FastScanner();\n final int N = sc.nextInt();\n final int K = sc.nextInt();\n int[] A = new int[N];\n Arrays.fill (A, 1);\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n int[] arr = sc.intArray (d);\n for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }\n }\n int ans = 0;\n for (int i = 0; i < N; i++)\n ans += A[i];\n System.out.println (ans);\n return;\n }",
"FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"final int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"final int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] A = new int[N];",
"A",
"new int[N]",
"N",
"Arrays.fill (A, 1)",
"Arrays.fill",
"Arrays",
"A",
"1",
"for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n int[] arr = sc.intArray (d);\n for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n int[] arr = sc.intArray (d);\n for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }\n }",
"{\n int d = sc.nextInt();\n int[] arr = sc.intArray (d);\n for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }\n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] arr = sc.intArray (d);",
"arr",
"sc.intArray (d)",
"sc.intArray",
"sc",
"d",
"for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n A[--arr[j]] = 0;\n }",
"{\n A[--arr[j]] = 0;\n }",
"A[--arr[j]] = 0",
"A[--arr[j]]",
"A",
"--arr[j]",
"arr[j]",
"arr",
"j",
"0",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i < N; i++)\n ans += A[i];",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"ans += A[i];",
"ans += A[i]",
"ans",
"A[i]",
"A",
"i",
"System.out.println (ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"return;",
"String[] args",
"args",
"static class FastScanner {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public FastScanner() {\n din = new DataInputStream (System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public FastScanner (String file_name) throws IOException {\n din = new DataInputStream (new FileInputStream (file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n public char nextChar() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n return (char)c;\n }\n\n public String nextString() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n StringBuilder builder = new StringBuilder();\n builder.append ((char)c);\n c = read();\n while (!Character.isWhitespace (c)) {\n builder.append ((char)c);\n c = read();\n }\n return builder.toString();\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n if (neg)\n return -ret;\n return ret;\n }\n\n public int[] intArray (int n) throws IOException {\n int arr[] = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextInt();\n }\n return arr;\n }\n\n public long[] longArray (int n) throws IOException {\n long arr[] = new long[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextLong();\n }\n return arr;\n }\n\n public double[] doubleArray (int n) throws IOException {\n double arr[] = new double[n];\n for (int i = 0; i < n; i++)\n arr[i] = nextDouble();\n return arr;\n }\n }",
"FastScanner",
"final private int BUFFER_SIZE = 1 << 16;",
"BUFFER_SIZE",
"1 << 16",
"1",
"16",
"private DataInputStream din;",
"din",
"private byte[] buffer;",
"buffer",
"private int bufferPointer",
"bufferPointer",
"bytesRead;",
"bytesRead",
"public FastScanner() {\n din = new DataInputStream (System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"FastScanner",
"{\n din = new DataInputStream (System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"din = new DataInputStream (System.in)",
"din",
"new DataInputStream (System.in)",
"buffer = new byte[BUFFER_SIZE]",
"buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"bufferPointer = bytesRead = 0",
"bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"public FastScanner (String file_name) throws IOException {\n din = new DataInputStream (new FileInputStream (file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"FastScanner",
"{\n din = new DataInputStream (new FileInputStream (file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"din = new DataInputStream (new FileInputStream (file_name))",
"din",
"new DataInputStream (new FileInputStream (file_name))",
"buffer = new byte[BUFFER_SIZE]",
"buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"bufferPointer = bytesRead = 0",
"bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"String file_name",
"file_name",
"private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }",
"read",
"{\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }",
"if (bufferPointer == bytesRead)\n fillBuffer();",
"bufferPointer == bytesRead",
"bufferPointer",
"bytesRead",
"fillBuffer()",
"fillBuffer",
"return buffer[bufferPointer++];",
"buffer[bufferPointer++]",
"buffer",
"bufferPointer++",
"bufferPointer",
"public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }",
"close",
"{\n if (din == null)\n return;\n din.close();\n }",
"if (din == null)\n return;",
"din == null",
"din",
"null",
"return;",
"din.close()",
"din.close",
"din",
"private void fillBuffer() throws IOException {\n bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }",
"fillBuffer",
"{\n bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }",
"bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE)",
"bytesRead",
"din.read (buffer, bufferPointer = 0, BUFFER_SIZE)",
"din.read",
"din",
"buffer",
"bufferPointer = 0",
"bufferPointer",
"0",
"BUFFER_SIZE",
"if (bytesRead == -1)\n buffer[0] = -1;",
"bytesRead == -1",
"bytesRead",
"-1",
"1",
"buffer[0] = -1",
"buffer[0]",
"buffer",
"0",
"-1",
"1",
"public char nextChar() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n return (char)c;\n }",
"nextChar",
"{\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n return (char)c;\n }",
"byte c = read();",
"c",
"read()",
"read",
"while (Character.isWhitespace (c)) {\n c = read();\n }",
"Character.isWhitespace (c)",
"Character.isWhitespace",
"Character",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"return (char)c;",
"(char)c",
"public String nextString() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n StringBuilder builder = new StringBuilder();\n builder.append ((char)c);\n c = read();\n while (!Character.isWhitespace (c)) {\n builder.append ((char)c);\n c = read();\n }\n return builder.toString();\n }",
"nextString",
"{\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n StringBuilder builder = new StringBuilder();\n builder.append ((char)c);\n c = read();\n while (!Character.isWhitespace (c)) {\n builder.append ((char)c);\n c = read();\n }\n return builder.toString();\n }",
"byte c = read();",
"c",
"read()",
"read",
"while (Character.isWhitespace (c)) {\n c = read();\n }",
"Character.isWhitespace (c)",
"Character.isWhitespace",
"Character",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"StringBuilder builder = new StringBuilder();",
"builder",
"new StringBuilder()",
"builder.append ((char)c)",
"builder.append",
"builder",
"(char)c",
"c = read()",
"c",
"read()",
"read",
"while (!Character.isWhitespace (c)) {\n builder.append ((char)c);\n c = read();\n }",
"!Character.isWhitespace (c)",
"Character.isWhitespace (c)",
"Character.isWhitespace",
"Character",
"c",
"{\n builder.append ((char)c);\n c = read();\n }",
"builder.append ((char)c)",
"builder.append",
"builder",
"(char)c",
"c = read()",
"c",
"read()",
"read",
"return builder.toString();",
"builder.toString()",
"builder.toString",
"builder",
"public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }",
"nextInt",
"{\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }",
"int ret = 0;",
"ret",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n c = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n c = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n ret = ret * 10 + c - '0';\n }",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (neg)\n return -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }",
"nextLong",
"{\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }",
"long ret = 0;",
"ret",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n c = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n c = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n ret = ret * 10 + c - '0';\n }",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (neg)\n return -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n if (neg)\n return -ret;\n return ret;\n }",
"nextDouble",
"{\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n if (neg)\n return -ret;\n return ret;\n }",
"double ret = 0",
"ret",
"0",
"div = 1;",
"div",
"1",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n c = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n c = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n ret = ret * 10 + c - '0';\n }",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }",
"c == '.'",
"c",
"'.'",
"{\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }",
"while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n ret += (c - '0') / (div *= 10);\n }",
"ret += (c - '0') / (div *= 10)",
"ret",
"(c - '0') / (div *= 10)",
"(c - '0')",
"c",
"'0'",
"(div *= 10)",
"div",
"10",
"if (neg)\n return -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public int[] intArray (int n) throws IOException {\n int arr[] = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextInt();\n }\n return arr;\n }",
"intArray",
"{\n int arr[] = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextInt();\n }\n return arr;\n }",
"int arr[] = new int[n];",
"arr",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n arr[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextInt();\n }",
"{\n arr[i] = nextInt();\n }",
"arr[i] = nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"public long[] longArray (int n) throws IOException {\n long arr[] = new long[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextLong();\n }\n return arr;\n }",
"longArray",
"{\n long arr[] = new long[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextLong();\n }\n return arr;\n }",
"long arr[] = new long[n];",
"arr",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n arr[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextLong();\n }",
"{\n arr[i] = nextLong();\n }",
"arr[i] = nextLong()",
"arr[i]",
"arr",
"i",
"nextLong()",
"nextLong",
"return arr;",
"arr",
"int n",
"n",
"public double[] doubleArray (int n) throws IOException {\n double arr[] = new double[n];\n for (int i = 0; i < n; i++)\n arr[i] = nextDouble();\n return arr;\n }",
"doubleArray",
"{\n double arr[] = new double[n];\n for (int i = 0; i < n; i++)\n arr[i] = nextDouble();\n return arr;\n }",
"double arr[] = new double[n];",
"arr",
"new double[n]",
"n",
"for (int i = 0; i < n; i++)\n arr[i] = nextDouble();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i] = nextDouble();",
"arr[i] = nextDouble()",
"arr[i]",
"arr",
"i",
"nextDouble()",
"nextDouble",
"return arr;",
"arr",
"int n",
"n",
"public class Main {\n public static void main (String[] args) throws IOException {\n FastScanner sc = new FastScanner();\n final int N = sc.nextInt();\n final int K = sc.nextInt();\n int[] A = new int[N];\n Arrays.fill (A, 1);\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n int[] arr = sc.intArray (d);\n for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }\n }\n int ans = 0;\n for (int i = 0; i < N; i++)\n ans += A[i];\n System.out.println (ans);\n return;\n }\n\n // FastScanner start\n static class FastScanner {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public FastScanner() {\n din = new DataInputStream (System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public FastScanner (String file_name) throws IOException {\n din = new DataInputStream (new FileInputStream (file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n public char nextChar() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n return (char)c;\n }\n\n public String nextString() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n StringBuilder builder = new StringBuilder();\n builder.append ((char)c);\n c = read();\n while (!Character.isWhitespace (c)) {\n builder.append ((char)c);\n c = read();\n }\n return builder.toString();\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n if (neg)\n return -ret;\n return ret;\n }\n\n public int[] intArray (int n) throws IOException {\n int arr[] = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextInt();\n }\n return arr;\n }\n\n public long[] longArray (int n) throws IOException {\n long arr[] = new long[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextLong();\n }\n return arr;\n }\n\n public double[] doubleArray (int n) throws IOException {\n double arr[] = new double[n];\n for (int i = 0; i < n; i++)\n arr[i] = nextDouble();\n return arr;\n }\n }\n // FastScanner end\n}",
"public class Main {\n public static void main (String[] args) throws IOException {\n FastScanner sc = new FastScanner();\n final int N = sc.nextInt();\n final int K = sc.nextInt();\n int[] A = new int[N];\n Arrays.fill (A, 1);\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n int[] arr = sc.intArray (d);\n for (int j = 0; j < d; j++) {\n A[--arr[j]] = 0;\n }\n }\n int ans = 0;\n for (int i = 0; i < N; i++)\n ans += A[i];\n System.out.println (ans);\n return;\n }\n\n // FastScanner start\n static class FastScanner {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public FastScanner() {\n din = new DataInputStream (System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public FastScanner (String file_name) throws IOException {\n din = new DataInputStream (new FileInputStream (file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n public char nextChar() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n return (char)c;\n }\n\n public String nextString() throws IOException {\n byte c = read();\n while (Character.isWhitespace (c)) {\n c = read();\n }\n StringBuilder builder = new StringBuilder();\n builder.append ((char)c);\n c = read();\n while (!Character.isWhitespace (c)) {\n builder.append ((char)c);\n c = read();\n }\n return builder.toString();\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n if (neg)\n return -ret;\n return ret;\n }\n\n public int[] intArray (int n) throws IOException {\n int arr[] = new int[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextInt();\n }\n return arr;\n }\n\n public long[] longArray (int n) throws IOException {\n long arr[] = new long[n];\n for (int i = 0; i < n; i++) {\n arr[i] = nextLong();\n }\n return arr;\n }\n\n public double[] doubleArray (int n) throws IOException {\n double arr[] = new double[n];\n for (int i = 0; i < n; i++)\n arr[i] = nextDouble();\n return arr;\n }\n }\n // FastScanner end\n}",
"Main"
] |
import java.io.*;
// import java.math.*;
import java.util.*;
// import java.util.Map.*;
// import java.util.stream.*;
public class Main {
public static void main (String[] args) throws IOException {
FastScanner sc = new FastScanner();
final int N = sc.nextInt();
final int K = sc.nextInt();
int[] A = new int[N];
Arrays.fill (A, 1);
for (int i = 0; i < K; i++) {
int d = sc.nextInt();
int[] arr = sc.intArray (d);
for (int j = 0; j < d; j++) {
A[--arr[j]] = 0;
}
}
int ans = 0;
for (int i = 0; i < N; i++)
ans += A[i];
System.out.println (ans);
return;
}
// FastScanner start
static class FastScanner {
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public FastScanner() {
din = new DataInputStream (System.in);
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public FastScanner (String file_name) throws IOException {
din = new DataInputStream (new FileInputStream (file_name));
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
private byte read() throws IOException {
if (bufferPointer == bytesRead)
fillBuffer();
return buffer[bufferPointer++];
}
public void close() throws IOException {
if (din == null)
return;
din.close();
}
private void fillBuffer() throws IOException {
bytesRead = din.read (buffer, bufferPointer = 0, BUFFER_SIZE);
if (bytesRead == -1)
buffer[0] = -1;
}
public char nextChar() throws IOException {
byte c = read();
while (Character.isWhitespace (c)) {
c = read();
}
return (char)c;
}
public String nextString() throws IOException {
byte c = read();
while (Character.isWhitespace (c)) {
c = read();
}
StringBuilder builder = new StringBuilder();
builder.append ((char)c);
c = read();
while (!Character.isWhitespace (c)) {
builder.append ((char)c);
c = read();
}
return builder.toString();
}
public int nextInt() throws IOException {
int ret = 0;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
public long nextLong() throws IOException {
long ret = 0;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
public double nextDouble() throws IOException {
double ret = 0, div = 1;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (c == '.') {
while ((c = read()) >= '0' && c <= '9') {
ret += (c - '0') / (div *= 10);
}
}
if (neg)
return -ret;
return ret;
}
public int[] intArray (int n) throws IOException {
int arr[] = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = nextInt();
}
return arr;
}
public long[] longArray (int n) throws IOException {
long arr[] = new long[n];
for (int i = 0; i < n; i++) {
arr[i] = nextLong();
}
return arr;
}
public double[] doubleArray (int n) throws IOException {
double arr[] = new double[n];
for (int i = 0; i < n; i++)
arr[i] = nextDouble();
return arr;
}
}
// FastScanner end
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
4,
18,
13,
17,
17,
41,
13,
17,
28,
13,
13,
30,
30,
14,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
90,
5
],
[
90,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
60,
64
],
[
57,
65
],
[
8,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
69,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
78,
80
],
[
8,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
6,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
]
] |
[
"import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0; i < k; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tfor(int e : a){\n\t\t\tif(e == 0)num += 1;\n\t\t}\n\t\tSystem.out.println(num);\n\t}\n\t\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0; i < k; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tfor(int e : a){\n\t\t\tif(e == 0)num += 1;\n\t\t}\n\t\tSystem.out.println(num);\n\t}\n\t\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0; i < k; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tfor(int e : a){\n\t\t\tif(e == 0)num += 1;\n\t\t}\n\t\tSystem.out.println(num);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0; i < k; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tfor(int e : a){\n\t\t\tif(e == 0)num += 1;\n\t\t}\n\t\tSystem.out.println(num);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for(int i = 0; i < k; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}\n\t\t}",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}",
"{\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}",
"a[sc.nextInt()-1] += 1",
"a[sc.nextInt()-1]",
"a",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"1",
"int num = 0;",
"num",
"0",
"for(int e : a){\n\t\t\tif(e == 0)num += 1;\n\t\t}",
"int e",
"a",
"{\n\t\t\tif(e == 0)num += 1;\n\t\t}",
"{\n\t\t\tif(e == 0)num += 1;\n\t\t}",
"if(e == 0)num += 1;",
"e == 0",
"e",
"0",
"num += 1",
"num",
"1",
"System.out.println(num)",
"System.out.println",
"System.out",
"System",
"System.out",
"num",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0; i < k; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tfor(int e : a){\n\t\t\tif(e == 0)num += 1;\n\t\t}\n\t\tSystem.out.println(num);\n\t}\n\t\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tfor(int i = 0; i < k; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\ta[sc.nextInt()-1] += 1;\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tfor(int e : a){\n\t\t\tif(e == 0)num += 1;\n\t\t}\n\t\tSystem.out.println(num);\n\t}\n\t\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] a = new int[n];
for(int i = 0; i < k; i++){
int d = sc.nextInt();
for(int j = 0; j < d; j++){
a[sc.nextInt()-1] += 1;
}
}
int num = 0;
for(int e : a){
if(e == 0)num += 1;
}
System.out.println(num);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
2,
18,
13,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
129,
5
],
[
129,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
61,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
71,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
91,
99
],
[
8,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
105,
106
],
[
105,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
100,
111
],
[
112,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
8,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
6,
126
],
[
126,
127
],
[
0,
128
],
[
128,
129
],
[
128,
130
]
] |
[
"import java.util.Scanner;\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n int d;\n int ans = 0;\n \n int[] C = new int[(int) N];\n for(int i = 0; i < N ; i++){\n C[i] = 1;\n }\n for(int n = 0; n < K ; n++){\n d = sc.nextInt();\n int[] A = new int[(int)d];\n for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }\n }\n \n for(int i = 0; i < N ;i++){\n ans = ans + C[i];\n } \n System.out.println(ans);\n \n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n int d;\n int ans = 0;\n \n int[] C = new int[(int) N];\n for(int i = 0; i < N ; i++){\n C[i] = 1;\n }\n for(int n = 0; n < K ; n++){\n d = sc.nextInt();\n int[] A = new int[(int)d];\n for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }\n }\n \n for(int i = 0; i < N ;i++){\n ans = ans + C[i];\n } \n System.out.println(ans);\n \n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n int d;\n int ans = 0;\n \n int[] C = new int[(int) N];\n for(int i = 0; i < N ; i++){\n C[i] = 1;\n }\n for(int n = 0; n < K ; n++){\n d = sc.nextInt();\n int[] A = new int[(int)d];\n for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }\n }\n \n for(int i = 0; i < N ;i++){\n ans = ans + C[i];\n } \n System.out.println(ans);\n \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n int d;\n int ans = 0;\n \n int[] C = new int[(int) N];\n for(int i = 0; i < N ; i++){\n C[i] = 1;\n }\n for(int n = 0; n < K ; n++){\n d = sc.nextInt();\n int[] A = new int[(int)d];\n for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }\n }\n \n for(int i = 0; i < N ;i++){\n ans = ans + C[i];\n } \n System.out.println(ans);\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d;",
"d",
"int ans = 0;",
"ans",
"0",
"int[] C = new int[(int) N];",
"C",
"new int[(int) N]",
"(int) N",
"for(int i = 0; i < N ; i++){\n C[i] = 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n C[i] = 1;\n }",
"{\n C[i] = 1;\n }",
"C[i] = 1",
"C[i]",
"C",
"i",
"1",
"for(int n = 0; n < K ; n++){\n d = sc.nextInt();\n int[] A = new int[(int)d];\n for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }\n }",
"int n = 0;",
"int n = 0;",
"n",
"0",
"n < K",
"n",
"K",
"n++",
"n++",
"n",
"{\n d = sc.nextInt();\n int[] A = new int[(int)d];\n for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }\n }",
"{\n d = sc.nextInt();\n int[] A = new int[(int)d];\n for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }\n }",
"d = sc.nextInt()",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] A = new int[(int)d];",
"A",
"new int[(int)d]",
"(int)d",
"for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < d",
"i",
"d",
"i++",
"i++",
"i",
"{\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }",
"{\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }",
"A[i] = sc.nextInt()",
"A[i]",
"A",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"C[A[i] - 1] = 0",
"C[A[i] - 1]",
"C",
"A[i] - 1",
"A[i]",
"A",
"i",
"1",
"0",
"for(int i = 0; i < N ;i++){\n ans = ans + C[i];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n ans = ans + C[i];\n }",
"{\n ans = ans + C[i];\n }",
"ans = ans + C[i]",
"ans",
"ans + C[i]",
"ans",
"C[i]",
"C",
"i",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n int d;\n int ans = 0;\n \n int[] C = new int[(int) N];\n for(int i = 0; i < N ; i++){\n C[i] = 1;\n }\n for(int n = 0; n < K ; n++){\n d = sc.nextInt();\n int[] A = new int[(int)d];\n for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }\n }\n \n for(int i = 0; i < N ;i++){\n ans = ans + C[i];\n } \n System.out.println(ans);\n \n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n int d;\n int ans = 0;\n \n int[] C = new int[(int) N];\n for(int i = 0; i < N ; i++){\n C[i] = 1;\n }\n for(int n = 0; n < K ; n++){\n d = sc.nextInt();\n int[] A = new int[(int)d];\n for(int i = 0 ; i < d ; i++){\n A[i] = sc.nextInt();\n C[A[i] - 1] = 0;\n \n }\n }\n \n for(int i = 0; i < N ;i++){\n ans = ans + C[i];\n } \n System.out.println(ans);\n \n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int d;
int ans = 0;
int[] C = new int[(int) N];
for(int i = 0; i < N ; i++){
C[i] = 1;
}
for(int n = 0; n < K ; n++){
d = sc.nextInt();
int[] A = new int[(int)d];
for(int i = 0 ; i < d ; i++){
A[i] = sc.nextInt();
C[A[i] - 1] = 0;
}
}
for(int i = 0; i < N ;i++){
ans = ans + C[i];
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
41,
13,
4,
18,
4,
18,
4,
18,
13,
17,
28,
13,
13,
30,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
23,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
36,
38
],
[
17,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
44,
46
],
[
17,
47
],
[
47,
48
],
[
47,
49
],
[
17,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
68,
75
],
[
62,
76
],
[
76,
77
],
[
76,
78
],
[
76,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
17,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
15,
97
],
[
97,
98
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.HashSet;\nimport java.util.Set;\n\n/**\n * Created with IntelliJ IDEA.\n * User: ngupta\n * Date: 4/5/2020 AD\n * Time: 23:41\n */\nclass Main {\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] NK = br.readLine().trim().split(\" \");\n int N = Integer.parseInt(NK[0]);\n int K = Integer.parseInt(NK[1]);\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < K; i++) {\n br.readLine();\n String[] snukes = br.readLine().trim().split(\" \");\n for (String sn : snukes)\n set.add(Integer.parseInt(sn));\n }\n\n System.out.println(N - set.size());\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] NK = br.readLine().trim().split(\" \");\n int N = Integer.parseInt(NK[0]);\n int K = Integer.parseInt(NK[1]);\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < K; i++) {\n br.readLine();\n String[] snukes = br.readLine().trim().split(\" \");\n for (String sn : snukes)\n set.add(Integer.parseInt(sn));\n }\n\n System.out.println(N - set.size());\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] NK = br.readLine().trim().split(\" \");\n int N = Integer.parseInt(NK[0]);\n int K = Integer.parseInt(NK[1]);\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < K; i++) {\n br.readLine();\n String[] snukes = br.readLine().trim().split(\" \");\n for (String sn : snukes)\n set.add(Integer.parseInt(sn));\n }\n\n System.out.println(N - set.size());\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] NK = br.readLine().trim().split(\" \");\n int N = Integer.parseInt(NK[0]);\n int K = Integer.parseInt(NK[1]);\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < K; i++) {\n br.readLine();\n String[] snukes = br.readLine().trim().split(\" \");\n for (String sn : snukes)\n set.add(Integer.parseInt(sn));\n }\n\n System.out.println(N - set.size());\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String[] NK = br.readLine().trim().split(\" \");",
"NK",
"br.readLine().trim().split(\" \")",
"br.readLine().trim().split",
"br.readLine().trim()",
"br.readLine().trim",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int N = Integer.parseInt(NK[0]);",
"N",
"Integer.parseInt(NK[0])",
"Integer.parseInt",
"Integer",
"NK[0]",
"NK",
"0",
"int K = Integer.parseInt(NK[1]);",
"K",
"Integer.parseInt(NK[1])",
"Integer.parseInt",
"Integer",
"NK[1]",
"NK",
"1",
"Set<Integer> set = new HashSet<>();",
"set",
"new HashSet<>()",
"for (int i = 0; i < K; i++) {\n br.readLine();\n String[] snukes = br.readLine().trim().split(\" \");\n for (String sn : snukes)\n set.add(Integer.parseInt(sn));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n br.readLine();\n String[] snukes = br.readLine().trim().split(\" \");\n for (String sn : snukes)\n set.add(Integer.parseInt(sn));\n }",
"{\n br.readLine();\n String[] snukes = br.readLine().trim().split(\" \");\n for (String sn : snukes)\n set.add(Integer.parseInt(sn));\n }",
"br.readLine()",
"br.readLine",
"br",
"String[] snukes = br.readLine().trim().split(\" \");",
"snukes",
"br.readLine().trim().split(\" \")",
"br.readLine().trim().split",
"br.readLine().trim()",
"br.readLine().trim",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"for (String sn : snukes)\n set.add(Integer.parseInt(sn));",
"String sn",
"snukes",
"set.add(Integer.parseInt(sn));",
"set.add(Integer.parseInt(sn))",
"set.add",
"set",
"Integer.parseInt(sn)",
"Integer.parseInt",
"Integer",
"sn",
"System.out.println(N - set.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"N - set.size()",
"N",
"set.size()",
"set.size",
"set",
"String[] args",
"args"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
/**
* Created with IntelliJ IDEA.
* User: ngupta
* Date: 4/5/2020 AD
* Time: 23:41
*/
class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] NK = br.readLine().trim().split(" ");
int N = Integer.parseInt(NK[0]);
int K = Integer.parseInt(NK[1]);
Set<Integer> set = new HashSet<>();
for (int i = 0; i < K; i++) {
br.readLine();
String[] snukes = br.readLine().trim().split(" ");
for (String sn : snukes)
set.add(Integer.parseInt(sn));
}
System.out.println(N - set.size());
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
28,
13,
13,
30,
30,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
40,
4,
18,
13,
13,
40,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
127,
20
],
[
127,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
23,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
23,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
47,
48
],
[
23,
49
],
[
49,
50
],
[
49,
51
],
[
23,
52
],
[
52,
53
],
[
52,
54
],
[
23,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
75,
80
],
[
67,
81
],
[
81,
82
],
[
81,
83
],
[
81,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
23,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
93,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
106,
112
],
[
112,
113
],
[
23,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
23,
118
],
[
118,
119
],
[
119,
120
],
[
23,
121
],
[
121,
122
],
[
122,
123
],
[
21,
124
],
[
124,
125
],
[
0,
126
],
[
126,
127
],
[
126,
128
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.util.HashSet;\nimport java.util.Set;\nimport java.util.StringTokenizer;\n\npublic class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n Set<Integer> notTargetSet = new HashSet<>();\n\n int result = 0;\n \n for(int i = 0; i < K; i++) {\n String d = br.readLine();\n String[] d_array = br.readLine().split(\" \");\n\n for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }\n }\n\n for(int j = 1; j <= N; j++) {\n if(!notTargetSet.contains(j)) result++;\n }\n\n pw.print(result);\n br.close();\n pw.close();\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n Set<Integer> notTargetSet = new HashSet<>();\n\n int result = 0;\n \n for(int i = 0; i < K; i++) {\n String d = br.readLine();\n String[] d_array = br.readLine().split(\" \");\n\n for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }\n }\n\n for(int j = 1; j <= N; j++) {\n if(!notTargetSet.contains(j)) result++;\n }\n\n pw.print(result);\n br.close();\n pw.close();\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n Set<Integer> notTargetSet = new HashSet<>();\n\n int result = 0;\n \n for(int i = 0; i < K; i++) {\n String d = br.readLine();\n String[] d_array = br.readLine().split(\" \");\n\n for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }\n }\n\n for(int j = 1; j <= N; j++) {\n if(!notTargetSet.contains(j)) result++;\n }\n\n pw.print(result);\n br.close();\n pw.close();\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n Set<Integer> notTargetSet = new HashSet<>();\n\n int result = 0;\n \n for(int i = 0; i < K; i++) {\n String d = br.readLine();\n String[] d_array = br.readLine().split(\" \");\n\n for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }\n }\n\n for(int j = 1; j <= N; j++) {\n if(!notTargetSet.contains(j)) result++;\n }\n\n pw.print(result);\n br.close();\n pw.close();\n }",
"BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));",
"br",
"new BufferedReader(new java.io.InputStreamReader(System.in))",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"StringTokenizer st = new StringTokenizer(br.readLine());",
"st",
"new StringTokenizer(br.readLine())",
"int N = Integer.parseInt(st.nextToken());",
"N",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int K = Integer.parseInt(st.nextToken());",
"K",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"Set<Integer> notTargetSet = new HashSet<>();",
"notTargetSet",
"new HashSet<>()",
"int result = 0;",
"result",
"0",
"for(int i = 0; i < K; i++) {\n String d = br.readLine();\n String[] d_array = br.readLine().split(\" \");\n\n for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n String d = br.readLine();\n String[] d_array = br.readLine().split(\" \");\n\n for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }\n }",
"{\n String d = br.readLine();\n String[] d_array = br.readLine().split(\" \");\n\n for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }\n }",
"String d = br.readLine();",
"d",
"br.readLine()",
"br.readLine",
"br",
"String[] d_array = br.readLine().split(\" \");",
"d_array",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }",
"String str",
"d_array",
"{\n notTargetSet.add(Integer.parseInt(str));\n }",
"{\n notTargetSet.add(Integer.parseInt(str));\n }",
"notTargetSet.add(Integer.parseInt(str))",
"notTargetSet.add",
"notTargetSet",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"for(int j = 1; j <= N; j++) {\n if(!notTargetSet.contains(j)) result++;\n }",
"int j = 1;",
"int j = 1;",
"j",
"1",
"j <= N",
"j",
"N",
"j++",
"j++",
"j",
"{\n if(!notTargetSet.contains(j)) result++;\n }",
"{\n if(!notTargetSet.contains(j)) result++;\n }",
"if(!notTargetSet.contains(j)) result++;",
"!notTargetSet.contains(j)",
"notTargetSet.contains(j)",
"notTargetSet.contains",
"notTargetSet",
"j",
"result++",
"result",
"pw.print(result)",
"pw.print",
"pw",
"result",
"br.close()",
"br.close",
"br",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n Set<Integer> notTargetSet = new HashSet<>();\n\n int result = 0;\n \n for(int i = 0; i < K; i++) {\n String d = br.readLine();\n String[] d_array = br.readLine().split(\" \");\n\n for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }\n }\n\n for(int j = 1; j <= N; j++) {\n if(!notTargetSet.contains(j)) result++;\n }\n\n pw.print(result);\n br.close();\n pw.close();\n }\n}",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n\n Set<Integer> notTargetSet = new HashSet<>();\n\n int result = 0;\n \n for(int i = 0; i < K; i++) {\n String d = br.readLine();\n String[] d_array = br.readLine().split(\" \");\n\n for(String str : d_array) {\n notTargetSet.add(Integer.parseInt(str));\n }\n }\n\n for(int j = 1; j <= N; j++) {\n if(!notTargetSet.contains(j)) result++;\n }\n\n pw.print(result);\n br.close();\n pw.close();\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(System.out);
StringTokenizer st = new StringTokenizer(br.readLine());
int N = Integer.parseInt(st.nextToken());
int K = Integer.parseInt(st.nextToken());
Set<Integer> notTargetSet = new HashSet<>();
int result = 0;
for(int i = 0; i < K; i++) {
String d = br.readLine();
String[] d_array = br.readLine().split(" ");
for(String str : d_array) {
notTargetSet.add(Integer.parseInt(str));
}
}
for(int j = 1; j <= N; j++) {
if(!notTargetSet.contains(j)) result++;
}
pw.print(result);
br.close();
pw.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
18,
13,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
2,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
128,
20
],
[
128,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
23,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
32,
37
],
[
23,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
43,
45
],
[
23,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
23,
54
],
[
54,
55
],
[
54,
56
],
[
23,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
57,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
76,
77
],
[
69,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
80,
85
],
[
69,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
23,
108
],
[
108,
109
],
[
109,
110
],
[
23,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
23,
122
],
[
122,
123
],
[
123,
124
],
[
21,
125
],
[
125,
126
],
[
0,
127
],
[
127,
128
],
[
127,
129
]
] |
[
"import java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n\n String[] in = br.readLine().split(\" \");\n int n = Integer.parseInt(in[0]);\n int k = Integer.parseInt(in[1]);\n\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(br.readLine());\n in = br.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }\n }\n\n br.close();\n\n bw.write(String.valueOf(n - set.size()));\n\n bw.flush();\n\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.BufferedWriter;",
"BufferedWriter",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.OutputStreamWriter;",
"OutputStreamWriter",
"java.io",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"public class Main {\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n\n String[] in = br.readLine().split(\" \");\n int n = Integer.parseInt(in[0]);\n int k = Integer.parseInt(in[1]);\n\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(br.readLine());\n in = br.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }\n }\n\n br.close();\n\n bw.write(String.valueOf(n - set.size()));\n\n bw.flush();\n\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n\n String[] in = br.readLine().split(\" \");\n int n = Integer.parseInt(in[0]);\n int k = Integer.parseInt(in[1]);\n\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(br.readLine());\n in = br.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }\n }\n\n br.close();\n\n bw.write(String.valueOf(n - set.size()));\n\n bw.flush();\n\n }",
"main",
"{\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n\n String[] in = br.readLine().split(\" \");\n int n = Integer.parseInt(in[0]);\n int k = Integer.parseInt(in[1]);\n\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(br.readLine());\n in = br.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }\n }\n\n br.close();\n\n bw.write(String.valueOf(n - set.size()));\n\n bw.flush();\n\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));",
"bw",
"new BufferedWriter(new OutputStreamWriter(System.out))",
"String[] in = br.readLine().split(\" \");",
"in",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int n = Integer.parseInt(in[0]);",
"n",
"Integer.parseInt(in[0])",
"Integer.parseInt",
"Integer",
"in[0]",
"in",
"0",
"int k = Integer.parseInt(in[1]);",
"k",
"Integer.parseInt(in[1])",
"Integer.parseInt",
"Integer",
"in[1]",
"in",
"1",
"Set<Integer> set = new HashSet<>();",
"set",
"new HashSet<>()",
"for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(br.readLine());\n in = br.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d = Integer.parseInt(br.readLine());\n in = br.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }\n }",
"{\n int d = Integer.parseInt(br.readLine());\n in = br.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }\n }",
"int d = Integer.parseInt(br.readLine());",
"d",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"in = br.readLine().split(\" \")",
"in",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n set.add(Integer.parseInt(in[j]));\n }",
"{\n set.add(Integer.parseInt(in[j]));\n }",
"set.add(Integer.parseInt(in[j]))",
"set.add",
"set",
"Integer.parseInt(in[j])",
"Integer.parseInt",
"Integer",
"in[j]",
"in",
"j",
"br.close()",
"br.close",
"br",
"bw.write(String.valueOf(n - set.size()))",
"bw.write",
"bw",
"String.valueOf(n - set.size())",
"String.valueOf",
"String",
"n - set.size()",
"n",
"set.size()",
"set.size",
"set",
"bw.flush()",
"bw.flush",
"bw",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n\n String[] in = br.readLine().split(\" \");\n int n = Integer.parseInt(in[0]);\n int k = Integer.parseInt(in[1]);\n\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(br.readLine());\n in = br.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }\n }\n\n br.close();\n\n bw.write(String.valueOf(n - set.size()));\n\n bw.flush();\n\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n\n String[] in = br.readLine().split(\" \");\n int n = Integer.parseInt(in[0]);\n int k = Integer.parseInt(in[1]);\n\n Set<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(br.readLine());\n in = br.readLine().split(\" \");\n for (int j = 0; j < d; j++) {\n set.add(Integer.parseInt(in[j]));\n }\n }\n\n br.close();\n\n bw.write(String.valueOf(n - set.size()));\n\n bw.flush();\n\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.HashSet;
import java.util.Set;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
String[] in = br.readLine().split(" ");
int n = Integer.parseInt(in[0]);
int k = Integer.parseInt(in[1]);
Set<Integer> set = new HashSet<>();
for (int i = 0; i < k; i++) {
int d = Integer.parseInt(br.readLine());
in = br.readLine().split(" ");
for (int j = 0; j < d; j++) {
set.add(Integer.parseInt(in[j]));
}
}
br.close();
bw.write(String.valueOf(n - set.size()));
bw.flush();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
13,
17,
41,
13,
4,
18,
13,
11,
1,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
2,
4,
18,
13,
17,
17,
41,
13,
17,
28,
13,
13,
30,
30,
14,
40,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
84,
5
],
[
84,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
15,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
19,
20
],
[
18,
21
],
[
18,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
34,
35
],
[
28,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
56,
60
],
[
53,
61
],
[
8,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
65,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner scan = new Scanner(System.in);\n boolean[] aaaaa = new boolean[scan.nextInt()];\n Arrays.fill(aaaaa,false);\n int k = scan.nextInt();\n for(;k>0;k--){\n int d = scan.nextInt();\n for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }\n }\n int aa = 0;\n for(boolean b:aaaaa){\n if(!b)aa++;\n }\n System.out.println(aa);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scan = new Scanner(System.in);\n boolean[] aaaaa = new boolean[scan.nextInt()];\n Arrays.fill(aaaaa,false);\n int k = scan.nextInt();\n for(;k>0;k--){\n int d = scan.nextInt();\n for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }\n }\n int aa = 0;\n for(boolean b:aaaaa){\n if(!b)aa++;\n }\n System.out.println(aa);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner scan = new Scanner(System.in);\n boolean[] aaaaa = new boolean[scan.nextInt()];\n Arrays.fill(aaaaa,false);\n int k = scan.nextInt();\n for(;k>0;k--){\n int d = scan.nextInt();\n for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }\n }\n int aa = 0;\n for(boolean b:aaaaa){\n if(!b)aa++;\n }\n System.out.println(aa);\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n boolean[] aaaaa = new boolean[scan.nextInt()];\n Arrays.fill(aaaaa,false);\n int k = scan.nextInt();\n for(;k>0;k--){\n int d = scan.nextInt();\n for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }\n }\n int aa = 0;\n for(boolean b:aaaaa){\n if(!b)aa++;\n }\n System.out.println(aa);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"boolean[] aaaaa = new boolean[scan.nextInt()];",
"aaaaa",
"new boolean[scan.nextInt()]",
"scan.nextInt()",
"scan.nextInt",
"scan",
"Arrays.fill(aaaaa,false)",
"Arrays.fill",
"Arrays",
"aaaaa",
"false",
"int k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(;k>0;k--){\n int d = scan.nextInt();\n for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }\n }",
";",
"k>0",
"k",
"0",
"k--",
"k--",
"k",
"{\n int d = scan.nextInt();\n for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }\n }",
"{\n int d = scan.nextInt();\n for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }\n }",
"int d = scan.nextInt();",
"d",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }",
";",
"d>0",
"d",
"0",
"d--",
"d--",
"d",
"{\n aaaaa[scan.nextInt()-1] = true;\n }",
"{\n aaaaa[scan.nextInt()-1] = true;\n }",
"aaaaa[scan.nextInt()-1] = true",
"aaaaa[scan.nextInt()-1]",
"aaaaa",
"scan.nextInt()-1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"true",
"int aa = 0;",
"aa",
"0",
"for(boolean b:aaaaa){\n if(!b)aa++;\n }",
"boolean b",
"aaaaa",
"{\n if(!b)aa++;\n }",
"{\n if(!b)aa++;\n }",
"if(!b)aa++;",
"!b",
"b",
"aa++",
"aa",
"System.out.println(aa)",
"System.out.println",
"System.out",
"System",
"System.out",
"aa",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scan = new Scanner(System.in);\n boolean[] aaaaa = new boolean[scan.nextInt()];\n Arrays.fill(aaaaa,false);\n int k = scan.nextInt();\n for(;k>0;k--){\n int d = scan.nextInt();\n for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }\n }\n int aa = 0;\n for(boolean b:aaaaa){\n if(!b)aa++;\n }\n System.out.println(aa);\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scan = new Scanner(System.in);\n boolean[] aaaaa = new boolean[scan.nextInt()];\n Arrays.fill(aaaaa,false);\n int k = scan.nextInt();\n for(;k>0;k--){\n int d = scan.nextInt();\n for(;d>0;d--){\n aaaaa[scan.nextInt()-1] = true;\n }\n }\n int aa = 0;\n for(boolean b:aaaaa){\n if(!b)aa++;\n }\n System.out.println(aa);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scan = new Scanner(System.in);
boolean[] aaaaa = new boolean[scan.nextInt()];
Arrays.fill(aaaaa,false);
int k = scan.nextInt();
for(;k>0;k--){
int d = scan.nextInt();
for(;d>0;d--){
aaaaa[scan.nextInt()-1] = true;
}
}
int aa = 0;
for(boolean b:aaaaa){
if(!b)aa++;
}
System.out.println(aa);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
78,
8
],
[
78,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
11,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
9,
75
],
[
75,
76
],
[
0,
77
],
[
77,
78
],
[
77,
79
]
] |
[
"import java.util.HashSet;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scn= new Scanner(System.in);\n\t\tint n =scn.nextInt();\n\t\tint k =scn.nextInt();\n\t\t HashSet<Integer> hs =new HashSet<>();\n\t\t for(int i=0;i<k;i++){\n\t\t\t int d =scn.nextInt();\n\t\t\t for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }\n\t\t }\n\t\t\n System.out.println(n-hs.size());\n\t}\n\n}",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scn= new Scanner(System.in);\n\t\tint n =scn.nextInt();\n\t\tint k =scn.nextInt();\n\t\t HashSet<Integer> hs =new HashSet<>();\n\t\t for(int i=0;i<k;i++){\n\t\t\t int d =scn.nextInt();\n\t\t\t for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }\n\t\t }\n\t\t\n System.out.println(n-hs.size());\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scn= new Scanner(System.in);\n\t\tint n =scn.nextInt();\n\t\tint k =scn.nextInt();\n\t\t HashSet<Integer> hs =new HashSet<>();\n\t\t for(int i=0;i<k;i++){\n\t\t\t int d =scn.nextInt();\n\t\t\t for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }\n\t\t }\n\t\t\n System.out.println(n-hs.size());\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tScanner scn= new Scanner(System.in);\n\t\tint n =scn.nextInt();\n\t\tint k =scn.nextInt();\n\t\t HashSet<Integer> hs =new HashSet<>();\n\t\t for(int i=0;i<k;i++){\n\t\t\t int d =scn.nextInt();\n\t\t\t for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }\n\t\t }\n\t\t\n System.out.println(n-hs.size());\n\t}",
"Scanner scn= new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int n =scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int k =scn.nextInt();",
"k",
"scn.nextInt()",
"scn.nextInt",
"scn",
"HashSet<Integer> hs =new HashSet<>();",
"hs",
"new HashSet<>()",
"for(int i=0;i<k;i++){\n\t\t\t int d =scn.nextInt();\n\t\t\t for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }\n\t\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\t int d =scn.nextInt();\n\t\t\t for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }\n\t\t }",
"{\n\t\t\t int d =scn.nextInt();\n\t\t\t for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }\n\t\t }",
"int d =scn.nextInt();",
"d",
"scn.nextInt()",
"scn.nextInt",
"scn",
"for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }",
"{\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }",
"hs.add(scn.nextInt())",
"hs.add",
"hs",
"scn.nextInt()",
"scn.nextInt",
"scn",
"System.out.println(n-hs.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"n-hs.size()",
"n",
"hs.size()",
"hs.size",
"hs",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scn= new Scanner(System.in);\n\t\tint n =scn.nextInt();\n\t\tint k =scn.nextInt();\n\t\t HashSet<Integer> hs =new HashSet<>();\n\t\t for(int i=0;i<k;i++){\n\t\t\t int d =scn.nextInt();\n\t\t\t for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }\n\t\t }\n\t\t\n System.out.println(n-hs.size());\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner scn= new Scanner(System.in);\n\t\tint n =scn.nextInt();\n\t\tint k =scn.nextInt();\n\t\t HashSet<Integer> hs =new HashSet<>();\n\t\t for(int i=0;i<k;i++){\n\t\t\t int d =scn.nextInt();\n\t\t\t for(int j=0;j<d;j++){\n\t\t\t\t hs.add(scn.nextInt());\n\t\t\t }\n\t\t }\n\t\t\n System.out.println(n-hs.size());\n\t}\n\n}",
"Main"
] |
import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scn= new Scanner(System.in);
int n =scn.nextInt();
int k =scn.nextInt();
HashSet<Integer> hs =new HashSet<>();
for(int i=0;i<k;i++){
int d =scn.nextInt();
for(int j=0;j<d;j++){
hs.add(scn.nextInt());
}
}
System.out.println(n-hs.size());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
18,
13,
2,
13,
17,
2,
18,
13,
2,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
0,
13,
2,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
122,
5
],
[
122,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
55,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
81,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
88,
99
],
[
100,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
101,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
8,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
6,
119
],
[
119,
120
],
[
0,
121
],
[
121,
122
],
[
121,
123
]
] |
[
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int N =sc.nextInt();\n int K=sc.nextInt();\n int m[] =new int[N];\n int d[] =new int[K];\n int n;int x=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}\n }\n for(int l=0;l<N;l++){\n if(m[l]==0){x=x+1;}}\n System.out.println(x);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int N =sc.nextInt();\n int K=sc.nextInt();\n int m[] =new int[N];\n int d[] =new int[K];\n int n;int x=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}\n }\n for(int l=0;l<N;l++){\n if(m[l]==0){x=x+1;}}\n System.out.println(x);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int N =sc.nextInt();\n int K=sc.nextInt();\n int m[] =new int[N];\n int d[] =new int[K];\n int n;int x=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}\n }\n for(int l=0;l<N;l++){\n if(m[l]==0){x=x+1;}}\n System.out.println(x);\n }",
"main",
"{\n Scanner sc =new Scanner(System.in);\n int N =sc.nextInt();\n int K=sc.nextInt();\n int m[] =new int[N];\n int d[] =new int[K];\n int n;int x=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}\n }\n for(int l=0;l<N;l++){\n if(m[l]==0){x=x+1;}}\n System.out.println(x);\n }",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N =sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K=sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m[] =new int[N];",
"m",
"new int[N]",
"N",
"int d[] =new int[K];",
"d",
"new int[K]",
"K",
"int n;",
"n",
"int x=0;",
"x",
"0",
"for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}\n }",
"{\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}\n }",
"d[i]=sc.nextInt()",
"d[i]",
"d",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d[i]",
"j",
"d[i]",
"d",
"i",
"j++",
"j++",
"j",
"{\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}",
"{\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}",
"n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"m[n-1]=m[n-1]+1",
"m[n-1]",
"m",
"n-1",
"n",
"1",
"m[n-1]+1",
"m[n-1]",
"m",
"n-1",
"n",
"1",
"1",
"for(int l=0;l<N;l++){\n if(m[l]==0){x=x+1;}}",
"int l=0;",
"int l=0;",
"l",
"0",
"l<N",
"l",
"N",
"l++",
"l++",
"l",
"{\n if(m[l]==0){x=x+1;}}",
"{\n if(m[l]==0){x=x+1;}}",
"if(m[l]==0){x=x+1;}",
"m[l]==0",
"m[l]",
"m",
"l",
"0",
"{x=x+1;}",
"x=x+1",
"x",
"x+1",
"x",
"1",
"System.out.println(x)",
"System.out.println",
"System.out",
"System",
"System.out",
"x",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int N =sc.nextInt();\n int K=sc.nextInt();\n int m[] =new int[N];\n int d[] =new int[K];\n int n;int x=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}\n }\n for(int l=0;l<N;l++){\n if(m[l]==0){x=x+1;}}\n System.out.println(x);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int N =sc.nextInt();\n int K=sc.nextInt();\n int m[] =new int[N];\n int d[] =new int[K];\n int n;int x=0;\n for(int i=0;i<K;i++){\n d[i]=sc.nextInt();\n for(int j=0;j<d[i];j++){\n n=sc.nextInt();\n m[n-1]=m[n-1]+1;}\n }\n for(int l=0;l<N;l++){\n if(m[l]==0){x=x+1;}}\n System.out.println(x);\n }\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
int N =sc.nextInt();
int K=sc.nextInt();
int m[] =new int[N];
int d[] =new int[K];
int n;int x=0;
for(int i=0;i<K;i++){
d[i]=sc.nextInt();
for(int j=0;j<d[i];j++){
n=sc.nextInt();
m[n-1]=m[n-1]+1;}
}
for(int l=0;l<N;l++){
if(m[l]==0){x=x+1;}}
System.out.println(x);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
0,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
28,
13,
13,
30,
14,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
130,
11
],
[
130,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
26,
27
],
[
27,
28
],
[
14,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
35,
36
],
[
14,
37
],
[
37,
38
],
[
37,
39
],
[
14,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
14,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
68,
77
],
[
77,
78
],
[
77,
79
],
[
68,
81
],
[
81,
82
],
[
81,
83
],
[
68,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
84,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
103,
104
],
[
104,
105
],
[
68,
106
],
[
106,
107
],
[
106,
108
],
[
106,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
110,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
14,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
125,
126
],
[
12,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
] |
[
"/*\nIf you want to aim high, aim high\nDon't let that studying and grades consume you\nJust live life young\n******************************\nIf I'm the sun, you're the moon\nBecause when I go up, you go down\n*******************************\nI'm working for the day I will surpass you\nhttps://www.a2oj.com/Ladder16.html\n*/\nimport java.util.*;\nimport java.io.*;\nimport java.math.*;\n\n public class Main\n {\n public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n HashSet<Integer> set = new HashSet<Integer>();\n for(int i=1; i <= N; i++)\n set.add(i);\n for(int qw=0; qw < K; qw++)\n {\n int d = Integer.parseInt(infile.readLine());\n int[] arr = new int[d];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n for(int x: arr)\n if(set.contains(x))\n set.remove(x);\n }\n System.out.println(set.size());\n }\n }",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main\n {\n public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n HashSet<Integer> set = new HashSet<Integer>();\n for(int i=1; i <= N; i++)\n set.add(i);\n for(int qw=0; qw < K; qw++)\n {\n int d = Integer.parseInt(infile.readLine());\n int[] arr = new int[d];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n for(int x: arr)\n if(set.contains(x))\n set.remove(x);\n }\n System.out.println(set.size());\n }\n }",
"Main",
"public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n HashSet<Integer> set = new HashSet<Integer>();\n for(int i=1; i <= N; i++)\n set.add(i);\n for(int qw=0; qw < K; qw++)\n {\n int d = Integer.parseInt(infile.readLine());\n int[] arr = new int[d];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n for(int x: arr)\n if(set.contains(x))\n set.remove(x);\n }\n System.out.println(set.size());\n }",
"main",
"{\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n HashSet<Integer> set = new HashSet<Integer>();\n for(int i=1; i <= N; i++)\n set.add(i);\n for(int qw=0; qw < K; qw++)\n {\n int d = Integer.parseInt(infile.readLine());\n int[] arr = new int[d];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n for(int x: arr)\n if(set.contains(x))\n set.remove(x);\n }\n System.out.println(set.size());\n }",
"BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));",
"infile",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st = new StringTokenizer(infile.readLine());",
"st",
"new StringTokenizer(infile.readLine())",
"int N = Integer.parseInt(st.nextToken());",
"N",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int K = Integer.parseInt(st.nextToken());",
"K",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"HashSet<Integer> set = new HashSet<Integer>();",
"set",
"new HashSet<Integer>()",
"for(int i=1; i <= N; i++)\n set.add(i);",
"int i=1;",
"int i=1;",
"i",
"1",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"set.add(i);",
"set.add(i)",
"set.add",
"set",
"i",
"for(int qw=0; qw < K; qw++)\n {\n int d = Integer.parseInt(infile.readLine());\n int[] arr = new int[d];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n for(int x: arr)\n if(set.contains(x))\n set.remove(x);\n }",
"int qw=0;",
"int qw=0;",
"qw",
"0",
"qw < K",
"qw",
"K",
"qw++",
"qw++",
"qw",
"{\n int d = Integer.parseInt(infile.readLine());\n int[] arr = new int[d];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n for(int x: arr)\n if(set.contains(x))\n set.remove(x);\n }",
"{\n int d = Integer.parseInt(infile.readLine());\n int[] arr = new int[d];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n for(int x: arr)\n if(set.contains(x))\n set.remove(x);\n }",
"int d = Integer.parseInt(infile.readLine());",
"d",
"Integer.parseInt(infile.readLine())",
"Integer.parseInt",
"Integer",
"infile.readLine()",
"infile.readLine",
"infile",
"int[] arr = new int[d];",
"arr",
"new int[d]",
"d",
"st = new StringTokenizer(infile.readLine())",
"st",
"new StringTokenizer(infile.readLine())",
"for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());",
"int i=0;",
"int i=0;",
"i",
"0",
"i < d",
"i",
"d",
"i++",
"i++",
"i",
"arr[i] = Integer.parseInt(st.nextToken());",
"arr[i] = Integer.parseInt(st.nextToken())",
"arr[i]",
"arr",
"i",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"for(int x: arr)\n if(set.contains(x))\n set.remove(x);",
"int x",
"arr",
"if(set.contains(x))\n set.remove(x);",
"if(set.contains(x))\n set.remove(x);",
"set.contains(x)",
"set.contains",
"set",
"x",
"set.remove(x)",
"set.remove",
"set",
"x",
"System.out.println(set.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"set.size()",
"set.size",
"set",
"String omkar[]",
"omkar",
"public class Main\n {\n public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n HashSet<Integer> set = new HashSet<Integer>();\n for(int i=1; i <= N; i++)\n set.add(i);\n for(int qw=0; qw < K; qw++)\n {\n int d = Integer.parseInt(infile.readLine());\n int[] arr = new int[d];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n for(int x: arr)\n if(set.contains(x))\n set.remove(x);\n }\n System.out.println(set.size());\n }\n }",
"public class Main\n {\n public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int K = Integer.parseInt(st.nextToken());\n HashSet<Integer> set = new HashSet<Integer>();\n for(int i=1; i <= N; i++)\n set.add(i);\n for(int qw=0; qw < K; qw++)\n {\n int d = Integer.parseInt(infile.readLine());\n int[] arr = new int[d];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < d; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n for(int x: arr)\n if(set.contains(x))\n set.remove(x);\n }\n System.out.println(set.size());\n }\n }",
"Main"
] |
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
I'm working for the day I will surpass you
https://www.a2oj.com/Ladder16.html
*/
import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
public static void main(String omkar[]) throws Exception
{
BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(infile.readLine());
int N = Integer.parseInt(st.nextToken());
int K = Integer.parseInt(st.nextToken());
HashSet<Integer> set = new HashSet<Integer>();
for(int i=1; i <= N; i++)
set.add(i);
for(int qw=0; qw < K; qw++)
{
int d = Integer.parseInt(infile.readLine());
int[] arr = new int[d];
st = new StringTokenizer(infile.readLine());
for(int i=0; i < d; i++)
arr[i] = Integer.parseInt(st.nextToken());
for(int x: arr)
if(set.contains(x))
set.remove(x);
}
System.out.println(set.size());
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
13,
0,
13,
4,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
13,
4,
13,
2,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
151,
5
],
[
151,
6
],
[
6,
7
],
[
6,
8
],
[
151,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
14,
15
],
[
11,
16
],
[
16,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
41,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
11,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
9,
71
],
[
71,
72
],
[
151,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
81,
82
],
[
151,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
91,
92
],
[
151,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
151,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
151,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
118,
119
],
[
151,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
123,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
120,
137
],
[
137,
138
],
[
151,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
142,
147
],
[
139,
148
],
[
148,
149
],
[
0,
150
],
[
150,
151
],
[
150,
152
]
] |
[
"import java.util.*;\npublic class Main{\n public static Scanner scan = new Scanner(System.in);\n public static void main(String[]args){\n int n,k;\n int di;\n\n Set<Integer> h_set = new HashSet<Integer>();\n\n n=nextInt();\n k=nextInt();\n for(int i=0;i<k;i++){\n di =nextInt();\n for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }\n }\n print(n-h_set.size());\n }\n\n\n\n public static int nextInt(){\n return Integer.parseInt(scan.next());\n }\n public static long nextLong(){\n return Long.parseLong(scan.next());\n }\n public static String next(){\n return scan.next();\n }\n public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }\n public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }\n\n //Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n public static void print(Object a){\n System.out.println(a);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static Scanner scan = new Scanner(System.in);\n public static void main(String[]args){\n int n,k;\n int di;\n\n Set<Integer> h_set = new HashSet<Integer>();\n\n n=nextInt();\n k=nextInt();\n for(int i=0;i<k;i++){\n di =nextInt();\n for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }\n }\n print(n-h_set.size());\n }\n\n\n\n public static int nextInt(){\n return Integer.parseInt(scan.next());\n }\n public static long nextLong(){\n return Long.parseLong(scan.next());\n }\n public static String next(){\n return scan.next();\n }\n public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }\n public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }\n\n //Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n public static void print(Object a){\n System.out.println(a);\n }\n}",
"Main",
"public static Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"public static void main(String[]args){\n int n,k;\n int di;\n\n Set<Integer> h_set = new HashSet<Integer>();\n\n n=nextInt();\n k=nextInt();\n for(int i=0;i<k;i++){\n di =nextInt();\n for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }\n }\n print(n-h_set.size());\n }",
"main",
"{\n int n,k;\n int di;\n\n Set<Integer> h_set = new HashSet<Integer>();\n\n n=nextInt();\n k=nextInt();\n for(int i=0;i<k;i++){\n di =nextInt();\n for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }\n }\n print(n-h_set.size());\n }",
"int n",
"n",
"k;",
"k",
"int di;",
"di",
"Set<Integer> h_set = new HashSet<Integer>();",
"h_set",
"new HashSet<Integer>()",
"n=nextInt()",
"n",
"nextInt()",
"nextInt",
"k=nextInt()",
"k",
"nextInt()",
"nextInt",
"for(int i=0;i<k;i++){\n di =nextInt();\n for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n di =nextInt();\n for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }\n }",
"{\n di =nextInt();\n for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }\n }",
"di =nextInt()",
"di",
"nextInt()",
"nextInt",
"for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j<di",
"j",
"di",
"j++",
"j++",
"j",
"{\n h_set.add(nextInt());\n }",
"{\n h_set.add(nextInt());\n }",
"h_set.add(nextInt())",
"h_set.add",
"h_set",
"nextInt()",
"nextInt",
"print(n-h_set.size())",
"print",
"n-h_set.size()",
"n",
"h_set.size()",
"h_set.size",
"h_set",
"String[]args",
"args",
"public static int nextInt(){\n return Integer.parseInt(scan.next());\n }",
"nextInt",
"{\n return Integer.parseInt(scan.next());\n }",
"return Integer.parseInt(scan.next());",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"public static long nextLong(){\n return Long.parseLong(scan.next());\n }",
"nextLong",
"{\n return Long.parseLong(scan.next());\n }",
"return Long.parseLong(scan.next());",
"Long.parseLong(scan.next())",
"Long.parseLong",
"Long",
"scan.next()",
"scan.next",
"scan",
"public static String next(){\n return scan.next();\n }",
"next",
"{\n return scan.next();\n }",
"return scan.next();",
"scan.next()",
"scan.next",
"scan",
"public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }",
"nextDouble",
"{\n return Double.parseDouble(scan.next());\n }",
"return Double.parseDouble(scan.next());",
"Double.parseDouble(scan.next())",
"Double.parseDouble",
"Double",
"scan.next()",
"scan.next",
"scan",
"public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }",
"nextFloat",
"{\n return Float.parseFloat(scan.next());\n }",
"return Float.parseFloat(scan.next());",
"Float.parseFloat(scan.next())",
"Float.parseFloat",
"Float",
"scan.next()",
"scan.next",
"scan",
"//Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"yesNo",
"{\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");",
"flag",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"boolean flag",
"flag",
"public static void print(Object a){\n System.out.println(a);\n }",
"print",
"{\n System.out.println(a);\n }",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"Object a",
"a",
"public class Main{\n public static Scanner scan = new Scanner(System.in);\n public static void main(String[]args){\n int n,k;\n int di;\n\n Set<Integer> h_set = new HashSet<Integer>();\n\n n=nextInt();\n k=nextInt();\n for(int i=0;i<k;i++){\n di =nextInt();\n for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }\n }\n print(n-h_set.size());\n }\n\n\n\n public static int nextInt(){\n return Integer.parseInt(scan.next());\n }\n public static long nextLong(){\n return Long.parseLong(scan.next());\n }\n public static String next(){\n return scan.next();\n }\n public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }\n public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }\n\n //Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n public static void print(Object a){\n System.out.println(a);\n }\n}",
"public class Main{\n public static Scanner scan = new Scanner(System.in);\n public static void main(String[]args){\n int n,k;\n int di;\n\n Set<Integer> h_set = new HashSet<Integer>();\n\n n=nextInt();\n k=nextInt();\n for(int i=0;i<k;i++){\n di =nextInt();\n for(int j = 0;j<di;j++){\n h_set.add(nextInt());\n }\n }\n print(n-h_set.size());\n }\n\n\n\n public static int nextInt(){\n return Integer.parseInt(scan.next());\n }\n public static long nextLong(){\n return Long.parseLong(scan.next());\n }\n public static String next(){\n return scan.next();\n }\n public static double nextDouble(){\n return Double.parseDouble(scan.next());\n }\n public static float nextFloat(){\n return Float.parseFloat(scan.next());\n }\n\n //Yes or No\n public static void yesNo(boolean flag){\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n public static void print(Object a){\n System.out.println(a);\n }\n}",
"Main"
] |
import java.util.*;
public class Main{
public static Scanner scan = new Scanner(System.in);
public static void main(String[]args){
int n,k;
int di;
Set<Integer> h_set = new HashSet<Integer>();
n=nextInt();
k=nextInt();
for(int i=0;i<k;i++){
di =nextInt();
for(int j = 0;j<di;j++){
h_set.add(nextInt());
}
}
print(n-h_set.size());
}
public static int nextInt(){
return Integer.parseInt(scan.next());
}
public static long nextLong(){
return Long.parseLong(scan.next());
}
public static String next(){
return scan.next();
}
public static double nextDouble(){
return Double.parseDouble(scan.next());
}
public static float nextFloat(){
return Float.parseFloat(scan.next());
}
//Yes or No
public static void yesNo(boolean flag){
if(flag) System.out.println("Yes");
else System.out.println("No");
}
public static void print(Object a){
System.out.println(a);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
4,
18,
13,
18,
13,
13,
17,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
18,
13,
13,
30,
0,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
19,
24
],
[
13,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
30,
31
],
[
30,
32
],
[
13,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
38,
40
],
[
13,
41
],
[
41,
42
],
[
41,
43
],
[
13,
45
],
[
45,
46
],
[
45,
47
],
[
13,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
67,
68
],
[
60,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
71,
76
],
[
60,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
77,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
93,
100
],
[
90,
101
],
[
13,
102
],
[
102,
103
],
[
102,
104
],
[
13,
105
],
[
105,
106
],
[
105,
107
],
[
13,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
108,
118
],
[
118,
119
],
[
119,
120
],
[
108,
121
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
126,
128
],
[
123,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
132,
134
],
[
13,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
135,
145
],
[
145,
146
],
[
146,
147
],
[
135,
148
],
[
149,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
153,
155
],
[
150,
156
],
[
156,
157
],
[
157,
158
],
[
13,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
159,
164
],
[
9,
165
],
[
165,
166
]
] |
[
"import java.io.*;\nimport java.util.*;\n\nclass Main{\n public static void main(String args[])throws IOException{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n\n int N = Integer.parseInt(input[0]);\n int K = Integer.parseInt(input[1]);\n\n int[] result = new int[N];\n int d = 0;\n\n for(int i = 0; i < K; i++){\n d = Integer.parseInt(br.readLine());\n String[] tmp = br.readLine().split(\" \");\n \n for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }\n }\n\n int min = 0;\n int count = 0;\n\n for(int i = 0; i < result.length; i++){\n if(min > result[i]){\n min = result[i];\n }\n }\n\n\n for(int i = 0; i < result.length; i++){\n if(min == result[i]){\n count++;\n }\n }\n\n System.out.println(count);\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String args[])throws IOException{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n\n int N = Integer.parseInt(input[0]);\n int K = Integer.parseInt(input[1]);\n\n int[] result = new int[N];\n int d = 0;\n\n for(int i = 0; i < K; i++){\n d = Integer.parseInt(br.readLine());\n String[] tmp = br.readLine().split(\" \");\n \n for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }\n }\n\n int min = 0;\n int count = 0;\n\n for(int i = 0; i < result.length; i++){\n if(min > result[i]){\n min = result[i];\n }\n }\n\n\n for(int i = 0; i < result.length; i++){\n if(min == result[i]){\n count++;\n }\n }\n\n System.out.println(count);\n }\n }\n}",
"Main",
"public static void main(String args[])throws IOException{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n\n int N = Integer.parseInt(input[0]);\n int K = Integer.parseInt(input[1]);\n\n int[] result = new int[N];\n int d = 0;\n\n for(int i = 0; i < K; i++){\n d = Integer.parseInt(br.readLine());\n String[] tmp = br.readLine().split(\" \");\n \n for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }\n }\n\n int min = 0;\n int count = 0;\n\n for(int i = 0; i < result.length; i++){\n if(min > result[i]){\n min = result[i];\n }\n }\n\n\n for(int i = 0; i < result.length; i++){\n if(min == result[i]){\n count++;\n }\n }\n\n System.out.println(count);\n }\n }",
"main",
"{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n\n int N = Integer.parseInt(input[0]);\n int K = Integer.parseInt(input[1]);\n\n int[] result = new int[N];\n int d = 0;\n\n for(int i = 0; i < K; i++){\n d = Integer.parseInt(br.readLine());\n String[] tmp = br.readLine().split(\" \");\n \n for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }\n }\n\n int min = 0;\n int count = 0;\n\n for(int i = 0; i < result.length; i++){\n if(min > result[i]){\n min = result[i];\n }\n }\n\n\n for(int i = 0; i < result.length; i++){\n if(min == result[i]){\n count++;\n }\n }\n\n System.out.println(count);\n }\n }",
"try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n\n int N = Integer.parseInt(input[0]);\n int K = Integer.parseInt(input[1]);\n\n int[] result = new int[N];\n int d = 0;\n\n for(int i = 0; i < K; i++){\n d = Integer.parseInt(br.readLine());\n String[] tmp = br.readLine().split(\" \");\n \n for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }\n }\n\n int min = 0;\n int count = 0;\n\n for(int i = 0; i < result.length; i++){\n if(min > result[i]){\n min = result[i];\n }\n }\n\n\n for(int i = 0; i < result.length; i++){\n if(min == result[i]){\n count++;\n }\n }\n\n System.out.println(count);\n }",
"{\n String[] input = br.readLine().split(\" \");\n\n int N = Integer.parseInt(input[0]);\n int K = Integer.parseInt(input[1]);\n\n int[] result = new int[N];\n int d = 0;\n\n for(int i = 0; i < K; i++){\n d = Integer.parseInt(br.readLine());\n String[] tmp = br.readLine().split(\" \");\n \n for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }\n }\n\n int min = 0;\n int count = 0;\n\n for(int i = 0; i < result.length; i++){\n if(min > result[i]){\n min = result[i];\n }\n }\n\n\n for(int i = 0; i < result.length; i++){\n if(min == result[i]){\n count++;\n }\n }\n\n System.out.println(count);\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"String[] input = br.readLine().split(\" \");",
"input",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int N = Integer.parseInt(input[0]);",
"N",
"Integer.parseInt(input[0])",
"Integer.parseInt",
"Integer",
"input[0]",
"input",
"0",
"int K = Integer.parseInt(input[1]);",
"K",
"Integer.parseInt(input[1])",
"Integer.parseInt",
"Integer",
"input[1]",
"input",
"1",
"int[] result = new int[N];",
"result",
"new int[N]",
"N",
"int d = 0;",
"d",
"0",
"for(int i = 0; i < K; i++){\n d = Integer.parseInt(br.readLine());\n String[] tmp = br.readLine().split(\" \");\n \n for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n d = Integer.parseInt(br.readLine());\n String[] tmp = br.readLine().split(\" \");\n \n for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }\n }",
"{\n d = Integer.parseInt(br.readLine());\n String[] tmp = br.readLine().split(\" \");\n \n for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }\n }",
"d = Integer.parseInt(br.readLine())",
"d",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"String[] tmp = br.readLine().split(\" \");",
"tmp",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"for(int j = 0; j < d; j++){\n result[Integer.parseInt(tmp[j])-1] += 1;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n result[Integer.parseInt(tmp[j])-1] += 1;\n }",
"{\n result[Integer.parseInt(tmp[j])-1] += 1;\n }",
"result[Integer.parseInt(tmp[j])-1] += 1",
"result[Integer.parseInt(tmp[j])-1]",
"result",
"Integer.parseInt(tmp[j])-1",
"Integer.parseInt(tmp[j])",
"Integer.parseInt",
"Integer",
"tmp[j]",
"tmp",
"j",
"1",
"1",
"int min = 0;",
"min",
"0",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < result.length; i++){\n if(min > result[i]){\n min = result[i];\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < result.length",
"i",
"result.length",
"result",
"result.length",
"i++",
"i++",
"i",
"{\n if(min > result[i]){\n min = result[i];\n }\n }",
"{\n if(min > result[i]){\n min = result[i];\n }\n }",
"if(min > result[i]){\n min = result[i];\n }",
"min > result[i]",
"min",
"result[i]",
"result",
"i",
"{\n min = result[i];\n }",
"min = result[i]",
"min",
"result[i]",
"result",
"i",
"for(int i = 0; i < result.length; i++){\n if(min == result[i]){\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < result.length",
"i",
"result.length",
"result",
"result.length",
"i++",
"i++",
"i",
"{\n if(min == result[i]){\n count++;\n }\n }",
"{\n if(min == result[i]){\n count++;\n }\n }",
"if(min == result[i]){\n count++;\n }",
"min == result[i]",
"min",
"result[i]",
"result",
"i",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String args[]",
"args"
] |
import java.io.*;
import java.util.*;
class Main{
public static void main(String args[])throws IOException{
try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
String[] input = br.readLine().split(" ");
int N = Integer.parseInt(input[0]);
int K = Integer.parseInt(input[1]);
int[] result = new int[N];
int d = 0;
for(int i = 0; i < K; i++){
d = Integer.parseInt(br.readLine());
String[] tmp = br.readLine().split(" ");
for(int j = 0; j < d; j++){
result[Integer.parseInt(tmp[j])-1] += 1;
}
}
int min = 0;
int count = 0;
for(int i = 0; i < result.length; i++){
if(min > result[i]){
min = result[i];
}
}
for(int i = 0; i < result.length; i++){
if(min == result[i]){
count++;
}
}
System.out.println(count);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
4,
18,
13,
17,
2,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
14,
2,
13,
40,
17,
30,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
110,
14
],
[
110,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
37,
41
],
[
41,
42
],
[
41,
43
],
[
33,
44
],
[
44,
45
],
[
45,
46
],
[
17,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
77,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
77,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
89,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
17,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
105,
106
],
[
15,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] |
[
"\nimport java.util.List;\nimport java.util.Scanner;\nimport java.util.stream.Collectors;\nimport java.util.stream.IntStream;\n\npublic class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n // ในใใผในๅบๅใใฎๆดๆฐใฎๅ
ฅๅ\n int N = sc.nextInt();\n int K = sc.nextInt();\n\n List<Integer> nList = IntStream.range(1, N + 1).boxed().collect(Collectors.toList());\n\n for (int i = 0; i < K; i++) {\n // ๆดๆฐใฎๅ
ฅๅ\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }\n }\n\n System.out.println(nList.size());\n }\n}",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.stream.Collectors;",
"Collectors",
"java.util.stream",
"import java.util.stream.IntStream;",
"IntStream",
"java.util.stream",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n // ในใใผในๅบๅใใฎๆดๆฐใฎๅ
ฅๅ\n int N = sc.nextInt();\n int K = sc.nextInt();\n\n List<Integer> nList = IntStream.range(1, N + 1).boxed().collect(Collectors.toList());\n\n for (int i = 0; i < K; i++) {\n // ๆดๆฐใฎๅ
ฅๅ\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }\n }\n\n System.out.println(nList.size());\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n // ในใใผในๅบๅใใฎๆดๆฐใฎๅ
ฅๅ\n int N = sc.nextInt();\n int K = sc.nextInt();\n\n List<Integer> nList = IntStream.range(1, N + 1).boxed().collect(Collectors.toList());\n\n for (int i = 0; i < K; i++) {\n // ๆดๆฐใฎๅ
ฅๅ\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }\n }\n\n System.out.println(nList.size());\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n // ในใใผในๅบๅใใฎๆดๆฐใฎๅ
ฅๅ\n int N = sc.nextInt();\n int K = sc.nextInt();\n\n List<Integer> nList = IntStream.range(1, N + 1).boxed().collect(Collectors.toList());\n\n for (int i = 0; i < K; i++) {\n // ๆดๆฐใฎๅ
ฅๅ\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }\n }\n\n System.out.println(nList.size());\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> nList = IntStream.range(1, N + 1).boxed().collect(Collectors.toList());",
"nList",
"IntStream.range(1, N + 1).boxed().collect(Collectors.toList())",
"IntStream.range(1, N + 1).boxed().collect",
"IntStream.range(1, N + 1).boxed()",
"IntStream.range(1, N + 1).boxed",
"IntStream.range(1, N + 1)",
"IntStream.range",
"IntStream",
"1",
"N + 1",
"N",
"1",
"Collectors.toList()",
"Collectors.toList",
"Collectors",
"for (int i = 0; i < K; i++) {\n // ๆดๆฐใฎๅ
ฅๅ\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n // ๆดๆฐใฎๅ
ฅๅ\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }\n }",
"{\n // ๆดๆฐใฎๅ
ฅๅ\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }\n }",
"int di = sc.nextInt();",
"di",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < di",
"j",
"di",
"j++",
"j++",
"j",
"{\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }",
"{\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int index = nList.indexOf(A);",
"index",
"nList.indexOf(A)",
"nList.indexOf",
"nList",
"A",
"if (index != -1) {\n nList.remove(index);\n }",
"index != -1",
"index",
"-1",
"1",
"{\n nList.remove(index);\n }",
"nList.remove(index)",
"nList.remove",
"nList",
"index",
"System.out.println(nList.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"nList.size()",
"nList.size",
"nList",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n // ในใใผในๅบๅใใฎๆดๆฐใฎๅ
ฅๅ\n int N = sc.nextInt();\n int K = sc.nextInt();\n\n List<Integer> nList = IntStream.range(1, N + 1).boxed().collect(Collectors.toList());\n\n for (int i = 0; i < K; i++) {\n // ๆดๆฐใฎๅ
ฅๅ\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }\n }\n\n System.out.println(nList.size());\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n // ในใใผในๅบๅใใฎๆดๆฐใฎๅ
ฅๅ\n int N = sc.nextInt();\n int K = sc.nextInt();\n\n List<Integer> nList = IntStream.range(1, N + 1).boxed().collect(Collectors.toList());\n\n for (int i = 0; i < K; i++) {\n // ๆดๆฐใฎๅ
ฅๅ\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n int A = sc.nextInt();\n int index = nList.indexOf(A);\n if (index != -1) {\n nList.remove(index);\n }\n }\n }\n\n System.out.println(nList.size());\n }\n}",
"Main"
] |
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// ในใใผในๅบๅใใฎๆดๆฐใฎๅ
ฅๅ
int N = sc.nextInt();
int K = sc.nextInt();
List<Integer> nList = IntStream.range(1, N + 1).boxed().collect(Collectors.toList());
for (int i = 0; i < K; i++) {
// ๆดๆฐใฎๅ
ฅๅ
int di = sc.nextInt();
for (int j = 0; j < di; j++) {
int A = sc.nextInt();
int index = nList.indexOf(A);
if (index != -1) {
nList.remove(index);
}
}
}
System.out.println(nList.size());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
4,
18,
13,
17,
41,
13,
17,
28,
13,
13,
30,
30,
14,
2,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
100,
5
],
[
100,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
44,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
74,
75
],
[
69,
76
],
[
8,
77
],
[
77,
78
],
[
77,
79
],
[
8,
80
],
[
80,
81
],
[
80,
82
],
[
80,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
8,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
6,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
] |
[
"import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint k = Integer.parseInt(scan.next());\n\t\tint[] sunuke = new int[n];\n\t\tfor(int i = 0;i < k; ++i){\n\t\t\tint d = Integer.parseInt(scan.next());\n\t\t\tfor(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int i :sunuke){\n\t\t\tif(i == 0)count++;\n\t\t}\n\t\tSystem.out.print(count);\n\t}\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint k = Integer.parseInt(scan.next());\n\t\tint[] sunuke = new int[n];\n\t\tfor(int i = 0;i < k; ++i){\n\t\t\tint d = Integer.parseInt(scan.next());\n\t\t\tfor(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int i :sunuke){\n\t\t\tif(i == 0)count++;\n\t\t}\n\t\tSystem.out.print(count);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint k = Integer.parseInt(scan.next());\n\t\tint[] sunuke = new int[n];\n\t\tfor(int i = 0;i < k; ++i){\n\t\t\tint d = Integer.parseInt(scan.next());\n\t\t\tfor(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int i :sunuke){\n\t\t\tif(i == 0)count++;\n\t\t}\n\t\tSystem.out.print(count);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint k = Integer.parseInt(scan.next());\n\t\tint[] sunuke = new int[n];\n\t\tfor(int i = 0;i < k; ++i){\n\t\t\tint d = Integer.parseInt(scan.next());\n\t\t\tfor(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int i :sunuke){\n\t\t\tif(i == 0)count++;\n\t\t}\n\t\tSystem.out.print(count);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = Integer.parseInt(scan.next());",
"n",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"int k = Integer.parseInt(scan.next());",
"k",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"int[] sunuke = new int[n];",
"sunuke",
"new int[n]",
"n",
"for(int i = 0;i < k; ++i){\n\t\t\tint d = Integer.parseInt(scan.next());\n\t\t\tfor(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"++i",
"++i",
"i",
"{\n\t\t\tint d = Integer.parseInt(scan.next());\n\t\t\tfor(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = Integer.parseInt(scan.next());\n\t\t\tfor(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}\n\t\t}",
"int d = Integer.parseInt(scan.next());",
"d",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"for(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"++j",
"++j",
"j",
"{\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}",
"{\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}",
"sunuke[Integer.parseInt(scan.next())-1]++",
"sunuke[Integer.parseInt(scan.next())-1]",
"sunuke",
"Integer.parseInt(scan.next())-1",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"1",
"int count = 0;",
"count",
"0",
"for(int i :sunuke){\n\t\t\tif(i == 0)count++;\n\t\t}",
"int i",
"sunuke",
"{\n\t\t\tif(i == 0)count++;\n\t\t}",
"{\n\t\t\tif(i == 0)count++;\n\t\t}",
"if(i == 0)count++;",
"i == 0",
"i",
"0",
"count++",
"count",
"System.out.print(count)",
"System.out.print",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint k = Integer.parseInt(scan.next());\n\t\tint[] sunuke = new int[n];\n\t\tfor(int i = 0;i < k; ++i){\n\t\t\tint d = Integer.parseInt(scan.next());\n\t\t\tfor(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int i :sunuke){\n\t\t\tif(i == 0)count++;\n\t\t}\n\t\tSystem.out.print(count);\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = Integer.parseInt(scan.next());\n\t\tint k = Integer.parseInt(scan.next());\n\t\tint[] sunuke = new int[n];\n\t\tfor(int i = 0;i < k; ++i){\n\t\t\tint d = Integer.parseInt(scan.next());\n\t\t\tfor(int j = 0;j < d; ++j){\n\t\t\t\tsunuke[Integer.parseInt(scan.next())-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int i :sunuke){\n\t\t\tif(i == 0)count++;\n\t\t}\n\t\tSystem.out.print(count);\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int n = Integer.parseInt(scan.next());
int k = Integer.parseInt(scan.next());
int[] sunuke = new int[n];
for(int i = 0;i < k; ++i){
int d = Integer.parseInt(scan.next());
for(int j = 0;j < d; ++j){
sunuke[Integer.parseInt(scan.next())-1]++;
}
}
int count = 0;
for(int i :sunuke){
if(i == 0)count++;
}
System.out.print(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
40,
18,
13,
2,
18,
13,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
54,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
8,
84
],
[
84,
85
],
[
84,
86
],
[
8,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
87,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
100,
106
],
[
106,
107
],
[
107,
108
],
[
8,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
6,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
] |
[
"import java.util.Scanner;\npublic class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[]d = new int[k];\n int[]a = new int[k];\n int[]s = new int[n];\n \t\t\n for(int i=0; i<k; i++) {\n \td[i] = sc.nextInt();\n \t\tfor(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}\n }\n int cou = 0;\n for(int i=0; i<n; i++) {\n \tif(s[i] == 0){\n \t\tcou++;\n \t}\n }\n \t\tSystem.out.println(cou);\n \t\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[]d = new int[k];\n int[]a = new int[k];\n int[]s = new int[n];\n \t\t\n for(int i=0; i<k; i++) {\n \td[i] = sc.nextInt();\n \t\tfor(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}\n }\n int cou = 0;\n for(int i=0; i<n; i++) {\n \tif(s[i] == 0){\n \t\tcou++;\n \t}\n }\n \t\tSystem.out.println(cou);\n \t\t}\n}",
"Main",
"public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[]d = new int[k];\n int[]a = new int[k];\n int[]s = new int[n];\n \t\t\n for(int i=0; i<k; i++) {\n \td[i] = sc.nextInt();\n \t\tfor(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}\n }\n int cou = 0;\n for(int i=0; i<n; i++) {\n \tif(s[i] == 0){\n \t\tcou++;\n \t}\n }\n \t\tSystem.out.println(cou);\n \t\t}",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[]d = new int[k];\n int[]a = new int[k];\n int[]s = new int[n];\n \t\t\n for(int i=0; i<k; i++) {\n \td[i] = sc.nextInt();\n \t\tfor(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}\n }\n int cou = 0;\n for(int i=0; i<n; i++) {\n \tif(s[i] == 0){\n \t\tcou++;\n \t}\n }\n \t\tSystem.out.println(cou);\n \t\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[]d = new int[k];",
"d",
"new int[k]",
"k",
"int[]a = new int[k];",
"a",
"new int[k]",
"k",
"int[]s = new int[n];",
"s",
"new int[n]",
"n",
"for(int i=0; i<k; i++) {\n \td[i] = sc.nextInt();\n \t\tfor(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n \td[i] = sc.nextInt();\n \t\tfor(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}\n }",
"{\n \td[i] = sc.nextInt();\n \t\tfor(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}\n }",
"d[i] = sc.nextInt()",
"d[i]",
"d",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d[i]",
"j",
"d[i]",
"d",
"i",
"j++",
"j++",
"j",
"{\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}",
"{\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"s[a[i]-1]++",
"s[a[i]-1]",
"s",
"a[i]-1",
"a[i]",
"a",
"i",
"1",
"int cou = 0;",
"cou",
"0",
"for(int i=0; i<n; i++) {\n \tif(s[i] == 0){\n \t\tcou++;\n \t}\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tif(s[i] == 0){\n \t\tcou++;\n \t}\n }",
"{\n \tif(s[i] == 0){\n \t\tcou++;\n \t}\n }",
"if(s[i] == 0){\n \t\tcou++;\n \t}",
"s[i] == 0",
"s[i]",
"s",
"i",
"0",
"{\n \t\tcou++;\n \t}",
"cou++",
"cou",
"System.out.println(cou)",
"System.out.println",
"System.out",
"System",
"System.out",
"cou",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[]d = new int[k];\n int[]a = new int[k];\n int[]s = new int[n];\n \t\t\n for(int i=0; i<k; i++) {\n \td[i] = sc.nextInt();\n \t\tfor(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}\n }\n int cou = 0;\n for(int i=0; i<n; i++) {\n \tif(s[i] == 0){\n \t\tcou++;\n \t}\n }\n \t\tSystem.out.println(cou);\n \t\t}\n}",
"public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[]d = new int[k];\n int[]a = new int[k];\n int[]s = new int[n];\n \t\t\n for(int i=0; i<k; i++) {\n \td[i] = sc.nextInt();\n \t\tfor(int j=0; j<d[i]; j++) {\n \t\t\t a[i] = sc.nextInt();\n \t\t\t \ts[a[i]-1]++;\n \t\t}\n }\n int cou = 0;\n for(int i=0; i<n; i++) {\n \tif(s[i] == 0){\n \t\tcou++;\n \t}\n }\n \t\tSystem.out.println(cou);\n \t\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[]d = new int[k];
int[]a = new int[k];
int[]s = new int[n];
for(int i=0; i<k; i++) {
d[i] = sc.nextInt();
for(int j=0; j<d[i]; j++) {
a[i] = sc.nextInt();
s[a[i]-1]++;
}
}
int cou = 0;
for(int i=0; i<n; i++) {
if(s[i] == 0){
cou++;
}
}
System.out.println(cou);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
38,
30,
4,
18,
13,
30,
0,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
41,
13,
20,
41,
13,
17,
28,
13,
13,
30,
30,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
17,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
2,
13,
17,
14,
2,
2,
13,
17,
2,
17,
2,
13,
17,
30,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
13,
4,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
161,
11
],
[
161,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
21,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
14,
44
],
[
44,
45
],
[
44,
46
],
[
14,
47
],
[
47,
48
],
[
47,
49
],
[
14,
50
],
[
50,
51
],
[
50,
52
],
[
14,
53
],
[
53,
54
],
[
53,
55
],
[
53,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
62,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
73,
84
],
[
84,
85
],
[
85,
86
],
[
73,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
58,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
95,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
105,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
112,
122
],
[
122,
123
],
[
123,
124
],
[
112,
125
],
[
126,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
132,
133
],
[
132,
134
],
[
126,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
135,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
57,
148
],
[
148,
149
],
[
14,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
150,
155
],
[
155,
156
],
[
156,
157
],
[
12,
158
],
[
158,
159
],
[
0,
160
],
[
160,
161
],
[
160,
162
]
] |
[
"import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String args[]) {\n Scanner scan = null;\n List<String> scanList = new ArrayList<String>();\n\n try {\n scan = new Scanner(System.in);\n while(scan.hasNext()){\n String str = scan.nextLine();\n scanList.add(str);\n }\n\n\n } finally {\n scan.close();\n }\n\n String strN = null;\n //Nไบบใชในใ\n List<Integer> nList = new ArrayList<Integer>();\n\n // ่ชญ่พผ\n int i = 0;\n for(String str : scanList) {\n // for(int i=0; i < scanList.size(); i++) {\n \n if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }\n i++;\n }\n\n //็ตๆ\n System.out.println(nList.size());\n\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String args[]) {\n Scanner scan = null;\n List<String> scanList = new ArrayList<String>();\n\n try {\n scan = new Scanner(System.in);\n while(scan.hasNext()){\n String str = scan.nextLine();\n scanList.add(str);\n }\n\n\n } finally {\n scan.close();\n }\n\n String strN = null;\n //Nไบบใชในใ\n List<Integer> nList = new ArrayList<Integer>();\n\n // ่ชญ่พผ\n int i = 0;\n for(String str : scanList) {\n // for(int i=0; i < scanList.size(); i++) {\n \n if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }\n i++;\n }\n\n //็ตๆ\n System.out.println(nList.size());\n\n }\n}",
"Main",
"public static void main(String args[]) {\n Scanner scan = null;\n List<String> scanList = new ArrayList<String>();\n\n try {\n scan = new Scanner(System.in);\n while(scan.hasNext()){\n String str = scan.nextLine();\n scanList.add(str);\n }\n\n\n } finally {\n scan.close();\n }\n\n String strN = null;\n //Nไบบใชในใ\n List<Integer> nList = new ArrayList<Integer>();\n\n // ่ชญ่พผ\n int i = 0;\n for(String str : scanList) {\n // for(int i=0; i < scanList.size(); i++) {\n \n if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }\n i++;\n }\n\n //็ตๆ\n System.out.println(nList.size());\n\n }",
"main",
"{\n Scanner scan = null;\n List<String> scanList = new ArrayList<String>();\n\n try {\n scan = new Scanner(System.in);\n while(scan.hasNext()){\n String str = scan.nextLine();\n scanList.add(str);\n }\n\n\n } finally {\n scan.close();\n }\n\n String strN = null;\n //Nไบบใชในใ\n List<Integer> nList = new ArrayList<Integer>();\n\n // ่ชญ่พผ\n int i = 0;\n for(String str : scanList) {\n // for(int i=0; i < scanList.size(); i++) {\n \n if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }\n i++;\n }\n\n //็ตๆ\n System.out.println(nList.size());\n\n }",
"Scanner scan = null;",
"scan",
"null",
"List<String> scanList = new ArrayList<String>();",
"scanList",
"new ArrayList<String>()",
"try {\n scan = new Scanner(System.in);\n while(scan.hasNext()){\n String str = scan.nextLine();\n scanList.add(str);\n }\n\n\n } finally {\n scan.close();\n }",
"{\n scan.close();\n }",
"scan.close()",
"scan.close",
"scan",
"{\n scan = new Scanner(System.in);\n while(scan.hasNext()){\n String str = scan.nextLine();\n scanList.add(str);\n }\n\n\n }",
"scan = new Scanner(System.in)",
"scan",
"new Scanner(System.in)",
"while(scan.hasNext()){\n String str = scan.nextLine();\n scanList.add(str);\n }",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n String str = scan.nextLine();\n scanList.add(str);\n }",
"String str = scan.nextLine();",
"str",
"scan.nextLine()",
"scan.nextLine",
"scan",
"scanList.add(str)",
"scanList.add",
"scanList",
"str",
"String strN = null;",
"strN",
"null",
"List<Integer> nList = new ArrayList<Integer>();",
"nList",
"new ArrayList<Integer>()",
"int i = 0;",
"i",
"0",
"for(String str : scanList) {\n // for(int i=0; i < scanList.size(); i++) {\n \n if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }\n i++;\n }",
"String str",
"scanList",
"{\n // for(int i=0; i < scanList.size(); i++) {\n \n if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }\n i++;\n }",
"{\n // for(int i=0; i < scanList.size(); i++) {\n \n if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }\n i++;\n }",
"if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }",
"i == 0",
"i",
"0",
"{\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n }",
"strN = str.substring(0, str.indexOf(\" \"))",
"strN",
"str.substring(0, str.indexOf(\" \"))",
"str.substring",
"str",
"0",
"str.indexOf(\" \")",
"str.indexOf",
"str",
"\" \"",
"for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<Integer.valueOf(strN)",
"k",
"Integer.valueOf(strN)",
"Integer.valueOf",
"Integer",
"strN",
"k++",
"k++",
"k",
"{\n nList.add(k+1);\n }",
"{\n nList.add(k+1);\n }",
"nList.add(k+1)",
"nList.add",
"nList",
"k+1",
"k",
"1",
"if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }",
"i != 0 && 0 == i % 2",
"i != 0",
"i",
"0",
"0 == i % 2",
"0",
"i % 2",
"i",
"2",
"{\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }",
"String[] sList = str.split(\" \");",
"sList",
"str.split(\" \")",
"str.split",
"str",
"\" \"",
"for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<sList.length",
"j",
"sList.length",
"sList",
"sList.length",
"j++",
"j++",
"j",
"{\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }",
"{\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }",
"int targetInt = Integer.valueOf(sList[j]);",
"targetInt",
"Integer.valueOf(sList[j])",
"Integer.valueOf",
"Integer",
"sList[j]",
"sList",
"j",
"if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }",
"nList.contains(targetInt)",
"nList.contains",
"nList",
"targetInt",
"{\n nList.remove(nList.indexOf(targetInt));\n }",
"nList.remove(nList.indexOf(targetInt))",
"nList.remove",
"nList",
"nList.indexOf(targetInt)",
"nList.indexOf",
"nList",
"targetInt",
"i++",
"i",
"System.out.println(nList.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"nList.size()",
"nList.size",
"nList",
"String args[]",
"args",
"public class Main {\n public static void main(String args[]) {\n Scanner scan = null;\n List<String> scanList = new ArrayList<String>();\n\n try {\n scan = new Scanner(System.in);\n while(scan.hasNext()){\n String str = scan.nextLine();\n scanList.add(str);\n }\n\n\n } finally {\n scan.close();\n }\n\n String strN = null;\n //Nไบบใชในใ\n List<Integer> nList = new ArrayList<Integer>();\n\n // ่ชญ่พผ\n int i = 0;\n for(String str : scanList) {\n // for(int i=0; i < scanList.size(); i++) {\n \n if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }\n i++;\n }\n\n //็ตๆ\n System.out.println(nList.size());\n\n }\n}",
"public class Main {\n public static void main(String args[]) {\n Scanner scan = null;\n List<String> scanList = new ArrayList<String>();\n\n try {\n scan = new Scanner(System.in);\n while(scan.hasNext()){\n String str = scan.nextLine();\n scanList.add(str);\n }\n\n\n } finally {\n scan.close();\n }\n\n String strN = null;\n //Nไบบใชในใ\n List<Integer> nList = new ArrayList<Integer>();\n\n // ่ชญ่พผ\n int i = 0;\n for(String str : scanList) {\n // for(int i=0; i < scanList.size(); i++) {\n \n if(i == 0) {\n strN = str.substring(0, str.indexOf(\" \"));\n for(int k=0; k<Integer.valueOf(strN); k++) {\n nList.add(k+1);\n }\n } else if (i != 0 && 0 == i % 2) {\n String[] sList = str.split(\" \");\n for(int j=0; j<sList.length; j++) {\n int targetInt = Integer.valueOf(sList[j]);\n if(nList.contains(targetInt)) {\n nList.remove(nList.indexOf(targetInt));\n }\n }\n }\n i++;\n }\n\n //็ตๆ\n System.out.println(nList.size());\n\n }\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner scan = null;
List<String> scanList = new ArrayList<String>();
try {
scan = new Scanner(System.in);
while(scan.hasNext()){
String str = scan.nextLine();
scanList.add(str);
}
} finally {
scan.close();
}
String strN = null;
//Nไบบใชในใ
List<Integer> nList = new ArrayList<Integer>();
// ่ชญ่พผ
int i = 0;
for(String str : scanList) {
// for(int i=0; i < scanList.size(); i++) {
if(i == 0) {
strN = str.substring(0, str.indexOf(" "));
for(int k=0; k<Integer.valueOf(strN); k++) {
nList.add(k+1);
}
} else if (i != 0 && 0 == i % 2) {
String[] sList = str.split(" ");
for(int j=0; j<sList.length; j++) {
int targetInt = Integer.valueOf(sList[j]);
if(nList.contains(targetInt)) {
nList.remove(nList.indexOf(targetInt));
}
}
}
i++;
}
//็ตๆ
System.out.println(nList.size());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
99,
5
],
[
99,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
60,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
6,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] |
[
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int sunu[] = new int[N];\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n // System.out.println(i+\"iii\"); \n for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }\n }\n int count = 0;\n for(int i=0;i<N;i++){\n if(sunu[i]==0){\n count++;\n }\n }\n System.out.println(count); \n }\n}\n\n\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int sunu[] = new int[N];\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n // System.out.println(i+\"iii\"); \n for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }\n }\n int count = 0;\n for(int i=0;i<N;i++){\n if(sunu[i]==0){\n count++;\n }\n }\n System.out.println(count); \n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int sunu[] = new int[N];\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n // System.out.println(i+\"iii\"); \n for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }\n }\n int count = 0;\n for(int i=0;i<N;i++){\n if(sunu[i]==0){\n count++;\n }\n }\n System.out.println(count); \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int sunu[] = new int[N];\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n // System.out.println(i+\"iii\"); \n for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }\n }\n int count = 0;\n for(int i=0;i<N;i++){\n if(sunu[i]==0){\n count++;\n }\n }\n System.out.println(count); \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sunu[] = new int[N];",
"sunu",
"new int[N]",
"N",
"for(int i=0;i<K;i++){\n int d = sc.nextInt();\n // System.out.println(i+\"iii\"); \n for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n // System.out.println(i+\"iii\"); \n for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }\n }",
"{\n int d = sc.nextInt();\n // System.out.println(i+\"iii\"); \n for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }\n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }",
"{\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }",
"sunu[sc.nextInt()-1]++",
"sunu[sc.nextInt()-1]",
"sunu",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"int count = 0;",
"count",
"0",
"for(int i=0;i<N;i++){\n if(sunu[i]==0){\n count++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n if(sunu[i]==0){\n count++;\n }\n }",
"{\n if(sunu[i]==0){\n count++;\n }\n }",
"if(sunu[i]==0){\n count++;\n }",
"sunu[i]==0",
"sunu[i]",
"sunu",
"i",
"0",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int sunu[] = new int[N];\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n // System.out.println(i+\"iii\"); \n for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }\n }\n int count = 0;\n for(int i=0;i<N;i++){\n if(sunu[i]==0){\n count++;\n }\n }\n System.out.println(count); \n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int sunu[] = new int[N];\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n // System.out.println(i+\"iii\"); \n for(int j=0; j<d; j++){\n // System.out.println(j+\"ssd\"); \n sunu[sc.nextInt()-1]++;\n // System.out.println(j+\"aaa\"); \n }\n }\n int count = 0;\n for(int i=0;i<N;i++){\n if(sunu[i]==0){\n count++;\n }\n }\n System.out.println(count); \n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int sunu[] = new int[N];
for(int i=0;i<K;i++){
int d = sc.nextInt();
// System.out.println(i+"iii");
for(int j=0; j<d; j++){
// System.out.println(j+"ssd");
sunu[sc.nextInt()-1]++;
// System.out.println(j+"aaa");
}
}
int count = 0;
for(int i=0;i<N;i++){
if(sunu[i]==0){
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
18,
13,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
14,
2,
13,
13,
30,
29,
17,
30,
0,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
29,
18,
13,
40,
13,
29,
40,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
40,
4,
13,
18,
13,
13,
40,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
14,
2,
2,
13,
17,
2,
17,
13,
30,
37,
20,
42,
17,
30,
14,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
13,
40,
17,
40,
4,
13,
13,
30,
29,
8,
13,
40,
13,
13,
30,
37,
20,
0,
13,
4,
13,
12,
13,
30,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
37,
20,
29,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
343,
20
],
[
343,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
23,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
23,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
23,
40
],
[
40,
41
],
[
40,
42
],
[
23,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
78,
79
],
[
23,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
21,
90
],
[
90,
91
],
[
0,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
92,
99
],
[
99,
100
],
[
99,
101
],
[
92,
103
],
[
103,
104
],
[
103,
105
],
[
92,
106
],
[
106,
107
],
[
106,
108
],
[
92,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
117,
118
],
[
112,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
123,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
119,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
141,
142
],
[
142,
143
],
[
111,
144
],
[
144,
145
],
[
92,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
149,
157
],
[
157,
158
],
[
158,
159
],
[
92,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
164,
168
],
[
168,
169
],
[
168,
170
],
[
160,
171
],
[
171,
172
],
[
92,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
177,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
183,
185
],
[
176,
186
],
[
186,
187
],
[
175,
188
],
[
188,
189
],
[
189,
190
],
[
92,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
194,
198
],
[
198,
199
],
[
193,
200
],
[
200,
201
],
[
200,
202
],
[
193,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
193,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
207,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
212,
215
],
[
211,
216
],
[
216,
217
],
[
216,
218
],
[
218,
219
],
[
193,
220
],
[
220,
221
],
[
221,
222
],
[
222,
223
],
[
92,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
227,
231
],
[
231,
232
],
[
226,
233
],
[
233,
234
],
[
233,
235
],
[
226,
236
],
[
236,
237
],
[
236,
238
],
[
226,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
226,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
243,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
247,
251
],
[
251,
252
],
[
251,
253
],
[
253,
254
],
[
226,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
256,
260
],
[
260,
261
],
[
260,
262
],
[
255,
263
],
[
263,
264
],
[
264,
265
],
[
226,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
271,
273
],
[
270,
274
],
[
274,
275
],
[
274,
276
],
[
269,
277
],
[
277,
278
],
[
278,
279
],
[
278,
280
],
[
277,
281
],
[
281,
282
],
[
281,
283
],
[
283,
284
],
[
283,
285
],
[
269,
286
],
[
286,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
290,
291
],
[
287,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
286,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
298,
302
],
[
286,
303
],
[
303,
304
],
[
304,
305
],
[
268,
306
],
[
306,
307
],
[
306,
308
],
[
308,
309
],
[
92,
310
],
[
310,
311
],
[
310,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
315,
316
],
[
312,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
321,
322
],
[
321,
323
],
[
318,
324
],
[
324,
325
],
[
324,
326
],
[
326,
327
],
[
326,
328
],
[
317,
329
],
[
329,
330
],
[
312,
331
],
[
331,
332
],
[
92,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
337,
340
],
[
340,
341
],
[
0,
342
],
[
342,
343
],
[
342,
344
]
] |
[
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.HashSet;\nimport java.util.NoSuchElementException;\nimport java.util.Scanner;\nimport java.util.Set;\n\npublic class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n Scanner scc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n Set<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < k; i++) {\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(n - set.size());\n }\n\n}\n\nclass FastScanner {\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() {\n if (hasNextByte())\n return buffer[ptr++];\n else\n return -1;\n }\n\n private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }\n\n public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr]))\n ptr++;\n return hasNextByte();\n }\n\n public String next() {\n if (!hasNext())\n throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n public long nextLong() {\n if (!hasNext())\n throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n throw new NumberFormatException();\n return (int) nl;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n Scanner scc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n Set<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < k; i++) {\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(n - set.size());\n }\n\n}",
"Main",
"public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n Scanner scc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n Set<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < k; i++) {\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(n - set.size());\n }",
"main",
"{\n FastScanner sc = new FastScanner();\n Scanner scc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n Set<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < k; i++) {\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(n - set.size());\n }",
"FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"Scanner scc = new Scanner(System.in);",
"scc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Set<Integer> set = new HashSet<Integer>();",
"set",
"new HashSet<Integer>()",
"for (int i = 0; i < k; i++) {\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }\n }",
"{\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }\n }",
"int di = sc.nextInt();",
"di",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < di",
"j",
"di",
"j++",
"j++",
"j",
"{\n set.add(sc.nextInt());\n }",
"{\n set.add(sc.nextInt());\n }",
"set.add(sc.nextInt())",
"set.add",
"set",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(n - set.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"n - set.size()",
"n",
"set.size()",
"set.size",
"set",
"String[] args",
"args",
"class FastScanner {\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() {\n if (hasNextByte())\n return buffer[ptr++];\n else\n return -1;\n }\n\n private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }\n\n public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr]))\n ptr++;\n return hasNextByte();\n }\n\n public String next() {\n if (!hasNext())\n throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n public long nextLong() {\n if (!hasNext())\n throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n throw new NumberFormatException();\n return (int) nl;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n}",
"FastScanner",
"private final InputStream in = System.in;",
"in",
"System.in",
"System",
"System.in",
"private final byte[] buffer = new byte[1024];",
"buffer",
"new byte[1024]",
"1024",
"private int ptr = 0;",
"ptr",
"0",
"private int buflen = 0;",
"buflen",
"0",
"private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }",
"hasNextByte",
"{\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }",
"if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }",
"ptr < buflen",
"ptr",
"buflen",
"{\n return true;\n }",
"return true;",
"true",
"{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }",
"ptr = 0",
"ptr",
"0",
"try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n buflen = in.read(buffer);\n }",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n return false;\n }",
"buflen <= 0",
"buflen",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"private int readByte() {\n if (hasNextByte())\n return buffer[ptr++];\n else\n return -1;\n }",
"readByte",
"{\n if (hasNextByte())\n return buffer[ptr++];\n else\n return -1;\n }",
"if (hasNextByte())\n return buffer[ptr++];\n else\n return -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }",
"isPrintableChar",
"{\n return 33 <= c && c <= 126;\n }",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr]))\n ptr++;\n return hasNextByte();\n }",
"hasNext",
"{\n while (hasNextByte() && !isPrintableChar(buffer[ptr]))\n ptr++;\n return hasNextByte();\n }",
"while (hasNextByte() && !isPrintableChar(buffer[ptr]))\n ptr++;",
"hasNextByte() && !isPrintableChar(buffer[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buffer[ptr])",
"isPrintableChar(buffer[ptr])",
"isPrintableChar",
"buffer[ptr]",
"buffer",
"ptr",
"ptr++",
"ptr",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n if (!hasNext())\n throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"next",
"{\n if (!hasNext())\n throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"if (!hasNext())\n throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n sb.appendCodePoint(b);\n b = readByte();\n }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public long nextLong() {\n if (!hasNext())\n throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }",
"nextLong",
"{\n if (!hasNext())\n throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }",
"if (!hasNext())\n throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long n = 0;",
"n",
"0",
"boolean minus = false;",
"minus",
"false",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if (b == '-') {\n minus = true;\n b = readByte();\n }",
"b == '-'",
"b",
"'-'",
"{\n minus = true;\n b = readByte();\n }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }",
"true",
"{\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }",
"if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n n *= 10;\n n += b - '0';\n }",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n return minus ? -n : n;\n }",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n throw new NumberFormatException();\n return (int) nl;\n }",
"nextInt",
"{\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n throw new NumberFormatException();\n return (int) nl;\n }",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n throw new NumberFormatException();",
"nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE",
"nl < Integer.MIN_VALUE",
"nl",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"nl > Integer.MAX_VALUE",
"nl",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int) nl;",
"(int) nl",
"public double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n Scanner scc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n Set<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < k; i++) {\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(n - set.size());\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n Scanner scc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n Set<Integer> set = new HashSet<Integer>();\n for (int i = 0; i < k; i++) {\n int di = sc.nextInt();\n for (int j = 0; j < di; j++) {\n set.add(sc.nextInt());\n }\n }\n System.out.println(n - set.size());\n }\n\n}",
"Main"
] |
import java.io.IOException;
import java.io.InputStream;
import java.util.HashSet;
import java.util.NoSuchElementException;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
Scanner scc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
Set<Integer> set = new HashSet<Integer>();
for (int i = 0; i < k; i++) {
int di = sc.nextInt();
for (int j = 0; j < di; j++) {
set.add(sc.nextInt());
}
}
System.out.println(n - set.size());
}
}
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
} else {
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() {
if (hasNextByte())
return buffer[ptr++];
else
return -1;
}
private static boolean isPrintableChar(int c) {
return 33 <= c && c <= 126;
}
public boolean hasNext() {
while (hasNextByte() && !isPrintableChar(buffer[ptr]))
ptr++;
return hasNextByte();
}
public String next() {
if (!hasNext())
throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext())
throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while (true) {
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
} else if (b == -1 || !isPrintableChar(b)) {
return minus ? -n : n;
} else {
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
throw new NumberFormatException();
return (int) nl;
}
public double nextDouble() {
return Double.parseDouble(next());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
40,
18,
13,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
29,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
114,
5
],
[
114,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
13,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
8,
76
],
[
76,
77
],
[
76,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
98,
99
],
[
99,
100
],
[
8,
101
],
[
101,
102
],
[
102,
103
],
[
8,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
8,
110
],
[
6,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint n, k;\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\n\t\tint number, index;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tnumber = sc.nextInt();\n\t\t\tfor (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}\n\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t\treturn;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint n, k;\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\n\t\tint number, index;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tnumber = sc.nextInt();\n\t\t\tfor (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}\n\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t\treturn;\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tint n, k;\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\n\t\tint number, index;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tnumber = sc.nextInt();\n\t\t\tfor (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}\n\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t\treturn;\n\t}",
"main",
"{\n\t\tint n, k;\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\n\t\tint number, index;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tnumber = sc.nextInt();\n\t\t\tfor (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}\n\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t\treturn;\n\t}",
"int n",
"n",
"k;",
"k",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k = sc.nextInt()",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"int number",
"number",
"index;",
"index",
"for (int i = 0; i < k; i++) {\n\t\t\tnumber = sc.nextInt();\n\t\t\tfor (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tnumber = sc.nextInt();\n\t\t\tfor (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tnumber = sc.nextInt();\n\t\t\tfor (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}\n\t\t}",
"number = sc.nextInt()",
"number",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < number",
"j",
"number",
"j++",
"j++",
"j",
"{\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}",
"{\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}",
"index = sc.nextInt()",
"index",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a[index - 1]++",
"a[index - 1]",
"a",
"index - 1",
"index",
"1",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tif (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}",
"a[i] == 0",
"a[i]",
"a",
"i",
"0",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"sc.close()",
"sc.close",
"sc",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"return;",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint n, k;\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\n\t\tint number, index;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tnumber = sc.nextInt();\n\t\t\tfor (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}\n\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t\treturn;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint n, k;\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tn = sc.nextInt();\n\t\tk = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\n\t\tint number, index;\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tnumber = sc.nextInt();\n\t\t\tfor (int j = 0; j < number; j++) {\n\t\t\t\tindex = sc.nextInt();\n\t\t\t\ta[index - 1]++;\n\t\t\t}\n\t\t}\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tif (a[i] == 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tsc.close();\n\t\tSystem.out.println(count);\n\t\treturn;\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int n, k;
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
k = sc.nextInt();
int[] a = new int[n];
int number, index;
for (int i = 0; i < k; i++) {
number = sc.nextInt();
for (int j = 0; j < number; j++) {
index = sc.nextInt();
a[index - 1]++;
}
}
int count = 0;
for (int i = 0; i < n; i++) {
if (a[i] == 0) {
count++;
}
}
sc.close();
System.out.println(count);
return;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
13,
13,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
42,
2,
40,
13,
17,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
4,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
4,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
4,
13,
17,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
4,
18,
13,
17,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
464,
8
],
[
464,
9
],
[
9,
10
],
[
464,
11
],
[
11,
12
],
[
464,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
15,
19
],
[
19,
20
],
[
19,
21
],
[
15,
22
],
[
22,
23
],
[
22,
24
],
[
15,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
15,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
15,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
15,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
51,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
62,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
72,
73
],
[
15,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
78,
79
],
[
15,
80
],
[
80,
81
],
[
81,
82
],
[
13,
83
],
[
83,
84
],
[
464,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
88,
98
],
[
98,
99
],
[
99,
100
],
[
88,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
102,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
102,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
121,
123
],
[
102,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
85,
129
],
[
129,
130
],
[
464,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
134,
144
],
[
144,
145
],
[
145,
146
],
[
134,
147
],
[
148,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
151,
155
],
[
155,
156
],
[
155,
157
],
[
148,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
160,
162
],
[
148,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
163,
167
],
[
167,
168
],
[
167,
169
],
[
148,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
170,
174
],
[
131,
175
],
[
175,
176
],
[
464,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
177,
181
],
[
181,
182
],
[
177,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
183,
189
],
[
189,
190
],
[
177,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
191,
197
],
[
197,
198
],
[
177,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
203,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
202,
211
],
[
211,
212
],
[
211,
213
],
[
201,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
177,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
225
],
[
225,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
225,
230
],
[
230,
231
],
[
230,
232
],
[
225,
233
],
[
233,
234
],
[
234,
235
],
[
225,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
241
],
[
241,
242
],
[
220,
243
],
[
243,
244
],
[
218,
245
],
[
245,
246
],
[
177,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
249,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
254,
259
],
[
259,
260
],
[
259,
261
],
[
254,
262
],
[
262,
263
],
[
263,
264
],
[
254,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
266,
270
],
[
270,
271
],
[
249,
272
],
[
272,
273
],
[
247,
274
],
[
274,
275
],
[
177,
276
],
[
276,
277
],
[
276,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
278,
283
],
[
283,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
283,
288
],
[
288,
289
],
[
288,
290
],
[
283,
291
],
[
291,
292
],
[
292,
293
],
[
283,
294
],
[
294,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
295,
299
],
[
299,
300
],
[
278,
301
],
[
301,
302
],
[
301,
303
],
[
278,
304
],
[
304,
305
],
[
305,
306
],
[
304,
307
],
[
278,
308
],
[
308,
309
],
[
276,
310
],
[
310,
311
],
[
177,
312
],
[
312,
313
],
[
312,
314
],
[
314,
315
],
[
315,
316
],
[
315,
317
],
[
314,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
319,
324
],
[
324,
325
],
[
324,
326
],
[
319,
327
],
[
327,
328
],
[
328,
329
],
[
319,
330
],
[
330,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
331,
335
],
[
335,
336
],
[
314,
337
],
[
337,
338
],
[
337,
339
],
[
314,
340
],
[
340,
341
],
[
341,
342
],
[
340,
343
],
[
314,
344
],
[
344,
345
],
[
312,
346
],
[
346,
347
],
[
177,
348
],
[
348,
349
],
[
348,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
350,
355
],
[
355,
356
],
[
356,
357
],
[
357,
358
],
[
357,
359
],
[
355,
360
],
[
360,
361
],
[
360,
362
],
[
355,
363
],
[
363,
364
],
[
364,
365
],
[
355,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
368,
370
],
[
367,
371
],
[
371,
372
],
[
350,
373
],
[
373,
374
],
[
348,
375
],
[
375,
376
],
[
177,
377
],
[
377,
378
],
[
377,
379
],
[
379,
380
],
[
380,
381
],
[
380,
382
],
[
379,
384
],
[
384,
385
],
[
385,
386
],
[
386,
387
],
[
386,
388
],
[
384,
389
],
[
389,
390
],
[
389,
391
],
[
384,
392
],
[
392,
393
],
[
393,
394
],
[
384,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
397,
399
],
[
396,
400
],
[
400,
401
],
[
379,
402
],
[
402,
403
],
[
377,
404
],
[
404,
405
],
[
177,
406
],
[
406,
407
],
[
406,
408
],
[
408,
409
],
[
409,
410
],
[
410,
411
],
[
411,
412
],
[
177,
413
],
[
413,
414
],
[
413,
415
],
[
415,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
417,
420
],
[
420,
421
],
[
177,
422
],
[
422,
423
],
[
422,
424
],
[
424,
425
],
[
425,
426
],
[
426,
427
],
[
427,
428
],
[
426,
429
],
[
429,
430
],
[
177,
431
],
[
431,
432
],
[
431,
433
],
[
433,
434
],
[
434,
435
],
[
435,
436
],
[
436,
437
],
[
437,
438
],
[
435,
439
],
[
177,
440
],
[
440,
441
],
[
440,
442
],
[
442,
443
],
[
443,
444
],
[
444,
445
],
[
445,
446
],
[
444,
447
],
[
447,
448
],
[
177,
449
],
[
449,
450
],
[
449,
451
],
[
451,
452
],
[
452,
453
],
[
453,
454
],
[
454,
455
],
[
177,
456
],
[
456,
457
],
[
456,
458
],
[
458,
459
],
[
459,
460
],
[
460,
461
],
[
459,
462
],
[
0,
463
],
[
463,
464
],
[
463,
465
]
] |
[
"import java.io.*;\nimport java.util.*;\n\npublic class Main{\n\t\n\tpublic static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tHashSet<Integer>hs=new HashSet<>();\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tfor(int i=1;i<=n;i++)hs.add(i);\n\t\t\n\t\twhile(k-->0) {\n\t\t\tint len=sc.nextInt();\n\t\t\twhile(len-->0) {\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tpw.println(hs.size());\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\t\n\tpublic static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tHashSet<Integer>hs=new HashSet<>();\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tfor(int i=1;i<=n;i++)hs.add(i);\n\t\t\n\t\twhile(k-->0) {\n\t\t\tint len=sc.nextInt();\n\t\t\twhile(len-->0) {\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tpw.println(hs.size());\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"Main",
"static PrintWriter pw;",
"pw",
"static MScanner sc;",
"sc",
"public static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tHashSet<Integer>hs=new HashSet<>();\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tfor(int i=1;i<=n;i++)hs.add(i);\n\t\t\n\t\twhile(k-->0) {\n\t\t\tint len=sc.nextInt();\n\t\t\twhile(len-->0) {\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tpw.println(hs.size());\n\t\tpw.flush();\n\t}",
"main",
"{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tHashSet<Integer>hs=new HashSet<>();\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tfor(int i=1;i<=n;i++)hs.add(i);\n\t\t\n\t\twhile(k-->0) {\n\t\t\tint len=sc.nextInt();\n\t\t\twhile(len-->0) {\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tpw.println(hs.size());\n\t\tpw.flush();\n\t}",
"pw=new PrintWriter(System.out)",
"pw",
"new PrintWriter(System.out)",
"sc = new MScanner(System.in)",
"sc",
"new MScanner(System.in)",
"HashSet<Integer>hs=new HashSet<>();",
"hs",
"new HashSet<>()",
"int n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k=sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=1;i<=n;i++)hs.add(i);",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"hs.add(i);",
"hs.add(i)",
"hs.add",
"hs",
"i",
"while(k-->0) {\n\t\t\tint len=sc.nextInt();\n\t\t\twhile(len-->0) {\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}\n\t\t}",
"k-->0",
"k--",
"k",
"0",
"{\n\t\t\tint len=sc.nextInt();\n\t\t\twhile(len-->0) {\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}\n\t\t}",
"int len=sc.nextInt();",
"len",
"sc.nextInt()",
"sc.nextInt",
"sc",
"while(len-->0) {\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}",
"len-->0",
"len--",
"len",
"0",
"{\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}",
"hs.remove(sc.nextInt())",
"hs.remove",
"hs",
"sc.nextInt()",
"sc.nextInt",
"sc",
"pw.println(hs.size())",
"pw.println",
"pw",
"hs.size()",
"hs.size",
"hs",
"pw.flush()",
"pw.flush",
"pw",
"String[] args",
"args",
"static void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"shuffle",
"{\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"for(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<in.length",
"i",
"in.length",
"in",
"in.length",
"i++",
"i++",
"i",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int idx=(int)(Math.random()*in.length);",
"idx",
"(int)(Math.random()*in.length)",
"Math.random()",
"Math.random",
"Math",
"in.length",
"in",
"in.length",
"int tmp=in[i];",
"tmp",
"in[i]",
"in",
"i",
"in[i]=in[idx]",
"in[i]",
"in",
"i",
"in[idx]",
"in",
"idx",
"in[idx]=tmp",
"in[idx]",
"in",
"idx",
"tmp",
"int[]in",
"in",
"static void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"shuffle",
"{\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"for(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<in.length",
"i",
"in.length",
"in",
"in.length",
"i++",
"i++",
"i",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int idx=(int)(Math.random()*in.length);",
"idx",
"(int)(Math.random()*in.length)",
"Math.random()",
"Math.random",
"Math",
"in.length",
"in",
"in.length",
"long tmp=in[i];",
"tmp",
"in[i]",
"in",
"i",
"in[i]=in[idx]",
"in[i]",
"in",
"i",
"in[idx]",
"in",
"idx",
"in[idx]=tmp",
"in[idx]",
"in",
"idx",
"tmp",
"long[]in",
"in",
"static class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}",
"MScanner",
"StringTokenizer st;",
"st",
"BufferedReader br;",
"br",
"public MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}",
"MScanner",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(system))",
"br",
"new BufferedReader(new InputStreamReader(system))",
"InputStream system",
"system",
"public MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}",
"MScanner",
"{\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}",
"br = new BufferedReader(new FileReader(file))",
"br",
"new BufferedReader(new FileReader(file))",
"String file",
"file",
"public String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}",
"while (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"intArr",
"{\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"int[]in=new int[n];",
"in",
"new int[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextInt();",
"in[i]=nextInt()",
"in[i]",
"in",
"i",
"nextInt()",
"nextInt",
"return in;",
"in",
"int n",
"n",
"public long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"longArr",
"{\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"long[]in=new long[n];",
"in",
"new long[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextLong();",
"in[i]=nextLong()",
"in[i]",
"in",
"i",
"nextLong()",
"nextLong",
"return in;",
"in",
"int n",
"n",
"public int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"intSortedArr",
"{\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"int[]in=new int[n];",
"in",
"new int[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextInt();",
"in[i]=nextInt()",
"in[i]",
"in",
"i",
"nextInt()",
"nextInt",
"shuffle(in)",
"shuffle",
"in",
"Arrays.sort(in)",
"Arrays.sort",
"Arrays",
"in",
"return in;",
"in",
"int n",
"n",
"public long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"longSortedArr",
"{\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"long[]in=new long[n];",
"in",
"new long[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextLong();",
"in[i]=nextLong()",
"in[i]",
"in",
"i",
"nextLong()",
"nextLong",
"shuffle(in)",
"shuffle",
"in",
"Arrays.sort(in)",
"Arrays.sort",
"Arrays",
"in",
"return in;",
"in",
"int n",
"n",
"public Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"IntegerArr",
"{\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"Integer[]in=new Integer[n];",
"in",
"new Integer[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextInt();",
"in[i]=nextInt()",
"in[i]",
"in",
"i",
"nextInt()",
"nextInt",
"return in;",
"in",
"int n",
"n",
"public Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"LongArr",
"{\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"Long[]in=new Long[n];",
"in",
"new Long[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextLong();",
"in[i]=nextLong()",
"in[i]",
"in",
"i",
"nextLong()",
"nextLong",
"return in;",
"in",
"int n",
"n",
"public String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}",
"nextLine",
"{\n\t\t\treturn br.readLine();\n\t\t}",
"return br.readLine();",
"br.readLine()",
"br.readLine",
"br",
"public int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}",
"nextChar",
"{\n\t\t\treturn next().charAt(0);\n\t\t}",
"return next().charAt(0);",
"next().charAt(0)",
"next().charAt",
"next()",
"next",
"0",
"public long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}",
"ready",
"{\n\t\t\treturn br.ready();\n\t\t}",
"return br.ready();",
"br.ready()",
"br.ready",
"br",
"public void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}",
"waitForInput",
"{\n\t\t\tThread.sleep(3000);\n\t\t}",
"Thread.sleep(3000)",
"Thread.sleep",
"Thread",
"3000",
"public class Main{\n\t\n\tpublic static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tHashSet<Integer>hs=new HashSet<>();\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tfor(int i=1;i<=n;i++)hs.add(i);\n\t\t\n\t\twhile(k-->0) {\n\t\t\tint len=sc.nextInt();\n\t\t\twhile(len-->0) {\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tpw.println(hs.size());\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"public class Main{\n\t\n\tpublic static void main(String[] args) throws Exception{\n\t\tpw=new PrintWriter(System.out);\n\t\tsc = new MScanner(System.in);\n\t\tHashSet<Integer>hs=new HashSet<>();\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tfor(int i=1;i<=n;i++)hs.add(i);\n\t\t\n\t\twhile(k-->0) {\n\t\t\tint len=sc.nextInt();\n\t\t\twhile(len-->0) {\n\t\t\t\ths.remove(sc.nextInt());\n\t\t\t}\n\t\t}\n\t\tpw.println(hs.size());\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws Exception{
pw=new PrintWriter(System.out);
sc = new MScanner(System.in);
HashSet<Integer>hs=new HashSet<>();
int n=sc.nextInt(),k=sc.nextInt();
for(int i=1;i<=n;i++)hs.add(i);
while(k-->0) {
int len=sc.nextInt();
while(len-->0) {
hs.remove(sc.nextInt());
}
}
pw.println(hs.size());
pw.flush();
}
static PrintWriter pw;
static MScanner sc;
static class MScanner {
StringTokenizer st;
BufferedReader br;
public MScanner(InputStream system) {
br = new BufferedReader(new InputStreamReader(system));
}
public MScanner(String file) throws Exception {
br = new BufferedReader(new FileReader(file));
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine());
return st.nextToken();
}
public int[] intArr(int n) throws IOException {
int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
return in;
}
public long[] longArr(int n) throws IOException {
long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
return in;
}
public int[] intSortedArr(int n) throws IOException {
int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
shuffle(in);
Arrays.sort(in);
return in;
}
public long[] longSortedArr(int n) throws IOException {
long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
shuffle(in);
Arrays.sort(in);
return in;
}
public Integer[] IntegerArr(int n) throws IOException {
Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();
return in;
}
public Long[] LongArr(int n) throws IOException {
Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();
return in;
}
public String nextLine() throws IOException {
return br.readLine();
}
public int nextInt() throws IOException {
return Integer.parseInt(next());
}
public double nextDouble() throws IOException {
return Double.parseDouble(next());
}
public char nextChar() throws IOException {
return next().charAt(0);
}
public long nextLong() throws IOException {
return Long.parseLong(next());
}
public boolean ready() throws IOException {
return br.ready();
}
public void waitForInput() throws InterruptedException {
Thread.sleep(3000);
}
}
static void shuffle(int[]in) {
for(int i=0;i<in.length;i++) {
int idx=(int)(Math.random()*in.length);
int tmp=in[i];
in[i]=in[idx];
in[idx]=tmp;
}
}
static void shuffle(long[]in) {
for(int i=0;i<in.length;i++) {
int idx=(int)(Math.random()*in.length);
long tmp=in[i];
in[i]=in[idx];
in[idx]=tmp;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
40,
13,
40,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
199,
23
],
[
199,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
26,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
26,
40
],
[
40,
41
],
[
40,
42
],
[
26,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
74,
80
],
[
80,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
26,
86
],
[
86,
87
],
[
86,
88
],
[
26,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
89,
99
],
[
99,
100
],
[
100,
101
],
[
89,
102
],
[
103,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
104,
110
],
[
110,
111
],
[
26,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
24,
118
],
[
118,
119
],
[
199,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
120,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
131,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
136,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
130,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
120,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
158,
159
],
[
120,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
172,
173
],
[
172,
174
],
[
167,
175
],
[
175,
176
],
[
176,
177
],
[
167,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
179,
183
],
[
183,
184
],
[
162,
185
],
[
185,
186
],
[
160,
187
],
[
187,
188
],
[
120,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
193,
196
],
[
196,
197
],
[
0,
198
],
[
198,
199
],
[
198,
200
]
] |
[
"import java.io.*;\nimport java.math.*;\nimport java.security.*;\nimport java.text.*;\nimport java.util.*;\nimport java.util.concurrent.*;\nimport java.util.regex.*;\n\n\npublic class Main {\n\n public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt(), k = scan.nextInt();\n \tint [] arr = new int [n];\n\n \tfor(int i=0; i<k; i++) {\n \t\tint d = scan.nextInt();\n \t\tfor(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}\n \t}\n \tint count = 0;\n \tfor(int i=0; i<arr.length; i++) {\n \t\tif(arr[i] == 0) count++;\n \t}\n \t\tSystem.out.println(count);\n }\n\n \n static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \t\n }\n \n \n}\n",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.security.*;",
"security.*",
"java",
"import java.text.*;",
"text.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.util.concurrent.*;",
"concurrent.*",
"java.util",
"import java.util.regex.*;",
"regex.*",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt(), k = scan.nextInt();\n \tint [] arr = new int [n];\n\n \tfor(int i=0; i<k; i++) {\n \t\tint d = scan.nextInt();\n \t\tfor(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}\n \t}\n \tint count = 0;\n \tfor(int i=0; i<arr.length; i++) {\n \t\tif(arr[i] == 0) count++;\n \t}\n \t\tSystem.out.println(count);\n }\n\n \n static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \t\n }\n \n \n}",
"Main",
"public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt(), k = scan.nextInt();\n \tint [] arr = new int [n];\n\n \tfor(int i=0; i<k; i++) {\n \t\tint d = scan.nextInt();\n \t\tfor(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}\n \t}\n \tint count = 0;\n \tfor(int i=0; i<arr.length; i++) {\n \t\tif(arr[i] == 0) count++;\n \t}\n \t\tSystem.out.println(count);\n }",
"main",
"{\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt(), k = scan.nextInt();\n \tint [] arr = new int [n];\n\n \tfor(int i=0; i<k; i++) {\n \t\tint d = scan.nextInt();\n \t\tfor(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}\n \t}\n \tint count = 0;\n \tfor(int i=0; i<arr.length; i++) {\n \t\tif(arr[i] == 0) count++;\n \t}\n \t\tSystem.out.println(count);\n }",
"FastScanner scan = new FastScanner();",
"scan",
"new FastScanner()",
"int n = scan.nextInt()",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int [] arr = new int [n];",
"arr",
"new int [n]",
"n",
"for(int i=0; i<k; i++) {\n \t\tint d = scan.nextInt();\n \t\tfor(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n \t\tint d = scan.nextInt();\n \t\tfor(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}\n \t}",
"{\n \t\tint d = scan.nextInt();\n \t\tfor(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}\n \t}",
"int d = scan.nextInt();",
"d",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}",
"{\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}",
"int x = scan.nextInt();",
"x",
"scan.nextInt()",
"scan.nextInt",
"scan",
"x--",
"x",
"arr[x] ++",
"arr[x]",
"arr",
"x",
"int count = 0;",
"count",
"0",
"for(int i=0; i<arr.length; i++) {\n \t\tif(arr[i] == 0) count++;\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n \t\tif(arr[i] == 0) count++;\n \t}",
"{\n \t\tif(arr[i] == 0) count++;\n \t}",
"if(arr[i] == 0) count++;",
"arr[i] == 0",
"arr[i]",
"arr",
"i",
"0",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \t\n }",
"FastScanner",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st = new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}",
"next",
"{\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}",
"while(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}",
"catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}",
"IOException e",
"{\n \t\t\t\te.printStackTrace();\n \t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t}",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}",
"nextInt",
"{\n \t\treturn Integer.parseInt(next());\n \t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"int [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}",
"readArray",
"{\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}",
"int [] a = new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0; i<n ; i++) a[i] = nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextInt();",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"long nextLong() {\n \t\treturn Long.parseLong(next());\n \t}",
"nextLong",
"{\n \t\treturn Long.parseLong(next());\n \t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public class Main {\n\n public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt(), k = scan.nextInt();\n \tint [] arr = new int [n];\n\n \tfor(int i=0; i<k; i++) {\n \t\tint d = scan.nextInt();\n \t\tfor(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}\n \t}\n \tint count = 0;\n \tfor(int i=0; i<arr.length; i++) {\n \t\tif(arr[i] == 0) count++;\n \t}\n \t\tSystem.out.println(count);\n }\n\n \n static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \t\n }\n \n \n}",
"public class Main {\n\n public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt(), k = scan.nextInt();\n \tint [] arr = new int [n];\n\n \tfor(int i=0; i<k; i++) {\n \t\tint d = scan.nextInt();\n \t\tfor(int j=0; j<d; j++) {\n \t\t\tint x = scan.nextInt();\n \t\t\tx--;\n \t\t\tarr[x] ++;\n \t\t}\n \t}\n \tint count = 0;\n \tfor(int i=0; i<arr.length; i++) {\n \t\tif(arr[i] == 0) count++;\n \t}\n \t\tSystem.out.println(count);\n }\n\n \n static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \t\n }\n \n \n}",
"Main"
] |
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
public class Main {
public static void main(String[] args) {
FastScanner scan = new FastScanner();
int n = scan.nextInt(), k = scan.nextInt();
int [] arr = new int [n];
for(int i=0; i<k; i++) {
int d = scan.nextInt();
for(int j=0; j<d; j++) {
int x = scan.nextInt();
x--;
arr[x] ++;
}
}
int count = 0;
for(int i=0; i<arr.length; i++) {
if(arr[i] == 0) count++;
}
System.out.println(count);
}
static class FastScanner{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
String next() {
while(!st.hasMoreTokens())
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e){
e.printStackTrace();
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
int [] readArray(int n) {
int [] a = new int[n];
for(int i=0; i<n ; i++) a[i] = nextInt();
return a;
}
long nextLong() {
return Long.parseLong(next());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
84,
11
],
[
84,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
14,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
14,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
12,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
] |
[
"import java.util.HashSet;\nimport java.util.Scanner;\nimport java.util.Set;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tSet<Integer> sunuke = new HashSet<>();\n\n\t\tfor(int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\n\t\t\tfor(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tint ans = n - sunuke.size();\n\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tSet<Integer> sunuke = new HashSet<>();\n\n\t\tfor(int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\n\t\t\tfor(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tint ans = n - sunuke.size();\n\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tSet<Integer> sunuke = new HashSet<>();\n\n\t\tfor(int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\n\t\t\tfor(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tint ans = n - sunuke.size();\n\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tSet<Integer> sunuke = new HashSet<>();\n\n\t\tfor(int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\n\t\t\tfor(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tint ans = n - sunuke.size();\n\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Set<Integer> sunuke = new HashSet<>();",
"sunuke",
"new HashSet<>()",
"for(int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\n\t\t\tfor(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tint d = sc.nextInt();\n\n\t\t\tfor(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = sc.nextInt();\n\n\t\t\tfor(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}\n\t\t}",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}",
"{\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}",
"sunuke.add(sc.nextInt())",
"sunuke.add",
"sunuke",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = n - sunuke.size();",
"ans",
"n - sunuke.size()",
"n",
"sunuke.size()",
"sunuke.size",
"sunuke",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tSet<Integer> sunuke = new HashSet<>();\n\n\t\tfor(int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\n\t\t\tfor(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tint ans = n - sunuke.size();\n\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tSet<Integer> sunuke = new HashSet<>();\n\n\t\tfor(int i=0; i<k; i++) {\n\t\t\tint d = sc.nextInt();\n\n\t\t\tfor(int j=0; j<d; j++) {\n\t\t\t\tsunuke.add(sc.nextInt());\n\t\t\t}\n\t\t}\n\n\t\tint ans = n - sunuke.size();\n\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"Main"
] |
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
Set<Integer> sunuke = new HashSet<>();
for(int i=0; i<k; i++) {
int d = sc.nextInt();
for(int j=0; j<d; j++) {
sunuke.add(sc.nextInt());
}
}
int ans = n - sunuke.size();
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
17,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
2,
4,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
14,
40,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
4,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
11,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
11,
43
],
[
43,
44
],
[
43,
45
],
[
11,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
79,
83
],
[
76,
84
],
[
11,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
85,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
11,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
9,
110
],
[
110,
111
]
] |
[
"import java.util.*;\nclass Main{\n static Scanner sc=new Scanner(System.in);\n public static void main(String[] args){\n int N = sc.nextInt();\n boolean flag[] = new boolean[N];\n for(int i=0;i<N;i++) flag[i] = false;\n int K = sc.nextInt();\n int count = 0;\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n for(int j=0;j<d;j++)\n \tflag[sc.nextInt()-1]=true;\n }\n for(int i=0;i<N;i++) if(!flag[i]) count++;\n System.out.println(count);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n static Scanner sc=new Scanner(System.in);\n public static void main(String[] args){\n int N = sc.nextInt();\n boolean flag[] = new boolean[N];\n for(int i=0;i<N;i++) flag[i] = false;\n int K = sc.nextInt();\n int count = 0;\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n for(int j=0;j<d;j++)\n \tflag[sc.nextInt()-1]=true;\n }\n for(int i=0;i<N;i++) if(!flag[i]) count++;\n System.out.println(count);\n }\n}",
"Main",
"static Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args){\n int N = sc.nextInt();\n boolean flag[] = new boolean[N];\n for(int i=0;i<N;i++) flag[i] = false;\n int K = sc.nextInt();\n int count = 0;\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n for(int j=0;j<d;j++)\n \tflag[sc.nextInt()-1]=true;\n }\n for(int i=0;i<N;i++) if(!flag[i]) count++;\n System.out.println(count);\n }",
"main",
"{\n int N = sc.nextInt();\n boolean flag[] = new boolean[N];\n for(int i=0;i<N;i++) flag[i] = false;\n int K = sc.nextInt();\n int count = 0;\n for(int i=0;i<K;i++){\n int d = sc.nextInt();\n for(int j=0;j<d;j++)\n \tflag[sc.nextInt()-1]=true;\n }\n for(int i=0;i<N;i++) if(!flag[i]) count++;\n System.out.println(count);\n }",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean flag[] = new boolean[N];",
"flag",
"new boolean[N]",
"N",
"for(int i=0;i<N;i++) flag[i] = false;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"flag[i] = false;",
"flag[i] = false",
"flag[i]",
"flag",
"i",
"false",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for(int i=0;i<K;i++){\n int d = sc.nextInt();\n for(int j=0;j<d;j++)\n \tflag[sc.nextInt()-1]=true;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n for(int j=0;j<d;j++)\n \tflag[sc.nextInt()-1]=true;\n }",
"{\n int d = sc.nextInt();\n for(int j=0;j<d;j++)\n \tflag[sc.nextInt()-1]=true;\n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0;j<d;j++)\n \tflag[sc.nextInt()-1]=true;",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"flag[sc.nextInt()-1]=true;",
"flag[sc.nextInt()-1]=true",
"flag[sc.nextInt()-1]",
"flag",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"true",
"for(int i=0;i<N;i++) if(!flag[i]) count++;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"if(!flag[i]) count++;",
"if(!flag[i]) count++;",
"!flag[i]",
"flag[i]",
"flag",
"i",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args"
] |
import java.util.*;
class Main{
static Scanner sc=new Scanner(System.in);
public static void main(String[] args){
int N = sc.nextInt();
boolean flag[] = new boolean[N];
for(int i=0;i<N;i++) flag[i] = false;
int K = sc.nextInt();
int count = 0;
for(int i=0;i<K;i++){
int d = sc.nextInt();
for(int j=0;j<d;j++)
flag[sc.nextInt()-1]=true;
}
for(int i=0;i<N;i++) if(!flag[i]) count++;
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
2,
4,
18,
13,
17,
41,
13,
4,
18,
13,
41,
13,
40,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
4,
18,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
42,
49
],
[
49,
50
],
[
49,
51
],
[
42,
52
],
[
52,
53
],
[
53,
54
],
[
42,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
57,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
64,
74
],
[
74,
75
],
[
75,
76
],
[
64,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
8,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
6,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n boolean a[]=new boolean[scn.nextInt()+1];\n int k=scn.nextInt();\n int ans=-1;\n for(int i=0;i<k;i++){\n for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }\n }\n for (int i=0;i<a.length;i++){\n if(!a[i]) ans++;\n }\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n boolean a[]=new boolean[scn.nextInt()+1];\n int k=scn.nextInt();\n int ans=-1;\n for(int i=0;i<k;i++){\n for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }\n }\n for (int i=0;i<a.length;i++){\n if(!a[i]) ans++;\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n boolean a[]=new boolean[scn.nextInt()+1];\n int k=scn.nextInt();\n int ans=-1;\n for(int i=0;i<k;i++){\n for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }\n }\n for (int i=0;i<a.length;i++){\n if(!a[i]) ans++;\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner scn = new Scanner(System.in);\n boolean a[]=new boolean[scn.nextInt()+1];\n int k=scn.nextInt();\n int ans=-1;\n for(int i=0;i<k;i++){\n for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }\n }\n for (int i=0;i<a.length;i++){\n if(!a[i]) ans++;\n }\n System.out.println(ans);\n }",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"boolean a[]=new boolean[scn.nextInt()+1];",
"a",
"new boolean[scn.nextInt()+1]",
"scn.nextInt()+1",
"scn.nextInt()",
"scn.nextInt",
"scn",
"1",
"int k=scn.nextInt();",
"k",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int ans=-1;",
"ans",
"-1",
"1",
"for(int i=0;i<k;i++){\n for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }\n }",
"{\n for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }\n }",
"for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }",
"int j=scn.nextInt();",
"int j=scn.nextInt();",
"j",
"scn.nextInt()",
"scn.nextInt",
"scn",
"j>0",
"j",
"0",
"j--",
"j--",
"j",
"{\n a[scn.nextInt()]=true;\n }",
"{\n a[scn.nextInt()]=true;\n }",
"a[scn.nextInt()]=true",
"a[scn.nextInt()]",
"a",
"scn.nextInt()",
"scn.nextInt",
"scn",
"true",
"for (int i=0;i<a.length;i++){\n if(!a[i]) ans++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n if(!a[i]) ans++;\n }",
"{\n if(!a[i]) ans++;\n }",
"if(!a[i]) ans++;",
"!a[i]",
"a[i]",
"a",
"i",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n boolean a[]=new boolean[scn.nextInt()+1];\n int k=scn.nextInt();\n int ans=-1;\n for(int i=0;i<k;i++){\n for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }\n }\n for (int i=0;i<a.length;i++){\n if(!a[i]) ans++;\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n boolean a[]=new boolean[scn.nextInt()+1];\n int k=scn.nextInt();\n int ans=-1;\n for(int i=0;i<k;i++){\n for(int j=scn.nextInt();j>0;j--){\n a[scn.nextInt()]=true;\n }\n }\n for (int i=0;i<a.length;i++){\n if(!a[i]) ans++;\n }\n System.out.println(ans);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scn = new Scanner(System.in);
boolean a[]=new boolean[scn.nextInt()+1];
int k=scn.nextInt();
int ans=-1;
for(int i=0;i<k;i++){
for(int j=scn.nextInt();j>0;j--){
a[scn.nextInt()]=true;
}
}
for (int i=0;i<a.length;i++){
if(!a[i]) ans++;
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
40,
18,
13,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
36,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
55,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
55,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
55,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
78,
86
],
[
86,
87
],
[
87,
88
],
[
78,
89
],
[
90,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
90,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
8,
105
],
[
105,
106
],
[
105,
107
],
[
8,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
108,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
121,
127
],
[
127,
128
],
[
128,
129
],
[
8,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
6,
136
],
[
136,
137
],
[
0,
138
],
[
138,
139
],
[
138,
140
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String line1 = sc.nextLine();\n String[] array = line1.split(\" \");\n \n int n = Integer.parseInt(array[0]);\n int k = Integer.parseInt(array[1]);\n \n int[] sunuke = new int[n];\n \n for(int i = 0; i < k; i++)\n {\n String buf1 = sc.nextLine();\n int ninzu = Integer.parseInt(buf1);\n String buf2 = sc.nextLine();\n String[] okasimoti = buf2.split(\" \");\n \n for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }\n }\n \n int count = 0;\n for(int i = 0; i < n; i++)\n {\n if(sunuke[i] == 0)\n {\n count++;\n }\n }\n \n \n System.out.println(count);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String line1 = sc.nextLine();\n String[] array = line1.split(\" \");\n \n int n = Integer.parseInt(array[0]);\n int k = Integer.parseInt(array[1]);\n \n int[] sunuke = new int[n];\n \n for(int i = 0; i < k; i++)\n {\n String buf1 = sc.nextLine();\n int ninzu = Integer.parseInt(buf1);\n String buf2 = sc.nextLine();\n String[] okasimoti = buf2.split(\" \");\n \n for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }\n }\n \n int count = 0;\n for(int i = 0; i < n; i++)\n {\n if(sunuke[i] == 0)\n {\n count++;\n }\n }\n \n \n System.out.println(count);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String line1 = sc.nextLine();\n String[] array = line1.split(\" \");\n \n int n = Integer.parseInt(array[0]);\n int k = Integer.parseInt(array[1]);\n \n int[] sunuke = new int[n];\n \n for(int i = 0; i < k; i++)\n {\n String buf1 = sc.nextLine();\n int ninzu = Integer.parseInt(buf1);\n String buf2 = sc.nextLine();\n String[] okasimoti = buf2.split(\" \");\n \n for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }\n }\n \n int count = 0;\n for(int i = 0; i < n; i++)\n {\n if(sunuke[i] == 0)\n {\n count++;\n }\n }\n \n \n System.out.println(count);\n }",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n String line1 = sc.nextLine();\n String[] array = line1.split(\" \");\n \n int n = Integer.parseInt(array[0]);\n int k = Integer.parseInt(array[1]);\n \n int[] sunuke = new int[n];\n \n for(int i = 0; i < k; i++)\n {\n String buf1 = sc.nextLine();\n int ninzu = Integer.parseInt(buf1);\n String buf2 = sc.nextLine();\n String[] okasimoti = buf2.split(\" \");\n \n for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }\n }\n \n int count = 0;\n for(int i = 0; i < n; i++)\n {\n if(sunuke[i] == 0)\n {\n count++;\n }\n }\n \n \n System.out.println(count);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String line1 = sc.nextLine();",
"line1",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] array = line1.split(\" \");",
"array",
"line1.split(\" \")",
"line1.split",
"line1",
"\" \"",
"int n = Integer.parseInt(array[0]);",
"n",
"Integer.parseInt(array[0])",
"Integer.parseInt",
"Integer",
"array[0]",
"array",
"0",
"int k = Integer.parseInt(array[1]);",
"k",
"Integer.parseInt(array[1])",
"Integer.parseInt",
"Integer",
"array[1]",
"array",
"1",
"int[] sunuke = new int[n];",
"sunuke",
"new int[n]",
"n",
"for(int i = 0; i < k; i++)\n {\n String buf1 = sc.nextLine();\n int ninzu = Integer.parseInt(buf1);\n String buf2 = sc.nextLine();\n String[] okasimoti = buf2.split(\" \");\n \n for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n String buf1 = sc.nextLine();\n int ninzu = Integer.parseInt(buf1);\n String buf2 = sc.nextLine();\n String[] okasimoti = buf2.split(\" \");\n \n for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }\n }",
"{\n String buf1 = sc.nextLine();\n int ninzu = Integer.parseInt(buf1);\n String buf2 = sc.nextLine();\n String[] okasimoti = buf2.split(\" \");\n \n for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }\n }",
"String buf1 = sc.nextLine();",
"buf1",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int ninzu = Integer.parseInt(buf1);",
"ninzu",
"Integer.parseInt(buf1)",
"Integer.parseInt",
"Integer",
"buf1",
"String buf2 = sc.nextLine();",
"buf2",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] okasimoti = buf2.split(\" \");",
"okasimoti",
"buf2.split(\" \")",
"buf2.split",
"buf2",
"\" \"",
"for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < ninzu",
"j",
"ninzu",
"j++",
"j++",
"j",
"{\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }",
"{\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }",
"int buf3 = Integer.parseInt(okasimoti[j]);",
"buf3",
"Integer.parseInt(okasimoti[j])",
"Integer.parseInt",
"Integer",
"okasimoti[j]",
"okasimoti",
"j",
"sunuke[buf3 - 1]++",
"sunuke[buf3 - 1]",
"sunuke",
"buf3 - 1",
"buf3",
"1",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < n; i++)\n {\n if(sunuke[i] == 0)\n {\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(sunuke[i] == 0)\n {\n count++;\n }\n }",
"{\n if(sunuke[i] == 0)\n {\n count++;\n }\n }",
"if(sunuke[i] == 0)\n {\n count++;\n }",
"sunuke[i] == 0",
"sunuke[i]",
"sunuke",
"i",
"0",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String line1 = sc.nextLine();\n String[] array = line1.split(\" \");\n \n int n = Integer.parseInt(array[0]);\n int k = Integer.parseInt(array[1]);\n \n int[] sunuke = new int[n];\n \n for(int i = 0; i < k; i++)\n {\n String buf1 = sc.nextLine();\n int ninzu = Integer.parseInt(buf1);\n String buf2 = sc.nextLine();\n String[] okasimoti = buf2.split(\" \");\n \n for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }\n }\n \n int count = 0;\n for(int i = 0; i < n; i++)\n {\n if(sunuke[i] == 0)\n {\n count++;\n }\n }\n \n \n System.out.println(count);\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner sc = new Scanner(System.in);\n String line1 = sc.nextLine();\n String[] array = line1.split(\" \");\n \n int n = Integer.parseInt(array[0]);\n int k = Integer.parseInt(array[1]);\n \n int[] sunuke = new int[n];\n \n for(int i = 0; i < k; i++)\n {\n String buf1 = sc.nextLine();\n int ninzu = Integer.parseInt(buf1);\n String buf2 = sc.nextLine();\n String[] okasimoti = buf2.split(\" \");\n \n for(int j = 0; j < ninzu; j++)\n {\n int buf3 = Integer.parseInt(okasimoti[j]);\n sunuke[buf3 - 1]++;\n }\n }\n \n int count = 0;\n for(int i = 0; i < n; i++)\n {\n if(sunuke[i] == 0)\n {\n count++;\n }\n }\n \n \n System.out.println(count);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String line1 = sc.nextLine();
String[] array = line1.split(" ");
int n = Integer.parseInt(array[0]);
int k = Integer.parseInt(array[1]);
int[] sunuke = new int[n];
for(int i = 0; i < k; i++)
{
String buf1 = sc.nextLine();
int ninzu = Integer.parseInt(buf1);
String buf2 = sc.nextLine();
String[] okasimoti = buf2.split(" ");
for(int j = 0; j < ninzu; j++)
{
int buf3 = Integer.parseInt(okasimoti[j]);
sunuke[buf3 - 1]++;
}
}
int count = 0;
for(int i = 0; i < n; i++)
{
if(sunuke[i] == 0)
{
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
28,
13,
13,
30,
30,
0,
18,
13,
2,
13,
17,
17,
28,
13,
13,
30,
30,
14,
2,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
47,
49
],
[
41,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
41,
71
],
[
71,
72
],
[
71,
73
],
[
71,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
76,
82
],
[
8,
83
],
[
83,
84
],
[
83,
85
],
[
83,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
100,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] ans = new int[N];\n\t\tint ans2 = 0;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint dk = sc.nextInt();\n\t\t\tint list[] = new int[dk];\n\t\t\tfor (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}\n\t\t\tfor (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}\n\t\t}\n\n\t\tfor (int num : ans) {\n\t\t\tif (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(N - ans2);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] ans = new int[N];\n\t\tint ans2 = 0;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint dk = sc.nextInt();\n\t\t\tint list[] = new int[dk];\n\t\t\tfor (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}\n\t\t\tfor (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}\n\t\t}\n\n\t\tfor (int num : ans) {\n\t\t\tif (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(N - ans2);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] ans = new int[N];\n\t\tint ans2 = 0;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint dk = sc.nextInt();\n\t\t\tint list[] = new int[dk];\n\t\t\tfor (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}\n\t\t\tfor (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}\n\t\t}\n\n\t\tfor (int num : ans) {\n\t\t\tif (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(N - ans2);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] ans = new int[N];\n\t\tint ans2 = 0;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint dk = sc.nextInt();\n\t\t\tint list[] = new int[dk];\n\t\t\tfor (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}\n\t\t\tfor (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}\n\t\t}\n\n\t\tfor (int num : ans) {\n\t\t\tif (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(N - ans2);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] ans = new int[N];",
"ans",
"new int[N]",
"N",
"int ans2 = 0;",
"ans2",
"0",
"for (int i = 0; i < K; i++) {\n\t\t\tint dk = sc.nextInt();\n\t\t\tint list[] = new int[dk];\n\t\t\tfor (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}\n\t\t\tfor (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tint dk = sc.nextInt();\n\t\t\tint list[] = new int[dk];\n\t\t\tfor (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}\n\t\t\tfor (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint dk = sc.nextInt();\n\t\t\tint list[] = new int[dk];\n\t\t\tfor (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}\n\t\t\tfor (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}\n\t\t}",
"int dk = sc.nextInt();",
"dk",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int list[] = new int[dk];",
"list",
"new int[dk]",
"dk",
"for (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}",
"int c = 0;",
"int c = 0;",
"c",
"0",
"c < dk",
"c",
"dk",
"c++",
"c++",
"c",
"{\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}",
"{\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}",
"list[c] = sc.nextInt()",
"list[c]",
"list",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}",
"int num",
"list",
"{\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}",
"{\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}",
"ans[num - 1] = 9",
"ans[num - 1]",
"ans",
"num - 1",
"num",
"1",
"9",
"for (int num : ans) {\n\t\t\tif (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}\n\t\t}",
"int num",
"ans",
"{\n\t\t\tif (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}\n\t\t}",
"if (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}",
"num == 9",
"num",
"9",
"{\n\t\t\t\tans2++;\n\t\t\t}",
"ans2++",
"ans2",
"System.out.println(N - ans2)",
"System.out.println",
"System.out",
"System",
"System.out",
"N - ans2",
"N",
"ans2",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] ans = new int[N];\n\t\tint ans2 = 0;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint dk = sc.nextInt();\n\t\t\tint list[] = new int[dk];\n\t\t\tfor (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}\n\t\t\tfor (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}\n\t\t}\n\n\t\tfor (int num : ans) {\n\t\t\tif (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(N - ans2);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] ans = new int[N];\n\t\tint ans2 = 0;\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint dk = sc.nextInt();\n\t\t\tint list[] = new int[dk];\n\t\t\tfor (int c = 0; c < dk; c++) {\n\t\t\t\tlist[c] = sc.nextInt();\n\t\t\t}\n\t\t\tfor (int num : list) {\n\t\t\t\tans[num - 1] = 9;\n\t\t\t}\n\t\t}\n\n\t\tfor (int num : ans) {\n\t\t\tif (num == 9) {\n\t\t\t\tans2++;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(N - ans2);\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int[] ans = new int[N];
int ans2 = 0;
for (int i = 0; i < K; i++) {
int dk = sc.nextInt();
int list[] = new int[dk];
for (int c = 0; c < dk; c++) {
list[c] = sc.nextInt();
}
for (int num : list) {
ans[num - 1] = 9;
}
}
for (int num : ans) {
if (num == 9) {
ans2++;
}
}
System.out.println(N - ans2);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
2,
13,
17,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
18,
18,
13,
13,
17,
17,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
40,
18,
13,
18,
18,
13,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
136,
5
],
[
136,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
25,
26
],
[
25,
27
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
37,
47
],
[
47,
48
],
[
48,
49
],
[
37,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
52,
58
],
[
58,
59
],
[
59,
60
],
[
51,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
68,
74
],
[
61,
75
],
[
75,
76
],
[
76,
77
],
[
61,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
79,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
8,
97
],
[
97,
98
],
[
97,
99
],
[
8,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
100,
110
],
[
110,
111
],
[
111,
112
],
[
100,
113
],
[
114,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
8,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
8,
130
],
[
130,
131
],
[
131,
132
],
[
6,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
] |
[
"import java.util.*;\n\npublic class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint N= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\tint[][] da = new int[K+1][N+1];\n\t\tint[] okashi = new int[N+1];\n\t\t\n\t\tfor(int k=1; k<K+1; k++) {\n\t\t\tda[k][0]= keyboard.nextInt();\n\t\t\tfor(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans =0;\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint N= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\tint[][] da = new int[K+1][N+1];\n\t\tint[] okashi = new int[N+1];\n\t\t\n\t\tfor(int k=1; k<K+1; k++) {\n\t\t\tda[k][0]= keyboard.nextInt();\n\t\t\tfor(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans =0;\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint N= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\tint[][] da = new int[K+1][N+1];\n\t\tint[] okashi = new int[N+1];\n\t\t\n\t\tfor(int k=1; k<K+1; k++) {\n\t\t\tda[k][0]= keyboard.nextInt();\n\t\t\tfor(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans =0;\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint N= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\tint[][] da = new int[K+1][N+1];\n\t\tint[] okashi = new int[N+1];\n\t\t\n\t\tfor(int k=1; k<K+1; k++) {\n\t\t\tda[k][0]= keyboard.nextInt();\n\t\t\tfor(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans =0;\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}",
"Scanner keyboard = new Scanner(System.in);",
"keyboard",
"new Scanner(System.in)",
"int N= keyboard.nextInt();",
"N",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"int K= keyboard.nextInt();",
"K",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"int[][] da = new int[K+1][N+1];",
"da",
"new int[K+1][N+1]",
"K+1",
"K",
"1",
"N+1",
"N",
"1",
"int[] okashi = new int[N+1];",
"okashi",
"new int[N+1]",
"N+1",
"N",
"1",
"for(int k=1; k<K+1; k++) {\n\t\t\tda[k][0]= keyboard.nextInt();\n\t\t\tfor(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}\n\t\t}",
"int k=1;",
"int k=1;",
"k",
"1",
"k<K+1",
"k",
"K+1",
"K",
"1",
"k++",
"k++",
"k",
"{\n\t\t\tda[k][0]= keyboard.nextInt();\n\t\t\tfor(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tda[k][0]= keyboard.nextInt();\n\t\t\tfor(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}\n\t\t}",
"da[k][0]= keyboard.nextInt()",
"da[k][0]",
"da[k]",
"da",
"k",
"0",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"for(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}",
"int a=1;",
"int a=1;",
"a",
"1",
"a<da[k][0]+1",
"a",
"da[k][0]+1",
"da[k][0]",
"da[k]",
"da",
"k",
"0",
"1",
"a++",
"a++",
"a",
"{\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}",
"{\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}",
"da[k][a] = keyboard.nextInt()",
"da[k][a]",
"da[k]",
"da",
"k",
"a",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"okashi[da[k][a]]++",
"okashi[da[k][a]]",
"okashi",
"da[k][a]",
"da[k]",
"da",
"k",
"a",
"int ans =0;",
"ans",
"0",
"for(int i=1; i<N+1; i++) {\n\t\t\tif(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<N+1",
"i",
"N+1",
"N",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tif(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"if(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}",
"okashi[i] == 0",
"okashi[i]",
"okashi",
"i",
"0",
"{\n\t\t\t\tans++;\n\t\t\t}",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"keyboard.close()",
"keyboard.close",
"keyboard",
"String[] args",
"args",
"public class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint N= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\tint[][] da = new int[K+1][N+1];\n\t\tint[] okashi = new int[N+1];\n\t\t\n\t\tfor(int k=1; k<K+1; k++) {\n\t\t\tda[k][0]= keyboard.nextInt();\n\t\t\tfor(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans =0;\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}\n}",
"public class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint N= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\tint[][] da = new int[K+1][N+1];\n\t\tint[] okashi = new int[N+1];\n\t\t\n\t\tfor(int k=1; k<K+1; k++) {\n\t\t\tda[k][0]= keyboard.nextInt();\n\t\t\tfor(int a=1; a<da[k][0]+1; a++) {\n\t\t\t\tda[k][a] = keyboard.nextInt();\n\t\t\t\tokashi[da[k][a]]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans =0;\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(okashi[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
int N= keyboard.nextInt();
int K= keyboard.nextInt();
int[][] da = new int[K+1][N+1];
int[] okashi = new int[N+1];
for(int k=1; k<K+1; k++) {
da[k][0]= keyboard.nextInt();
for(int a=1; a<da[k][0]+1; a++) {
da[k][a] = keyboard.nextInt();
okashi[da[k][a]]++;
}
}
int ans =0;
for(int i=1; i<N+1; i++) {
if(okashi[i] == 0) {
ans++;
}
}
System.out.println(ans);
keyboard.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
2,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
104,
5
],
[
104,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
62,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
72,
82
],
[
82,
83
],
[
83,
84
],
[
72,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
93,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
6,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
] |
[
"\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tboolean[] res = new boolean[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}\n\n\t\t}\n\t\tint output = 0;\n\t\tfor (int i = 0; i < res.length; i++) {\n\t\t\tif (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(output);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tboolean[] res = new boolean[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}\n\n\t\t}\n\t\tint output = 0;\n\t\tfor (int i = 0; i < res.length; i++) {\n\t\t\tif (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(output);\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tboolean[] res = new boolean[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}\n\n\t\t}\n\t\tint output = 0;\n\t\tfor (int i = 0; i < res.length; i++) {\n\t\t\tif (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(output);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tboolean[] res = new boolean[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}\n\n\t\t}\n\t\tint output = 0;\n\t\tfor (int i = 0; i < res.length; i++) {\n\t\t\tif (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(output);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean[] res = new boolean[N];",
"res",
"new boolean[N]",
"N",
"for (int i = 0; i < K; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}\n\n\t\t}",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}\n\n\t\t}",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}",
"{\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}",
"int tmp = sc.nextInt();",
"tmp",
"sc.nextInt()",
"sc.nextInt",
"sc",
"res[tmp - 1] = true",
"res[tmp - 1]",
"res",
"tmp - 1",
"tmp",
"1",
"true",
"int output = 0;",
"output",
"0",
"for (int i = 0; i < res.length; i++) {\n\t\t\tif (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < res.length",
"i",
"res.length",
"res",
"res.length",
"i++",
"i++",
"i",
"{\n\t\t\tif (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}\n\t\t}",
"if (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}",
"!res[i]",
"res[i]",
"res",
"i",
"{\n\t\t\t\toutput++;\n\t\t\t}",
"output++",
"output",
"System.out.println(output)",
"System.out.println",
"System.out",
"System",
"System.out",
"output",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tboolean[] res = new boolean[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}\n\n\t\t}\n\t\tint output = 0;\n\t\tfor (int i = 0; i < res.length; i++) {\n\t\t\tif (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(output);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tboolean[] res = new boolean[N];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint tmp = sc.nextInt();\n\t\t\t\tres[tmp - 1] = true;\n\t\t\t}\n\n\t\t}\n\t\tint output = 0;\n\t\tfor (int i = 0; i < res.length; i++) {\n\t\t\tif (!res[i]) {\n\t\t\t\toutput++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(output);\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
boolean[] res = new boolean[N];
for (int i = 0; i < K; i++) {
int d = sc.nextInt();
for (int j = 0; j < d; j++) {
int tmp = sc.nextInt();
res[tmp - 1] = true;
}
}
int output = 0;
for (int i = 0; i < res.length; i++) {
if (!res[i]) {
output++;
}
}
System.out.println(output);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
4,
18,
13,
17,
17,
41,
13,
17,
28,
13,
13,
30,
30,
14,
13,
40,
13,
4,
18,
18,
13,
13,
2,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
92,
5
],
[
92,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
60,
64
],
[
57,
65
],
[
8,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
69,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
8,
86
],
[
86,
87
],
[
87,
88
],
[
6,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
] |
[
"\n\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n\n // ไบบๆฐ\n int n = sc.nextInt();\n // ็จฎ้ก\n int k = sc.nextInt();\n\n boolean[] sunuke = new boolean[n];\n\n for (int i = 0; i < k; i++) {\n int jmax = sc.nextInt();\n for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }\n }\n\n int ans = 0;\n\n for (boolean isTrue : sunuke) {\n if (isTrue)\n ans++;\n }\n System.out.println(n - ans);\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n\n // ไบบๆฐ\n int n = sc.nextInt();\n // ็จฎ้ก\n int k = sc.nextInt();\n\n boolean[] sunuke = new boolean[n];\n\n for (int i = 0; i < k; i++) {\n int jmax = sc.nextInt();\n for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }\n }\n\n int ans = 0;\n\n for (boolean isTrue : sunuke) {\n if (isTrue)\n ans++;\n }\n System.out.println(n - ans);\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n\n // ไบบๆฐ\n int n = sc.nextInt();\n // ็จฎ้ก\n int k = sc.nextInt();\n\n boolean[] sunuke = new boolean[n];\n\n for (int i = 0; i < k; i++) {\n int jmax = sc.nextInt();\n for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }\n }\n\n int ans = 0;\n\n for (boolean isTrue : sunuke) {\n if (isTrue)\n ans++;\n }\n System.out.println(n - ans);\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n // ไบบๆฐ\n int n = sc.nextInt();\n // ็จฎ้ก\n int k = sc.nextInt();\n\n boolean[] sunuke = new boolean[n];\n\n for (int i = 0; i < k; i++) {\n int jmax = sc.nextInt();\n for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }\n }\n\n int ans = 0;\n\n for (boolean isTrue : sunuke) {\n if (isTrue)\n ans++;\n }\n System.out.println(n - ans);\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean[] sunuke = new boolean[n];",
"sunuke",
"new boolean[n]",
"n",
"for (int i = 0; i < k; i++) {\n int jmax = sc.nextInt();\n for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int jmax = sc.nextInt();\n for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }\n }",
"{\n int jmax = sc.nextInt();\n for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }\n }",
"int jmax = sc.nextInt();",
"jmax",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < jmax",
"j",
"jmax",
"j++",
"j++",
"j",
"{\n sunuke[sc.nextInt() - 1] = true;\n }",
"{\n sunuke[sc.nextInt() - 1] = true;\n }",
"sunuke[sc.nextInt() - 1] = true",
"sunuke[sc.nextInt() - 1]",
"sunuke",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"true",
"int ans = 0;",
"ans",
"0",
"for (boolean isTrue : sunuke) {\n if (isTrue)\n ans++;\n }",
"boolean isTrue",
"sunuke",
"{\n if (isTrue)\n ans++;\n }",
"{\n if (isTrue)\n ans++;\n }",
"if (isTrue)\n ans++;",
"isTrue",
"ans++",
"ans",
"System.out.println(n - ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"n - ans",
"n",
"ans",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n\n // ไบบๆฐ\n int n = sc.nextInt();\n // ็จฎ้ก\n int k = sc.nextInt();\n\n boolean[] sunuke = new boolean[n];\n\n for (int i = 0; i < k; i++) {\n int jmax = sc.nextInt();\n for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }\n }\n\n int ans = 0;\n\n for (boolean isTrue : sunuke) {\n if (isTrue)\n ans++;\n }\n System.out.println(n - ans);\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n\n // ไบบๆฐ\n int n = sc.nextInt();\n // ็จฎ้ก\n int k = sc.nextInt();\n\n boolean[] sunuke = new boolean[n];\n\n for (int i = 0; i < k; i++) {\n int jmax = sc.nextInt();\n for (int j = 0; j < jmax; j++) {\n sunuke[sc.nextInt() - 1] = true;\n }\n }\n\n int ans = 0;\n\n for (boolean isTrue : sunuke) {\n if (isTrue)\n ans++;\n }\n System.out.println(n - ans);\n sc.close();\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
// ไบบๆฐ
int n = sc.nextInt();
// ็จฎ้ก
int k = sc.nextInt();
boolean[] sunuke = new boolean[n];
for (int i = 0; i < k; i++) {
int jmax = sc.nextInt();
for (int j = 0; j < jmax; j++) {
sunuke[sc.nextInt() - 1] = true;
}
}
int ans = 0;
for (boolean isTrue : sunuke) {
if (isTrue)
ans++;
}
System.out.println(n - ans);
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
17,
40,
18,
13,
13,
41,
13,
17,
28,
13,
13,
30,
30,
14,
2,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
120,
5
],
[
120,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
14,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
33,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
8,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
52,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
63,
68
],
[
52,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
81,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
8,
96
],
[
96,
97
],
[
96,
98
],
[
8,
99
],
[
99,
100
],
[
99,
101
],
[
99,
102
],
[
103,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
109,
110
],
[
8,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
6,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
] |
[
"import java.util.*;\n \npublic class Main{\n public static void main(String[]args){\n Scanner sc = new Scanner(System.in);\n String[] S = sc.nextLine().split(\" \");\n int N = Integer.parseInt(S[0]);\n int K = Integer.parseInt(S[1]);\n int[] val = new int[N];\n for(int i = 0; i < K; i++){\n int A = Integer.parseInt(sc.nextLine());\n S = sc.nextLine().split(\" \");\n for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }\n }\n int ans = 0;\n for(int c : val){\n if(c == 0){\n ans++;\n }\n }\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[]args){\n Scanner sc = new Scanner(System.in);\n String[] S = sc.nextLine().split(\" \");\n int N = Integer.parseInt(S[0]);\n int K = Integer.parseInt(S[1]);\n int[] val = new int[N];\n for(int i = 0; i < K; i++){\n int A = Integer.parseInt(sc.nextLine());\n S = sc.nextLine().split(\" \");\n for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }\n }\n int ans = 0;\n for(int c : val){\n if(c == 0){\n ans++;\n }\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[]args){\n Scanner sc = new Scanner(System.in);\n String[] S = sc.nextLine().split(\" \");\n int N = Integer.parseInt(S[0]);\n int K = Integer.parseInt(S[1]);\n int[] val = new int[N];\n for(int i = 0; i < K; i++){\n int A = Integer.parseInt(sc.nextLine());\n S = sc.nextLine().split(\" \");\n for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }\n }\n int ans = 0;\n for(int c : val){\n if(c == 0){\n ans++;\n }\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String[] S = sc.nextLine().split(\" \");\n int N = Integer.parseInt(S[0]);\n int K = Integer.parseInt(S[1]);\n int[] val = new int[N];\n for(int i = 0; i < K; i++){\n int A = Integer.parseInt(sc.nextLine());\n S = sc.nextLine().split(\" \");\n for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }\n }\n int ans = 0;\n for(int c : val){\n if(c == 0){\n ans++;\n }\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String[] S = sc.nextLine().split(\" \");",
"S",
"sc.nextLine().split(\" \")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\" \"",
"int N = Integer.parseInt(S[0]);",
"N",
"Integer.parseInt(S[0])",
"Integer.parseInt",
"Integer",
"S[0]",
"S",
"0",
"int K = Integer.parseInt(S[1]);",
"K",
"Integer.parseInt(S[1])",
"Integer.parseInt",
"Integer",
"S[1]",
"S",
"1",
"int[] val = new int[N];",
"val",
"new int[N]",
"N",
"for(int i = 0; i < K; i++){\n int A = Integer.parseInt(sc.nextLine());\n S = sc.nextLine().split(\" \");\n for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int A = Integer.parseInt(sc.nextLine());\n S = sc.nextLine().split(\" \");\n for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }\n }",
"{\n int A = Integer.parseInt(sc.nextLine());\n S = sc.nextLine().split(\" \");\n for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }\n }",
"int A = Integer.parseInt(sc.nextLine());",
"A",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"S = sc.nextLine().split(\" \")",
"S",
"sc.nextLine().split(\" \")",
"sc.nextLine().split",
"sc.nextLine()",
"sc.nextLine",
"sc",
"\" \"",
"for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < A",
"j",
"A",
"j++",
"j++",
"j",
"{\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }",
"{\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }",
"int b = Integer.parseInt(S[j])-1;",
"b",
"Integer.parseInt(S[j])-1",
"Integer.parseInt(S[j])",
"Integer.parseInt",
"Integer",
"S[j]",
"S",
"j",
"1",
"val[b]++",
"val[b]",
"val",
"b",
"int ans = 0;",
"ans",
"0",
"for(int c : val){\n if(c == 0){\n ans++;\n }\n }",
"int c",
"val",
"{\n if(c == 0){\n ans++;\n }\n }",
"{\n if(c == 0){\n ans++;\n }\n }",
"if(c == 0){\n ans++;\n }",
"c == 0",
"c",
"0",
"{\n ans++;\n }",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[]args",
"args",
"public class Main{\n public static void main(String[]args){\n Scanner sc = new Scanner(System.in);\n String[] S = sc.nextLine().split(\" \");\n int N = Integer.parseInt(S[0]);\n int K = Integer.parseInt(S[1]);\n int[] val = new int[N];\n for(int i = 0; i < K; i++){\n int A = Integer.parseInt(sc.nextLine());\n S = sc.nextLine().split(\" \");\n for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }\n }\n int ans = 0;\n for(int c : val){\n if(c == 0){\n ans++;\n }\n }\n System.out.println(ans);\n }\n}",
"public class Main{\n public static void main(String[]args){\n Scanner sc = new Scanner(System.in);\n String[] S = sc.nextLine().split(\" \");\n int N = Integer.parseInt(S[0]);\n int K = Integer.parseInt(S[1]);\n int[] val = new int[N];\n for(int i = 0; i < K; i++){\n int A = Integer.parseInt(sc.nextLine());\n S = sc.nextLine().split(\" \");\n for(int j = 0; j < A; j++){\n int b = Integer.parseInt(S[j])-1;\n val[b]++;\n }\n }\n int ans = 0;\n for(int c : val){\n if(c == 0){\n ans++;\n }\n }\n System.out.println(ans);\n }\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String[]args){
Scanner sc = new Scanner(System.in);
String[] S = sc.nextLine().split(" ");
int N = Integer.parseInt(S[0]);
int K = Integer.parseInt(S[1]);
int[] val = new int[N];
for(int i = 0; i < K; i++){
int A = Integer.parseInt(sc.nextLine());
S = sc.nextLine().split(" ");
for(int j = 0; j < A; j++){
int b = Integer.parseInt(S[j])-1;
val[b]++;
}
}
int ans = 0;
for(int c : val){
if(c == 0){
ans++;
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
84,
5
],
[
84,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint peopleNum = sc.nextInt(); // ไบบๆฐ\n \tint snackNum = sc.nextInt(); // ใ่ๅญใฎๆฐ\n \t\n \tList<Integer> ownList = new ArrayList<Integer>();\n \tfor(int i = 0; i < snackNum; i++){\n \tint ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tfor(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }\n }\n \n \t// ใ่ๅญใๆใฃใฆใใไบบใฎ้่คใๆ้ค -> ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tList<Integer> ownListB = new ArrayList<Integer>(new LinkedHashSet<>(ownList));\n \tint size = ownListB.size();\n \n \t// ๅ
จไบบๆฐ - ใ่ๅญใๆใฃใฆใใไบบๆฐ = ใ่ๅญใๆใฃใฆใใชใไบบๆฐ\n \tSystem.out.println(peopleNum - size);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint peopleNum = sc.nextInt(); // ไบบๆฐ\n \tint snackNum = sc.nextInt(); // ใ่ๅญใฎๆฐ\n \t\n \tList<Integer> ownList = new ArrayList<Integer>();\n \tfor(int i = 0; i < snackNum; i++){\n \tint ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tfor(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }\n }\n \n \t// ใ่ๅญใๆใฃใฆใใไบบใฎ้่คใๆ้ค -> ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tList<Integer> ownListB = new ArrayList<Integer>(new LinkedHashSet<>(ownList));\n \tint size = ownListB.size();\n \n \t// ๅ
จไบบๆฐ - ใ่ๅญใๆใฃใฆใใไบบๆฐ = ใ่ๅญใๆใฃใฆใใชใไบบๆฐ\n \tSystem.out.println(peopleNum - size);\n }\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint peopleNum = sc.nextInt(); // ไบบๆฐ\n \tint snackNum = sc.nextInt(); // ใ่ๅญใฎๆฐ\n \t\n \tList<Integer> ownList = new ArrayList<Integer>();\n \tfor(int i = 0; i < snackNum; i++){\n \tint ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tfor(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }\n }\n \n \t// ใ่ๅญใๆใฃใฆใใไบบใฎ้่คใๆ้ค -> ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tList<Integer> ownListB = new ArrayList<Integer>(new LinkedHashSet<>(ownList));\n \tint size = ownListB.size();\n \n \t// ๅ
จไบบๆฐ - ใ่ๅญใๆใฃใฆใใไบบๆฐ = ใ่ๅญใๆใฃใฆใใชใไบบๆฐ\n \tSystem.out.println(peopleNum - size);\n }",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint peopleNum = sc.nextInt(); // ไบบๆฐ\n \tint snackNum = sc.nextInt(); // ใ่ๅญใฎๆฐ\n \t\n \tList<Integer> ownList = new ArrayList<Integer>();\n \tfor(int i = 0; i < snackNum; i++){\n \tint ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tfor(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }\n }\n \n \t// ใ่ๅญใๆใฃใฆใใไบบใฎ้่คใๆ้ค -> ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tList<Integer> ownListB = new ArrayList<Integer>(new LinkedHashSet<>(ownList));\n \tint size = ownListB.size();\n \n \t// ๅ
จไบบๆฐ - ใ่ๅญใๆใฃใฆใใไบบๆฐ = ใ่ๅญใๆใฃใฆใใชใไบบๆฐ\n \tSystem.out.println(peopleNum - size);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int peopleNum = sc.nextInt();",
"peopleNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int snackNum = sc.nextInt();",
"snackNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> ownList = new ArrayList<Integer>();",
"ownList",
"new ArrayList<Integer>()",
"for(int i = 0; i < snackNum; i++){\n \tint ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tfor(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < snackNum",
"i",
"snackNum",
"i++",
"i++",
"i",
"{\n \tint ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tfor(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }\n }",
"{\n \tint ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tfor(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }\n }",
"int ownNum = sc.nextInt();",
"ownNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < ownNum",
"j",
"ownNum",
"j++",
"j++",
"j",
"{\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }",
"{\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }",
"int people = sc.nextInt();",
"people",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ownList.add(people)",
"ownList.add",
"ownList",
"people",
"List<Integer> ownListB = new ArrayList<Integer>(new LinkedHashSet<>(ownList));",
"ownListB",
"new ArrayList<Integer>(new LinkedHashSet<>(ownList))",
"int size = ownListB.size();",
"size",
"ownListB.size()",
"ownListB.size",
"ownListB",
"System.out.println(peopleNum - size)",
"System.out.println",
"System.out",
"System",
"System.out",
"peopleNum - size",
"peopleNum",
"size",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint peopleNum = sc.nextInt(); // ไบบๆฐ\n \tint snackNum = sc.nextInt(); // ใ่ๅญใฎๆฐ\n \t\n \tList<Integer> ownList = new ArrayList<Integer>();\n \tfor(int i = 0; i < snackNum; i++){\n \tint ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tfor(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }\n }\n \n \t// ใ่ๅญใๆใฃใฆใใไบบใฎ้่คใๆ้ค -> ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tList<Integer> ownListB = new ArrayList<Integer>(new LinkedHashSet<>(ownList));\n \tint size = ownListB.size();\n \n \t// ๅ
จไบบๆฐ - ใ่ๅญใๆใฃใฆใใไบบๆฐ = ใ่ๅญใๆใฃใฆใใชใไบบๆฐ\n \tSystem.out.println(peopleNum - size);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint peopleNum = sc.nextInt(); // ไบบๆฐ\n \tint snackNum = sc.nextInt(); // ใ่ๅญใฎๆฐ\n \t\n \tList<Integer> ownList = new ArrayList<Integer>();\n \tfor(int i = 0; i < snackNum; i++){\n \tint ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tfor(int j = 0; j < ownNum; j++){\n int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ\n ownList.add(people);\n }\n }\n \n \t// ใ่ๅญใๆใฃใฆใใไบบใฎ้่คใๆ้ค -> ใ่ๅญใๆใฃใฆใใไบบๆฐ\n \tList<Integer> ownListB = new ArrayList<Integer>(new LinkedHashSet<>(ownList));\n \tint size = ownListB.size();\n \n \t// ๅ
จไบบๆฐ - ใ่ๅญใๆใฃใฆใใไบบๆฐ = ใ่ๅญใๆใฃใฆใใชใไบบๆฐ\n \tSystem.out.println(peopleNum - size);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int peopleNum = sc.nextInt(); // ไบบๆฐ
int snackNum = sc.nextInt(); // ใ่ๅญใฎๆฐ
List<Integer> ownList = new ArrayList<Integer>();
for(int i = 0; i < snackNum; i++){
int ownNum = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบๆฐ
for(int j = 0; j < ownNum; j++){
int people = sc.nextInt(); // ใ่ๅญใๆใฃใฆใใไบบ
ownList.add(people);
}
}
// ใ่ๅญใๆใฃใฆใใไบบใฎ้่คใๆ้ค -> ใ่ๅญใๆใฃใฆใใไบบๆฐ
List<Integer> ownListB = new ArrayList<Integer>(new LinkedHashSet<>(ownList));
int size = ownListB.size();
// ๅ
จไบบๆฐ - ใ่ๅญใๆใฃใฆใใไบบๆฐ = ใ่ๅญใๆใฃใฆใใชใไบบๆฐ
System.out.println(peopleNum - size);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
18,
13,
2,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
65,
71
],
[
8,
72
],
[
72,
73
],
[
72,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int M = scn.nextInt();\n boolean[] nusuke = new boolean[N];\n int a = 0;\n //Mๅใซใผใ\n for(int i=0;i<M;i++){\n int d = scn.nextInt();\n //dๅใซใผใ\n for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }\n }\n\n int cnt = 0;\n\n for(int i=0;i<N;i++){\n if(nusuke[i] == false){\n cnt++;\n }\n }\n\n System.out.println(cnt);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int M = scn.nextInt();\n boolean[] nusuke = new boolean[N];\n int a = 0;\n //Mๅใซใผใ\n for(int i=0;i<M;i++){\n int d = scn.nextInt();\n //dๅใซใผใ\n for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }\n }\n\n int cnt = 0;\n\n for(int i=0;i<N;i++){\n if(nusuke[i] == false){\n cnt++;\n }\n }\n\n System.out.println(cnt);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int M = scn.nextInt();\n boolean[] nusuke = new boolean[N];\n int a = 0;\n //Mๅใซใผใ\n for(int i=0;i<M;i++){\n int d = scn.nextInt();\n //dๅใซใผใ\n for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }\n }\n\n int cnt = 0;\n\n for(int i=0;i<N;i++){\n if(nusuke[i] == false){\n cnt++;\n }\n }\n\n System.out.println(cnt);\n }",
"main",
"{\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int M = scn.nextInt();\n boolean[] nusuke = new boolean[N];\n int a = 0;\n //Mๅใซใผใ\n for(int i=0;i<M;i++){\n int d = scn.nextInt();\n //dๅใซใผใ\n for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }\n }\n\n int cnt = 0;\n\n for(int i=0;i<N;i++){\n if(nusuke[i] == false){\n cnt++;\n }\n }\n\n System.out.println(cnt);\n }",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int N = scn.nextInt();",
"N",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int M = scn.nextInt();",
"M",
"scn.nextInt()",
"scn.nextInt",
"scn",
"boolean[] nusuke = new boolean[N];",
"nusuke",
"new boolean[N]",
"N",
"int a = 0;",
"a",
"0",
"for(int i=0;i<M;i++){\n int d = scn.nextInt();\n //dๅใซใผใ\n for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<M",
"i",
"M",
"i++",
"i++",
"i",
"{\n int d = scn.nextInt();\n //dๅใซใผใ\n for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }\n }",
"{\n int d = scn.nextInt();\n //dๅใซใผใ\n for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }\n }",
"int d = scn.nextInt();",
"d",
"scn.nextInt()",
"scn.nextInt",
"scn",
"for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<d",
"k",
"d",
"k++",
"k++",
"k",
"{\n a = scn.nextInt();\n nusuke[a-1] = true;\n }",
"{\n a = scn.nextInt();\n nusuke[a-1] = true;\n }",
"a = scn.nextInt()",
"a",
"scn.nextInt()",
"scn.nextInt",
"scn",
"nusuke[a-1] = true",
"nusuke[a-1]",
"nusuke",
"a-1",
"a",
"1",
"true",
"int cnt = 0;",
"cnt",
"0",
"for(int i=0;i<N;i++){\n if(nusuke[i] == false){\n cnt++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n if(nusuke[i] == false){\n cnt++;\n }\n }",
"{\n if(nusuke[i] == false){\n cnt++;\n }\n }",
"if(nusuke[i] == false){\n cnt++;\n }",
"nusuke[i] == false",
"nusuke[i]",
"nusuke",
"i",
"false",
"{\n cnt++;\n }",
"cnt++",
"cnt",
"System.out.println(cnt)",
"System.out.println",
"System.out",
"System",
"System.out",
"cnt",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int M = scn.nextInt();\n boolean[] nusuke = new boolean[N];\n int a = 0;\n //Mๅใซใผใ\n for(int i=0;i<M;i++){\n int d = scn.nextInt();\n //dๅใซใผใ\n for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }\n }\n\n int cnt = 0;\n\n for(int i=0;i<N;i++){\n if(nusuke[i] == false){\n cnt++;\n }\n }\n\n System.out.println(cnt);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int M = scn.nextInt();\n boolean[] nusuke = new boolean[N];\n int a = 0;\n //Mๅใซใผใ\n for(int i=0;i<M;i++){\n int d = scn.nextInt();\n //dๅใซใผใ\n for(int k=0;k<d;k++){\n a = scn.nextInt();\n nusuke[a-1] = true;\n }\n }\n\n int cnt = 0;\n\n for(int i=0;i<N;i++){\n if(nusuke[i] == false){\n cnt++;\n }\n }\n\n System.out.println(cnt);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scn = new Scanner(System.in);
int N = scn.nextInt();
int M = scn.nextInt();
boolean[] nusuke = new boolean[N];
int a = 0;
//Mๅใซใผใ
for(int i=0;i<M;i++){
int d = scn.nextInt();
//dๅใซใผใ
for(int k=0;k<d;k++){
a = scn.nextInt();
nusuke[a-1] = true;
}
}
int cnt = 0;
for(int i=0;i<N;i++){
if(nusuke[i] == false){
cnt++;
}
}
System.out.println(cnt);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
20,
2,
13,
17,
41,
13,
20,
2,
13,
17,
41,
13,
20,
2,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
13,
0,
18,
13,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
2,
2,
17,
18,
13,
2,
13,
13,
2,
13,
2,
13,
13,
13,
12,
13,
30,
41,
13,
13,
0,
18,
13,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
2,
2,
17,
18,
13,
13,
18,
13,
2,
13,
17,
13,
12,
13,
30,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
2,
2,
17,
18,
13,
2,
13,
17,
13,
13,
12,
13,
30,
41,
13,
13,
41,
13,
2,
2,
2,
2,
17,
2,
2,
17,
18,
13,
13,
18,
13,
13,
13,
18,
13,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
2,
13,
13,
41,
13,
13,
41,
13,
4,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
17,
40,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
18,
13,
13,
30,
14,
2,
13,
18,
13,
13,
29,
40,
17,
29,
17,
30,
14,
2,
13,
18,
13,
13,
29,
40,
17,
29,
17,
23,
13,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
515,
32
],
[
515,
33
],
[
33,
34
],
[
33,
35
],
[
515,
36
],
[
36,
37
],
[
36,
38
],
[
39,
40
],
[
39,
41
],
[
515,
42
],
[
42,
43
],
[
42,
44
],
[
45,
46
],
[
45,
47
],
[
515,
48
],
[
48,
49
],
[
48,
50
],
[
51,
52
],
[
51,
53
],
[
515,
54
],
[
54,
55
],
[
54,
56
],
[
515,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
59,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
72,
80
],
[
80,
81
],
[
81,
82
],
[
72,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
88,
102
],
[
515,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
105,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
123,
124
],
[
123,
125
],
[
118,
126
],
[
126,
127
],
[
127,
128
],
[
118,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
138,
140
],
[
135,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
134,
146
],
[
515,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
149,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
155,
160
],
[
160,
161
],
[
160,
162
],
[
155,
163
],
[
163,
164
],
[
164,
165
],
[
155,
166
],
[
167,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
172
],
[
172,
173
],
[
174,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
178,
180
],
[
174,
181
],
[
172,
182
],
[
515,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
185,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
199,
201
],
[
196,
202
],
[
202,
203
],
[
202,
204
],
[
193,
205
],
[
192,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
208,
210
],
[
191,
211
],
[
185,
212
],
[
212,
213
],
[
183,
214
],
[
214,
215
],
[
183,
216
],
[
216,
217
],
[
515,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
223,
226
],
[
226,
227
],
[
226,
228
],
[
220,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
232,
233
],
[
231,
234
],
[
234,
235
],
[
234,
236
],
[
220,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
239,
241
],
[
220,
242
],
[
242,
243
],
[
242,
244
],
[
220,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
247,
249
],
[
247,
250
],
[
220,
251
],
[
251,
252
],
[
218,
253
],
[
253,
254
],
[
218,
255
],
[
255,
256
],
[
218,
257
],
[
257,
258
],
[
218,
259
],
[
259,
260
],
[
515,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
266,
268
],
[
263,
269
],
[
269,
270
],
[
269,
271
],
[
263,
272
],
[
272,
273
],
[
272,
274
],
[
263,
275
],
[
275,
276
],
[
275,
277
],
[
277,
278
],
[
278,
279
],
[
263,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
263,
285
],
[
285,
286
],
[
285,
287
],
[
263,
289
],
[
289,
290
],
[
290,
291
],
[
291,
292
],
[
290,
293
],
[
289,
294
],
[
294,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
298,
299
],
[
294,
300
],
[
300,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
300,
305
],
[
305,
306
],
[
305,
307
],
[
300,
308
],
[
308,
309
],
[
309,
310
],
[
300,
311
],
[
312,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
315,
316
],
[
316,
317
],
[
317,
318
],
[
315,
319
],
[
312,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
263,
324
],
[
324,
325
],
[
324,
326
],
[
263,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
327,
332
],
[
332,
333
],
[
332,
334
],
[
327,
335
],
[
335,
336
],
[
336,
337
],
[
327,
338
],
[
339,
339
],
[
339,
340
],
[
340,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
341,
345
],
[
340,
346
],
[
346,
347
],
[
347,
348
],
[
263,
349
],
[
349,
350
],
[
350,
351
],
[
349,
352
],
[
263,
353
],
[
353,
354
],
[
354,
355
],
[
261,
356
],
[
356,
357
],
[
515,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
358,
362
],
[
362,
363
],
[
358,
364
],
[
364,
365
],
[
358,
366
],
[
366,
367
],
[
366,
368
],
[
368,
369
],
[
369,
370
],
[
370,
371
],
[
370,
372
],
[
369,
373
],
[
368,
374
],
[
374,
375
],
[
375,
376
],
[
375,
377
],
[
374,
378
],
[
368,
379
],
[
379,
380
],
[
380,
381
],
[
380,
382
],
[
379,
383
],
[
366,
384
],
[
384,
385
],
[
366,
386
],
[
386,
387
],
[
366,
388
],
[
388,
389
],
[
358,
390
],
[
390,
391
],
[
390,
392
],
[
392,
393
],
[
393,
394
],
[
394,
395
],
[
394,
396
],
[
396,
397
],
[
396,
398
],
[
393,
399
],
[
399,
400
],
[
400,
401
],
[
401,
402
],
[
401,
403
],
[
403,
404
],
[
403,
405
],
[
400,
406
],
[
406,
407
],
[
407,
408
],
[
400,
409
],
[
409,
410
],
[
393,
411
],
[
411,
412
],
[
412,
413
],
[
413,
414
],
[
413,
415
],
[
415,
416
],
[
415,
417
],
[
412,
418
],
[
418,
419
],
[
419,
420
],
[
412,
421
],
[
421,
422
],
[
390,
423
],
[
423,
424
],
[
358,
425
],
[
515,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
426,
430
],
[
430,
431
],
[
426,
432
],
[
432,
433
],
[
432,
434
],
[
434,
435
],
[
435,
436
],
[
435,
437
],
[
426,
438
],
[
438,
439
],
[
438,
440
],
[
440,
441
],
[
441,
442
],
[
442,
443
],
[
443,
444
],
[
443,
445
],
[
442,
446
],
[
446,
447
],
[
447,
448
],
[
448,
449
],
[
441,
450
],
[
450,
451
],
[
451,
452
],
[
452,
453
],
[
452,
454
],
[
454,
455
],
[
455,
456
],
[
456,
457
],
[
451,
458
],
[
458,
459
],
[
459,
460
],
[
459,
461
],
[
440,
462
],
[
462,
463
],
[
463,
464
],
[
464,
465
],
[
426,
466
],
[
466,
467
],
[
466,
468
],
[
468,
469
],
[
469,
470
],
[
470,
471
],
[
471,
472
],
[
470,
473
],
[
473,
474
],
[
426,
475
],
[
475,
476
],
[
475,
477
],
[
477,
478
],
[
478,
479
],
[
479,
480
],
[
480,
481
],
[
479,
482
],
[
482,
483
],
[
426,
484
],
[
484,
485
],
[
484,
486
],
[
486,
487
],
[
487,
488
],
[
488,
489
],
[
489,
490
],
[
488,
491
],
[
491,
492
],
[
426,
493
],
[
493,
494
],
[
493,
495
],
[
495,
496
],
[
496,
497
],
[
496,
498
],
[
495,
499
],
[
499,
500
],
[
500,
501
],
[
500,
502
],
[
502,
503
],
[
503,
504
],
[
504,
505
],
[
499,
506
],
[
506,
507
],
[
507,
508
],
[
507,
509
],
[
509,
510
],
[
510,
511
],
[
495,
512
],
[
512,
513
],
[
0,
514
],
[
514,
515
],
[
514,
516
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.StringTokenizer;\n\n\n\npublic class Main\n{\t\n\t\n\tstatic class Pair implements Comparable<Pair>\n\t{\n\t\tint x;\n\t\tint y;\n\t\tint type;\n\t\tPair(int x,int y,int type)\n\t\t{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.type = type;\n\t\t}\n\t\t\n\t\t@Override\n\t\tpublic int compareTo(Pair o)\n\t\t{\n\t\t\tif(x != o.x)\n\t\t\t{\t\n\t\t\t\tif(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tif(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t}\n\t}\n\t \n\tstatic class FastReader \n\t{ \n\t BufferedReader br; \n\t StringTokenizer st; \n\n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\n\t String next() \n\t { \n\t while (st == null || !st.hasMoreElements()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken(); \n\t } \n\n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t } \n\t}\n\n\tstatic int maxN = 2000000;\n\tstatic int fact[] = new int[maxN+1];\n\tstatic int factorialNumInverse[] = new int[maxN+1];\n\tstatic int naturalNumInverse[] = new int[maxN+1];\n\t\n\tstatic void InverseofNumber() \n\t{ \t\n\t\tint p = mod;\n\t naturalNumInverse[0] = naturalNumInverse[1] = 1; \n\t for (int i = 2; i <= maxN; i++) \n\t naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p); \n\t}\n\t\n\tstatic void InverseofFactorial() \n\t{ \t\n\t\tint p = mod;\n\t factorialNumInverse[0] = factorialNumInverse[1] = 1; \n\t \n\t for (int i = 2; i <= maxN; i++) \n\t factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p); \n\t} \n\t\n\tstatic void Factorial()\n\t{\n\t\t\n\t\tfact[0] = 1;\n\t\tfor(int i = 1; i < maxN; i++) \n\t\t{\n\t\t\tfact[i] = (int)(1L *fact[i - 1] * i % mod);\n\t\t}\n\t}\n\t\n\tstatic int Binomial(int N, int R) \n\t{ \n\t int p = mod;\n\t int ans = (int)((1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)]) % p); \n\t return ans; \n\t} \n\tstatic int paths(int x1,int y1,int x2,int y2)\n\t{\t\n\t\tint x = Math.abs(x2-x1);\n\t\tint y = Math.abs(y2-y1);\n\t\t\n\t\tint N = x+y;\n\t\tint R = x;\n\t\t\n\t\tint ans = Binomial(N,R);\n\t\treturn ans;\n\t}\n\t\n\tstatic int mod = 998244353;\n\t\n\t// a b c d e f g h i j k\n\t// 0 1 0 1 0 1 0 1 0 1 0\n\t\n\t\n\t\n\t\n\tpublic static void main(String[] args) \n\t{\n\t\tOutputStream outputStream = System.out;\n\t\tFastReader sc = new FastReader();\n PrintWriter out = new PrintWriter(outputStream);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n int map[] = new int[n];\n while(k-- > 0)\n {\n \tint l = sc.nextInt();\n \t\n \tfor(int i= 0; i < l; i++)\n \t{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}\n }\n \n int cnt= 0;\n for(int i = 0; i < n; i++)\n {\n \tif(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}\n }\n \n out.println(cnt);\n out.close();\n \n\n\t}\n \n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main\n{\t\n\t\n\tstatic class Pair implements Comparable<Pair>\n\t{\n\t\tint x;\n\t\tint y;\n\t\tint type;\n\t\tPair(int x,int y,int type)\n\t\t{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.type = type;\n\t\t}\n\t\t\n\t\t@Override\n\t\tpublic int compareTo(Pair o)\n\t\t{\n\t\t\tif(x != o.x)\n\t\t\t{\t\n\t\t\t\tif(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tif(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t}\n\t}\n\t \n\tstatic class FastReader \n\t{ \n\t BufferedReader br; \n\t StringTokenizer st; \n\n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\n\t String next() \n\t { \n\t while (st == null || !st.hasMoreElements()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken(); \n\t } \n\n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t } \n\t}\n\n\tstatic int maxN = 2000000;\n\tstatic int fact[] = new int[maxN+1];\n\tstatic int factorialNumInverse[] = new int[maxN+1];\n\tstatic int naturalNumInverse[] = new int[maxN+1];\n\t\n\tstatic void InverseofNumber() \n\t{ \t\n\t\tint p = mod;\n\t naturalNumInverse[0] = naturalNumInverse[1] = 1; \n\t for (int i = 2; i <= maxN; i++) \n\t naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p); \n\t}\n\t\n\tstatic void InverseofFactorial() \n\t{ \t\n\t\tint p = mod;\n\t factorialNumInverse[0] = factorialNumInverse[1] = 1; \n\t \n\t for (int i = 2; i <= maxN; i++) \n\t factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p); \n\t} \n\t\n\tstatic void Factorial()\n\t{\n\t\t\n\t\tfact[0] = 1;\n\t\tfor(int i = 1; i < maxN; i++) \n\t\t{\n\t\t\tfact[i] = (int)(1L *fact[i - 1] * i % mod);\n\t\t}\n\t}\n\t\n\tstatic int Binomial(int N, int R) \n\t{ \n\t int p = mod;\n\t int ans = (int)((1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)]) % p); \n\t return ans; \n\t} \n\tstatic int paths(int x1,int y1,int x2,int y2)\n\t{\t\n\t\tint x = Math.abs(x2-x1);\n\t\tint y = Math.abs(y2-y1);\n\t\t\n\t\tint N = x+y;\n\t\tint R = x;\n\t\t\n\t\tint ans = Binomial(N,R);\n\t\treturn ans;\n\t}\n\t\n\tstatic int mod = 998244353;\n\t\n\t// a b c d e f g h i j k\n\t// 0 1 0 1 0 1 0 1 0 1 0\n\t\n\t\n\t\n\t\n\tpublic static void main(String[] args) \n\t{\n\t\tOutputStream outputStream = System.out;\n\t\tFastReader sc = new FastReader();\n PrintWriter out = new PrintWriter(outputStream);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n int map[] = new int[n];\n while(k-- > 0)\n {\n \tint l = sc.nextInt();\n \t\n \tfor(int i= 0; i < l; i++)\n \t{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}\n }\n \n int cnt= 0;\n for(int i = 0; i < n; i++)\n {\n \tif(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}\n }\n \n out.println(cnt);\n out.close();\n \n\n\t}\n \n}",
"Main",
"static int maxN = 2000000;",
"maxN",
"2000000",
"static int fact[] = new int[maxN+1];",
"fact",
"new int[maxN+1]",
"maxN+1",
"maxN",
"1",
"static int factorialNumInverse[] = new int[maxN+1];",
"factorialNumInverse",
"new int[maxN+1]",
"maxN+1",
"maxN",
"1",
"static int naturalNumInverse[] = new int[maxN+1];",
"naturalNumInverse",
"new int[maxN+1]",
"maxN+1",
"maxN",
"1",
"static int mod = 998244353;",
"mod",
"998244353",
"static void InverseofNumber() \n\t{ \t\n\t\tint p = mod;\n\t naturalNumInverse[0] = naturalNumInverse[1] = 1; \n\t for (int i = 2; i <= maxN; i++) \n\t naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p); \n\t}",
"InverseofNumber",
"{ \t\n\t\tint p = mod;\n\t naturalNumInverse[0] = naturalNumInverse[1] = 1; \n\t for (int i = 2; i <= maxN; i++) \n\t naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p); \n\t}",
"int p = mod;",
"p",
"mod",
"naturalNumInverse[0] = naturalNumInverse[1] = 1",
"naturalNumInverse[0]",
"naturalNumInverse",
"0",
"naturalNumInverse[1] = 1",
"naturalNumInverse[1]",
"naturalNumInverse",
"1",
"1",
"for (int i = 2; i <= maxN; i++) \n\t naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p);",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= maxN",
"i",
"maxN",
"i++",
"i++",
"i",
"naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p);",
"naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p)",
"naturalNumInverse[i]",
"naturalNumInverse",
"i",
"(int)((1L *naturalNumInverse[p % i] * (p - p / i))%p)",
"(1L *naturalNumInverse[p % i] * (p - p / i))",
"1L *naturalNumInverse[p % i] * (p - p / i)",
"1L",
"naturalNumInverse[p % i]",
"naturalNumInverse",
"p % i",
"p",
"i",
"(p - p / i)",
"p",
"p / i",
"p",
"i",
"p",
"static void InverseofFactorial() \n\t{ \t\n\t\tint p = mod;\n\t factorialNumInverse[0] = factorialNumInverse[1] = 1; \n\t \n\t for (int i = 2; i <= maxN; i++) \n\t factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p); \n\t}",
"InverseofFactorial",
"{ \t\n\t\tint p = mod;\n\t factorialNumInverse[0] = factorialNumInverse[1] = 1; \n\t \n\t for (int i = 2; i <= maxN; i++) \n\t factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p); \n\t}",
"int p = mod;",
"p",
"mod",
"factorialNumInverse[0] = factorialNumInverse[1] = 1",
"factorialNumInverse[0]",
"factorialNumInverse",
"0",
"factorialNumInverse[1] = 1",
"factorialNumInverse[1]",
"factorialNumInverse",
"1",
"1",
"for (int i = 2; i <= maxN; i++) \n\t factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p);",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= maxN",
"i",
"maxN",
"i++",
"i++",
"i",
"factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p);",
"factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p)",
"factorialNumInverse[i]",
"factorialNumInverse",
"i",
"(int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p)",
"(1L*naturalNumInverse[i] * factorialNumInverse[i - 1])",
"1L*naturalNumInverse[i] * factorialNumInverse[i - 1]",
"1L",
"naturalNumInverse[i]",
"naturalNumInverse",
"i",
"factorialNumInverse[i - 1]",
"factorialNumInverse",
"i - 1",
"i",
"1",
"p",
"static void Factorial()\n\t{\n\t\t\n\t\tfact[0] = 1;\n\t\tfor(int i = 1; i < maxN; i++) \n\t\t{\n\t\t\tfact[i] = (int)(1L *fact[i - 1] * i % mod);\n\t\t}\n\t}",
"Factorial",
"{\n\t\t\n\t\tfact[0] = 1;\n\t\tfor(int i = 1; i < maxN; i++) \n\t\t{\n\t\t\tfact[i] = (int)(1L *fact[i - 1] * i % mod);\n\t\t}\n\t}",
"fact[0] = 1",
"fact[0]",
"fact",
"0",
"1",
"for(int i = 1; i < maxN; i++) \n\t\t{\n\t\t\tfact[i] = (int)(1L *fact[i - 1] * i % mod);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < maxN",
"i",
"maxN",
"i++",
"i++",
"i",
"{\n\t\t\tfact[i] = (int)(1L *fact[i - 1] * i % mod);\n\t\t}",
"{\n\t\t\tfact[i] = (int)(1L *fact[i - 1] * i % mod);\n\t\t}",
"fact[i] = (int)(1L *fact[i - 1] * i % mod)",
"fact[i]",
"fact",
"i",
"(int)(1L *fact[i - 1] * i % mod)",
"1L *fact[i - 1] * i",
"1L *fact[i - 1] * i",
"1L",
"fact[i - 1]",
"fact",
"i - 1",
"i",
"1",
"i",
"mod",
"static int Binomial(int N, int R) \n\t{ \n\t int p = mod;\n\t int ans = (int)((1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)]) % p); \n\t return ans; \n\t}",
"Binomial",
"{ \n\t int p = mod;\n\t int ans = (int)((1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)]) % p); \n\t return ans; \n\t}",
"int p = mod;",
"p",
"mod",
"int ans = (int)((1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)]) % p);",
"ans",
"(int)((1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)]) % p)",
"(1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)])",
"1L *(1L*fact[N] * factorialNumInverse[R]) % p",
"1L *(1L*fact[N] * factorialNumInverse[R])",
"1L",
"(1L*fact[N] * factorialNumInverse[R])",
"1L*fact[N] * factorialNumInverse[R]",
"1L",
"fact[N]",
"fact",
"N",
"factorialNumInverse[R]",
"factorialNumInverse",
"R",
"p",
"factorialNumInverse[(N - R)]",
"factorialNumInverse",
"(N - R)",
"N",
"R",
"p",
"return ans;",
"ans",
"int N",
"N",
"int R",
"R",
"static int paths(int x1,int y1,int x2,int y2)\n\t{\t\n\t\tint x = Math.abs(x2-x1);\n\t\tint y = Math.abs(y2-y1);\n\t\t\n\t\tint N = x+y;\n\t\tint R = x;\n\t\t\n\t\tint ans = Binomial(N,R);\n\t\treturn ans;\n\t}",
"paths",
"{\t\n\t\tint x = Math.abs(x2-x1);\n\t\tint y = Math.abs(y2-y1);\n\t\t\n\t\tint N = x+y;\n\t\tint R = x;\n\t\t\n\t\tint ans = Binomial(N,R);\n\t\treturn ans;\n\t}",
"int x = Math.abs(x2-x1);",
"x",
"Math.abs(x2-x1)",
"Math.abs",
"Math",
"x2-x1",
"x2",
"x1",
"int y = Math.abs(y2-y1);",
"y",
"Math.abs(y2-y1)",
"Math.abs",
"Math",
"y2-y1",
"y2",
"y1",
"int N = x+y;",
"N",
"x+y",
"x",
"y",
"int R = x;",
"R",
"x",
"int ans = Binomial(N,R);",
"ans",
"Binomial(N,R)",
"Binomial",
"N",
"R",
"return ans;",
"ans",
"int x1",
"x1",
"int y1",
"y1",
"int x2",
"x2",
"int y2",
"y2",
"public static void main(String[] args) \n\t{\n\t\tOutputStream outputStream = System.out;\n\t\tFastReader sc = new FastReader();\n PrintWriter out = new PrintWriter(outputStream);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n int map[] = new int[n];\n while(k-- > 0)\n {\n \tint l = sc.nextInt();\n \t\n \tfor(int i= 0; i < l; i++)\n \t{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}\n }\n \n int cnt= 0;\n for(int i = 0; i < n; i++)\n {\n \tif(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}\n }\n \n out.println(cnt);\n out.close();\n \n\n\t}",
"main",
"{\n\t\tOutputStream outputStream = System.out;\n\t\tFastReader sc = new FastReader();\n PrintWriter out = new PrintWriter(outputStream);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n int map[] = new int[n];\n while(k-- > 0)\n {\n \tint l = sc.nextInt();\n \t\n \tfor(int i= 0; i < l; i++)\n \t{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}\n }\n \n int cnt= 0;\n for(int i = 0; i < n; i++)\n {\n \tif(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}\n }\n \n out.println(cnt);\n out.close();\n \n\n\t}",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"FastReader sc = new FastReader();",
"sc",
"new FastReader()",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int map[] = new int[n];",
"map",
"new int[n]",
"n",
"while(k-- > 0)\n {\n \tint l = sc.nextInt();\n \t\n \tfor(int i= 0; i < l; i++)\n \t{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}\n }",
"k-- > 0",
"k--",
"k",
"0",
"{\n \tint l = sc.nextInt();\n \t\n \tfor(int i= 0; i < l; i++)\n \t{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}\n }",
"int l = sc.nextInt();",
"l",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i= 0; i < l; i++)\n \t{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}",
"int i= 0;",
"int i= 0;",
"i",
"0",
"i < l",
"i",
"l",
"i++",
"i++",
"i",
"{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}",
"{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}",
"int x = sc.nextInt()-1;",
"x",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"map[x]++",
"map[x]",
"map",
"x",
"int cnt= 0;",
"cnt",
"0",
"for(int i = 0; i < n; i++)\n {\n \tif(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tif(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}\n }",
"{\n \tif(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}\n }",
"if(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}",
"map[i] == 0",
"map[i]",
"map",
"i",
"0",
"{\n \t\tcnt++;\n \t}",
"cnt++",
"cnt",
"out.println(cnt)",
"out.println",
"out",
"cnt",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class Pair implements Comparable<Pair>\n\t{\n\t\tint x;\n\t\tint y;\n\t\tint type;\n\t\tPair(int x,int y,int type)\n\t\t{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.type = type;\n\t\t}\n\t\t\n\t\t@Override\n\t\tpublic int compareTo(Pair o)\n\t\t{\n\t\t\tif(x != o.x)\n\t\t\t{\t\n\t\t\t\tif(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tif(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t}\n\t}",
"Pair",
"int x;",
"x",
"int y;",
"y",
"int type;",
"type",
"Pair(int x,int y,int type)\n\t\t{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.type = type;\n\t\t}",
"Pair",
"{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.type = type;\n\t\t}",
"this.x = x",
"this.x",
"this",
"this.x",
"x",
"this.y = y",
"this.y",
"this",
"this.y",
"y",
"this.type = type",
"this.type",
"this",
"this.type",
"type",
"int x",
"x",
"int y",
"y",
"int type",
"type",
"@Override\n\t\tpublic int compareTo(Pair o)\n\t\t{\n\t\t\tif(x != o.x)\n\t\t\t{\t\n\t\t\t\tif(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tif(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t}",
"compareTo",
"{\n\t\t\tif(x != o.x)\n\t\t\t{\t\n\t\t\t\tif(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tif(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t}",
"if(x != o.x)\n\t\t\t{\t\n\t\t\t\tif(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tif(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}",
"x != o.x",
"x",
"o.x",
"o",
"o.x",
"{\t\n\t\t\t\tif(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}",
"if(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;",
"x < o.x",
"x",
"o.x",
"o",
"o.x",
"return -1;",
"-1",
"1",
"return 1;",
"1",
"{\t\n\t\t\t\tif(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}",
"if(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;",
"y < o.y",
"y",
"o.y",
"o",
"o.y",
"return -1;",
"-1",
"1",
"return 1;",
"1",
"Pair o",
"o",
"Comparable",
"static class FastReader \n\t{ \n\t BufferedReader br; \n\t StringTokenizer st; \n\n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\n\t String next() \n\t { \n\t while (st == null || !st.hasMoreElements()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken(); \n\t } \n\n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t } \n\t}",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t }",
"FastReader",
"{ \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t }",
"br = new BufferedReader(new\n\t InputStreamReader(System.in))",
"br",
"new BufferedReader(new\n\t InputStreamReader(System.in))",
"String next() \n\t { \n\t while (st == null || !st.hasMoreElements()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken(); \n\t }",
"next",
"{ \n\t while (st == null || !st.hasMoreElements()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken(); \n\t }",
"while (st == null || !st.hasMoreElements()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{ \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t }",
"try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }",
"catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }",
"IOException e",
"{ \n\t e.printStackTrace(); \n\t }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n\t st = new StringTokenizer(br.readLine()); \n\t }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t }",
"nextInt",
"{ \n\t return Integer.parseInt(next()); \n\t }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t }",
"nextLong",
"{ \n\t return Long.parseLong(next()); \n\t }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t }",
"nextDouble",
"{ \n\t return Double.parseDouble(next()); \n\t }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }",
"nextLine",
"{ \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t }",
"String str = \"\";",
"str",
"\"\"",
"try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }",
"catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t }",
"IOException e",
"{ \n\t e.printStackTrace(); \n\t }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n\t str = br.readLine(); \n\t }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main\n{\t\n\t\n\tstatic class Pair implements Comparable<Pair>\n\t{\n\t\tint x;\n\t\tint y;\n\t\tint type;\n\t\tPair(int x,int y,int type)\n\t\t{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.type = type;\n\t\t}\n\t\t\n\t\t@Override\n\t\tpublic int compareTo(Pair o)\n\t\t{\n\t\t\tif(x != o.x)\n\t\t\t{\t\n\t\t\t\tif(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tif(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t}\n\t}\n\t \n\tstatic class FastReader \n\t{ \n\t BufferedReader br; \n\t StringTokenizer st; \n\n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\n\t String next() \n\t { \n\t while (st == null || !st.hasMoreElements()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken(); \n\t } \n\n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t } \n\t}\n\n\tstatic int maxN = 2000000;\n\tstatic int fact[] = new int[maxN+1];\n\tstatic int factorialNumInverse[] = new int[maxN+1];\n\tstatic int naturalNumInverse[] = new int[maxN+1];\n\t\n\tstatic void InverseofNumber() \n\t{ \t\n\t\tint p = mod;\n\t naturalNumInverse[0] = naturalNumInverse[1] = 1; \n\t for (int i = 2; i <= maxN; i++) \n\t naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p); \n\t}\n\t\n\tstatic void InverseofFactorial() \n\t{ \t\n\t\tint p = mod;\n\t factorialNumInverse[0] = factorialNumInverse[1] = 1; \n\t \n\t for (int i = 2; i <= maxN; i++) \n\t factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p); \n\t} \n\t\n\tstatic void Factorial()\n\t{\n\t\t\n\t\tfact[0] = 1;\n\t\tfor(int i = 1; i < maxN; i++) \n\t\t{\n\t\t\tfact[i] = (int)(1L *fact[i - 1] * i % mod);\n\t\t}\n\t}\n\t\n\tstatic int Binomial(int N, int R) \n\t{ \n\t int p = mod;\n\t int ans = (int)((1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)]) % p); \n\t return ans; \n\t} \n\tstatic int paths(int x1,int y1,int x2,int y2)\n\t{\t\n\t\tint x = Math.abs(x2-x1);\n\t\tint y = Math.abs(y2-y1);\n\t\t\n\t\tint N = x+y;\n\t\tint R = x;\n\t\t\n\t\tint ans = Binomial(N,R);\n\t\treturn ans;\n\t}\n\t\n\tstatic int mod = 998244353;\n\t\n\t// a b c d e f g h i j k\n\t// 0 1 0 1 0 1 0 1 0 1 0\n\t\n\t\n\t\n\t\n\tpublic static void main(String[] args) \n\t{\n\t\tOutputStream outputStream = System.out;\n\t\tFastReader sc = new FastReader();\n PrintWriter out = new PrintWriter(outputStream);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n int map[] = new int[n];\n while(k-- > 0)\n {\n \tint l = sc.nextInt();\n \t\n \tfor(int i= 0; i < l; i++)\n \t{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}\n }\n \n int cnt= 0;\n for(int i = 0; i < n; i++)\n {\n \tif(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}\n }\n \n out.println(cnt);\n out.close();\n \n\n\t}\n \n}",
"public class Main\n{\t\n\t\n\tstatic class Pair implements Comparable<Pair>\n\t{\n\t\tint x;\n\t\tint y;\n\t\tint type;\n\t\tPair(int x,int y,int type)\n\t\t{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.type = type;\n\t\t}\n\t\t\n\t\t@Override\n\t\tpublic int compareTo(Pair o)\n\t\t{\n\t\t\tif(x != o.x)\n\t\t\t{\t\n\t\t\t\tif(x < o.x)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tif(y < o.y)\n\t\t\t\treturn -1;\n\t\t\t\t\n\t\t\t\telse return 1;\n\t\t\t}\n\t\t}\n\t}\n\t \n\tstatic class FastReader \n\t{ \n\t BufferedReader br; \n\t StringTokenizer st; \n\n\t public FastReader() \n\t { \n\t br = new BufferedReader(new\n\t InputStreamReader(System.in)); \n\t } \n\n\t String next() \n\t { \n\t while (st == null || !st.hasMoreElements()) \n\t { \n\t try\n\t { \n\t st = new StringTokenizer(br.readLine()); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t } \n\t return st.nextToken(); \n\t } \n\n\t int nextInt() \n\t { \n\t return Integer.parseInt(next()); \n\t } \n\n\t long nextLong() \n\t { \n\t return Long.parseLong(next()); \n\t } \n\n\t double nextDouble() \n\t { \n\t return Double.parseDouble(next()); \n\t } \n\n\t String nextLine() \n\t { \n\t String str = \"\"; \n\t try\n\t { \n\t str = br.readLine(); \n\t } \n\t catch (IOException e) \n\t { \n\t e.printStackTrace(); \n\t } \n\t return str; \n\t } \n\t}\n\n\tstatic int maxN = 2000000;\n\tstatic int fact[] = new int[maxN+1];\n\tstatic int factorialNumInverse[] = new int[maxN+1];\n\tstatic int naturalNumInverse[] = new int[maxN+1];\n\t\n\tstatic void InverseofNumber() \n\t{ \t\n\t\tint p = mod;\n\t naturalNumInverse[0] = naturalNumInverse[1] = 1; \n\t for (int i = 2; i <= maxN; i++) \n\t naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p); \n\t}\n\t\n\tstatic void InverseofFactorial() \n\t{ \t\n\t\tint p = mod;\n\t factorialNumInverse[0] = factorialNumInverse[1] = 1; \n\t \n\t for (int i = 2; i <= maxN; i++) \n\t factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p); \n\t} \n\t\n\tstatic void Factorial()\n\t{\n\t\t\n\t\tfact[0] = 1;\n\t\tfor(int i = 1; i < maxN; i++) \n\t\t{\n\t\t\tfact[i] = (int)(1L *fact[i - 1] * i % mod);\n\t\t}\n\t}\n\t\n\tstatic int Binomial(int N, int R) \n\t{ \n\t int p = mod;\n\t int ans = (int)((1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)]) % p); \n\t return ans; \n\t} \n\tstatic int paths(int x1,int y1,int x2,int y2)\n\t{\t\n\t\tint x = Math.abs(x2-x1);\n\t\tint y = Math.abs(y2-y1);\n\t\t\n\t\tint N = x+y;\n\t\tint R = x;\n\t\t\n\t\tint ans = Binomial(N,R);\n\t\treturn ans;\n\t}\n\t\n\tstatic int mod = 998244353;\n\t\n\t// a b c d e f g h i j k\n\t// 0 1 0 1 0 1 0 1 0 1 0\n\t\n\t\n\t\n\t\n\tpublic static void main(String[] args) \n\t{\n\t\tOutputStream outputStream = System.out;\n\t\tFastReader sc = new FastReader();\n PrintWriter out = new PrintWriter(outputStream);\n \n \n int n = sc.nextInt();\n int k = sc.nextInt();\n \n int map[] = new int[n];\n while(k-- > 0)\n {\n \tint l = sc.nextInt();\n \t\n \tfor(int i= 0; i < l; i++)\n \t{\n \t\tint x = sc.nextInt()-1;\n \t\tmap[x]++;\n \t}\n }\n \n int cnt= 0;\n for(int i = 0; i < n; i++)\n {\n \tif(map[i] == 0)\n \t{\n \t\tcnt++;\n \t}\n }\n \n out.println(cnt);\n out.close();\n \n\n\t}\n \n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.StringTokenizer;
public class Main
{
static class Pair implements Comparable<Pair>
{
int x;
int y;
int type;
Pair(int x,int y,int type)
{
this.x = x;
this.y = y;
this.type = type;
}
@Override
public int compareTo(Pair o)
{
if(x != o.x)
{
if(x < o.x)
return -1;
else return 1;
}
else
{
if(y < o.y)
return -1;
else return 1;
}
}
}
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(new
InputStreamReader(System.in));
}
String next()
{
while (st == null || !st.hasMoreElements())
{
try
{
st = new StringTokenizer(br.readLine());
}
catch (IOException e)
{
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt()
{
return Integer.parseInt(next());
}
long nextLong()
{
return Long.parseLong(next());
}
double nextDouble()
{
return Double.parseDouble(next());
}
String nextLine()
{
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
}
static int maxN = 2000000;
static int fact[] = new int[maxN+1];
static int factorialNumInverse[] = new int[maxN+1];
static int naturalNumInverse[] = new int[maxN+1];
static void InverseofNumber()
{
int p = mod;
naturalNumInverse[0] = naturalNumInverse[1] = 1;
for (int i = 2; i <= maxN; i++)
naturalNumInverse[i] = (int)((1L *naturalNumInverse[p % i] * (p - p / i))%p);
}
static void InverseofFactorial()
{
int p = mod;
factorialNumInverse[0] = factorialNumInverse[1] = 1;
for (int i = 2; i <= maxN; i++)
factorialNumInverse[i] = (int)((1L*naturalNumInverse[i] * factorialNumInverse[i - 1]) % p);
}
static void Factorial()
{
fact[0] = 1;
for(int i = 1; i < maxN; i++)
{
fact[i] = (int)(1L *fact[i - 1] * i % mod);
}
}
static int Binomial(int N, int R)
{
int p = mod;
int ans = (int)((1L *(1L*fact[N] * factorialNumInverse[R]) % p * factorialNumInverse[(N - R)]) % p);
return ans;
}
static int paths(int x1,int y1,int x2,int y2)
{
int x = Math.abs(x2-x1);
int y = Math.abs(y2-y1);
int N = x+y;
int R = x;
int ans = Binomial(N,R);
return ans;
}
static int mod = 998244353;
// a b c d e f g h i j k
// 0 1 0 1 0 1 0 1 0 1 0
public static void main(String[] args)
{
OutputStream outputStream = System.out;
FastReader sc = new FastReader();
PrintWriter out = new PrintWriter(outputStream);
int n = sc.nextInt();
int k = sc.nextInt();
int map[] = new int[n];
while(k-- > 0)
{
int l = sc.nextInt();
for(int i= 0; i < l; i++)
{
int x = sc.nextInt()-1;
map[x]++;
}
}
int cnt= 0;
for(int i = 0; i < n; i++)
{
if(map[i] == 0)
{
cnt++;
}
}
out.println(cnt);
out.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
40,
18,
13,
2,
13,
17,
30,
0,
18,
13,
2,
13,
17,
17,
4,
18,
13,
41,
13,
17,
28,
13,
13,
30,
30,
14,
40,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
62,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
70,
76
],
[
8,
77
],
[
77,
78
],
[
78,
79
],
[
8,
80
],
[
80,
81
],
[
80,
82
],
[
8,
83
],
[
83,
84
],
[
83,
85
],
[
83,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
92,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
6,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t//ใใฌใๅใชในใ\n\t\tboolean[] arrayGetSweets = new boolean[N];\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\t//ใ่ๅญiใๆใฃใฆใใไบบๆฐ\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\t//ใ่ๅญใ่ฒฐใฃใฆใใชใไบบๆฐใใซใฆใณใ\n\t\tint count = 0;\n\t\tfor (boolean bool : arrayGetSweets) {\n\t\t\tif (!bool) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t//ใใฌใๅใชในใ\n\t\tboolean[] arrayGetSweets = new boolean[N];\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\t//ใ่ๅญiใๆใฃใฆใใไบบๆฐ\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\t//ใ่ๅญใ่ฒฐใฃใฆใใชใไบบๆฐใใซใฆใณใ\n\t\tint count = 0;\n\t\tfor (boolean bool : arrayGetSweets) {\n\t\t\tif (!bool) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t//ใใฌใๅใชในใ\n\t\tboolean[] arrayGetSweets = new boolean[N];\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\t//ใ่ๅญiใๆใฃใฆใใไบบๆฐ\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\t//ใ่ๅญใ่ฒฐใฃใฆใใชใไบบๆฐใใซใฆใณใ\n\t\tint count = 0;\n\t\tfor (boolean bool : arrayGetSweets) {\n\t\t\tif (!bool) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t//ใใฌใๅใชในใ\n\t\tboolean[] arrayGetSweets = new boolean[N];\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\t//ใ่ๅญiใๆใฃใฆใใไบบๆฐ\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\t//ใ่ๅญใ่ฒฐใฃใฆใใชใไบบๆฐใใซใฆใณใ\n\t\tint count = 0;\n\t\tfor (boolean bool : arrayGetSweets) {\n\t\t\tif (!bool) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean[] arrayGetSweets = new boolean[N];",
"arrayGetSweets",
"new boolean[N]",
"N",
"for (int i = 0; i < K; i++) {\n\t\t\t//ใ่ๅญiใๆใฃใฆใใไบบๆฐ\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\t//ใ่ๅญiใๆใฃใฆใใไบบๆฐ\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\t//ใ่ๅญiใๆใฃใฆใใไบบๆฐ\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}",
"int GetSweets = sc.nextInt();",
"GetSweets",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}",
"!arrayGetSweets[GetSweets - 1]",
"arrayGetSweets[GetSweets - 1]",
"arrayGetSweets",
"GetSweets - 1",
"GetSweets",
"1",
"{\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}",
"arrayGetSweets[GetSweets - 1] = true",
"arrayGetSweets[GetSweets - 1]",
"arrayGetSweets",
"GetSweets - 1",
"GetSweets",
"1",
"true",
"sc.close()",
"sc.close",
"sc",
"int count = 0;",
"count",
"0",
"for (boolean bool : arrayGetSweets) {\n\t\t\tif (!bool) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"boolean bool",
"arrayGetSweets",
"{\n\t\t\tif (!bool) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (!bool) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (!bool) {\n\t\t\t\tcount++;\n\t\t\t}",
"!bool",
"bool",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t//ใใฌใๅใชในใ\n\t\tboolean[] arrayGetSweets = new boolean[N];\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\t//ใ่ๅญiใๆใฃใฆใใไบบๆฐ\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\t//ใ่ๅญใ่ฒฐใฃใฆใใชใไบบๆฐใใซใฆใณใ\n\t\tint count = 0;\n\t\tfor (boolean bool : arrayGetSweets) {\n\t\t\tif (!bool) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\t//ใใฌใๅใชในใ\n\t\tboolean[] arrayGetSweets = new boolean[N];\n\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\t//ใ่ๅญiใๆใฃใฆใใไบบๆฐ\n\t\t\tint d = sc.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\t//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท\n\t\t\t\tint GetSweets = sc.nextInt();\n\t\t\t\tif (!arrayGetSweets[GetSweets - 1]) {\n\t\t\t\t\tarrayGetSweets[GetSweets - 1] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t\t//ใ่ๅญใ่ฒฐใฃใฆใใชใไบบๆฐใใซใฆใณใ\n\t\tint count = 0;\n\t\tfor (boolean bool : arrayGetSweets) {\n\t\t\tif (!bool) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
//ใใฌใๅใชในใ
boolean[] arrayGetSweets = new boolean[N];
for (int i = 0; i < K; i++) {
//ใ่ๅญiใๆใฃใฆใใไบบๆฐ
int d = sc.nextInt();
for (int j = 0; j < d; j++) {
//ในใคใผใใใใใฃใใใฌใๅใฎ็ชๅท
int GetSweets = sc.nextInt();
if (!arrayGetSweets[GetSweets - 1]) {
arrayGetSweets[GetSweets - 1] = true;
}
}
}
sc.close();
//ใ่ๅญใ่ฒฐใฃใฆใใชใไบบๆฐใใซใฆใณใ
int count = 0;
for (boolean bool : arrayGetSweets) {
if (!bool) {
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
60,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
87,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
6,
95
],
[
95,
96
]
] |
[
"import java.util.*;\nclass Main{\npublic static void main(String[]args){\nScanner sc=new Scanner(System.in);\n int n=sc.nextInt(),k=sc.nextInt();\n int po[]=new int[n];\n for(int i=0;i<k;i++){\n int d=sc.nextInt();\n for(int j=0;j<d;j++){\n po[sc.nextInt()-1]++;\n }\n }\n int sum=0;\n for(int i=0;i<n;i++){\n if(po[i]==0)sum++;\n }\n System.out.println(sum);\n}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\npublic static void main(String[]args){\nScanner sc=new Scanner(System.in);\n int n=sc.nextInt(),k=sc.nextInt();\n int po[]=new int[n];\n for(int i=0;i<k;i++){\n int d=sc.nextInt();\n for(int j=0;j<d;j++){\n po[sc.nextInt()-1]++;\n }\n }\n int sum=0;\n for(int i=0;i<n;i++){\n if(po[i]==0)sum++;\n }\n System.out.println(sum);\n}\n}",
"Main",
"public static void main(String[]args){\nScanner sc=new Scanner(System.in);\n int n=sc.nextInt(),k=sc.nextInt();\n int po[]=new int[n];\n for(int i=0;i<k;i++){\n int d=sc.nextInt();\n for(int j=0;j<d;j++){\n po[sc.nextInt()-1]++;\n }\n }\n int sum=0;\n for(int i=0;i<n;i++){\n if(po[i]==0)sum++;\n }\n System.out.println(sum);\n}",
"main",
"{\nScanner sc=new Scanner(System.in);\n int n=sc.nextInt(),k=sc.nextInt();\n int po[]=new int[n];\n for(int i=0;i<k;i++){\n int d=sc.nextInt();\n for(int j=0;j<d;j++){\n po[sc.nextInt()-1]++;\n }\n }\n int sum=0;\n for(int i=0;i<n;i++){\n if(po[i]==0)sum++;\n }\n System.out.println(sum);\n}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k=sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int po[]=new int[n];",
"po",
"new int[n]",
"n",
"for(int i=0;i<k;i++){\n int d=sc.nextInt();\n for(int j=0;j<d;j++){\n po[sc.nextInt()-1]++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d=sc.nextInt();\n for(int j=0;j<d;j++){\n po[sc.nextInt()-1]++;\n }\n }",
"{\n int d=sc.nextInt();\n for(int j=0;j<d;j++){\n po[sc.nextInt()-1]++;\n }\n }",
"int d=sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j=0;j<d;j++){\n po[sc.nextInt()-1]++;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n po[sc.nextInt()-1]++;\n }",
"{\n po[sc.nextInt()-1]++;\n }",
"po[sc.nextInt()-1]++",
"po[sc.nextInt()-1]",
"po",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<n;i++){\n if(po[i]==0)sum++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(po[i]==0)sum++;\n }",
"{\n if(po[i]==0)sum++;\n }",
"if(po[i]==0)sum++;",
"po[i]==0",
"po[i]",
"po",
"i",
"0",
"sum++",
"sum",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[]args",
"args"
] |
import java.util.*;
class Main{
public static void main(String[]args){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt(),k=sc.nextInt();
int po[]=new int[n];
for(int i=0;i<k;i++){
int d=sc.nextInt();
for(int j=0;j<d;j++){
po[sc.nextInt()-1]++;
}
}
int sum=0;
for(int i=0;i<n;i++){
if(po[i]==0)sum++;
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
41,
13,
17,
28,
13,
13,
30,
30,
14,
2,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
60,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
68,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
8,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
6,
86
],
[
86,
87
]
] |
[
"import java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor(int i = 0; i < K; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int r : A){\n\t\t\tif(r == 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(count);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor(int i = 0; i < K; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int r : A){\n\t\t\tif(r == 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(count);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor(int i = 0; i < K; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int r : A){\n\t\t\tif(r == 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(count);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor(int i = 0; i < K; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tfor(int r : A){\n\t\t\tif(r == 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(count);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] A = new int[N];",
"A",
"new int[N]",
"N",
"for(int i = 0; i < K; i++){\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = sc.nextInt();\n\t\t\tfor(int j = 0; j < d; j++){\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}\n\t\t}",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0; j < d; j++){\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}",
"{\n\t\t\t\tA[sc.nextInt()-1]++;\n\t\t\t}",
"A[sc.nextInt()-1]++",
"A[sc.nextInt()-1]",
"A",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"int count = 0;",
"count",
"0",
"for(int r : A){\n\t\t\tif(r == 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int r",
"A",
"{\n\t\t\tif(r == 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(r == 0){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if(r == 0){\n\t\t\t\tcount++;\n\t\t\t}",
"r == 0",
"r",
"0",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"System.out.print(count)",
"System.out.print",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args"
] |
import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int[] A = new int[N];
for(int i = 0; i < K; i++){
int d = sc.nextInt();
for(int j = 0; j < d; j++){
A[sc.nextInt()-1]++;
}
}
int count = 0;
for(int r : A){
if(r == 0){
count++;
}
}
System.out.print(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
39,
17,
40,
17,
17,
17,
41,
13,
39,
17,
17,
17,
40,
17,
12,
13,
30,
29,
2,
2,
2,
2,
13,
18,
13,
13,
2,
13,
17,
2,
13,
18,
13,
13,
2,
13,
17,
23,
13,
23,
13,
12,
13,
30,
0,
18,
18,
13,
13,
13,
17,
40,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
4,
13,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
40,
18,
18,
13,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
2,
2,
18,
18,
13,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
17,
2,
18,
18,
13,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
17,
30,
4,
13,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
14,
2,
4,
18,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
29,
4,
18,
13,
2,
2,
2,
18,
13,
13,
18,
13,
13,
2,
18,
13,
13,
18,
13,
13,
2,
2,
18,
13,
13,
18,
13,
13,
2,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
13,
17,
23,
13,
12,
13,
30,
29,
8,
2,
2,
13,
13,
17,
2,
13,
13,
2,
2,
13,
13,
17,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
42,
2,
40,
13,
17,
30,
0,
18,
13,
2,
4,
18,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
40,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
18,
36,
13,
18,
13,
13,
23,
13,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
17,
0,
18,
36,
13,
40,
17,
12,
13,
30,
29,
2,
18,
36,
13,
18,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
18,
36,
13,
40,
18,
13,
13,
30,
29,
17,
14,
2,
40,
18,
36,
13,
18,
13,
13,
30,
29,
40,
17,
30,
29,
2,
18,
36,
13,
18,
13,
13,
23,
13,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
631,
8
],
[
631,
9
],
[
9,
10
],
[
631,
11
],
[
11,
12
],
[
631,
13
],
[
13,
14
],
[
631,
15
],
[
15,
16
],
[
631,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
19,
23
],
[
19,
24
],
[
631,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
27,
30
],
[
27,
31
],
[
31,
32
],
[
631,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
39,
38
],
[
48,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
39,
45
],
[
45,
46
],
[
45,
47
],
[
48,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
39,
53
],
[
53,
54
],
[
53,
55
],
[
33,
56
],
[
56,
57
],
[
33,
58
],
[
58,
59
],
[
631,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
62,
70
],
[
70,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
72,
80
],
[
80,
81
],
[
81,
82
],
[
72,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
88,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
87,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
101,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
87,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
116,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
126,
128
],
[
115,
129
],
[
114,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
131,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
130,
144
],
[
85,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
150,
152
],
[
146,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
155,
157
],
[
60,
158
],
[
158,
159
],
[
60,
160
],
[
160,
161
],
[
631,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
165,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
165,
175
],
[
175,
176
],
[
176,
177
],
[
165,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
181,
184
],
[
180,
185
],
[
179,
186
],
[
186,
187
],
[
164,
188
],
[
188,
189
],
[
162,
190
],
[
190,
191
],
[
631,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
196,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
201,
205
],
[
205,
206
],
[
205,
207
],
[
200,
208
],
[
208,
209
],
[
209,
210
],
[
209,
211
],
[
208,
212
],
[
212,
213
],
[
212,
214
],
[
199,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
216,
220
],
[
220,
221
],
[
220,
222
],
[
215,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
223,
227
],
[
227,
228
],
[
227,
229
],
[
192,
230
],
[
230,
231
],
[
192,
232
],
[
232,
233
],
[
631,
234
],
[
234,
235
],
[
234,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
234,
241
],
[
241,
242
],
[
631,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
249,
251
],
[
248,
252
],
[
247,
253
],
[
253,
254
],
[
253,
255
],
[
247,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
256,
260
],
[
243,
261
],
[
261,
262
],
[
243,
263
],
[
263,
264
],
[
631,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
268,
269
],
[
268,
270
],
[
267,
271
],
[
271,
272
],
[
271,
273
],
[
267,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
277,
278
],
[
267,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
282,
283
],
[
267,
284
],
[
284,
285
],
[
284,
286
],
[
267,
288
],
[
288,
289
],
[
289,
290
],
[
290,
291
],
[
289,
292
],
[
288,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
293,
299
],
[
299,
300
],
[
300,
301
],
[
301,
302
],
[
300,
303
],
[
299,
304
],
[
304,
305
],
[
305,
306
],
[
306,
307
],
[
306,
308
],
[
308,
309
],
[
309,
310
],
[
310,
311
],
[
308,
312
],
[
305,
313
],
[
267,
314
],
[
314,
315
],
[
314,
316
],
[
267,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
317,
322
],
[
322,
323
],
[
322,
324
],
[
317,
325
],
[
325,
326
],
[
326,
327
],
[
317,
328
],
[
329,
329
],
[
329,
330
],
[
330,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
330,
335
],
[
335,
336
],
[
267,
337
],
[
337,
338
],
[
338,
339
],
[
337,
340
],
[
267,
341
],
[
341,
342
],
[
342,
343
],
[
265,
344
],
[
344,
345
],
[
631,
346
],
[
346,
347
],
[
346,
348
],
[
348,
349
],
[
346,
350
],
[
350,
351
],
[
346,
352
],
[
352,
353
],
[
352,
354
],
[
354,
355
],
[
355,
356
],
[
355,
357
],
[
352,
358
],
[
358,
359
],
[
346,
360
],
[
360,
361
],
[
360,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
360,
366
],
[
366,
367
],
[
346,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
371,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
372,
376
],
[
376,
377
],
[
377,
378
],
[
378,
379
],
[
371,
380
],
[
380,
381
],
[
380,
382
],
[
370,
383
],
[
383,
384
],
[
384,
385
],
[
385,
386
],
[
346,
387
],
[
387,
388
],
[
387,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
391,
394
],
[
394,
395
],
[
346,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
401,
402
],
[
400,
403
],
[
403,
404
],
[
346,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
408,
409
],
[
409,
410
],
[
410,
411
],
[
346,
412
],
[
412,
413
],
[
412,
414
],
[
414,
415
],
[
415,
416
],
[
416,
417
],
[
417,
418
],
[
416,
419
],
[
419,
420
],
[
346,
421
],
[
421,
422
],
[
421,
423
],
[
423,
424
],
[
424,
425
],
[
424,
426
],
[
423,
428
],
[
428,
429
],
[
429,
430
],
[
430,
431
],
[
430,
432
],
[
428,
433
],
[
433,
434
],
[
433,
435
],
[
435,
436
],
[
435,
437
],
[
428,
438
],
[
438,
439
],
[
439,
440
],
[
428,
441
],
[
441,
442
],
[
442,
443
],
[
443,
444
],
[
443,
445
],
[
442,
446
],
[
446,
447
],
[
423,
448
],
[
448,
449
],
[
421,
450
],
[
450,
451
],
[
346,
452
],
[
452,
453
],
[
452,
454
],
[
454,
455
],
[
455,
456
],
[
455,
457
],
[
454,
459
],
[
459,
460
],
[
460,
461
],
[
461,
462
],
[
461,
463
],
[
459,
464
],
[
464,
465
],
[
464,
466
],
[
459,
467
],
[
467,
468
],
[
468,
469
],
[
459,
470
],
[
470,
471
],
[
471,
472
],
[
472,
473
],
[
472,
474
],
[
471,
475
],
[
475,
476
],
[
454,
477
],
[
477,
478
],
[
452,
479
],
[
479,
480
],
[
346,
481
],
[
481,
482
],
[
481,
483
],
[
483,
484
],
[
484,
485
],
[
485,
486
],
[
486,
487
],
[
631,
488
],
[
488,
489
],
[
488,
490
],
[
490,
491
],
[
488,
492
],
[
492,
493
],
[
488,
494
],
[
494,
495
],
[
494,
496
],
[
496,
497
],
[
497,
498
],
[
498,
499
],
[
498,
500
],
[
497,
501
],
[
496,
502
],
[
502,
503
],
[
503,
504
],
[
503,
505
],
[
502,
506
],
[
494,
507
],
[
507,
508
],
[
494,
509
],
[
509,
510
],
[
488,
511
],
[
511,
512
],
[
511,
513
],
[
513,
514
],
[
514,
515
],
[
515,
516
],
[
516,
517
],
[
516,
518
],
[
515,
519
],
[
519,
520
],
[
519,
521
],
[
511,
522
],
[
522,
523
],
[
488,
524
],
[
631,
525
],
[
525,
526
],
[
525,
527
],
[
527,
528
],
[
525,
529
],
[
529,
530
],
[
525,
531
],
[
531,
532
],
[
531,
533
],
[
533,
534
],
[
534,
535
],
[
535,
536
],
[
535,
537
],
[
534,
538
],
[
533,
539
],
[
539,
540
],
[
540,
541
],
[
540,
542
],
[
539,
543
],
[
543,
544
],
[
525,
545
],
[
545,
546
],
[
545,
547
],
[
547,
548
],
[
548,
549
],
[
549,
550
],
[
550,
551
],
[
550,
552
],
[
549,
553
],
[
553,
554
],
[
553,
555
],
[
545,
556
],
[
556,
557
],
[
631,
558
],
[
558,
559
],
[
558,
560
],
[
560,
561
],
[
558,
562
],
[
562,
563
],
[
558,
564
],
[
564,
565
],
[
558,
566
],
[
566,
567
],
[
566,
568
],
[
568,
569
],
[
569,
570
],
[
570,
571
],
[
570,
572
],
[
569,
573
],
[
568,
574
],
[
574,
575
],
[
575,
576
],
[
575,
577
],
[
574,
578
],
[
568,
579
],
[
579,
580
],
[
580,
581
],
[
580,
582
],
[
579,
583
],
[
566,
584
],
[
584,
585
],
[
566,
586
],
[
586,
587
],
[
566,
588
],
[
588,
589
],
[
558,
590
],
[
590,
591
],
[
590,
592
],
[
592,
593
],
[
593,
594
],
[
594,
595
],
[
595,
596
],
[
595,
597
],
[
594,
598
],
[
598,
599
],
[
599,
600
],
[
599,
601
],
[
593,
602
],
[
602,
603
],
[
603,
604
],
[
593,
605
],
[
605,
606
],
[
606,
607
],
[
607,
608
],
[
608,
609
],
[
608,
610
],
[
606,
611
],
[
611,
612
],
[
611,
613
],
[
605,
614
],
[
614,
615
],
[
615,
616
],
[
616,
617
],
[
605,
618
],
[
618,
619
],
[
619,
620
],
[
620,
621
],
[
621,
622
],
[
621,
623
],
[
620,
624
],
[
624,
625
],
[
624,
626
],
[
590,
627
],
[
627,
628
],
[
558,
629
],
[
0,
630
],
[
630,
631
],
[
630,
632
]
] |
[
"import java.io.*;\nimport java.util.*;\npublic class Main {\n\tstatic PrintWriter pw;\n\tstatic boolean[][] visit;\n\tstatic char[][] adj;\n//\tstatic void dfs(int i, long c) {\n//\t\tvisit[i]=true;\n//\t\tmax=Math.max(c, max);\n//\t\tfor(Pair p: adj[i]) {\n//\t\t\tif(!visit[p.x-1]) {\n//\t\t\t\tdfs(p.x-1, c+1l*p.y);\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic Queue<Integer> q;\n//\tstatic void bfs(int i) {\n//\t\tvisit[i].x=true;\n//\t\tvisit[i].n=0;\n//\t\tq.add(i);\n//\t\twhile(!q.isEmpty()){\n//\t\t\tint u = q.poll();\n//\t\t\tfor(int v : adj[u]){\n//\t\t\t\tif(!visit[v].x){\n//\t\t\t\t\tq.add(v);\n//\t\t\t\t\tvisit[v].x = true;\n//\t\t\t\t\tvisit[v].n=visit[u].n+1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic void tpsort(int i) {\n//\t\tvisit[i]=true;\n//\t\tfor(int x: adj[i]) {\n//\t\t\tif(!visit[x-1]) {\n//\t\t\t\ttpsort(x-1);\n//\t\t\t}\n//\t\t}\n//\t\tsticks.add(i+1);\n//\t}\n\tstatic int max;\n\tstatic int[] dx= {1,-1,0,0};\n\tstatic int[] dy= {0,0,1,-1};\n\tstatic boolean valid(int i, int j) {\n\t\treturn i<adj.length && i>=0 && j<adj.length && j>=0;\n\t}\n\tstatic void dfs(int i, int j) {\n\t\tvisit[i][j]=true;\n\t\tmax++;\n\t\tfor(int k=0; k<4; k++) {\n\t\t\tif(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}\n\t\t}\n\t}\n\tpublic static boolean contain(String s) {\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t\tif(s.charAt(i)==' ')\n\t\t\t\treturn true;\n\t\treturn false;\n\t}\n\tpublic static double dist(Pair a, Pair b) {\n\t\treturn Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));\n\t}\n\tpublic static boolean sign(int x) {\n\t\treturn x>0;\n\t}\n\tstatic long ceildiv(long x,long y) {\n\t\treturn x%y==0? x/y: x/y+1;\n\t}\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc= new Scanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tboolean[] arr=new boolean[n];\n\t\twhile(k-->0) {\n\t\t\tint d=sc.nextInt();\n\t\t\twhile(d-->0) {\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif(!arr[i])\n\t\t\t\tans++;\n\t\t}\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br; \n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n \n\t\tpublic Scanner(FileReader r) {\n\t\t\tbr = new BufferedReader(r);\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextArr(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\t\tarr[i] = nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic Integer[] nextsort(int n) throws IOException{\n\t\t\tInteger[] arr=new Integer[n];\n\t\t\tfor(int i=0; i<n; i++) \n\t\t\t\tarr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t}\n\tstatic class Pair implements Comparable<Pair>{\n\t\tint x;\n\t\tint y;\n\t\tpublic Pair(int a, int b) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t}\n\t\tpublic int compareTo(Pair other) {\n\t\t\treturn this.x-other.x;\n\t\t}\n\t}\n\tstatic class visit{\n\t\tboolean x;\n\t\tint n;\n\t\tpublic visit(){\n\t\t\tthis.x=false;\n\t\t\tthis.n=-1;\n\t\t}\n\t\tpublic int compareTo(visit other) {\n\t\t\treturn this.n-other.n;\n\t\t}\n\t}\n\tstatic class Tuple implements Comparable<Tuple>{\n\t\tint x;\n\t\tint y;\n\t\tboolean d;\n\t\tpublic Tuple(int a, int b, boolean t) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t\tthis.d=t;\n\t\t}\n\t\tpublic int compareTo(Tuple other) {\n\t\t\tif(this.d && !other.d) {\n\t\t\t\treturn 1;\n\t\t\t}else if(!this.d && other.d) {\n\t\t\t\treturn -1;\n\t\t\t}else {\n\t\t\t\treturn this.y-other.y;\n\t\t\t}\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic PrintWriter pw;\n\tstatic boolean[][] visit;\n\tstatic char[][] adj;\n//\tstatic void dfs(int i, long c) {\n//\t\tvisit[i]=true;\n//\t\tmax=Math.max(c, max);\n//\t\tfor(Pair p: adj[i]) {\n//\t\t\tif(!visit[p.x-1]) {\n//\t\t\t\tdfs(p.x-1, c+1l*p.y);\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic Queue<Integer> q;\n//\tstatic void bfs(int i) {\n//\t\tvisit[i].x=true;\n//\t\tvisit[i].n=0;\n//\t\tq.add(i);\n//\t\twhile(!q.isEmpty()){\n//\t\t\tint u = q.poll();\n//\t\t\tfor(int v : adj[u]){\n//\t\t\t\tif(!visit[v].x){\n//\t\t\t\t\tq.add(v);\n//\t\t\t\t\tvisit[v].x = true;\n//\t\t\t\t\tvisit[v].n=visit[u].n+1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic void tpsort(int i) {\n//\t\tvisit[i]=true;\n//\t\tfor(int x: adj[i]) {\n//\t\t\tif(!visit[x-1]) {\n//\t\t\t\ttpsort(x-1);\n//\t\t\t}\n//\t\t}\n//\t\tsticks.add(i+1);\n//\t}\n\tstatic int max;\n\tstatic int[] dx= {1,-1,0,0};\n\tstatic int[] dy= {0,0,1,-1};\n\tstatic boolean valid(int i, int j) {\n\t\treturn i<adj.length && i>=0 && j<adj.length && j>=0;\n\t}\n\tstatic void dfs(int i, int j) {\n\t\tvisit[i][j]=true;\n\t\tmax++;\n\t\tfor(int k=0; k<4; k++) {\n\t\t\tif(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}\n\t\t}\n\t}\n\tpublic static boolean contain(String s) {\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t\tif(s.charAt(i)==' ')\n\t\t\t\treturn true;\n\t\treturn false;\n\t}\n\tpublic static double dist(Pair a, Pair b) {\n\t\treturn Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));\n\t}\n\tpublic static boolean sign(int x) {\n\t\treturn x>0;\n\t}\n\tstatic long ceildiv(long x,long y) {\n\t\treturn x%y==0? x/y: x/y+1;\n\t}\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc= new Scanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tboolean[] arr=new boolean[n];\n\t\twhile(k-->0) {\n\t\t\tint d=sc.nextInt();\n\t\t\twhile(d-->0) {\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif(!arr[i])\n\t\t\t\tans++;\n\t\t}\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br; \n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n \n\t\tpublic Scanner(FileReader r) {\n\t\t\tbr = new BufferedReader(r);\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextArr(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\t\tarr[i] = nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic Integer[] nextsort(int n) throws IOException{\n\t\t\tInteger[] arr=new Integer[n];\n\t\t\tfor(int i=0; i<n; i++) \n\t\t\t\tarr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t}\n\tstatic class Pair implements Comparable<Pair>{\n\t\tint x;\n\t\tint y;\n\t\tpublic Pair(int a, int b) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t}\n\t\tpublic int compareTo(Pair other) {\n\t\t\treturn this.x-other.x;\n\t\t}\n\t}\n\tstatic class visit{\n\t\tboolean x;\n\t\tint n;\n\t\tpublic visit(){\n\t\t\tthis.x=false;\n\t\t\tthis.n=-1;\n\t\t}\n\t\tpublic int compareTo(visit other) {\n\t\t\treturn this.n-other.n;\n\t\t}\n\t}\n\tstatic class Tuple implements Comparable<Tuple>{\n\t\tint x;\n\t\tint y;\n\t\tboolean d;\n\t\tpublic Tuple(int a, int b, boolean t) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t\tthis.d=t;\n\t\t}\n\t\tpublic int compareTo(Tuple other) {\n\t\t\tif(this.d && !other.d) {\n\t\t\t\treturn 1;\n\t\t\t}else if(!this.d && other.d) {\n\t\t\t\treturn -1;\n\t\t\t}else {\n\t\t\t\treturn this.y-other.y;\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"static PrintWriter pw;",
"pw",
"static boolean[][] visit;",
"visit",
"static char[][] adj;",
"adj",
"//\tstatic void dfs(int i, long c) {\n//\t\tvisit[i]=true;\n//\t\tmax=Math.max(c, max);\n//\t\tfor(Pair p: adj[i]) {\n//\t\t\tif(!visit[p.x-1]) {\n//\t\t\t\tdfs(p.x-1, c+1l*p.y);\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic Queue<Integer> q;\n//\tstatic void bfs(int i) {\n//\t\tvisit[i].x=true;\n//\t\tvisit[i].n=0;\n//\t\tq.add(i);\n//\t\twhile(!q.isEmpty()){\n//\t\t\tint u = q.poll();\n//\t\t\tfor(int v : adj[u]){\n//\t\t\t\tif(!visit[v].x){\n//\t\t\t\t\tq.add(v);\n//\t\t\t\t\tvisit[v].x = true;\n//\t\t\t\t\tvisit[v].n=visit[u].n+1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic void tpsort(int i) {\n//\t\tvisit[i]=true;\n//\t\tfor(int x: adj[i]) {\n//\t\t\tif(!visit[x-1]) {\n//\t\t\t\ttpsort(x-1);\n//\t\t\t}\n//\t\t}\n//\t\tsticks.add(i+1);\n//\t}\n\tstatic int max;",
"max",
"static int[] dx= {1,-1,0,0};",
"dx",
"{1,-1,0,0}",
"1",
"-1",
"1",
"0",
"0",
"static int[] dy= {0,0,1,-1};",
"dy",
"{0,0,1,-1}",
"0",
"0",
"1",
"-1",
"1",
"static boolean valid(int i, int j) {\n\t\treturn i<adj.length && i>=0 && j<adj.length && j>=0;\n\t}",
"valid",
"{\n\t\treturn i<adj.length && i>=0 && j<adj.length && j>=0;\n\t}",
"return i<adj.length && i>=0 && j<adj.length && j>=0;",
"i<adj.length && i>=0 && j<adj.length && j>=0",
"j<adj.length",
"i<adj.length && i>=0 && j<adj.length && j>=0",
"i<adj.length",
"i",
"adj.length",
"adj",
"adj.length",
"i>=0",
"i",
"0",
"j<adj.length",
"j",
"adj.length",
"adj",
"adj.length",
"j>=0",
"j",
"0",
"int i",
"i",
"int j",
"j",
"static void dfs(int i, int j) {\n\t\tvisit[i][j]=true;\n\t\tmax++;\n\t\tfor(int k=0; k<4; k++) {\n\t\t\tif(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}\n\t\t}\n\t}",
"dfs",
"{\n\t\tvisit[i][j]=true;\n\t\tmax++;\n\t\tfor(int k=0; k<4; k++) {\n\t\t\tif(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}\n\t\t}\n\t}",
"visit[i][j]=true",
"visit[i][j]",
"visit[i]",
"visit",
"i",
"j",
"true",
"max++",
"max",
"for(int k=0; k<4; k++) {\n\t\t\tif(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}\n\t\t}",
"int k=0;",
"int k=0;",
"k",
"0",
"k<4",
"k",
"4",
"k++",
"k++",
"k",
"{\n\t\t\tif(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}\n\t\t}",
"if(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}",
"valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')",
"valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')",
"valid(i+dx[k],j+dy[k])",
"valid",
"i+dx[k]",
"i",
"dx[k]",
"dx",
"k",
"j+dy[k]",
"j",
"dy[k]",
"dy",
"k",
"!visit[i+dx[k]][j+dy[k]]",
"visit[i+dx[k]][j+dy[k]]",
"visit[i+dx[k]]",
"visit",
"i+dx[k]",
"i",
"dx[k]",
"dx",
"k",
"j+dy[k]",
"j",
"dy[k]",
"dy",
"k",
"(adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')",
"adj[i+dx[k]][j+dy[k]]=='x'",
"adj[i+dx[k]][j+dy[k]]",
"adj[i+dx[k]]",
"adj",
"i+dx[k]",
"i",
"dx[k]",
"dx",
"k",
"j+dy[k]",
"j",
"dy[k]",
"dy",
"k",
"'x'",
"adj[i+dx[k]][j+dy[k]]=='@'",
"adj[i+dx[k]][j+dy[k]]",
"adj[i+dx[k]]",
"adj",
"i+dx[k]",
"i",
"dx[k]",
"dx",
"k",
"j+dy[k]",
"j",
"dy[k]",
"dy",
"k",
"'@'",
"{\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}",
"dfs(i+dx[k],j+dy[k])",
"dfs",
"i+dx[k]",
"i",
"dx[k]",
"dx",
"k",
"j+dy[k]",
"j",
"dy[k]",
"dy",
"k",
"int i",
"i",
"int j",
"j",
"public static boolean contain(String s) {\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t\tif(s.charAt(i)==' ')\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"contain",
"{\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t\tif(s.charAt(i)==' ')\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"for(int i=0; i<s.length(); i++)\n\t\t\tif(s.charAt(i)==' ')\n\t\t\t\treturn true;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"if(s.charAt(i)==' ')\n\t\t\t\treturn true;",
"if(s.charAt(i)==' ')\n\t\t\t\treturn true;",
"s.charAt(i)==' '",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"' '",
"return true;",
"true",
"return false;",
"false",
"String s",
"s",
"public static double dist(Pair a, Pair b) {\n\t\treturn Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));\n\t}",
"dist",
"{\n\t\treturn Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));\n\t}",
"return Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));",
"Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y))",
"Math.sqrt",
"Math",
"(a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y)",
"(a.x-b.x)*(a.x-b.x)",
"(a.x-b.x)",
"a.x",
"a",
"a.x",
"b.x",
"b",
"b.x",
"(a.x-b.x)",
"a.x",
"a",
"a.x",
"b.x",
"b",
"b.x",
"(a.y-b.y)*(a.y-b.y)",
"(a.y-b.y)",
"a.y",
"a",
"a.y",
"b.y",
"b",
"b.y",
"(a.y-b.y)",
"a.y",
"a",
"a.y",
"b.y",
"b",
"b.y",
"Pair a",
"a",
"Pair b",
"b",
"public static boolean sign(int x) {\n\t\treturn x>0;\n\t}",
"sign",
"{\n\t\treturn x>0;\n\t}",
"return x>0;",
"x>0",
"x",
"0",
"int x",
"x",
"static long ceildiv(long x,long y) {\n\t\treturn x%y==0? x/y: x/y+1;\n\t}",
"ceildiv",
"{\n\t\treturn x%y==0? x/y: x/y+1;\n\t}",
"return x%y==0? x/y: x/y+1;",
"x%y==0? x/y: x/y+1",
"x%y==0",
"x%y",
"x",
"y",
"0",
"x/y",
"x",
"y",
"x/y+1",
"x/y",
"x",
"y",
"1",
"long x",
"x",
"long y",
"y",
"public static void main(String[] args) throws Exception {\n\t\tScanner sc= new Scanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tboolean[] arr=new boolean[n];\n\t\twhile(k-->0) {\n\t\t\tint d=sc.nextInt();\n\t\t\twhile(d-->0) {\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif(!arr[i])\n\t\t\t\tans++;\n\t\t}\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}",
"main",
"{\n\t\tScanner sc= new Scanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tboolean[] arr=new boolean[n];\n\t\twhile(k-->0) {\n\t\t\tint d=sc.nextInt();\n\t\t\twhile(d-->0) {\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif(!arr[i])\n\t\t\t\tans++;\n\t\t}\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}",
"Scanner sc= new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"pw = new PrintWriter(System.out)",
"pw",
"new PrintWriter(System.out)",
"int n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k=sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean[] arr=new boolean[n];",
"arr",
"new boolean[n]",
"n",
"while(k-->0) {\n\t\t\tint d=sc.nextInt();\n\t\t\twhile(d-->0) {\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}\n\t\t}",
"k-->0",
"k--",
"k",
"0",
"{\n\t\t\tint d=sc.nextInt();\n\t\t\twhile(d-->0) {\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}\n\t\t}",
"int d=sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"while(d-->0) {\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}",
"d-->0",
"d--",
"d",
"0",
"{\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}",
"arr[sc.nextInt()-1]=true",
"arr[sc.nextInt()-1]",
"arr",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"true",
"int ans=0;",
"ans",
"0",
"for(int i=0; i<n; i++) {\n\t\t\tif(!arr[i])\n\t\t\t\tans++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(!arr[i])\n\t\t\t\tans++;\n\t\t}",
"{\n\t\t\tif(!arr[i])\n\t\t\t\tans++;\n\t\t}",
"if(!arr[i])\n\t\t\t\tans++;",
"!arr[i]",
"arr[i]",
"arr",
"i",
"ans++",
"ans",
"pw.println(ans)",
"pw.println",
"pw",
"ans",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"static class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br; \n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n \n\t\tpublic Scanner(FileReader r) {\n\t\t\tbr = new BufferedReader(r);\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextArr(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\t\tarr[i] = nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic Integer[] nextsort(int n) throws IOException{\n\t\t\tInteger[] arr=new Integer[n];\n\t\t\tfor(int i=0; i<n; i++) \n\t\t\t\tarr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t}",
"Scanner",
"StringTokenizer st;",
"st",
"BufferedReader br;",
"br",
"public Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}",
"Scanner",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(s))",
"br",
"new BufferedReader(new InputStreamReader(s))",
"InputStream s",
"s",
"public Scanner(FileReader r) {\n\t\t\tbr = new BufferedReader(r);\n\t\t}",
"Scanner",
"{\n\t\t\tbr = new BufferedReader(r);\n\t\t}",
"br = new BufferedReader(r)",
"br",
"new BufferedReader(r)",
"FileReader r",
"r",
"public String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}",
"while (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}",
"nextLine",
"{\n\t\t\treturn br.readLine();\n\t\t}",
"return br.readLine();",
"br.readLine()",
"br.readLine",
"br",
"public double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public int[] nextArr(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\t\tarr[i] = nextInt();\n\t\t\treturn arr;\n\t\t}",
"nextArr",
"{\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\t\tarr[i] = nextInt();\n\t\t\treturn arr;\n\t\t}",
"int[] arr = new int[n];",
"arr",
"new int[n]",
"n",
"for (int i = 0; i < arr.length; i++)\n\t\t\t\tarr[i] = nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"arr[i] = nextInt();",
"arr[i] = nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"public Integer[] nextsort(int n) throws IOException{\n\t\t\tInteger[] arr=new Integer[n];\n\t\t\tfor(int i=0; i<n; i++) \n\t\t\t\tarr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}",
"nextsort",
"{\n\t\t\tInteger[] arr=new Integer[n];\n\t\t\tfor(int i=0; i<n; i++) \n\t\t\t\tarr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}",
"Integer[] arr=new Integer[n];",
"arr",
"new Integer[n]",
"n",
"for(int i=0; i<n; i++) \n\t\t\t\tarr[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i]=nextInt();",
"arr[i]=nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"public boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}",
"ready",
"{\n\t\t\treturn br.ready();\n\t\t}",
"return br.ready();",
"br.ready()",
"br.ready",
"br",
"static class Pair implements Comparable<Pair>{\n\t\tint x;\n\t\tint y;\n\t\tpublic Pair(int a, int b) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t}\n\t\tpublic int compareTo(Pair other) {\n\t\t\treturn this.x-other.x;\n\t\t}\n\t}",
"Pair",
"int x;",
"x",
"int y;",
"y",
"public Pair(int a, int b) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t}",
"Pair",
"{\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t}",
"this.x=a",
"this.x",
"this",
"this.x",
"a",
"this.y=b",
"this.y",
"this",
"this.y",
"b",
"int a",
"a",
"int b",
"b",
"public int compareTo(Pair other) {\n\t\t\treturn this.x-other.x;\n\t\t}",
"compareTo",
"{\n\t\t\treturn this.x-other.x;\n\t\t}",
"return this.x-other.x;",
"this.x-other.x",
"this.x",
"this",
"this.x",
"other.x",
"other",
"other.x",
"Pair other",
"other",
"Comparable",
"static class visit{\n\t\tboolean x;\n\t\tint n;\n\t\tpublic visit(){\n\t\t\tthis.x=false;\n\t\t\tthis.n=-1;\n\t\t}\n\t\tpublic int compareTo(visit other) {\n\t\t\treturn this.n-other.n;\n\t\t}\n\t}",
"visit",
"boolean x;",
"x",
"int n;",
"n",
"public visit(){\n\t\t\tthis.x=false;\n\t\t\tthis.n=-1;\n\t\t}",
"visit",
"{\n\t\t\tthis.x=false;\n\t\t\tthis.n=-1;\n\t\t}",
"this.x=false",
"this.x",
"this",
"this.x",
"false",
"this.n=-1",
"this.n",
"this",
"this.n",
"-1",
"1",
"public int compareTo(visit other) {\n\t\t\treturn this.n-other.n;\n\t\t}",
"compareTo",
"{\n\t\t\treturn this.n-other.n;\n\t\t}",
"return this.n-other.n;",
"this.n-other.n",
"this.n",
"this",
"this.n",
"other.n",
"other",
"other.n",
"visit other",
"other",
"static class Tuple implements Comparable<Tuple>{\n\t\tint x;\n\t\tint y;\n\t\tboolean d;\n\t\tpublic Tuple(int a, int b, boolean t) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t\tthis.d=t;\n\t\t}\n\t\tpublic int compareTo(Tuple other) {\n\t\t\tif(this.d && !other.d) {\n\t\t\t\treturn 1;\n\t\t\t}else if(!this.d && other.d) {\n\t\t\t\treturn -1;\n\t\t\t}else {\n\t\t\t\treturn this.y-other.y;\n\t\t\t}\n\t\t}\n\t}",
"Tuple",
"int x;",
"x",
"int y;",
"y",
"boolean d;",
"d",
"public Tuple(int a, int b, boolean t) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t\tthis.d=t;\n\t\t}",
"Tuple",
"{\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t\tthis.d=t;\n\t\t}",
"this.x=a",
"this.x",
"this",
"this.x",
"a",
"this.y=b",
"this.y",
"this",
"this.y",
"b",
"this.d=t",
"this.d",
"this",
"this.d",
"t",
"int a",
"a",
"int b",
"b",
"boolean t",
"t",
"public int compareTo(Tuple other) {\n\t\t\tif(this.d && !other.d) {\n\t\t\t\treturn 1;\n\t\t\t}else if(!this.d && other.d) {\n\t\t\t\treturn -1;\n\t\t\t}else {\n\t\t\t\treturn this.y-other.y;\n\t\t\t}\n\t\t}",
"compareTo",
"{\n\t\t\tif(this.d && !other.d) {\n\t\t\t\treturn 1;\n\t\t\t}else if(!this.d && other.d) {\n\t\t\t\treturn -1;\n\t\t\t}else {\n\t\t\t\treturn this.y-other.y;\n\t\t\t}\n\t\t}",
"if(this.d && !other.d) {\n\t\t\t\treturn 1;\n\t\t\t}else if(!this.d && other.d) {\n\t\t\t\treturn -1;\n\t\t\t}else {\n\t\t\t\treturn this.y-other.y;\n\t\t\t}",
"this.d && !other.d",
"this.d",
"this",
"this.d",
"!other.d",
"other.d",
"other",
"other.d",
"{\n\t\t\t\treturn 1;\n\t\t\t}",
"return 1;",
"1",
"if(!this.d && other.d) {\n\t\t\t\treturn -1;\n\t\t\t}else {\n\t\t\t\treturn this.y-other.y;\n\t\t\t}",
"!this.d && other.d",
"!this.d",
"this.d",
"this",
"this.d",
"other.d",
"other",
"other.d",
"{\n\t\t\t\treturn -1;\n\t\t\t}",
"return -1;",
"-1",
"1",
"{\n\t\t\t\treturn this.y-other.y;\n\t\t\t}",
"return this.y-other.y;",
"this.y-other.y",
"this.y",
"this",
"this.y",
"other.y",
"other",
"other.y",
"Tuple other",
"other",
"Comparable",
"public class Main {\n\tstatic PrintWriter pw;\n\tstatic boolean[][] visit;\n\tstatic char[][] adj;\n//\tstatic void dfs(int i, long c) {\n//\t\tvisit[i]=true;\n//\t\tmax=Math.max(c, max);\n//\t\tfor(Pair p: adj[i]) {\n//\t\t\tif(!visit[p.x-1]) {\n//\t\t\t\tdfs(p.x-1, c+1l*p.y);\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic Queue<Integer> q;\n//\tstatic void bfs(int i) {\n//\t\tvisit[i].x=true;\n//\t\tvisit[i].n=0;\n//\t\tq.add(i);\n//\t\twhile(!q.isEmpty()){\n//\t\t\tint u = q.poll();\n//\t\t\tfor(int v : adj[u]){\n//\t\t\t\tif(!visit[v].x){\n//\t\t\t\t\tq.add(v);\n//\t\t\t\t\tvisit[v].x = true;\n//\t\t\t\t\tvisit[v].n=visit[u].n+1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic void tpsort(int i) {\n//\t\tvisit[i]=true;\n//\t\tfor(int x: adj[i]) {\n//\t\t\tif(!visit[x-1]) {\n//\t\t\t\ttpsort(x-1);\n//\t\t\t}\n//\t\t}\n//\t\tsticks.add(i+1);\n//\t}\n\tstatic int max;\n\tstatic int[] dx= {1,-1,0,0};\n\tstatic int[] dy= {0,0,1,-1};\n\tstatic boolean valid(int i, int j) {\n\t\treturn i<adj.length && i>=0 && j<adj.length && j>=0;\n\t}\n\tstatic void dfs(int i, int j) {\n\t\tvisit[i][j]=true;\n\t\tmax++;\n\t\tfor(int k=0; k<4; k++) {\n\t\t\tif(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}\n\t\t}\n\t}\n\tpublic static boolean contain(String s) {\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t\tif(s.charAt(i)==' ')\n\t\t\t\treturn true;\n\t\treturn false;\n\t}\n\tpublic static double dist(Pair a, Pair b) {\n\t\treturn Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));\n\t}\n\tpublic static boolean sign(int x) {\n\t\treturn x>0;\n\t}\n\tstatic long ceildiv(long x,long y) {\n\t\treturn x%y==0? x/y: x/y+1;\n\t}\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc= new Scanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tboolean[] arr=new boolean[n];\n\t\twhile(k-->0) {\n\t\t\tint d=sc.nextInt();\n\t\t\twhile(d-->0) {\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif(!arr[i])\n\t\t\t\tans++;\n\t\t}\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br; \n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n \n\t\tpublic Scanner(FileReader r) {\n\t\t\tbr = new BufferedReader(r);\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextArr(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\t\tarr[i] = nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic Integer[] nextsort(int n) throws IOException{\n\t\t\tInteger[] arr=new Integer[n];\n\t\t\tfor(int i=0; i<n; i++) \n\t\t\t\tarr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t}\n\tstatic class Pair implements Comparable<Pair>{\n\t\tint x;\n\t\tint y;\n\t\tpublic Pair(int a, int b) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t}\n\t\tpublic int compareTo(Pair other) {\n\t\t\treturn this.x-other.x;\n\t\t}\n\t}\n\tstatic class visit{\n\t\tboolean x;\n\t\tint n;\n\t\tpublic visit(){\n\t\t\tthis.x=false;\n\t\t\tthis.n=-1;\n\t\t}\n\t\tpublic int compareTo(visit other) {\n\t\t\treturn this.n-other.n;\n\t\t}\n\t}\n\tstatic class Tuple implements Comparable<Tuple>{\n\t\tint x;\n\t\tint y;\n\t\tboolean d;\n\t\tpublic Tuple(int a, int b, boolean t) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t\tthis.d=t;\n\t\t}\n\t\tpublic int compareTo(Tuple other) {\n\t\t\tif(this.d && !other.d) {\n\t\t\t\treturn 1;\n\t\t\t}else if(!this.d && other.d) {\n\t\t\t\treturn -1;\n\t\t\t}else {\n\t\t\t\treturn this.y-other.y;\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main {\n\tstatic PrintWriter pw;\n\tstatic boolean[][] visit;\n\tstatic char[][] adj;\n//\tstatic void dfs(int i, long c) {\n//\t\tvisit[i]=true;\n//\t\tmax=Math.max(c, max);\n//\t\tfor(Pair p: adj[i]) {\n//\t\t\tif(!visit[p.x-1]) {\n//\t\t\t\tdfs(p.x-1, c+1l*p.y);\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic Queue<Integer> q;\n//\tstatic void bfs(int i) {\n//\t\tvisit[i].x=true;\n//\t\tvisit[i].n=0;\n//\t\tq.add(i);\n//\t\twhile(!q.isEmpty()){\n//\t\t\tint u = q.poll();\n//\t\t\tfor(int v : adj[u]){\n//\t\t\t\tif(!visit[v].x){\n//\t\t\t\t\tq.add(v);\n//\t\t\t\t\tvisit[v].x = true;\n//\t\t\t\t\tvisit[v].n=visit[u].n+1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t}\n//\tstatic void tpsort(int i) {\n//\t\tvisit[i]=true;\n//\t\tfor(int x: adj[i]) {\n//\t\t\tif(!visit[x-1]) {\n//\t\t\t\ttpsort(x-1);\n//\t\t\t}\n//\t\t}\n//\t\tsticks.add(i+1);\n//\t}\n\tstatic int max;\n\tstatic int[] dx= {1,-1,0,0};\n\tstatic int[] dy= {0,0,1,-1};\n\tstatic boolean valid(int i, int j) {\n\t\treturn i<adj.length && i>=0 && j<adj.length && j>=0;\n\t}\n\tstatic void dfs(int i, int j) {\n\t\tvisit[i][j]=true;\n\t\tmax++;\n\t\tfor(int k=0; k<4; k++) {\n\t\t\tif(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {\n\t\t\t\tdfs(i+dx[k],j+dy[k]);\n\t\t\t}\n\t\t}\n\t}\n\tpublic static boolean contain(String s) {\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t\tif(s.charAt(i)==' ')\n\t\t\t\treturn true;\n\t\treturn false;\n\t}\n\tpublic static double dist(Pair a, Pair b) {\n\t\treturn Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));\n\t}\n\tpublic static boolean sign(int x) {\n\t\treturn x>0;\n\t}\n\tstatic long ceildiv(long x,long y) {\n\t\treturn x%y==0? x/y: x/y+1;\n\t}\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc= new Scanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint n=sc.nextInt(),k=sc.nextInt();\n\t\tboolean[] arr=new boolean[n];\n\t\twhile(k-->0) {\n\t\t\tint d=sc.nextInt();\n\t\t\twhile(d-->0) {\n\t\t\t\tarr[sc.nextInt()-1]=true;\n\t\t\t}\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tif(!arr[i])\n\t\t\t\tans++;\n\t\t}\n\t\tpw.println(ans);\n\t\tpw.close();\n\t}\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br; \n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n \n\t\tpublic Scanner(FileReader r) {\n\t\t\tbr = new BufferedReader(r);\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic int[] nextArr(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < arr.length; i++)\n\t\t\t\tarr[i] = nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic Integer[] nextsort(int n) throws IOException{\n\t\t\tInteger[] arr=new Integer[n];\n\t\t\tfor(int i=0; i<n; i++) \n\t\t\t\tarr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t}\n\tstatic class Pair implements Comparable<Pair>{\n\t\tint x;\n\t\tint y;\n\t\tpublic Pair(int a, int b) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t}\n\t\tpublic int compareTo(Pair other) {\n\t\t\treturn this.x-other.x;\n\t\t}\n\t}\n\tstatic class visit{\n\t\tboolean x;\n\t\tint n;\n\t\tpublic visit(){\n\t\t\tthis.x=false;\n\t\t\tthis.n=-1;\n\t\t}\n\t\tpublic int compareTo(visit other) {\n\t\t\treturn this.n-other.n;\n\t\t}\n\t}\n\tstatic class Tuple implements Comparable<Tuple>{\n\t\tint x;\n\t\tint y;\n\t\tboolean d;\n\t\tpublic Tuple(int a, int b, boolean t) {\n\t\t\tthis.x=a;\n\t\t\tthis.y=b;\n\t\t\tthis.d=t;\n\t\t}\n\t\tpublic int compareTo(Tuple other) {\n\t\t\tif(this.d && !other.d) {\n\t\t\t\treturn 1;\n\t\t\t}else if(!this.d && other.d) {\n\t\t\t\treturn -1;\n\t\t\t}else {\n\t\t\t\treturn this.y-other.y;\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.*;
import java.util.*;
public class Main {
static PrintWriter pw;
static boolean[][] visit;
static char[][] adj;
// static void dfs(int i, long c) {
// visit[i]=true;
// max=Math.max(c, max);
// for(Pair p: adj[i]) {
// if(!visit[p.x-1]) {
// dfs(p.x-1, c+1l*p.y);
// }
// }
// }
// static Queue<Integer> q;
// static void bfs(int i) {
// visit[i].x=true;
// visit[i].n=0;
// q.add(i);
// while(!q.isEmpty()){
// int u = q.poll();
// for(int v : adj[u]){
// if(!visit[v].x){
// q.add(v);
// visit[v].x = true;
// visit[v].n=visit[u].n+1;
// }
// }
// }
// }
// static void tpsort(int i) {
// visit[i]=true;
// for(int x: adj[i]) {
// if(!visit[x-1]) {
// tpsort(x-1);
// }
// }
// sticks.add(i+1);
// }
static int max;
static int[] dx= {1,-1,0,0};
static int[] dy= {0,0,1,-1};
static boolean valid(int i, int j) {
return i<adj.length && i>=0 && j<adj.length && j>=0;
}
static void dfs(int i, int j) {
visit[i][j]=true;
max++;
for(int k=0; k<4; k++) {
if(valid(i+dx[k],j+dy[k]) && !visit[i+dx[k]][j+dy[k]] && (adj[i+dx[k]][j+dy[k]]=='x' || adj[i+dx[k]][j+dy[k]]=='@')) {
dfs(i+dx[k],j+dy[k]);
}
}
}
public static boolean contain(String s) {
for(int i=0; i<s.length(); i++)
if(s.charAt(i)==' ')
return true;
return false;
}
public static double dist(Pair a, Pair b) {
return Math.sqrt((a.x-b.x)*(a.x-b.x)+ (a.y-b.y)*(a.y-b.y));
}
public static boolean sign(int x) {
return x>0;
}
static long ceildiv(long x,long y) {
return x%y==0? x/y: x/y+1;
}
public static void main(String[] args) throws Exception {
Scanner sc= new Scanner(System.in);
pw = new PrintWriter(System.out);
int n=sc.nextInt(),k=sc.nextInt();
boolean[] arr=new boolean[n];
while(k-->0) {
int d=sc.nextInt();
while(d-->0) {
arr[sc.nextInt()-1]=true;
}
}
int ans=0;
for(int i=0; i<n; i++) {
if(!arr[i])
ans++;
}
pw.println(ans);
pw.close();
}
static class Scanner {
StringTokenizer st;
BufferedReader br;
public Scanner(InputStream s) {
br = new BufferedReader(new InputStreamReader(s));
}
public Scanner(FileReader r) {
br = new BufferedReader(r);
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine());
return st.nextToken();
}
public int nextInt() throws IOException {
return Integer.parseInt(next());
}
public long nextLong() throws IOException {
return Long.parseLong(next());
}
public String nextLine() throws IOException {
return br.readLine();
}
public double nextDouble() throws IOException {
return Double.parseDouble(next());
}
public int[] nextArr(int n) throws IOException {
int[] arr = new int[n];
for (int i = 0; i < arr.length; i++)
arr[i] = nextInt();
return arr;
}
public Integer[] nextsort(int n) throws IOException{
Integer[] arr=new Integer[n];
for(int i=0; i<n; i++)
arr[i]=nextInt();
return arr;
}
public boolean ready() throws IOException {
return br.ready();
}
}
static class Pair implements Comparable<Pair>{
int x;
int y;
public Pair(int a, int b) {
this.x=a;
this.y=b;
}
public int compareTo(Pair other) {
return this.x-other.x;
}
}
static class visit{
boolean x;
int n;
public visit(){
this.x=false;
this.n=-1;
}
public int compareTo(visit other) {
return this.n-other.n;
}
}
static class Tuple implements Comparable<Tuple>{
int x;
int y;
boolean d;
public Tuple(int a, int b, boolean t) {
this.x=a;
this.y=b;
this.d=t;
}
public int compareTo(Tuple other) {
if(this.d && !other.d) {
return 1;
}else if(!this.d && other.d) {
return -1;
}else {
return this.y-other.y;
}
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
40,
18,
13,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
10,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
29,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
40,
41
],
[
40,
42
],
[
29,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
29,
86
],
[
86,
87
],
[
86,
88
],
[
29,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
89,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
102,
108
],
[
108,
109
],
[
109,
110
],
[
29,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
17,
115
],
[
115,
116
],
[
116,
117
],
[
17,
118
],
[
118,
119
],
[
119,
120
],
[
15,
121
],
[
121,
122
],
[
10,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
123,
127
],
[
127,
128
],
[
123,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
123,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
138,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
148,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
137,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
123,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
170,
171
],
[
123,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
176,
179
],
[
179,
180
],
[
123,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
188,
189
],
[
123,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
192,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
196,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
207,
208
],
[
192,
209
],
[
209,
210
]
] |
[
"//package com.company;\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n//****Use Integer Wrapper Class for Arrays.sort()****\nclass Main {\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] Args){\n FastReader scan=new FastReader();\n int t=1;\n //t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int k=scan.nextInt();\n int[] f=new int[n];\n for(int i=0;i<k;i++){\n int d=scan.nextInt();\n for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }\n }\n int v=0;\n for(int i=0;i<n;i++){\n if(f[i]==0){\n v++;\n }\n }\n out.println(v);\n }\n out.flush();\n out.close();\n }\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main {\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] Args){\n FastReader scan=new FastReader();\n int t=1;\n //t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int k=scan.nextInt();\n int[] f=new int[n];\n for(int i=0;i<k;i++){\n int d=scan.nextInt();\n for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }\n }\n int v=0;\n for(int i=0;i<n;i++){\n if(f[i]==0){\n v++;\n }\n }\n out.println(v);\n }\n out.flush();\n out.close();\n }\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n}",
"Main",
"static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));",
"out",
"new PrintWriter(new OutputStreamWriter(System.out))",
"public static void main(String[] Args){\n FastReader scan=new FastReader();\n int t=1;\n //t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int k=scan.nextInt();\n int[] f=new int[n];\n for(int i=0;i<k;i++){\n int d=scan.nextInt();\n for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }\n }\n int v=0;\n for(int i=0;i<n;i++){\n if(f[i]==0){\n v++;\n }\n }\n out.println(v);\n }\n out.flush();\n out.close();\n }",
"main",
"{\n FastReader scan=new FastReader();\n int t=1;\n //t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int k=scan.nextInt();\n int[] f=new int[n];\n for(int i=0;i<k;i++){\n int d=scan.nextInt();\n for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }\n }\n int v=0;\n for(int i=0;i<n;i++){\n if(f[i]==0){\n v++;\n }\n }\n out.println(v);\n }\n out.flush();\n out.close();\n }",
"FastReader scan=new FastReader();",
"scan",
"new FastReader()",
"int t=1;",
"t",
"1",
"while(t-->0){\n int n=scan.nextInt();\n int k=scan.nextInt();\n int[] f=new int[n];\n for(int i=0;i<k;i++){\n int d=scan.nextInt();\n for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }\n }\n int v=0;\n for(int i=0;i<n;i++){\n if(f[i]==0){\n v++;\n }\n }\n out.println(v);\n }",
"t-->0",
"t--",
"t",
"0",
"{\n int n=scan.nextInt();\n int k=scan.nextInt();\n int[] f=new int[n];\n for(int i=0;i<k;i++){\n int d=scan.nextInt();\n for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }\n }\n int v=0;\n for(int i=0;i<n;i++){\n if(f[i]==0){\n v++;\n }\n }\n out.println(v);\n }",
"int n=scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k=scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] f=new int[n];",
"f",
"new int[n]",
"n",
"for(int i=0;i<k;i++){\n int d=scan.nextInt();\n for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d=scan.nextInt();\n for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }\n }",
"{\n int d=scan.nextInt();\n for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }\n }",
"int d=scan.nextInt();",
"d",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int j=0;j<d;j++){\n int di=scan.nextInt();\n f[di-1]++;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d",
"j",
"d",
"j++",
"j++",
"j",
"{\n int di=scan.nextInt();\n f[di-1]++;\n }",
"{\n int di=scan.nextInt();\n f[di-1]++;\n }",
"int di=scan.nextInt();",
"di",
"scan.nextInt()",
"scan.nextInt",
"scan",
"f[di-1]++",
"f[di-1]",
"f",
"di-1",
"di",
"1",
"int v=0;",
"v",
"0",
"for(int i=0;i<n;i++){\n if(f[i]==0){\n v++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(f[i]==0){\n v++;\n }\n }",
"{\n if(f[i]==0){\n v++;\n }\n }",
"if(f[i]==0){\n v++;\n }",
"f[i]==0",
"f[i]",
"f",
"i",
"0",
"{\n v++;\n }",
"v++",
"v",
"out.println(v)",
"out.println",
"out",
"v",
"out.flush()",
"out.flush",
"out",
"out.close()",
"out.close",
"out",
"String[] Args",
"Args",
"static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }\n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }",
"FastReader",
"{\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }",
"br = new BufferedReader(new\n InputStreamReader(System.in))",
"br",
"new BufferedReader(new\n InputStreamReader(System.in))",
"String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }",
"try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }",
"catch (IOException e)\n {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt()\n {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong()\n {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble()\n {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }",
"catch (IOException e)\n {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n str = br.readLine();\n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str"
] |
//package com.company;
import java.util.*;
import java.lang.*;
import java.io.*;
//****Use Integer Wrapper Class for Arrays.sort()****
class Main {
static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
public static void main(String[] Args){
FastReader scan=new FastReader();
int t=1;
//t=scan.nextInt();
while(t-->0){
int n=scan.nextInt();
int k=scan.nextInt();
int[] f=new int[n];
for(int i=0;i<k;i++){
int d=scan.nextInt();
for(int j=0;j<d;j++){
int di=scan.nextInt();
f[di-1]++;
}
}
int v=0;
for(int i=0;i<n;i++){
if(f[i]==0){
v++;
}
}
out.println(v);
}
out.flush();
out.close();
}
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(new
InputStreamReader(System.in));
}
String next()
{
while (st == null || !st.hasMoreElements())
{
try
{
st = new StringTokenizer(br.readLine());
}
catch (IOException e)
{
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt()
{
return Integer.parseInt(next());
}
long nextLong()
{
return Long.parseLong(next());
}
double nextDouble()
{
return Double.parseDouble(next());
}
String nextLine()
{
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
4,
18,
13,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
96,
5
],
[
96,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
41,
48
],
[
48,
49
],
[
48,
50
],
[
41,
51
],
[
51,
52
],
[
52,
53
],
[
41,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
8,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
8,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
6,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
] |
[
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] cnt = new int[N+1];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tfor (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <=N; i++) {\n\t\t\tif(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] cnt = new int[N+1];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tfor (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <=N; i++) {\n\t\t\tif(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] cnt = new int[N+1];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tfor (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <=N; i++) {\n\t\t\tif(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] cnt = new int[N+1];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tfor (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <=N; i++) {\n\t\t\tif(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] cnt = new int[N+1];",
"cnt",
"new int[N+1]",
"N+1",
"N",
"1",
"for (int i = 0; i < K; i++) {\n\t\t\tfor (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tfor (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}\n\t\t}",
"for (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}",
"int d = sc.nextInt();",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d > 0",
"d",
"0",
"d--",
"d--",
"d",
"{\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}",
"{\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}",
"cnt[sc.nextInt()]++",
"cnt[sc.nextInt()]",
"cnt",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"for (int i = 1; i <=N; i++) {\n\t\t\tif(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <=N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tif(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}",
"if(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}",
"cnt[i] == 0",
"cnt[i]",
"cnt",
"i",
"0",
"{\n\t\t\t\tans++;\n\t\t\t}",
"ans++",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] cnt = new int[N+1];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tfor (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <=N; i++) {\n\t\t\tif(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tint[] cnt = new int[N+1];\n\t\tfor (int i = 0; i < K; i++) {\n\t\t\tfor (int d = sc.nextInt(); d > 0; d--) {\n\t\t\t\tcnt[sc.nextInt()]++;\n\t\t\t}\n\t\t}\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <=N; i++) {\n\t\t\tif(cnt[i] == 0) {\n\t\t\t\tans++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int[] cnt = new int[N+1];
for (int i = 0; i < K; i++) {
for (int d = sc.nextInt(); d > 0; d--) {
cnt[sc.nextInt()]++;
}
}
int ans = 0;
for (int i = 1; i <=N; i++) {
if(cnt[i] == 0) {
ans++;
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
84,
5
],
[
84,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
43,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
69,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Set<String> hash = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }\n\n }\n\n System.out.println(n - hash.size());\n }\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Set<String> hash = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }\n\n }\n\n System.out.println(n - hash.size());\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Set<String> hash = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }\n\n }\n\n System.out.println(n - hash.size());\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Set<String> hash = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }\n\n }\n\n System.out.println(n - hash.size());\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = Integer.parseInt(sc.next());",
"n",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int k = Integer.parseInt(sc.next());",
"k",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"Set<String> hash = new HashSet<>();",
"hash",
"new HashSet<>()",
"for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }\n\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }\n\n }",
"{\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }\n\n }",
"int d = Integer.parseInt(sc.next());",
"d",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n hash.add(sc.next());\n }",
"{\n hash.add(sc.next());\n }",
"hash.add(sc.next())",
"hash.add",
"hash",
"sc.next()",
"sc.next",
"sc",
"System.out.println(n - hash.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"n - hash.size()",
"n",
"hash.size()",
"hash.size",
"hash",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Set<String> hash = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }\n\n }\n\n System.out.println(n - hash.size());\n }\n}",
"public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n Set<String> hash = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = Integer.parseInt(sc.next());\n for (int j = 0; j < d; j++) {\n hash.add(sc.next());\n }\n\n }\n\n System.out.println(n - hash.size());\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
int k = Integer.parseInt(sc.next());
Set<String> hash = new HashSet<>();
for (int i = 0; i < k; i++) {
int d = Integer.parseInt(sc.next());
for (int j = 0; j < d; j++) {
hash.add(sc.next());
}
}
System.out.println(n - hash.size());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
4,
18,
13,
17,
41,
13,
17,
28,
13,
13,
30,
14,
40,
13,
40,
13,
4,
18,
18,
13,
13,
2,
13,
17,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
68,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
8,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
6,
85
],
[
85,
86
]
] |
[
"import java.util.*;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n boolean[] hasSweets = new boolean[N+1];\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) hasSweets[sc.nextInt()] = true;\n }\n int ans = 0;\n for (boolean h : hasSweets) if (!h) ans++;\n System.out.println(ans-1);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n boolean[] hasSweets = new boolean[N+1];\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) hasSweets[sc.nextInt()] = true;\n }\n int ans = 0;\n for (boolean h : hasSweets) if (!h) ans++;\n System.out.println(ans-1);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n boolean[] hasSweets = new boolean[N+1];\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) hasSweets[sc.nextInt()] = true;\n }\n int ans = 0;\n for (boolean h : hasSweets) if (!h) ans++;\n System.out.println(ans-1);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int K = sc.nextInt();\n boolean[] hasSweets = new boolean[N+1];\n for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) hasSweets[sc.nextInt()] = true;\n }\n int ans = 0;\n for (boolean h : hasSweets) if (!h) ans++;\n System.out.println(ans-1);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean[] hasSweets = new boolean[N+1];",
"hasSweets",
"new boolean[N+1]",
"N+1",
"N",
"1",
"for (int i = 0; i < K; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) hasSweets[sc.nextInt()] = true;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) hasSweets[sc.nextInt()] = true;\n }",
"{\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) hasSweets[sc.nextInt()] = true;\n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < d; j++) hasSweets[sc.nextInt()] = true;",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"hasSweets[sc.nextInt()] = true;",
"hasSweets[sc.nextInt()] = true",
"hasSweets[sc.nextInt()]",
"hasSweets",
"sc.nextInt()",
"sc.nextInt",
"sc",
"true",
"int ans = 0;",
"ans",
"0",
"for (boolean h : hasSweets) if (!h) ans++;",
"boolean h",
"hasSweets",
"if (!h) ans++;",
"if (!h) ans++;",
"!h",
"h",
"ans++",
"ans",
"System.out.println(ans-1)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans-1",
"ans",
"1",
"String[] args",
"args"
] |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
boolean[] hasSweets = new boolean[N+1];
for (int i = 0; i < K; i++) {
int d = sc.nextInt();
for (int j = 0; j < d; j++) hasSweets[sc.nextInt()] = true;
}
int ans = 0;
for (boolean h : hasSweets) if (!h) ans++;
System.out.println(ans-1);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
0,
18,
13,
2,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
161,
5
],
[
161,
6
],
[
6,
7
],
[
161,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
10,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
10,
22
],
[
22,
23
],
[
22,
24
],
[
10,
26
],
[
26,
27
],
[
26,
28
],
[
10,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
10,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
60,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
67,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
81,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
10,
93
],
[
93,
94
],
[
93,
95
],
[
10,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
96,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
10,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
8,
121
],
[
121,
122
],
[
161,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
161,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
137,
138
],
[
138,
139
],
[
161,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
147,
148
],
[
148,
149
],
[
161,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
157,
158
],
[
158,
159
],
[
0,
160
],
[
160,
161
],
[
160,
162
]
] |
[
"\n\nimport java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int N=gi();\n\t int K=gi();\n int[] D=new int[K];\n boolean[] F=new boolean[N];\n for (int i=0; i<N; i++) {\n \tF[i]=true;\n }\n for (int i=0; i<K;i++) {\n \tD[i]=gi();\n \tfor (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}\n }\n int c=0;\n for (int i=0; i<N; i++) {\n \tif(F[i])c++;\n }\n\n\n System.out.print(c);\n\n// if (N%2==0 && s.substring(0, N/2).equals(s.substring(N/2))) {\n// \tSystem.out.println(\"Yes\");\n// }else{\n// \tSystem.out.println(\"No\");\n// }\n\t}\n\n\t// ๆๅญๅใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int N=gi();\n\t int K=gi();\n int[] D=new int[K];\n boolean[] F=new boolean[N];\n for (int i=0; i<N; i++) {\n \tF[i]=true;\n }\n for (int i=0; i<K;i++) {\n \tD[i]=gi();\n \tfor (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}\n }\n int c=0;\n for (int i=0; i<N; i++) {\n \tif(F[i])c++;\n }\n\n\n System.out.print(c);\n\n// if (N%2==0 && s.substring(0, N/2).equals(s.substring(N/2))) {\n// \tSystem.out.println(\"Yes\");\n// }else{\n// \tSystem.out.println(\"No\");\n// }\n\t}\n\n\t// ๆๅญๅใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"Main",
"static Scanner scanner;",
"scanner",
"public static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int N=gi();\n\t int K=gi();\n int[] D=new int[K];\n boolean[] F=new boolean[N];\n for (int i=0; i<N; i++) {\n \tF[i]=true;\n }\n for (int i=0; i<K;i++) {\n \tD[i]=gi();\n \tfor (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}\n }\n int c=0;\n for (int i=0; i<N; i++) {\n \tif(F[i])c++;\n }\n\n\n System.out.print(c);\n\n// if (N%2==0 && s.substring(0, N/2).equals(s.substring(N/2))) {\n// \tSystem.out.println(\"Yes\");\n// }else{\n// \tSystem.out.println(\"No\");\n// }\n\t}",
"main",
"{\n\t scanner = new Scanner(System.in);\n\n\t int N=gi();\n\t int K=gi();\n int[] D=new int[K];\n boolean[] F=new boolean[N];\n for (int i=0; i<N; i++) {\n \tF[i]=true;\n }\n for (int i=0; i<K;i++) {\n \tD[i]=gi();\n \tfor (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}\n }\n int c=0;\n for (int i=0; i<N; i++) {\n \tif(F[i])c++;\n }\n\n\n System.out.print(c);\n\n// if (N%2==0 && s.substring(0, N/2).equals(s.substring(N/2))) {\n// \tSystem.out.println(\"Yes\");\n// }else{\n// \tSystem.out.println(\"No\");\n// }\n\t}",
"scanner = new Scanner(System.in)",
"scanner",
"new Scanner(System.in)",
"int N=gi();",
"N",
"gi()",
"gi",
"int K=gi();",
"K",
"gi()",
"gi",
"int[] D=new int[K];",
"D",
"new int[K]",
"K",
"boolean[] F=new boolean[N];",
"F",
"new boolean[N]",
"N",
"for (int i=0; i<N; i++) {\n \tF[i]=true;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \tF[i]=true;\n }",
"{\n \tF[i]=true;\n }",
"F[i]=true",
"F[i]",
"F",
"i",
"true",
"for (int i=0; i<K;i++) {\n \tD[i]=gi();\n \tfor (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n \tD[i]=gi();\n \tfor (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}\n }",
"{\n \tD[i]=gi();\n \tfor (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}\n }",
"D[i]=gi()",
"D[i]",
"D",
"i",
"gi()",
"gi",
"for (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<D[i]",
"j",
"D[i]",
"D",
"i",
"j++",
"j++",
"j",
"{ \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}",
"{ \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}",
"int a=gi();",
"a",
"gi()",
"gi",
"F[a-1]=false",
"F[a-1]",
"F",
"a-1",
"a",
"1",
"false",
"int c=0;",
"c",
"0",
"for (int i=0; i<N; i++) {\n \tif(F[i])c++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \tif(F[i])c++;\n }",
"{\n \tif(F[i])c++;\n }",
"if(F[i])c++;",
"F[i]",
"F",
"i",
"c++",
"c",
"System.out.print(c)",
"System.out.print",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"// ๆๅญๅใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}",
"gs",
"{\n\t\treturn scanner.next();\n\t}",
"return scanner.next();",
"scanner.next()",
"scanner.next",
"scanner",
"// intใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}",
"gi",
"{\n\t\treturn Integer.parseInt(scanner.next());\n\t}",
"return Integer.parseInt(scanner.next());",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"// longใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}",
"gl",
"{\n\t\treturn Long.parseLong(scanner.next());\n\t}",
"return Long.parseLong(scanner.next());",
"Long.parseLong(scanner.next())",
"Long.parseLong",
"Long",
"scanner.next()",
"scanner.next",
"scanner",
"// doubleใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}",
"gd",
"{\n\t\treturn Double.parseDouble(scanner.next());\n\t}",
"return Double.parseDouble(scanner.next());",
"Double.parseDouble(scanner.next())",
"Double.parseDouble",
"Double",
"scanner.next()",
"scanner.next",
"scanner",
"public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int N=gi();\n\t int K=gi();\n int[] D=new int[K];\n boolean[] F=new boolean[N];\n for (int i=0; i<N; i++) {\n \tF[i]=true;\n }\n for (int i=0; i<K;i++) {\n \tD[i]=gi();\n \tfor (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}\n }\n int c=0;\n for (int i=0; i<N; i++) {\n \tif(F[i])c++;\n }\n\n\n System.out.print(c);\n\n// if (N%2==0 && s.substring(0, N/2).equals(s.substring(N/2))) {\n// \tSystem.out.println(\"Yes\");\n// }else{\n// \tSystem.out.println(\"No\");\n// }\n\t}\n\n\t// ๆๅญๅใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int N=gi();\n\t int K=gi();\n int[] D=new int[K];\n boolean[] F=new boolean[N];\n for (int i=0; i<N; i++) {\n \tF[i]=true;\n }\n for (int i=0; i<K;i++) {\n \tD[i]=gi();\n \tfor (int j=0; j<D[i];j++) { \n \t\tint a=gi();\n \t\tF[a-1]=false;\n \t}\n }\n int c=0;\n for (int i=0; i<N; i++) {\n \tif(F[i])c++;\n }\n\n\n System.out.print(c);\n\n// if (N%2==0 && s.substring(0, N/2).equals(s.substring(N/2))) {\n// \tSystem.out.println(\"Yes\");\n// }else{\n// \tSystem.out.println(\"No\");\n// }\n\t}\n\n\t// ๆๅญๅใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleใจใใฆๅ
ฅๅใๅๅพ\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
static Scanner scanner;
public static void main(String[] args) {
scanner = new Scanner(System.in);
int N=gi();
int K=gi();
int[] D=new int[K];
boolean[] F=new boolean[N];
for (int i=0; i<N; i++) {
F[i]=true;
}
for (int i=0; i<K;i++) {
D[i]=gi();
for (int j=0; j<D[i];j++) {
int a=gi();
F[a-1]=false;
}
}
int c=0;
for (int i=0; i<N; i++) {
if(F[i])c++;
}
System.out.print(c);
// if (N%2==0 && s.substring(0, N/2).equals(s.substring(N/2))) {
// System.out.println("Yes");
// }else{
// System.out.println("No");
// }
}
// ๆๅญๅใจใใฆๅ
ฅๅใๅๅพ
public static String gs() {
return scanner.next();
}
// intใจใใฆๅ
ฅๅใๅๅพ
public static int gi() {
return Integer.parseInt(scanner.next());
}
// longใจใใฆๅ
ฅๅใๅๅพ
public static long gl() {
return Long.parseLong(scanner.next());
}
// doubleใจใใฆๅ
ฅๅใๅๅพ
public static double gd() {
return Double.parseDouble(scanner.next());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
40,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
8,
2,
18,
13,
13,
17,
17,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
71,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
85,
91
],
[
85,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
6,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt(), k = sc.nextInt(), c[] = new int[n], t = 0;\n\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint h = sc.nextInt();\n\t\t\tfor(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) t += c[i] == 0 ? 1 : 0;\n\n\t\tSystem.out.println(t);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt(), k = sc.nextInt(), c[] = new int[n], t = 0;\n\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint h = sc.nextInt();\n\t\t\tfor(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) t += c[i] == 0 ? 1 : 0;\n\n\t\tSystem.out.println(t);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt(), k = sc.nextInt(), c[] = new int[n], t = 0;\n\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint h = sc.nextInt();\n\t\t\tfor(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) t += c[i] == 0 ? 1 : 0;\n\n\t\tSystem.out.println(t);\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt(), k = sc.nextInt(), c[] = new int[n], t = 0;\n\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint h = sc.nextInt();\n\t\t\tfor(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) t += c[i] == 0 ? 1 : 0;\n\n\t\tSystem.out.println(t);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k = sc.nextInt()",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c[] = new int[n]",
"c",
"new int[n]",
"n",
"t = 0;",
"t",
"0",
"for(int i = 0; i < k; i++) {\n\t\t\tint h = sc.nextInt();\n\t\t\tfor(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tint h = sc.nextInt();\n\t\t\tfor(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint h = sc.nextInt();\n\t\t\tfor(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}\n\t\t}",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < h",
"j",
"h",
"j++",
"j++",
"j",
"{\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}",
"{\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}",
"int idx = sc.nextInt();",
"idx",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c[idx-1]++",
"c[idx-1]",
"c",
"idx-1",
"idx",
"1",
"for(int i = 0; i < n; i++) t += c[i] == 0 ? 1 : 0;",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"t += c[i] == 0 ? 1 : 0;",
"t += c[i] == 0 ? 1 : 0",
"t",
"c[i] == 0 ? 1 : 0",
"c[i] == 0",
"c[i]",
"c",
"i",
"0",
"1",
"0",
"System.out.println(t)",
"System.out.println",
"System.out",
"System",
"System.out",
"t",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt(), k = sc.nextInt(), c[] = new int[n], t = 0;\n\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint h = sc.nextInt();\n\t\t\tfor(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) t += c[i] == 0 ? 1 : 0;\n\n\t\tSystem.out.println(t);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt(), k = sc.nextInt(), c[] = new int[n], t = 0;\n\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tint h = sc.nextInt();\n\t\t\tfor(int j = 0; j < h; j++) {\n\t\t\t\tint idx = sc.nextInt();\n\t\t\t\tc[idx-1]++;\n\t\t\t}\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) t += c[i] == 0 ? 1 : 0;\n\n\t\tSystem.out.println(t);\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), k = sc.nextInt(), c[] = new int[n], t = 0;
for(int i = 0; i < k; i++) {
int h = sc.nextInt();
for(int j = 0; j < h; j++) {
int idx = sc.nextInt();
c[idx-1]++;
}
}
for(int i = 0; i < n; i++) t += c[i] == 0 ? 1 : 0;
System.out.println(t);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
2,
18,
13,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
8,
2,
18,
13,
13,
17,
17,
17,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
120,
5
],
[
120,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
50,
52
],
[
44,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
74,
82
],
[
8,
83
],
[
83,
84
],
[
83,
85
],
[
8,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
101,
107
],
[
101,
108
],
[
8,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
6,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n int N, K, d;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n K = sc.nextInt();\n int[] count = new int[N];\n for(int i = 0 ; i < K ; i++)\n {\n d = sc.nextInt();\n int a[] = new int[d];\n for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }\n }\n int dem = 0;\n for(int i = 0 ; i < N ; i++)\n {\n dem += count[i] == 1 ? 1 : 0;\n }\n System.out.println(N - dem);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n int N, K, d;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n K = sc.nextInt();\n int[] count = new int[N];\n for(int i = 0 ; i < K ; i++)\n {\n d = sc.nextInt();\n int a[] = new int[d];\n for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }\n }\n int dem = 0;\n for(int i = 0 ; i < N ; i++)\n {\n dem += count[i] == 1 ? 1 : 0;\n }\n System.out.println(N - dem);\n }\n}",
"Main",
"public static void main(String[] args) {\n int N, K, d;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n K = sc.nextInt();\n int[] count = new int[N];\n for(int i = 0 ; i < K ; i++)\n {\n d = sc.nextInt();\n int a[] = new int[d];\n for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }\n }\n int dem = 0;\n for(int i = 0 ; i < N ; i++)\n {\n dem += count[i] == 1 ? 1 : 0;\n }\n System.out.println(N - dem);\n }",
"main",
"{\n int N, K, d;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n K = sc.nextInt();\n int[] count = new int[N];\n for(int i = 0 ; i < K ; i++)\n {\n d = sc.nextInt();\n int a[] = new int[d];\n for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }\n }\n int dem = 0;\n for(int i = 0 ; i < N ; i++)\n {\n dem += count[i] == 1 ? 1 : 0;\n }\n System.out.println(N - dem);\n }",
"int N",
"N",
"K",
"K",
"d;",
"d",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"N = sc.nextInt()",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"K = sc.nextInt()",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] count = new int[N];",
"count",
"new int[N]",
"N",
"for(int i = 0 ; i < K ; i++)\n {\n d = sc.nextInt();\n int a[] = new int[d];\n for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n d = sc.nextInt();\n int a[] = new int[d];\n for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }\n }",
"{\n d = sc.nextInt();\n int a[] = new int[d];\n for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }\n }",
"d = sc.nextInt()",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a[] = new int[d];",
"a",
"new int[d]",
"d",
"for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }",
"{\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }",
"a[j] = sc.nextInt()",
"a[j]",
"a",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"count[a[j]-1] = 1",
"count[a[j]-1]",
"count",
"a[j]-1",
"a[j]",
"a",
"j",
"1",
"1",
"int dem = 0;",
"dem",
"0",
"for(int i = 0 ; i < N ; i++)\n {\n dem += count[i] == 1 ? 1 : 0;\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n dem += count[i] == 1 ? 1 : 0;\n }",
"{\n dem += count[i] == 1 ? 1 : 0;\n }",
"dem += count[i] == 1 ? 1 : 0",
"dem",
"count[i] == 1 ? 1 : 0",
"count[i] == 1",
"count[i]",
"count",
"i",
"1",
"1",
"0",
"System.out.println(N - dem)",
"System.out.println",
"System.out",
"System",
"System.out",
"N - dem",
"N",
"dem",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n int N, K, d;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n K = sc.nextInt();\n int[] count = new int[N];\n for(int i = 0 ; i < K ; i++)\n {\n d = sc.nextInt();\n int a[] = new int[d];\n for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }\n }\n int dem = 0;\n for(int i = 0 ; i < N ; i++)\n {\n dem += count[i] == 1 ? 1 : 0;\n }\n System.out.println(N - dem);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n int N, K, d;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n K = sc.nextInt();\n int[] count = new int[N];\n for(int i = 0 ; i < K ; i++)\n {\n d = sc.nextInt();\n int a[] = new int[d];\n for(int j = 0 ; j < d ; j++)\n {\n a[j] = sc.nextInt();\n count[a[j]-1] = 1;\n }\n }\n int dem = 0;\n for(int i = 0 ; i < N ; i++)\n {\n dem += count[i] == 1 ? 1 : 0;\n }\n System.out.println(N - dem);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int N, K, d;
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
K = sc.nextInt();
int[] count = new int[N];
for(int i = 0 ; i < K ; i++)
{
d = sc.nextInt();
int a[] = new int[d];
for(int j = 0 ; j < d ; j++)
{
a[j] = sc.nextInt();
count[a[j]-1] = 1;
}
}
int dem = 0;
for(int i = 0 ; i < N ; i++)
{
dem += count[i] == 1 ? 1 : 0;
}
System.out.println(N - dem);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
17,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
17,
14,
2,
4,
18,
13,
13,
17,
30,
4,
18,
13,
13,
17,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
125,
11
],
[
125,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
14,
48
],
[
48,
49
],
[
48,
50
],
[
14,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
84,
88
],
[
81,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
90,
95
],
[
89,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
97,
101
],
[
96,
102
],
[
102,
103
],
[
63,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
108,
115
],
[
14,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
12,
122
],
[
122,
123
],
[
0,
124
],
[
124,
125
],
[
124,
126
]
] |
[
"import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\t // input N K d1 A11,A12,...,A1d1 d2 ... AKdK\n // Aij ใฎๅฒๅฝใใชใ็ชๅทใฎๅๆฐใๅบๅใใ\n Scanner sc = new Scanner(System.in);\n int sunukeNum = sc.nextInt();\n int sweetsNum = sc.nextInt();\n List<Integer> hasSweetsSunuke = new ArrayList<>();\n for(int i = 0; i < sunukeNum; i++){\n hasSweetsSunuke.add(0);\n }\n int trickNum = sunukeNum;\n for(int i = 0; i < sweetsNum; i++){\n int sweetsNo = sc.nextInt();\n for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }\n if(trickNum == 0){\n System.out.println(0);\n return;\n }\n }\n System.out.println(trickNum);\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n\t // input N K d1 A11,A12,...,A1d1 d2 ... AKdK\n // Aij ใฎๅฒๅฝใใชใ็ชๅทใฎๅๆฐใๅบๅใใ\n Scanner sc = new Scanner(System.in);\n int sunukeNum = sc.nextInt();\n int sweetsNum = sc.nextInt();\n List<Integer> hasSweetsSunuke = new ArrayList<>();\n for(int i = 0; i < sunukeNum; i++){\n hasSweetsSunuke.add(0);\n }\n int trickNum = sunukeNum;\n for(int i = 0; i < sweetsNum; i++){\n int sweetsNo = sc.nextInt();\n for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }\n if(trickNum == 0){\n System.out.println(0);\n return;\n }\n }\n System.out.println(trickNum);\n }\n}",
"Main",
"public static void main(String[] args) {\n\t // input N K d1 A11,A12,...,A1d1 d2 ... AKdK\n // Aij ใฎๅฒๅฝใใชใ็ชๅทใฎๅๆฐใๅบๅใใ\n Scanner sc = new Scanner(System.in);\n int sunukeNum = sc.nextInt();\n int sweetsNum = sc.nextInt();\n List<Integer> hasSweetsSunuke = new ArrayList<>();\n for(int i = 0; i < sunukeNum; i++){\n hasSweetsSunuke.add(0);\n }\n int trickNum = sunukeNum;\n for(int i = 0; i < sweetsNum; i++){\n int sweetsNo = sc.nextInt();\n for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }\n if(trickNum == 0){\n System.out.println(0);\n return;\n }\n }\n System.out.println(trickNum);\n }",
"main",
"{\n\t // input N K d1 A11,A12,...,A1d1 d2 ... AKdK\n // Aij ใฎๅฒๅฝใใชใ็ชๅทใฎๅๆฐใๅบๅใใ\n Scanner sc = new Scanner(System.in);\n int sunukeNum = sc.nextInt();\n int sweetsNum = sc.nextInt();\n List<Integer> hasSweetsSunuke = new ArrayList<>();\n for(int i = 0; i < sunukeNum; i++){\n hasSweetsSunuke.add(0);\n }\n int trickNum = sunukeNum;\n for(int i = 0; i < sweetsNum; i++){\n int sweetsNo = sc.nextInt();\n for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }\n if(trickNum == 0){\n System.out.println(0);\n return;\n }\n }\n System.out.println(trickNum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int sunukeNum = sc.nextInt();",
"sunukeNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sweetsNum = sc.nextInt();",
"sweetsNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"List<Integer> hasSweetsSunuke = new ArrayList<>();",
"hasSweetsSunuke",
"new ArrayList<>()",
"for(int i = 0; i < sunukeNum; i++){\n hasSweetsSunuke.add(0);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < sunukeNum",
"i",
"sunukeNum",
"i++",
"i++",
"i",
"{\n hasSweetsSunuke.add(0);\n }",
"{\n hasSweetsSunuke.add(0);\n }",
"hasSweetsSunuke.add(0)",
"hasSweetsSunuke.add",
"hasSweetsSunuke",
"0",
"int trickNum = sunukeNum;",
"trickNum",
"sunukeNum",
"for(int i = 0; i < sweetsNum; i++){\n int sweetsNo = sc.nextInt();\n for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }\n if(trickNum == 0){\n System.out.println(0);\n return;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < sweetsNum",
"i",
"sweetsNum",
"i++",
"i++",
"i",
"{\n int sweetsNo = sc.nextInt();\n for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }\n if(trickNum == 0){\n System.out.println(0);\n return;\n }\n }",
"{\n int sweetsNo = sc.nextInt();\n for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }\n if(trickNum == 0){\n System.out.println(0);\n return;\n }\n }",
"int sweetsNo = sc.nextInt();",
"sweetsNo",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < sweetsNo",
"j",
"sweetsNo",
"j++",
"j++",
"j",
"{\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }",
"{\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }",
"int sunukeNo = sc.nextInt()-1;",
"sunukeNo",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }",
"hasSweetsSunuke.get(sunukeNo) == 0",
"hasSweetsSunuke.get(sunukeNo)",
"hasSweetsSunuke.get",
"hasSweetsSunuke",
"sunukeNo",
"0",
"{\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }",
"hasSweetsSunuke.set(sunukeNo, 1)",
"hasSweetsSunuke.set",
"hasSweetsSunuke",
"sunukeNo",
"1",
"trickNum--",
"trickNum",
"if(trickNum == 0){\n System.out.println(0);\n return;\n }",
"trickNum == 0",
"trickNum",
"0",
"{\n System.out.println(0);\n return;\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"return;",
"System.out.println(trickNum)",
"System.out.println",
"System.out",
"System",
"System.out",
"trickNum",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\t // input N K d1 A11,A12,...,A1d1 d2 ... AKdK\n // Aij ใฎๅฒๅฝใใชใ็ชๅทใฎๅๆฐใๅบๅใใ\n Scanner sc = new Scanner(System.in);\n int sunukeNum = sc.nextInt();\n int sweetsNum = sc.nextInt();\n List<Integer> hasSweetsSunuke = new ArrayList<>();\n for(int i = 0; i < sunukeNum; i++){\n hasSweetsSunuke.add(0);\n }\n int trickNum = sunukeNum;\n for(int i = 0; i < sweetsNum; i++){\n int sweetsNo = sc.nextInt();\n for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }\n if(trickNum == 0){\n System.out.println(0);\n return;\n }\n }\n System.out.println(trickNum);\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n\t // input N K d1 A11,A12,...,A1d1 d2 ... AKdK\n // Aij ใฎๅฒๅฝใใชใ็ชๅทใฎๅๆฐใๅบๅใใ\n Scanner sc = new Scanner(System.in);\n int sunukeNum = sc.nextInt();\n int sweetsNum = sc.nextInt();\n List<Integer> hasSweetsSunuke = new ArrayList<>();\n for(int i = 0; i < sunukeNum; i++){\n hasSweetsSunuke.add(0);\n }\n int trickNum = sunukeNum;\n for(int i = 0; i < sweetsNum; i++){\n int sweetsNo = sc.nextInt();\n for(int j = 0; j < sweetsNo; j++){\n int sunukeNo = sc.nextInt()-1;\n if(hasSweetsSunuke.get(sunukeNo) == 0){\n hasSweetsSunuke.set(sunukeNo, 1);\n trickNum--;\n }\n }\n if(trickNum == 0){\n System.out.println(0);\n return;\n }\n }\n System.out.println(trickNum);\n }\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// input N K d1 A11,A12,...,A1d1 d2 ... AKdK
// Aij ใฎๅฒๅฝใใชใ็ชๅทใฎๅๆฐใๅบๅใใ
Scanner sc = new Scanner(System.in);
int sunukeNum = sc.nextInt();
int sweetsNum = sc.nextInt();
List<Integer> hasSweetsSunuke = new ArrayList<>();
for(int i = 0; i < sunukeNum; i++){
hasSweetsSunuke.add(0);
}
int trickNum = sunukeNum;
for(int i = 0; i < sweetsNum; i++){
int sweetsNo = sc.nextInt();
for(int j = 0; j < sweetsNo; j++){
int sunukeNo = sc.nextInt()-1;
if(hasSweetsSunuke.get(sunukeNo) == 0){
hasSweetsSunuke.set(sunukeNo, 1);
trickNum--;
}
}
if(trickNum == 0){
System.out.println(0);
return;
}
}
System.out.println(trickNum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
2,
13,
4,
18,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
187,
32
],
[
187,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
35,
46
],
[
46,
47
],
[
46,
48
],
[
35,
49
],
[
49,
50
],
[
49,
51
],
[
35,
52
],
[
52,
53
],
[
52,
54
],
[
35,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
55,
60
],
[
35,
61
],
[
61,
62
],
[
62,
63
],
[
33,
64
],
[
64,
65
],
[
187,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
70,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
70,
81
],
[
81,
82
],
[
81,
83
],
[
70,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
84,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
96,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
102,
110
],
[
110,
111
],
[
111,
112
],
[
102,
113
],
[
114,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
118,
119
],
[
119,
120
],
[
70,
121
],
[
121,
122
],
[
122,
123
],
[
121,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
68,
129
],
[
129,
130
],
[
68,
131
],
[
131,
132
],
[
68,
133
],
[
133,
134
],
[
187,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
135,
139
],
[
139,
140
],
[
135,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
141,
147
],
[
147,
148
],
[
135,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
152,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
162,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
151,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
135,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
181,
184
],
[
184,
185
],
[
0,
186
],
[
186,
187
],
[
186,
188
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.HashSet;\nimport java.util.StringTokenizer;\nimport java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author bhavy seth\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C {\n public void solve(int testNumber, InputReader sc, PrintWriter out) {\n int n = sc.nextInt();\n int k = sc.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n out.println(n - set.size());\n }\n\n }\n\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n public String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C {\n public void solve(int testNumber, InputReader sc, PrintWriter out) {\n int n = sc.nextInt();\n int k = sc.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n out.println(n - set.size());\n }\n\n }\n\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n public String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"C solver = new C();",
"solver",
"new C()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class C {\n public void solve(int testNumber, InputReader sc, PrintWriter out) {\n int n = sc.nextInt();\n int k = sc.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n out.println(n - set.size());\n }\n\n }",
"C",
"public void solve(int testNumber, InputReader sc, PrintWriter out) {\n int n = sc.nextInt();\n int k = sc.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n out.println(n - set.size());\n }",
"solve",
"{\n int n = sc.nextInt();\n int k = sc.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n out.println(n - set.size());\n }",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"HashSet<Integer> set = new HashSet<>();",
"set",
"new HashSet<>()",
"for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }",
"{\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n set.add(sc.nextInt());\n }",
"{\n set.add(sc.nextInt());\n }",
"set.add(sc.nextInt())",
"set.add",
"set",
"sc.nextInt()",
"sc.nextInt",
"sc",
"out.println(n - set.size())",
"out.println",
"out",
"n - set.size()",
"n",
"set.size()",
"set.size",
"set",
"int testNumber",
"testNumber",
"InputReader sc",
"sc",
"PrintWriter out",
"out",
"static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n public String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }",
"InputReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public InputReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }",
"InputReader",
"{\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }",
"br = new BufferedReader(new\n InputStreamReader(inputStream))",
"br",
"new BufferedReader(new\n InputStreamReader(inputStream))",
"InputStream inputStream",
"inputStream",
"public String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C {\n public void solve(int testNumber, InputReader sc, PrintWriter out) {\n int n = sc.nextInt();\n int k = sc.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n out.println(n - set.size());\n }\n\n }\n\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n public String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C {\n public void solve(int testNumber, InputReader sc, PrintWriter out) {\n int n = sc.nextInt();\n int k = sc.nextInt();\n HashSet<Integer> set = new HashSet<>();\n for (int i = 0; i < k; i++) {\n int d = sc.nextInt();\n for (int j = 0; j < d; j++) {\n set.add(sc.nextInt());\n }\n }\n out.println(n - set.size());\n }\n\n }\n\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }\n\n public String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}",
"Main"
] |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author bhavy seth
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
C solver = new C();
solver.solve(1, in, out);
out.close();
}
static class C {
public void solve(int testNumber, InputReader sc, PrintWriter out) {
int n = sc.nextInt();
int k = sc.nextInt();
HashSet<Integer> set = new HashSet<>();
for (int i = 0; i < k; i++) {
int d = sc.nextInt();
for (int j = 0; j < d; j++) {
set.add(sc.nextInt());
}
}
out.println(n - set.size());
}
}
static class InputReader {
BufferedReader br;
StringTokenizer st;
public InputReader(InputStream inputStream) {
br = new BufferedReader(new
InputStreamReader(inputStream));
}
public String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
28,
13,
13,
30,
30,
14,
2,
13,
13,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
110,
8
],
[
110,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
11,
68
],
[
68,
69
],
[
68,
70
],
[
11,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
71,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
84,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
11,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
11,
104
],
[
104,
105
],
[
105,
106
],
[
9,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] |
[
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint n = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = kb.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}\n\t\t}\n\t\tint count = n;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t\tkb.close();\n\t}\n\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint n = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = kb.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}\n\t\t}\n\t\tint count = n;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t\tkb.close();\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint n = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = kb.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}\n\t\t}\n\t\tint count = n;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t\tkb.close();\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint n = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = kb.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}\n\t\t}\n\t\tint count = n;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t\tkb.close();\n\t}",
"Scanner kb = new Scanner(System.in);",
"kb",
"new Scanner(System.in)",
"int n = kb.nextInt();",
"n",
"kb.nextInt()",
"kb.nextInt",
"kb",
"int k = kb.nextInt();",
"k",
"kb.nextInt()",
"kb.nextInt",
"kb",
"ArrayList<Integer> a = new ArrayList<Integer>();",
"a",
"new ArrayList<Integer>()",
"for (int i = 0; i < k; i++) {\n\t\t\tint d = kb.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tint d = kb.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d = kb.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}\n\t\t}",
"int d = kb.nextInt();",
"d",
"kb.nextInt()",
"kb.nextInt",
"kb",
"for (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}",
"{\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}",
"int l = kb.nextInt();",
"l",
"kb.nextInt()",
"kb.nextInt",
"kb",
"a.add(l)",
"a.add",
"a",
"l",
"int count = n;",
"count",
"n",
"for (int i = 1; i <= n; i++) {\n\t\t\tfor (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tfor (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int e",
"a",
"{\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"i == e",
"i",
"e",
"{\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"count -= 1",
"count",
"1",
"break;",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"kb.close()",
"kb.close",
"kb",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint n = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = kb.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}\n\t\t}\n\t\tint count = n;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t\tkb.close();\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint n = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < k; i++) {\n\t\t\tint d = kb.nextInt();\n\t\t\tfor (int j = 0; j < d; j++) {\n\t\t\t\tint l = kb.nextInt();\n\t\t\t\ta.add(l);\n\t\t\t}\n\t\t}\n\t\tint count = n;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int e : a) {\n\t\t\t\tif (i == e) {\n\t\t\t\t\tcount -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\n\t\tkb.close();\n\t}\n\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner kb = new Scanner(System.in);
int n = kb.nextInt();
int k = kb.nextInt();
ArrayList<Integer> a = new ArrayList<Integer>();
for (int i = 0; i < k; i++) {
int d = kb.nextInt();
for (int j = 0; j < d; j++) {
int l = kb.nextInt();
a.add(l);
}
}
int count = n;
for (int i = 1; i <= n; i++) {
for (int e : a) {
if (i == e) {
count -= 1;
break;
}
}
}
System.out.println(count);
kb.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
40,
18,
13,
2,
18,
13,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
4,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
11,
22
],
[
22,
23
],
[
22,
24
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
42,
50
],
[
50,
51
],
[
50,
52
],
[
53,
54
],
[
53,
55
],
[
42,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
56,
66
],
[
66,
67
],
[
67,
68
],
[
56,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
11,
86
],
[
86,
87
],
[
86,
88
],
[
11,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
89,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
102,
108
],
[
108,
109
],
[
109,
110
],
[
11,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
9,
117
],
[
117,
118
]
] |
[
"import java.util.*;\n \nclass Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\t\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n int[] d = new int[K];\n int[] h = new int[N];\n \n for(int i=0; i<K; i++){\n d[i] = sc.nextInt(); //i็ช็ฎใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n int[] A = new int[d[i]];\n for(int j=0; j<d[i]; j++){\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }\n }\n \n int count = 0;\n for(int i=0; i<N; i++){\n if(h[i]==0){\n count++;\n }\n }\n System.out.println(count);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\t\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n int[] d = new int[K];\n int[] h = new int[N];\n \n for(int i=0; i<K; i++){\n d[i] = sc.nextInt(); //i็ช็ฎใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n int[] A = new int[d[i]];\n for(int j=0; j<d[i]; j++){\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }\n }\n \n int count = 0;\n for(int i=0; i<N; i++){\n if(h[i]==0){\n count++;\n }\n }\n System.out.println(count);\n\t}\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\t\t\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n int[] d = new int[K];\n int[] h = new int[N];\n \n for(int i=0; i<K; i++){\n d[i] = sc.nextInt(); //i็ช็ฎใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n int[] A = new int[d[i]];\n for(int j=0; j<d[i]; j++){\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }\n }\n \n int count = 0;\n for(int i=0; i<N; i++){\n if(h[i]==0){\n count++;\n }\n }\n System.out.println(count);\n\t}",
"main",
"{\n\t\t\n\t\tint N = sc.nextInt();\n\t\tint K = sc.nextInt();\n int[] d = new int[K];\n int[] h = new int[N];\n \n for(int i=0; i<K; i++){\n d[i] = sc.nextInt(); //i็ช็ฎใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n int[] A = new int[d[i]];\n for(int j=0; j<d[i]; j++){\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }\n }\n \n int count = 0;\n for(int i=0; i<N; i++){\n if(h[i]==0){\n count++;\n }\n }\n System.out.println(count);\n\t}",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] d = new int[K];",
"d",
"new int[K]",
"K",
"int[] h = new int[N];",
"h",
"new int[N]",
"N",
"for(int i=0; i<K; i++){\n d[i] = sc.nextInt(); //i็ช็ฎใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n int[] A = new int[d[i]];\n for(int j=0; j<d[i]; j++){\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<K",
"i",
"K",
"i++",
"i++",
"i",
"{\n d[i] = sc.nextInt(); //i็ช็ฎใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n int[] A = new int[d[i]];\n for(int j=0; j<d[i]; j++){\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }\n }",
"{\n d[i] = sc.nextInt(); //i็ช็ฎใฎใ่ๅญใๆใฃใฆใใไบบๆฐ\n int[] A = new int[d[i]];\n for(int j=0; j<d[i]; j++){\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }\n }",
"d[i] = sc.nextInt()",
"d[i]",
"d",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] A = new int[d[i]];",
"A",
"new int[d[i]]",
"d[i]",
"d",
"i",
"for(int j=0; j<d[i]; j++){\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<d[i]",
"j",
"d[i]",
"d",
"i",
"j++",
"j++",
"j",
"{\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }",
"{\n A[j] = sc.nextInt();\n h[A[j]-1]++;\n }",
"A[j] = sc.nextInt()",
"A[j]",
"A",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"h[A[j]-1]++",
"h[A[j]-1]",
"h",
"A[j]-1",
"A[j]",
"A",
"j",
"1",
"int count = 0;",
"count",
"0",
"for(int i=0; i<N; i++){\n if(h[i]==0){\n count++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n if(h[i]==0){\n count++;\n }\n }",
"{\n if(h[i]==0){\n count++;\n }\n }",
"if(h[i]==0){\n count++;\n }",
"h[i]==0",
"h[i]",
"h",
"i",
"0",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args"
] |
import java.util.*;
class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int N = sc.nextInt();
int K = sc.nextInt();
int[] d = new int[K];
int[] h = new int[N];
for(int i=0; i<K; i++){
d[i] = sc.nextInt(); //i็ช็ฎใฎใ่ๅญใๆใฃใฆใใไบบๆฐ
int[] A = new int[d[i]];
for(int j=0; j<d[i]; j++){
A[j] = sc.nextInt();
h[A[j]-1]++;
}
}
int count = 0;
for(int i=0; i<N; i++){
if(h[i]==0){
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
13,
17,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
72,
80
],
[
80,
81
],
[
81,
82
],
[
72,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
85,
91
],
[
91,
92
],
[
92,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
6,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] |
[
"\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String [] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n int[] visited = new int[n + 1];\n for (int i = 0; i < k; ++i) {\n int d = scanner.nextInt();\n for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }\n }\n int number = n;\n for (int i = 1; i <= n; ++i) {\n if (visited[i] == 1) {\n number--;\n }\n }\n System.out.println(number);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String [] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n int[] visited = new int[n + 1];\n for (int i = 0; i < k; ++i) {\n int d = scanner.nextInt();\n for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }\n }\n int number = n;\n for (int i = 1; i <= n; ++i) {\n if (visited[i] == 1) {\n number--;\n }\n }\n System.out.println(number);\n }\n}",
"Main",
"public static void main(String [] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n int[] visited = new int[n + 1];\n for (int i = 0; i < k; ++i) {\n int d = scanner.nextInt();\n for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }\n }\n int number = n;\n for (int i = 1; i <= n; ++i) {\n if (visited[i] == 1) {\n number--;\n }\n }\n System.out.println(number);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n int[] visited = new int[n + 1];\n for (int i = 0; i < k; ++i) {\n int d = scanner.nextInt();\n for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }\n }\n int number = n;\n for (int i = 1; i <= n; ++i) {\n if (visited[i] == 1) {\n number--;\n }\n }\n System.out.println(number);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int k = scanner.nextInt();",
"k",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int[] visited = new int[n + 1];",
"visited",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 0; i < k; ++i) {\n int d = scanner.nextInt();\n for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"++i",
"++i",
"i",
"{\n int d = scanner.nextInt();\n for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }\n }",
"{\n int d = scanner.nextInt();\n for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }\n }",
"int d = scanner.nextInt();",
"d",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d",
"j",
"d",
"++j",
"++j",
"j",
"{\n int people = scanner.nextInt();\n visited[people] = 1;\n }",
"{\n int people = scanner.nextInt();\n visited[people] = 1;\n }",
"int people = scanner.nextInt();",
"people",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"visited[people] = 1",
"visited[people]",
"visited",
"people",
"1",
"int number = n;",
"number",
"n",
"for (int i = 1; i <= n; ++i) {\n if (visited[i] == 1) {\n number--;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"++i",
"++i",
"i",
"{\n if (visited[i] == 1) {\n number--;\n }\n }",
"{\n if (visited[i] == 1) {\n number--;\n }\n }",
"if (visited[i] == 1) {\n number--;\n }",
"visited[i] == 1",
"visited[i]",
"visited",
"i",
"1",
"{\n number--;\n }",
"number--",
"number",
"System.out.println(number)",
"System.out.println",
"System.out",
"System",
"System.out",
"number",
"String [] args",
"args",
"public class Main {\n public static void main(String [] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n int[] visited = new int[n + 1];\n for (int i = 0; i < k; ++i) {\n int d = scanner.nextInt();\n for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }\n }\n int number = n;\n for (int i = 1; i <= n; ++i) {\n if (visited[i] == 1) {\n number--;\n }\n }\n System.out.println(number);\n }\n}",
"public class Main {\n public static void main(String [] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int k = scanner.nextInt();\n int[] visited = new int[n + 1];\n for (int i = 0; i < k; ++i) {\n int d = scanner.nextInt();\n for (int j = 0; j < d; ++j) {\n int people = scanner.nextInt();\n visited[people] = 1;\n }\n }\n int number = n;\n for (int i = 1; i <= n; ++i) {\n if (visited[i] == 1) {\n number--;\n }\n }\n System.out.println(number);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String [] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int k = scanner.nextInt();
int[] visited = new int[n + 1];
for (int i = 0; i < k; ++i) {
int d = scanner.nextInt();
for (int j = 0; j < d; ++j) {
int people = scanner.nextInt();
visited[people] = 1;
}
}
int number = n;
for (int i = 1; i <= n; ++i) {
if (visited[i] == 1) {
number--;
}
}
System.out.println(number);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
42,
2,
13,
13,
30,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
13,
30,
41,
13,
2,
4,
18,
13,
17,
0,
18,
13,
13,
2,
18,
13,
13,
17,
0,
13,
2,
13,
17,
0,
13,
2,
13,
17,
41,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
14,
2,
18,
13,
13,
17,
30,
0,
13,
2,
13,
17,
0,
13,
2,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
39,
41
],
[
33,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
49,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
46,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
33,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
8,
73
],
[
73,
74
],
[
73,
75
],
[
8,
76
],
[
76,
77
],
[
76,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
84,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
83,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
8,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
6,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nint N= scan.nextInt();\n int K= scan.nextInt();\n int A[]= new int[N];\nint i=0;\n\n while (i<K){int D=scan.nextInt();\n int i1=0;\n\n while(i1<D){\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }\n i=i+1;\n\n\n }\n int i2=0;\n int i3=0;\n\n while (i2<N){\n if(A[i2]==0){i3=i3+1;};\n i2=i2+1;\n\n }\n\nSystem.out.println(i3);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nint N= scan.nextInt();\n int K= scan.nextInt();\n int A[]= new int[N];\nint i=0;\n\n while (i<K){int D=scan.nextInt();\n int i1=0;\n\n while(i1<D){\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }\n i=i+1;\n\n\n }\n int i2=0;\n int i3=0;\n\n while (i2<N){\n if(A[i2]==0){i3=i3+1;};\n i2=i2+1;\n\n }\n\nSystem.out.println(i3);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nint N= scan.nextInt();\n int K= scan.nextInt();\n int A[]= new int[N];\nint i=0;\n\n while (i<K){int D=scan.nextInt();\n int i1=0;\n\n while(i1<D){\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }\n i=i+1;\n\n\n }\n int i2=0;\n int i3=0;\n\n while (i2<N){\n if(A[i2]==0){i3=i3+1;};\n i2=i2+1;\n\n }\n\nSystem.out.println(i3);\n }",
"main",
"{\n Scanner scan=new Scanner(System.in);\nint N= scan.nextInt();\n int K= scan.nextInt();\n int A[]= new int[N];\nint i=0;\n\n while (i<K){int D=scan.nextInt();\n int i1=0;\n\n while(i1<D){\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }\n i=i+1;\n\n\n }\n int i2=0;\n int i3=0;\n\n while (i2<N){\n if(A[i2]==0){i3=i3+1;};\n i2=i2+1;\n\n }\n\nSystem.out.println(i3);\n }",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N= scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K= scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int A[]= new int[N];",
"A",
"new int[N]",
"N",
"int i=0;",
"i",
"0",
"while (i<K){int D=scan.nextInt();\n int i1=0;\n\n while(i1<D){\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }\n i=i+1;\n\n\n }",
"i<K",
"i",
"K",
"{int D=scan.nextInt();\n int i1=0;\n\n while(i1<D){\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }\n i=i+1;\n\n\n }",
"int D=scan.nextInt();",
"D",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int i1=0;",
"i1",
"0",
"while(i1<D){\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }",
"i1<D",
"i1",
"D",
"{\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }",
"int i4=scan.nextInt()-1;",
"i4",
"scan.nextInt()-1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"A[i4]=A[i4]+1",
"A[i4]",
"A",
"i4",
"A[i4]+1",
"A[i4]",
"A",
"i4",
"1",
"i1=i1+1",
"i1",
"i1+1",
"i1",
"1",
"i=i+1",
"i",
"i+1",
"i",
"1",
"int i2=0;",
"i2",
"0",
"int i3=0;",
"i3",
"0",
"while (i2<N){\n if(A[i2]==0){i3=i3+1;};\n i2=i2+1;\n\n }",
"i2<N",
"i2",
"N",
"{\n if(A[i2]==0){i3=i3+1;};\n i2=i2+1;\n\n }",
"if(A[i2]==0){i3=i3+1;}",
"A[i2]==0",
"A[i2]",
"A",
"i2",
"0",
"{i3=i3+1;}",
"i3=i3+1",
"i3",
"i3+1",
"i3",
"1",
"i2=i2+1",
"i2",
"i2+1",
"i2",
"1",
"System.out.println(i3)",
"System.out.println",
"System.out",
"System",
"System.out",
"i3",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nint N= scan.nextInt();\n int K= scan.nextInt();\n int A[]= new int[N];\nint i=0;\n\n while (i<K){int D=scan.nextInt();\n int i1=0;\n\n while(i1<D){\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }\n i=i+1;\n\n\n }\n int i2=0;\n int i3=0;\n\n while (i2<N){\n if(A[i2]==0){i3=i3+1;};\n i2=i2+1;\n\n }\n\nSystem.out.println(i3);\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nint N= scan.nextInt();\n int K= scan.nextInt();\n int A[]= new int[N];\nint i=0;\n\n while (i<K){int D=scan.nextInt();\n int i1=0;\n\n while(i1<D){\n int i4=scan.nextInt()-1;\n\n A[i4]=A[i4]+1;\n i1=i1+1;\n\n\n }\n i=i+1;\n\n\n }\n int i2=0;\n int i3=0;\n\n while (i2<N){\n if(A[i2]==0){i3=i3+1;};\n i2=i2+1;\n\n }\n\nSystem.out.println(i3);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
int N= scan.nextInt();
int K= scan.nextInt();
int A[]= new int[N];
int i=0;
while (i<K){int D=scan.nextInt();
int i1=0;
while(i1<D){
int i4=scan.nextInt()-1;
A[i4]=A[i4]+1;
i1=i1+1;
}
i=i+1;
}
int i2=0;
int i3=0;
while (i2<N){
if(A[i2]==0){i3=i3+1;};
i2=i2+1;
}
System.out.println(i3);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
17,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
14,
2,
18,
13,
2,
13,
17,
17,
30,
40,
18,
13,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
133,
5
],
[
133,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
8,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
66,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
85,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
8,
99
],
[
99,
100
],
[
99,
101
],
[
8,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
102,
110
],
[
110,
111
],
[
111,
112
],
[
102,
113
],
[
114,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
8,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
6,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
] |
[
"import java.util.*;\n\npublic class Main{\n static public void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int[] sunuke = new int[N];\n for(int i=0; i<N; i++){\n sunuke[i] = 0;\n }\n \n int di, A;\n for(int j=0; j<K; j++){\n di = sc.nextInt();\n for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }\n }\n \n int count = 0;\n for(int h=0; h<N; h++){\n if(sunuke[h] == 0){\n count++;\n }\n }\n \n System.out.println(count);\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n static public void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int[] sunuke = new int[N];\n for(int i=0; i<N; i++){\n sunuke[i] = 0;\n }\n \n int di, A;\n for(int j=0; j<K; j++){\n di = sc.nextInt();\n for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }\n }\n \n int count = 0;\n for(int h=0; h<N; h++){\n if(sunuke[h] == 0){\n count++;\n }\n }\n \n System.out.println(count);\n \n }\n}",
"Main",
"static public void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int[] sunuke = new int[N];\n for(int i=0; i<N; i++){\n sunuke[i] = 0;\n }\n \n int di, A;\n for(int j=0; j<K; j++){\n di = sc.nextInt();\n for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }\n }\n \n int count = 0;\n for(int h=0; h<N; h++){\n if(sunuke[h] == 0){\n count++;\n }\n }\n \n System.out.println(count);\n \n }",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int[] sunuke = new int[N];\n for(int i=0; i<N; i++){\n sunuke[i] = 0;\n }\n \n int di, A;\n for(int j=0; j<K; j++){\n di = sc.nextInt();\n for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }\n }\n \n int count = 0;\n for(int h=0; h<N; h++){\n if(sunuke[h] == 0){\n count++;\n }\n }\n \n System.out.println(count);\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] sunuke = new int[N];",
"sunuke",
"new int[N]",
"N",
"for(int i=0; i<N; i++){\n sunuke[i] = 0;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n sunuke[i] = 0;\n }",
"{\n sunuke[i] = 0;\n }",
"sunuke[i] = 0",
"sunuke[i]",
"sunuke",
"i",
"0",
"int di",
"di",
"A;",
"A",
"for(int j=0; j<K; j++){\n di = sc.nextInt();\n for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<K",
"j",
"K",
"j++",
"j++",
"j",
"{\n di = sc.nextInt();\n for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }\n }",
"{\n di = sc.nextInt();\n for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }\n }",
"di = sc.nextInt()",
"di",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<di",
"k",
"di",
"k++",
"k++",
"k",
"{\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }",
"{\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }",
"A = sc.nextInt()",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }",
"sunuke[A-1] == 0",
"sunuke[A-1]",
"sunuke",
"A-1",
"A",
"1",
"0",
"{\n sunuke[A-1]++;\n }",
"sunuke[A-1]++",
"sunuke[A-1]",
"sunuke",
"A-1",
"A",
"1",
"int count = 0;",
"count",
"0",
"for(int h=0; h<N; h++){\n if(sunuke[h] == 0){\n count++;\n }\n }",
"int h=0;",
"int h=0;",
"h",
"0",
"h<N",
"h",
"N",
"h++",
"h++",
"h",
"{\n if(sunuke[h] == 0){\n count++;\n }\n }",
"{\n if(sunuke[h] == 0){\n count++;\n }\n }",
"if(sunuke[h] == 0){\n count++;\n }",
"sunuke[h] == 0",
"sunuke[h]",
"sunuke",
"h",
"0",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main{\n static public void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int[] sunuke = new int[N];\n for(int i=0; i<N; i++){\n sunuke[i] = 0;\n }\n \n int di, A;\n for(int j=0; j<K; j++){\n di = sc.nextInt();\n for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }\n }\n \n int count = 0;\n for(int h=0; h<N; h++){\n if(sunuke[h] == 0){\n count++;\n }\n }\n \n System.out.println(count);\n \n }\n}",
"public class Main{\n static public void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int K = sc.nextInt();\n \n int[] sunuke = new int[N];\n for(int i=0; i<N; i++){\n sunuke[i] = 0;\n }\n \n int di, A;\n for(int j=0; j<K; j++){\n di = sc.nextInt();\n for(int k=0; k<di; k++){\n A = sc.nextInt();\n if(sunuke[A-1] == 0){\n sunuke[A-1]++;\n }\n }\n }\n \n int count = 0;\n for(int h=0; h<N; h++){\n if(sunuke[h] == 0){\n count++;\n }\n }\n \n System.out.println(count);\n \n }\n}",
"Main"
] |
import java.util.*;
public class Main{
static public void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int K = sc.nextInt();
int[] sunuke = new int[N];
for(int i=0; i<N; i++){
sunuke[i] = 0;
}
int di, A;
for(int j=0; j<K; j++){
di = sc.nextInt();
for(int k=0; k<di; k++){
A = sc.nextInt();
if(sunuke[A-1] == 0){
sunuke[A-1]++;
}
}
}
int count = 0;
for(int h=0; h<N; h++){
if(sunuke[h] == 0){
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
18,
13,
13,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
30,
0,
18,
18,
13,
13,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
13,
17,
30,
0,
18,
13,
2,
18,
18,
13,
13,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
172,
5
],
[
172,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
64,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
64,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
8,
88
],
[
88,
89
],
[
88,
90
],
[
8,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
92,
100
],
[
100,
101
],
[
101,
102
],
[
92,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
105,
113
],
[
113,
114
],
[
114,
115
],
[
105,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
119,
125
],
[
118,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
130,
136
],
[
127,
137
],
[
8,
138
],
[
138,
139
],
[
138,
140
],
[
8,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
141,
146
],
[
146,
147
],
[
146,
148
],
[
141,
149
],
[
149,
150
],
[
150,
151
],
[
141,
152
],
[
153,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
154,
160
],
[
160,
161
],
[
161,
162
],
[
8,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
163,
168
],
[
6,
169
],
[
169,
170
],
[
0,
171
],
[
171,
172
],
[
171,
173
]
] |
[
"import java.util.Scanner;\n \npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] arrayD = new int[k];\n int[][] arrayA = new int[k][n];\n\n for (int i = 0; i < k; i++) {\n arrayD[i] = sc.nextInt();\n for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }\n }\n \n int[] arrayAnswer = new int[n];\n for (int i = 0; i < k; i++) {\n for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }\n }\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n if(arrayAnswer[i] == 0) {\n count++;\n }\n \n }\n System.out.println(count);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] arrayD = new int[k];\n int[][] arrayA = new int[k][n];\n\n for (int i = 0; i < k; i++) {\n arrayD[i] = sc.nextInt();\n for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }\n }\n \n int[] arrayAnswer = new int[n];\n for (int i = 0; i < k; i++) {\n for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }\n }\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n if(arrayAnswer[i] == 0) {\n count++;\n }\n \n }\n System.out.println(count);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] arrayD = new int[k];\n int[][] arrayA = new int[k][n];\n\n for (int i = 0; i < k; i++) {\n arrayD[i] = sc.nextInt();\n for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }\n }\n \n int[] arrayAnswer = new int[n];\n for (int i = 0; i < k; i++) {\n for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }\n }\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n if(arrayAnswer[i] == 0) {\n count++;\n }\n \n }\n System.out.println(count);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] arrayD = new int[k];\n int[][] arrayA = new int[k][n];\n\n for (int i = 0; i < k; i++) {\n arrayD[i] = sc.nextInt();\n for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }\n }\n \n int[] arrayAnswer = new int[n];\n for (int i = 0; i < k; i++) {\n for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }\n }\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n if(arrayAnswer[i] == 0) {\n count++;\n }\n \n }\n System.out.println(count);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] arrayD = new int[k];",
"arrayD",
"new int[k]",
"k",
"int[][] arrayA = new int[k][n];",
"arrayA",
"new int[k][n]",
"k",
"n",
"for (int i = 0; i < k; i++) {\n arrayD[i] = sc.nextInt();\n for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n arrayD[i] = sc.nextInt();\n for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }\n }",
"{\n arrayD[i] = sc.nextInt();\n for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }\n }",
"arrayD[i] = sc.nextInt()",
"arrayD[i]",
"arrayD",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }",
"{\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }",
"if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }",
"j < arrayD[i]",
"j",
"arrayD[i]",
"arrayD",
"i",
"{\n arrayA[i][j] = sc.nextInt();\n }",
"arrayA[i][j] = sc.nextInt()",
"arrayA[i][j]",
"arrayA[i]",
"arrayA",
"i",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"{\n arrayA[i][j] = 0;\n }",
"arrayA[i][j] = 0",
"arrayA[i][j]",
"arrayA[i]",
"arrayA",
"i",
"j",
"0",
"int[] arrayAnswer = new int[n];",
"arrayAnswer",
"new int[n]",
"n",
"for (int i = 0; i < k; i++) {\n for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }\n }",
"{\n for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }\n }",
"for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }",
"{\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }",
"if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }",
"arrayA[i][j] != 0",
"arrayA[i][j]",
"arrayA[i]",
"arrayA",
"i",
"j",
"0",
"{\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }",
"arrayAnswer[arrayA[i][j] - 1] = 1",
"arrayAnswer[arrayA[i][j] - 1]",
"arrayAnswer",
"arrayA[i][j] - 1",
"arrayA[i][j]",
"arrayA[i]",
"arrayA",
"i",
"j",
"1",
"1",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n if(arrayAnswer[i] == 0) {\n count++;\n }\n \n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(arrayAnswer[i] == 0) {\n count++;\n }\n \n }",
"{\n if(arrayAnswer[i] == 0) {\n count++;\n }\n \n }",
"if(arrayAnswer[i] == 0) {\n count++;\n }",
"arrayAnswer[i] == 0",
"arrayAnswer[i]",
"arrayAnswer",
"i",
"0",
"{\n count++;\n }",
"count++",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] arrayD = new int[k];\n int[][] arrayA = new int[k][n];\n\n for (int i = 0; i < k; i++) {\n arrayD[i] = sc.nextInt();\n for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }\n }\n \n int[] arrayAnswer = new int[n];\n for (int i = 0; i < k; i++) {\n for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }\n }\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n if(arrayAnswer[i] == 0) {\n count++;\n }\n \n }\n System.out.println(count);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] arrayD = new int[k];\n int[][] arrayA = new int[k][n];\n\n for (int i = 0; i < k; i++) {\n arrayD[i] = sc.nextInt();\n for (int j = 0; j < n; j++) {\n if (j < arrayD[i]) {\n arrayA[i][j] = sc.nextInt();\n } else {\n arrayA[i][j] = 0;\n }\n }\n }\n \n int[] arrayAnswer = new int[n];\n for (int i = 0; i < k; i++) {\n for (int j = 0; j < n; j++) {\n if (arrayA[i][j] != 0) {\n arrayAnswer[arrayA[i][j] - 1] = 1;\n }\n }\n }\n\n int count = 0;\n for (int i = 0; i < n; i++) {\n if(arrayAnswer[i] == 0) {\n count++;\n }\n \n }\n System.out.println(count);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] arrayD = new int[k];
int[][] arrayA = new int[k][n];
for (int i = 0; i < k; i++) {
arrayD[i] = sc.nextInt();
for (int j = 0; j < n; j++) {
if (j < arrayD[i]) {
arrayA[i][j] = sc.nextInt();
} else {
arrayA[i][j] = 0;
}
}
}
int[] arrayAnswer = new int[n];
for (int i = 0; i < k; i++) {
for (int j = 0; j < n; j++) {
if (arrayA[i][j] != 0) {
arrayAnswer[arrayA[i][j] - 1] = 1;
}
}
}
int count = 0;
for (int i = 0; i < n; i++) {
if(arrayAnswer[i] == 0) {
count++;
}
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
4,
18,
13,
17,
40,
18,
13,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
17,
42,
2,
18,
13,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
109,
5
],
[
109,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
26,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
49,
51
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
70,
74
],
[
65,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
8,
81
],
[
81,
82
],
[
82,
83
],
[
8,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
8,
88
],
[
88,
89
],
[
88,
90
],
[
8,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
91,
97
],
[
97,
98
],
[
98,
99
],
[
8,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
6,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
] |
[
"import java.util.*;\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] s = new int[n];\n Arrays.fill(s , 0);\n for(int i = 0 ; i < k ; i++){\n int d = sc.nextInt();\n int[] a = new int[d];\n for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n } \n }\n sc.close();\n Arrays.sort(s);\n int yono = 0;\n while(s[yono] == 0){\n yono++;\n }\n System.out.println(yono);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] s = new int[n];\n Arrays.fill(s , 0);\n for(int i = 0 ; i < k ; i++){\n int d = sc.nextInt();\n int[] a = new int[d];\n for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n } \n }\n sc.close();\n Arrays.sort(s);\n int yono = 0;\n while(s[yono] == 0){\n yono++;\n }\n System.out.println(yono);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] s = new int[n];\n Arrays.fill(s , 0);\n for(int i = 0 ; i < k ; i++){\n int d = sc.nextInt();\n int[] a = new int[d];\n for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n } \n }\n sc.close();\n Arrays.sort(s);\n int yono = 0;\n while(s[yono] == 0){\n yono++;\n }\n System.out.println(yono);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] s = new int[n];\n Arrays.fill(s , 0);\n for(int i = 0 ; i < k ; i++){\n int d = sc.nextInt();\n int[] a = new int[d];\n for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n } \n }\n sc.close();\n Arrays.sort(s);\n int yono = 0;\n while(s[yono] == 0){\n yono++;\n }\n System.out.println(yono);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] s = new int[n];",
"s",
"new int[n]",
"n",
"Arrays.fill(s , 0)",
"Arrays.fill",
"Arrays",
"s",
"0",
"for(int i = 0 ; i < k ; i++){\n int d = sc.nextInt();\n int[] a = new int[d];\n for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n } \n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n int d = sc.nextInt();\n int[] a = new int[d];\n for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n } \n }",
"{\n int d = sc.nextInt();\n int[] a = new int[d];\n for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n } \n }",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[d];",
"a",
"new int[d]",
"d",
"for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n }",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < d",
"j",
"d",
"j++",
"j++",
"j",
"{\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n }",
"{\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n }",
"a[j] = sc.nextInt() - 1",
"a[j]",
"a",
"j",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"s[a[j]]++",
"s[a[j]]",
"s",
"a[j]",
"a",
"j",
"sc.close()",
"sc.close",
"sc",
"Arrays.sort(s)",
"Arrays.sort",
"Arrays",
"s",
"int yono = 0;",
"yono",
"0",
"while(s[yono] == 0){\n yono++;\n }",
"s[yono] == 0",
"s[yono]",
"s",
"yono",
"0",
"{\n yono++;\n }",
"yono++",
"yono",
"System.out.println(yono)",
"System.out.println",
"System.out",
"System",
"System.out",
"yono",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] s = new int[n];\n Arrays.fill(s , 0);\n for(int i = 0 ; i < k ; i++){\n int d = sc.nextInt();\n int[] a = new int[d];\n for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n } \n }\n sc.close();\n Arrays.sort(s);\n int yono = 0;\n while(s[yono] == 0){\n yono++;\n }\n System.out.println(yono);\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int k = sc.nextInt();\n int[] s = new int[n];\n Arrays.fill(s , 0);\n for(int i = 0 ; i < k ; i++){\n int d = sc.nextInt();\n int[] a = new int[d];\n for(int j = 0 ; j < d ; j++){\n a[j] = sc.nextInt() - 1;\n s[a[j]]++;\n } \n }\n sc.close();\n Arrays.sort(s);\n int yono = 0;\n while(s[yono] == 0){\n yono++;\n }\n System.out.println(yono);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] s = new int[n];
Arrays.fill(s , 0);
for(int i = 0 ; i < k ; i++){
int d = sc.nextInt();
int[] a = new int[d];
for(int j = 0 ; j < d ; j++){
a[j] = sc.nextInt() - 1;
s[a[j]]++;
}
}
sc.close();
Arrays.sort(s);
int yono = 0;
while(s[yono] == 0){
yono++;
}
System.out.println(yono);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
2,
13,
17,
4,
18,
18,
13,
13,
2,
4,
18,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
131,
14
],
[
131,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
26,
27
],
[
27,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
35,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
17,
40
],
[
40,
41
],
[
40,
42
],
[
17,
44
],
[
44,
45
],
[
44,
46
],
[
17,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
70,
80
],
[
80,
81
],
[
81,
82
],
[
70,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
92,
93
],
[
17,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
94,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
110,
112
],
[
17,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
118,
122
],
[
122,
123
],
[
123,
124
],
[
17,
125
],
[
125,
126
],
[
126,
127
],
[
15,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
] |
[
"import java.util.ArrayList;\nimport java.util.HashSet;\nimport java.util.Scanner;\nimport java.util.Set;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tint[] d = new int[K];\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t//ใชในใใใๆใ\n\t\tSystem.out.println(list.size() - set.size());\n\t\tsc.close();\n\n\t}\n\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tint[] d = new int[K];\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t//ใชในใใใๆใ\n\t\tSystem.out.println(list.size() - set.size());\n\t\tsc.close();\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tint[] d = new int[K];\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t//ใชในใใใๆใ\n\t\tSystem.out.println(list.size() - set.size());\n\t\tsc.close();\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tint[] d = new int[K];\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t//ใชในใใใๆใ\n\t\tSystem.out.println(list.size() - set.size());\n\t\tsc.close();\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = Integer.parseInt(sc.next());",
"N",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int K = Integer.parseInt(sc.next());",
"K",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"ArrayList<Integer> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"int[] d = new int[K];",
"d",
"new int[K]",
"K",
"Set<Integer> set = new HashSet<>();",
"set",
"new HashSet<>()",
"for(int i = 0; i < K; i++) {\n\t\t\td[i] = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\td[i] = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}\n\t\t}",
"{\n\t\t\td[i] = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}\n\t\t}",
"d[i] = Integer.parseInt(sc.next())",
"d[i]",
"d",
"i",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"for(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < d[i]",
"j",
"d[i]",
"d",
"i",
"j++",
"j++",
"j",
"{\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}",
"{\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}",
"set.add(Integer.parseInt(sc.next()))",
"set.add",
"set",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"for(int i = 0; i < N; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tlist.add(i + 1);\n\t\t}",
"{\n\t\t\tlist.add(i + 1);\n\t\t}",
"list.add(i + 1)",
"list.add",
"list",
"i + 1",
"i",
"1",
"System.out.println(list.size() - set.size())",
"System.out.println",
"System.out",
"System",
"System.out",
"list.size() - set.size()",
"list.size()",
"list.size",
"list",
"set.size()",
"set.size",
"set",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tint[] d = new int[K];\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t//ใชในใใใๆใ\n\t\tSystem.out.println(list.size() - set.size());\n\t\tsc.close();\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tArrayList<Integer> list = new ArrayList<>();\n\t\tint[] d = new int[K];\n\t\tSet<Integer> set = new HashSet<>();\n\t\tfor(int i = 0; i < K; i++) {\n\t\t\td[i] = Integer.parseInt(sc.next());\n\t\t\tfor(int j = 0; j < d[i]; j++) {\n\t\t\t\tset.add(Integer.parseInt(sc.next()));\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tlist.add(i + 1);\n\t\t}\n\t\t//ใชในใใใๆใ\n\t\tSystem.out.println(list.size() - set.size());\n\t\tsc.close();\n\n\t}\n\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
int K = Integer.parseInt(sc.next());
ArrayList<Integer> list = new ArrayList<>();
int[] d = new int[K];
Set<Integer> set = new HashSet<>();
for(int i = 0; i < K; i++) {
d[i] = Integer.parseInt(sc.next());
for(int j = 0; j < d[i]; j++) {
set.add(Integer.parseInt(sc.next()));
}
}
for(int i = 0; i < N; i++) {
list.add(i + 1);
}
//ใชในใใใๆใ
System.out.println(list.size() - set.size());
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
14,
40,
4,
18,
13,
13,
30,
4,
18,
13,
13,
17,
4,
18,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
107,
5
],
[
107,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
43,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
70,
71
],
[
71,
72
],
[
64,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
80,
84
],
[
8,
85
],
[
85,
86
],
[
86,
87
],
[
8,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
6,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
] |
[
"import java.util.*;\n\npublic class Main {\n\n public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int n = Integer.parseInt(scan.next());\n int k = Integer.parseInt(scan.next());\n\n Map<Integer, Boolean> map = new HashMap<>(k);\n\n for (int i = 1; i <= k; i++) {\n\n int d = Integer.parseInt(scan.next());\n\n for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }\n }\n scan.close();\n\n int x= n- map.size();\n\n System.out.println(String.valueOf(x));\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int n = Integer.parseInt(scan.next());\n int k = Integer.parseInt(scan.next());\n\n Map<Integer, Boolean> map = new HashMap<>(k);\n\n for (int i = 1; i <= k; i++) {\n\n int d = Integer.parseInt(scan.next());\n\n for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }\n }\n scan.close();\n\n int x= n- map.size();\n\n System.out.println(String.valueOf(x));\n }\n}",
"Main",
"public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int n = Integer.parseInt(scan.next());\n int k = Integer.parseInt(scan.next());\n\n Map<Integer, Boolean> map = new HashMap<>(k);\n\n for (int i = 1; i <= k; i++) {\n\n int d = Integer.parseInt(scan.next());\n\n for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }\n }\n scan.close();\n\n int x= n- map.size();\n\n System.out.println(String.valueOf(x));\n }",
"main",
"{\n\n\n Scanner scan = new Scanner(System.in);\n\n int n = Integer.parseInt(scan.next());\n int k = Integer.parseInt(scan.next());\n\n Map<Integer, Boolean> map = new HashMap<>(k);\n\n for (int i = 1; i <= k; i++) {\n\n int d = Integer.parseInt(scan.next());\n\n for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }\n }\n scan.close();\n\n int x= n- map.size();\n\n System.out.println(String.valueOf(x));\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = Integer.parseInt(scan.next());",
"n",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"int k = Integer.parseInt(scan.next());",
"k",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"Map<Integer, Boolean> map = new HashMap<>(k);",
"map",
"new HashMap<>(k)",
"for (int i = 1; i <= k; i++) {\n\n int d = Integer.parseInt(scan.next());\n\n for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\n int d = Integer.parseInt(scan.next());\n\n for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }\n }",
"{\n\n int d = Integer.parseInt(scan.next());\n\n for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }\n }",
"int d = Integer.parseInt(scan.next());",
"d",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }",
"int j = 1;",
"int j = 1;",
"j",
"1",
"j<= d",
"j",
"d",
"j++",
"j++",
"j",
"{\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }",
"{\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }",
"int a = Integer.parseInt(scan.next());",
"a",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"if (!map.containsKey(a)) {\n map.put(a, true);\n }",
"!map.containsKey(a)",
"map.containsKey(a)",
"map.containsKey",
"map",
"a",
"{\n map.put(a, true);\n }",
"map.put(a, true)",
"map.put",
"map",
"a",
"true",
"scan.close()",
"scan.close",
"scan",
"int x= n- map.size();",
"x",
"n- map.size()",
"n",
"map.size()",
"map.size",
"map",
"System.out.println(String.valueOf(x))",
"System.out.println",
"System.out",
"System",
"System.out",
"String.valueOf(x)",
"String.valueOf",
"String",
"x",
"String args[]",
"args",
"public class Main {\n\n public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int n = Integer.parseInt(scan.next());\n int k = Integer.parseInt(scan.next());\n\n Map<Integer, Boolean> map = new HashMap<>(k);\n\n for (int i = 1; i <= k; i++) {\n\n int d = Integer.parseInt(scan.next());\n\n for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }\n }\n scan.close();\n\n int x= n- map.size();\n\n System.out.println(String.valueOf(x));\n }\n}",
"public class Main {\n\n public static void main(String args[]) {\n\n\n Scanner scan = new Scanner(System.in);\n\n int n = Integer.parseInt(scan.next());\n int k = Integer.parseInt(scan.next());\n\n Map<Integer, Boolean> map = new HashMap<>(k);\n\n for (int i = 1; i <= k; i++) {\n\n int d = Integer.parseInt(scan.next());\n\n for (int j = 1; j<= d; j++) {\n\n\n int a = Integer.parseInt(scan.next());\n\n if (!map.containsKey(a)) {\n map.put(a, true);\n }\n }\n }\n scan.close();\n\n int x= n- map.size();\n\n System.out.println(String.valueOf(x));\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int n = Integer.parseInt(scan.next());
int k = Integer.parseInt(scan.next());
Map<Integer, Boolean> map = new HashMap<>(k);
for (int i = 1; i <= k; i++) {
int d = Integer.parseInt(scan.next());
for (int j = 1; j<= d; j++) {
int a = Integer.parseInt(scan.next());
if (!map.containsKey(a)) {
map.put(a, true);
}
}
}
scan.close();
int x= n- map.size();
System.out.println(String.valueOf(x));
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.