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,
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,
4,
18,
13,
17,
41,
13,
20,
2,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
97,
20
],
[
97,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
23,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
37,
42
],
[
23,
43
],
[
43,
44
],
[
43,
45
],
[
46,
47
],
[
46,
48
],
[
23,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
49,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
70,
71
],
[
70,
72
],
[
23,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
73,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
21,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n int t= Integer.parseInt(reader.readLine());\n\n String[] s=reader.readLine().split(\" \");\n int[] num=new int[t+t];\n\n for (int i = 0; i <s.length ; i++) {\n num[Integer.parseInt(s[i])]++;\n }\n for (int i = 1; i <=t ; i++) {\n System.out.println(num[i]);\n }\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.util.Arrays;",
"Arrays",
"java.util",
"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 IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n int t= Integer.parseInt(reader.readLine());\n\n String[] s=reader.readLine().split(\" \");\n int[] num=new int[t+t];\n\n for (int i = 0; i <s.length ; i++) {\n num[Integer.parseInt(s[i])]++;\n }\n for (int i = 1; i <=t ; i++) {\n System.out.println(num[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n int t= Integer.parseInt(reader.readLine());\n\n String[] s=reader.readLine().split(\" \");\n int[] num=new int[t+t];\n\n for (int i = 0; i <s.length ; i++) {\n num[Integer.parseInt(s[i])]++;\n }\n for (int i = 1; i <=t ; i++) {\n System.out.println(num[i]);\n }\n }",
"main",
"{\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n int t= Integer.parseInt(reader.readLine());\n\n String[] s=reader.readLine().split(\" \");\n int[] num=new int[t+t];\n\n for (int i = 0; i <s.length ; i++) {\n num[Integer.parseInt(s[i])]++;\n }\n for (int i = 1; i <=t ; i++) {\n System.out.println(num[i]);\n }\n }",
"BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"int t= Integer.parseInt(reader.readLine());",
"t",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"String[] s=reader.readLine().split(\" \");",
"s",
"reader.readLine().split(\" \")",
"reader.readLine().split",
"reader.readLine()",
"reader.readLine",
"reader",
"\" \"",
"int[] num=new int[t+t];",
"num",
"new int[t+t]",
"t+t",
"t",
"t",
"for (int i = 0; i <s.length ; i++) {\n num[Integer.parseInt(s[i])]++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <s.length",
"i",
"s.length",
"s",
"s.length",
"i++",
"i++",
"i",
"{\n num[Integer.parseInt(s[i])]++;\n }",
"{\n num[Integer.parseInt(s[i])]++;\n }",
"num[Integer.parseInt(s[i])]++",
"num[Integer.parseInt(s[i])]",
"num",
"Integer.parseInt(s[i])",
"Integer.parseInt",
"Integer",
"s[i]",
"s",
"i",
"for (int i = 1; i <=t ; i++) {\n System.out.println(num[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <=t",
"i",
"t",
"i++",
"i++",
"i",
"{\n System.out.println(num[i]);\n }",
"{\n System.out.println(num[i]);\n }",
"System.out.println(num[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"num[i]",
"num",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n int t= Integer.parseInt(reader.readLine());\n\n String[] s=reader.readLine().split(\" \");\n int[] num=new int[t+t];\n\n for (int i = 0; i <s.length ; i++) {\n num[Integer.parseInt(s[i])]++;\n }\n for (int i = 1; i <=t ; i++) {\n System.out.println(num[i]);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n int t= Integer.parseInt(reader.readLine());\n\n String[] s=reader.readLine().split(\" \");\n int[] num=new int[t+t];\n\n for (int i = 0; i <s.length ; i++) {\n num[Integer.parseInt(s[i])]++;\n }\n for (int i = 1; i <=t ; i++) {\n System.out.println(num[i]);\n }\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
int t= Integer.parseInt(reader.readLine());
String[] s=reader.readLine().split(" ");
int[] num=new int[t+t];
for (int i = 0; i <s.length ; i++) {
num[Integer.parseInt(s[i])]++;
}
for (int i = 1; i <=t ; i++) {
System.out.println(num[i]);
}
}
}
|
[
7,
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,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
17,
41,
13,
4,
18,
13,
13,
17,
4,
18,
13,
13,
40,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
81,
5
],
[
81,
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
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
20,
30
],
[
30,
31
],
[
31,
32
],
[
20,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
37,
41
],
[
34,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
44,
48
],
[
34,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
49,
53
],
[
53,
54
],
[
8,
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
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
6,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String args[]) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < n-1; i++) {\n int val = scanner.nextInt() - 1;\n int count = map.getOrDefault(val, 0);\n map.put(val, ++count);\n }\n\n for (int i = 0; i < n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String args[]) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < n-1; i++) {\n int val = scanner.nextInt() - 1;\n int count = map.getOrDefault(val, 0);\n map.put(val, ++count);\n }\n\n for (int i = 0; i < n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n }\n}",
"Main",
"public static void main(String args[]) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < n-1; i++) {\n int val = scanner.nextInt() - 1;\n int count = map.getOrDefault(val, 0);\n map.put(val, ++count);\n }\n\n for (int i = 0; i < n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < n-1; i++) {\n int val = scanner.nextInt() - 1;\n int count = map.getOrDefault(val, 0);\n map.put(val, ++count);\n }\n\n for (int i = 0; i < n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"Map<Integer, Integer> map = new HashMap<>();",
"map",
"new HashMap<>()",
"for (int i = 0; i < n-1; i++) {\n int val = scanner.nextInt() - 1;\n int count = map.getOrDefault(val, 0);\n map.put(val, ++count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n int val = scanner.nextInt() - 1;\n int count = map.getOrDefault(val, 0);\n map.put(val, ++count);\n }",
"{\n int val = scanner.nextInt() - 1;\n int count = map.getOrDefault(val, 0);\n map.put(val, ++count);\n }",
"int val = scanner.nextInt() - 1;",
"val",
"scanner.nextInt() - 1",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"1",
"int count = map.getOrDefault(val, 0);",
"count",
"map.getOrDefault(val, 0)",
"map.getOrDefault",
"map",
"val",
"0",
"map.put(val, ++count)",
"map.put",
"map",
"val",
"++count",
"count",
"for (int i = 0; i < n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n System.out.println(map.getOrDefault(i, 0));\n }",
"{\n System.out.println(map.getOrDefault(i, 0));\n }",
"System.out.println(map.getOrDefault(i, 0))",
"System.out.println",
"System.out",
"System",
"System.out",
"map.getOrDefault(i, 0)",
"map.getOrDefault",
"map",
"i",
"0",
"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 Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < n-1; i++) {\n int val = scanner.nextInt() - 1;\n int count = map.getOrDefault(val, 0);\n map.put(val, ++count);\n }\n\n for (int i = 0; i < n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\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 Map<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < n-1; i++) {\n int val = scanner.nextInt() - 1;\n int count = map.getOrDefault(val, 0);\n map.put(val, ++count);\n }\n\n for (int i = 0; i < n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < n-1; i++) {
int val = scanner.nextInt() - 1;
int count = map.getOrDefault(val, 0);
map.put(val, ++count);
}
for (int i = 0; i < n; i++) {
System.out.println(map.getOrDefault(i, 0));
}
}
}
|
[
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,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
40,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
94,
14
],
[
94,
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
],
[
33,
34
],
[
34,
35
],
[
31,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
17,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
41,
51
],
[
51,
52
],
[
52,
53
],
[
41,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
61,
63
],
[
55,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
17,
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
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
15,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.HashMap;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint value[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint a = Integer.parseInt(str[i]);\n\n\t\t\tvalue[a - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.HashMap;",
"HashMap",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint value[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint a = Integer.parseInt(str[i]);\n\n\t\t\tvalue[a - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint value[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint a = Integer.parseInt(str[i]);\n\n\t\t\tvalue[a - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint value[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint a = Integer.parseInt(str[i]);\n\n\t\t\tvalue[a - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"String str[] = br.readLine().split(\" \");",
"str",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int value[] = new int[n];",
"value",
"new int[n]",
"n",
"for (int i = 0; i < n - 1; i++) {\n\t\t\tint a = Integer.parseInt(str[i]);\n\n\t\t\tvalue[a - 1]++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 1",
"i",
"n - 1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint a = Integer.parseInt(str[i]);\n\n\t\t\tvalue[a - 1]++;\n\t\t}",
"{\n\t\t\tint a = Integer.parseInt(str[i]);\n\n\t\t\tvalue[a - 1]++;\n\t\t}",
"int a = Integer.parseInt(str[i]);",
"a",
"Integer.parseInt(str[i])",
"Integer.parseInt",
"Integer",
"str[i]",
"str",
"i",
"value[a - 1]++",
"value[a - 1]",
"value",
"a - 1",
"a",
"1",
"for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(value[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(value[i]);\n\t\t}",
"System.out.println(value[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"value[i]",
"value",
"i",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint value[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint a = Integer.parseInt(str[i]);\n\n\t\t\tvalue[a - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint value[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint a = Integer.parseInt(str[i]);\n\n\t\t\tvalue[a - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(value[i]);\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String str[] = br.readLine().split(" ");
int value[] = new int[n];
for (int i = 0; i < n - 1; i++) {
int a = Integer.parseInt(str[i]);
value[a - 1]++;
}
for (int i = 0; i < n; i++) {
System.out.println(value[i]);
}
}
}
|
[
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,
20,
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,
4,
18,
18,
13,
13,
18,
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
],
[
75,
11
],
[
75,
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
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
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
],
[
46,
47
],
[
47,
48
],
[
48,
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
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
12,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\n\npublic final class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int n = in.nextInt();\n in.nextLine();\n int[] members = new int[n];\n for (int i = 1; i < n; i++) {\n members[in.nextInt()-1]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(members[i]);\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public final class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int n = in.nextInt();\n in.nextLine();\n int[] members = new int[n];\n for (int i = 1; i < n; i++) {\n members[in.nextInt()-1]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(members[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int n = in.nextInt();\n in.nextLine();\n int[] members = new int[n];\n for (int i = 1; i < n; i++) {\n members[in.nextInt()-1]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(members[i]);\n }\n }",
"main",
"{\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int n = in.nextInt();\n in.nextLine();\n int[] members = new int[n];\n for (int i = 1; i < n; i++) {\n members[in.nextInt()-1]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(members[i]);\n }\n }",
"final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));",
"in",
"new Scanner(new BufferedReader(new InputStreamReader(System.in)))",
"final int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"in.nextLine()",
"in.nextLine",
"in",
"int[] members = new int[n];",
"members",
"new int[n]",
"n",
"for (int i = 1; i < n; i++) {\n members[in.nextInt()-1]++;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n members[in.nextInt()-1]++;\n }",
"{\n members[in.nextInt()-1]++;\n }",
"members[in.nextInt()-1]++",
"members[in.nextInt()-1]",
"members",
"in.nextInt()-1",
"in.nextInt()",
"in.nextInt",
"in",
"1",
"for (int i = 0; i < n; i++) {\n System.out.println(members[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n System.out.println(members[i]);\n }",
"{\n System.out.println(members[i]);\n }",
"System.out.println(members[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"members[i]",
"members",
"i",
"String[] args",
"args",
"public final class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int n = in.nextInt();\n in.nextLine();\n int[] members = new int[n];\n for (int i = 1; i < n; i++) {\n members[in.nextInt()-1]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(members[i]);\n }\n }\n}",
"public final class Main {\n\n public static void main(String[] args) {\n final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n final int n = in.nextInt();\n in.nextLine();\n int[] members = new int[n];\n for (int i = 1; i < n; i++) {\n members[in.nextInt()-1]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(members[i]);\n }\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public final class Main {
public static void main(String[] args) {
final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
final int n = in.nextInt();
in.nextLine();
int[] members = new int[n];
for (int i = 1; i < n; i++) {
members[in.nextInt()-1]++;
}
for (int i = 0; i < n; i++) {
System.out.println(members[i]);
}
}
}
|
[
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,
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,
20,
13,
0,
18,
13,
17,
40,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
13,
17,
4,
18,
13,
18,
13,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
13,
17,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
17,
12,
13,
30,
4,
13,
20,
23,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
2,
2,
17,
13,
17,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
37,
20,
30,
41,
13,
4,
18,
13,
14,
2,
13,
17,
29,
17,
0,
13,
20,
41,
13,
4,
18,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
2,
2,
2,
17,
13,
17,
13,
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
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
270,
35
],
[
270,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
38,
49
],
[
49,
50
],
[
49,
51
],
[
38,
52
],
[
52,
53
],
[
52,
54
],
[
38,
55
],
[
55,
56
],
[
55,
57
],
[
38,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
58,
63
],
[
38,
64
],
[
64,
65
],
[
65,
66
],
[
36,
67
],
[
67,
68
],
[
270,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
73,
79
],
[
79,
80
],
[
79,
81
],
[
73,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
73,
89
],
[
89,
90
],
[
89,
91
],
[
73,
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
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
109,
113
],
[
104,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
119,
120
],
[
119,
121
],
[
116,
122
],
[
104,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
126,
128
],
[
123,
129
],
[
129,
130
],
[
129,
131
],
[
73,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
137,
138
],
[
137,
139
],
[
132,
140
],
[
140,
141
],
[
141,
142
],
[
132,
143
],
[
144,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
145,
148
],
[
148,
149
],
[
149,
150
],
[
148,
151
],
[
148,
152
],
[
71,
153
],
[
153,
154
],
[
71,
155
],
[
155,
156
],
[
71,
157
],
[
157,
158
],
[
270,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
159,
163
],
[
163,
164
],
[
159,
165
],
[
165,
166
],
[
165,
167
],
[
159,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
168,
174
],
[
174,
175
],
[
159,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
176,
182
],
[
182,
183
],
[
159,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
192,
197
],
[
198,
198
],
[
198,
199
],
[
198,
200
],
[
198,
201
],
[
186,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
203,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
202,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
215,
219
],
[
219,
220
],
[
212,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
224,
225
],
[
225,
226
],
[
221,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
231,
232
],
[
221,
233
],
[
233,
234
],
[
233,
235
],
[
186,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
239,
240
],
[
186,
241
],
[
241,
242
],
[
242,
243
],
[
242,
244
],
[
241,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
246,
251
],
[
253,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
252,
256
],
[
253,
257
],
[
186,
258
],
[
258,
259
],
[
159,
260
],
[
260,
261
],
[
260,
262
],
[
262,
263
],
[
263,
264
],
[
264,
265
],
[
265,
266
],
[
264,
267
],
[
267,
268
],
[
0,
269
],
[
269,
270
],
[
269,
271
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.io.PrintStream;\nimport java.util.HashMap;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\nimport java.io.BufferedReader;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author Eric\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] a = new int[n];\n a[0] = -1;\n HashMap<Integer, Integer> bossNb = new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }\n\n for (int i = 0; i < n; i++) {\n out.println(bossNb.getOrDefault(i, 0));\n }\n //out.print(\"Case #\"+ testNumber + \": \");\n }\n\n }\n\n static class FastReader {\n public BufferedReader br;\n public StringTokenizer st;\n String context = null;\n\n public FastReader(InputStream in) {\n this(new InputStreamReader(in));\n }\n\n public FastReader(InputStreamReader input) {\n br = new BufferedReader(input);\n }\n\n public String next() {\n if (context != null) {\n System.err.print(\"[\" + context + \"] Wait for input ...\");\n }\n while (st == null || !st.hasMoreElements()) {\n try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }\n }\n String res = st.nextToken();\n if (context != null) {\n System.err.println(\"[\" + context + \"] ... received : \" + res);\n }\n return res;\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.io.PrintStream;",
"PrintStream",
"java.io",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.io.BufferedReader;",
"BufferedReader",
"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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] a = new int[n];\n a[0] = -1;\n HashMap<Integer, Integer> bossNb = new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }\n\n for (int i = 0; i < n; i++) {\n out.println(bossNb.getOrDefault(i, 0));\n }\n //out.print(\"Case #\"+ testNumber + \": \");\n }\n\n }\n\n static class FastReader {\n public BufferedReader br;\n public StringTokenizer st;\n String context = null;\n\n public FastReader(InputStream in) {\n this(new InputStreamReader(in));\n }\n\n public FastReader(InputStreamReader input) {\n br = new BufferedReader(input);\n }\n\n public String next() {\n if (context != null) {\n System.err.print(\"[\" + context + \"] Wait for input ...\");\n }\n while (st == null || !st.hasMoreElements()) {\n try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }\n }\n String res = st.nextToken();\n if (context != null) {\n System.err.println(\"[\" + context + \"] ... received : \" + res);\n }\n return res;\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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\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",
"FastReader in = new FastReader(inputStream);",
"in",
"new FastReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"CManagement solver = new CManagement();",
"solver",
"new CManagement()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class CManagement {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] a = new int[n];\n a[0] = -1;\n HashMap<Integer, Integer> bossNb = new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }\n\n for (int i = 0; i < n; i++) {\n out.println(bossNb.getOrDefault(i, 0));\n }\n //out.print(\"Case #\"+ testNumber + \": \");\n }\n\n }",
"CManagement",
"public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] a = new int[n];\n a[0] = -1;\n HashMap<Integer, Integer> bossNb = new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }\n\n for (int i = 0; i < n; i++) {\n out.println(bossNb.getOrDefault(i, 0));\n }\n //out.print(\"Case #\"+ testNumber + \": \");\n }",
"solve",
"{\n int n = in.nextInt();\n int[] a = new int[n];\n a[0] = -1;\n HashMap<Integer, Integer> bossNb = new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }\n\n for (int i = 0; i < n; i++) {\n out.println(bossNb.getOrDefault(i, 0));\n }\n //out.print(\"Case #\"+ testNumber + \": \");\n }",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"a[0] = -1",
"a[0]",
"a",
"0",
"-1",
"1",
"HashMap<Integer, Integer> bossNb = new HashMap<>();",
"bossNb",
"new HashMap<>()",
"for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }",
"{\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }",
"a[i] = in.nextInt() - 1",
"a[i]",
"a",
"i",
"in.nextInt() - 1",
"in.nextInt()",
"in.nextInt",
"in",
"1",
"int tmp = bossNb.getOrDefault(a[i], 0);",
"tmp",
"bossNb.getOrDefault(a[i], 0)",
"bossNb.getOrDefault",
"bossNb",
"a[i]",
"a",
"i",
"0",
"bossNb.put(a[i], tmp + 1)",
"bossNb.put",
"bossNb",
"a[i]",
"a",
"i",
"tmp + 1",
"tmp",
"1",
"for (int i = 0; i < n; i++) {\n out.println(bossNb.getOrDefault(i, 0));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n out.println(bossNb.getOrDefault(i, 0));\n }",
"{\n out.println(bossNb.getOrDefault(i, 0));\n }",
"out.println(bossNb.getOrDefault(i, 0))",
"out.println",
"out",
"bossNb.getOrDefault(i, 0)",
"bossNb.getOrDefault",
"bossNb",
"i",
"0",
"int testNumber",
"testNumber",
"FastReader in",
"in",
"PrintWriter out",
"out",
"static class FastReader {\n public BufferedReader br;\n public StringTokenizer st;\n String context = null;\n\n public FastReader(InputStream in) {\n this(new InputStreamReader(in));\n }\n\n public FastReader(InputStreamReader input) {\n br = new BufferedReader(input);\n }\n\n public String next() {\n if (context != null) {\n System.err.print(\"[\" + context + \"] Wait for input ...\");\n }\n while (st == null || !st.hasMoreElements()) {\n try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }\n }\n String res = st.nextToken();\n if (context != null) {\n System.err.println(\"[\" + context + \"] ... received : \" + res);\n }\n return res;\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }",
"FastReader",
"public BufferedReader br;",
"br",
"public StringTokenizer st;",
"st",
"String context = null;",
"context",
"null",
"public FastReader(InputStream in) {\n this(new InputStreamReader(in));\n }",
"FastReader",
"{\n this(new InputStreamReader(in));\n }",
"this(new InputStreamReader(in))",
"this",
"new InputStreamReader(in)",
"InputStream in",
"in",
"public FastReader(InputStreamReader input) {\n br = new BufferedReader(input);\n }",
"FastReader",
"{\n br = new BufferedReader(input);\n }",
"br = new BufferedReader(input)",
"br",
"new BufferedReader(input)",
"InputStreamReader input",
"input",
"public String next() {\n if (context != null) {\n System.err.print(\"[\" + context + \"] Wait for input ...\");\n }\n while (st == null || !st.hasMoreElements()) {\n try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }\n }\n String res = st.nextToken();\n if (context != null) {\n System.err.println(\"[\" + context + \"] ... received : \" + res);\n }\n return res;\n }",
"next",
"{\n if (context != null) {\n System.err.print(\"[\" + context + \"] Wait for input ...\");\n }\n while (st == null || !st.hasMoreElements()) {\n try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }\n }\n String res = st.nextToken();\n if (context != null) {\n System.err.println(\"[\" + context + \"] ... received : \" + res);\n }\n return res;\n }",
"if (context != null) {\n System.err.print(\"[\" + context + \"] Wait for input ...\");\n }",
"context != null",
"context",
"null",
"{\n System.err.print(\"[\" + context + \"] Wait for input ...\");\n }",
"System.err.print(\"[\" + context + \"] Wait for input ...\")",
"System.err.print",
"System.err",
"System",
"System.err",
"\"[\" + context + \"] Wait for input ...\"",
"\"[\" + context + \"] Wait for input ...\"",
"\"[\"",
"context",
"\"] Wait for input ...\"",
"while (st == null || !st.hasMoreElements()) {\n try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }\n }",
"try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }",
"catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }",
"IOException e",
"{\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"throw new RuntimeException(\"Could not read\");",
"new RuntimeException(\"Could not read\")",
"{\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n }",
"String s = br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"if (s == null)\n return null;",
"s == null",
"s",
"null",
"return null;",
"null",
"st = new StringTokenizer(s)",
"st",
"new StringTokenizer(s)",
"String res = st.nextToken();",
"res",
"st.nextToken()",
"st.nextToken",
"st",
"if (context != null) {\n System.err.println(\"[\" + context + \"] ... received : \" + res);\n }",
"context != null",
"context",
"null",
"{\n System.err.println(\"[\" + context + \"] ... received : \" + res);\n }",
"System.err.println(\"[\" + context + \"] ... received : \" + res)",
"System.err.println",
"System.err",
"System",
"System.err",
"\"[\" + context + \"] ... received : \" + res",
"\"] ... received : \"",
"\"[\" + context + \"] ... received : \" + res",
"\"[\"",
"context",
"\"] ... received : \"",
"res",
"return res;",
"res",
"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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] a = new int[n];\n a[0] = -1;\n HashMap<Integer, Integer> bossNb = new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }\n\n for (int i = 0; i < n; i++) {\n out.println(bossNb.getOrDefault(i, 0));\n }\n //out.print(\"Case #\"+ testNumber + \": \");\n }\n\n }\n\n static class FastReader {\n public BufferedReader br;\n public StringTokenizer st;\n String context = null;\n\n public FastReader(InputStream in) {\n this(new InputStreamReader(in));\n }\n\n public FastReader(InputStreamReader input) {\n br = new BufferedReader(input);\n }\n\n public String next() {\n if (context != null) {\n System.err.print(\"[\" + context + \"] Wait for input ...\");\n }\n while (st == null || !st.hasMoreElements()) {\n try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }\n }\n String res = st.nextToken();\n if (context != null) {\n System.err.println(\"[\" + context + \"] ... received : \" + res);\n }\n return res;\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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] a = new int[n];\n a[0] = -1;\n HashMap<Integer, Integer> bossNb = new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n int tmp = bossNb.getOrDefault(a[i], 0);\n bossNb.put(a[i], tmp + 1);\n }\n\n for (int i = 0; i < n; i++) {\n out.println(bossNb.getOrDefault(i, 0));\n }\n //out.print(\"Case #\"+ testNumber + \": \");\n }\n\n }\n\n static class FastReader {\n public BufferedReader br;\n public StringTokenizer st;\n String context = null;\n\n public FastReader(InputStream in) {\n this(new InputStreamReader(in));\n }\n\n public FastReader(InputStreamReader input) {\n br = new BufferedReader(input);\n }\n\n public String next() {\n if (context != null) {\n System.err.print(\"[\" + context + \"] Wait for input ...\");\n }\n while (st == null || !st.hasMoreElements()) {\n try {\n String s = br.readLine();\n if (s == null)\n return null;\n st = new StringTokenizer(s);\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(\"Could not read\");\n }\n }\n String res = st.nextToken();\n if (context != null) {\n System.err.println(\"[\" + context + \"] ... received : \" + res);\n }\n return res;\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.io.PrintStream;
import java.util.HashMap;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Eric
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
FastReader in = new FastReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
CManagement solver = new CManagement();
solver.solve(1, in, out);
out.close();
}
static class CManagement {
public void solve(int testNumber, FastReader in, PrintWriter out) {
int n = in.nextInt();
int[] a = new int[n];
a[0] = -1;
HashMap<Integer, Integer> bossNb = new HashMap<>();
for (int i = 1; i < n; i++) {
a[i] = in.nextInt() - 1;
int tmp = bossNb.getOrDefault(a[i], 0);
bossNb.put(a[i], tmp + 1);
}
for (int i = 0; i < n; i++) {
out.println(bossNb.getOrDefault(i, 0));
}
//out.print("Case #"+ testNumber + ": ");
}
}
static class FastReader {
public BufferedReader br;
public StringTokenizer st;
String context = null;
public FastReader(InputStream in) {
this(new InputStreamReader(in));
}
public FastReader(InputStreamReader input) {
br = new BufferedReader(input);
}
public String next() {
if (context != null) {
System.err.print("[" + context + "] Wait for input ...");
}
while (st == null || !st.hasMoreElements()) {
try {
String s = br.readLine();
if (s == null)
return null;
st = new StringTokenizer(s);
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("Could not read");
}
}
String res = st.nextToken();
if (context != null) {
System.err.println("[" + context + "] ... received : " + res);
}
return res;
}
public int nextInt() {
return Integer.parseInt(next());
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
2,
18,
13,
13,
17,
2,
18,
13,
2,
18,
13,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
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
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
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
],
[
62,
63
],
[
63,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
73,
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
],
[
95,
100
],
[
100,
101
],
[
100,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"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 A[] =new int[N];\n int B[] =new int[N];\n for(int j=0;j<N;j++){\n B[j]=0;}\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n B[A[i]-1]=B[A[i]-1]+1;}\n for(int k=0;k<N;k++){\n System.out.println(B[k]);}\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 A[] =new int[N];\n int B[] =new int[N];\n for(int j=0;j<N;j++){\n B[j]=0;}\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n B[A[i]-1]=B[A[i]-1]+1;}\n for(int k=0;k<N;k++){\n System.out.println(B[k]);}\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int N =sc.nextInt();\n int A[] =new int[N];\n int B[] =new int[N];\n for(int j=0;j<N;j++){\n B[j]=0;}\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n B[A[i]-1]=B[A[i]-1]+1;}\n for(int k=0;k<N;k++){\n System.out.println(B[k]);}\n }",
"main",
"{\n Scanner sc =new Scanner(System.in);\n int N =sc.nextInt();\n int A[] =new int[N];\n int B[] =new int[N];\n for(int j=0;j<N;j++){\n B[j]=0;}\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n B[A[i]-1]=B[A[i]-1]+1;}\n for(int k=0;k<N;k++){\n System.out.println(B[k]);}\n }",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N =sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int A[] =new int[N];",
"A",
"new int[N]",
"N",
"int B[] =new int[N];",
"B",
"new int[N]",
"N",
"for(int j=0;j<N;j++){\n B[j]=0;}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<N",
"j",
"N",
"j++",
"j++",
"j",
"{\n B[j]=0;}",
"{\n B[j]=0;}",
"B[j]=0",
"B[j]",
"B",
"j",
"0",
"for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n B[A[i]-1]=B[A[i]-1]+1;}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n A[i]=sc.nextInt();\n B[A[i]-1]=B[A[i]-1]+1;}",
"{\n A[i]=sc.nextInt();\n B[A[i]-1]=B[A[i]-1]+1;}",
"A[i]=sc.nextInt()",
"A[i]",
"A",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"B[A[i]-1]=B[A[i]-1]+1",
"B[A[i]-1]",
"B",
"A[i]-1",
"A[i]",
"A",
"i",
"1",
"B[A[i]-1]+1",
"B[A[i]-1]",
"B",
"A[i]-1",
"A[i]",
"A",
"i",
"1",
"1",
"for(int k=0;k<N;k++){\n System.out.println(B[k]);}",
"int k=0;",
"int k=0;",
"k",
"0",
"k<N",
"k",
"N",
"k++",
"k++",
"k",
"{\n System.out.println(B[k]);}",
"{\n System.out.println(B[k]);}",
"System.out.println(B[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"B[k]",
"B",
"k",
"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 A[] =new int[N];\n int B[] =new int[N];\n for(int j=0;j<N;j++){\n B[j]=0;}\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n B[A[i]-1]=B[A[i]-1]+1;}\n for(int k=0;k<N;k++){\n System.out.println(B[k]);}\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 A[] =new int[N];\n int B[] =new int[N];\n for(int j=0;j<N;j++){\n B[j]=0;}\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n B[A[i]-1]=B[A[i]-1]+1;}\n for(int k=0;k<N;k++){\n System.out.println(B[k]);}\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 A[] =new int[N];
int B[] =new int[N];
for(int j=0;j<N;j++){
B[j]=0;}
for(int i=0;i<N-1;i++){
A[i]=sc.nextInt();
B[A[i]-1]=B[A[i]-1]+1;}
for(int k=0;k<N;k++){
System.out.println(B[k]);}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
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,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
71,
5
],
[
71,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
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
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
6,
68
],
[
68,
69
],
[
0,
70
],
[
70,
71
],
[
70,
72
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\t\n public static void main(String[] args) {\n\t Scanner scan = new Scanner(System.in);\n\t int number = scan.nextInt();\n\t int[] people = new int[number];\n\t for(int i=0;i<number-1;i++){\n\t \tint no = scan.nextInt();\n\t \tpeople[no-1]++;\n\t }\n\t for(int i=0;i<number;i++){\n\t \tSystem.out.println(people[i]);\n\t }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n public static void main(String[] args) {\n\t Scanner scan = new Scanner(System.in);\n\t int number = scan.nextInt();\n\t int[] people = new int[number];\n\t for(int i=0;i<number-1;i++){\n\t \tint no = scan.nextInt();\n\t \tpeople[no-1]++;\n\t }\n\t for(int i=0;i<number;i++){\n\t \tSystem.out.println(people[i]);\n\t }\n }\n}",
"Main",
"public static void main(String[] args) {\n\t Scanner scan = new Scanner(System.in);\n\t int number = scan.nextInt();\n\t int[] people = new int[number];\n\t for(int i=0;i<number-1;i++){\n\t \tint no = scan.nextInt();\n\t \tpeople[no-1]++;\n\t }\n\t for(int i=0;i<number;i++){\n\t \tSystem.out.println(people[i]);\n\t }\n }",
"main",
"{\n\t Scanner scan = new Scanner(System.in);\n\t int number = scan.nextInt();\n\t int[] people = new int[number];\n\t for(int i=0;i<number-1;i++){\n\t \tint no = scan.nextInt();\n\t \tpeople[no-1]++;\n\t }\n\t for(int i=0;i<number;i++){\n\t \tSystem.out.println(people[i]);\n\t }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int number = scan.nextInt();",
"number",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] people = new int[number];",
"people",
"new int[number]",
"number",
"for(int i=0;i<number-1;i++){\n\t \tint no = scan.nextInt();\n\t \tpeople[no-1]++;\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<number-1",
"i",
"number-1",
"number",
"1",
"i++",
"i++",
"i",
"{\n\t \tint no = scan.nextInt();\n\t \tpeople[no-1]++;\n\t }",
"{\n\t \tint no = scan.nextInt();\n\t \tpeople[no-1]++;\n\t }",
"int no = scan.nextInt();",
"no",
"scan.nextInt()",
"scan.nextInt",
"scan",
"people[no-1]++",
"people[no-1]",
"people",
"no-1",
"no",
"1",
"for(int i=0;i<number;i++){\n\t \tSystem.out.println(people[i]);\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<number",
"i",
"number",
"i++",
"i++",
"i",
"{\n\t \tSystem.out.println(people[i]);\n\t }",
"{\n\t \tSystem.out.println(people[i]);\n\t }",
"System.out.println(people[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"people[i]",
"people",
"i",
"String[] args",
"args",
"public class Main {\n\t\n public static void main(String[] args) {\n\t Scanner scan = new Scanner(System.in);\n\t int number = scan.nextInt();\n\t int[] people = new int[number];\n\t for(int i=0;i<number-1;i++){\n\t \tint no = scan.nextInt();\n\t \tpeople[no-1]++;\n\t }\n\t for(int i=0;i<number;i++){\n\t \tSystem.out.println(people[i]);\n\t }\n }\n}",
"public class Main {\n\t\n public static void main(String[] args) {\n\t Scanner scan = new Scanner(System.in);\n\t int number = scan.nextInt();\n\t int[] people = new int[number];\n\t for(int i=0;i<number-1;i++){\n\t \tint no = scan.nextInt();\n\t \tpeople[no-1]++;\n\t }\n\t for(int i=0;i<number;i++){\n\t \tSystem.out.println(people[i]);\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 number = scan.nextInt();
int[] people = new int[number];
for(int i=0;i<number-1;i++){
int no = scan.nextInt();
people[no-1]++;
}
for(int i=0;i<number;i++){
System.out.println(people[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
40,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
73,
5
],
[
73,
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
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
47,
57
],
[
57,
58
],
[
58,
59
],
[
47,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
6,
70
],
[
70,
71
],
[
0,
72
],
[
72,
73
],
[
72,
74
]
] |
[
"\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[] res = new int[N+1];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint tmp = sc.nextInt();\n\t\t\tres[tmp]++;\n\t\t}\n\t\tfor (int i = 1; i < res.length; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\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[] res = new int[N+1];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint tmp = sc.nextInt();\n\t\t\tres[tmp]++;\n\t\t}\n\t\tfor (int i = 1; i < res.length; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\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[] res = new int[N+1];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint tmp = sc.nextInt();\n\t\t\tres[tmp]++;\n\t\t}\n\t\tfor (int i = 1; i < res.length; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] res = new int[N+1];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint tmp = sc.nextInt();\n\t\t\tres[tmp]++;\n\t\t}\n\t\tfor (int i = 1; i < res.length; i++) {\n\t\t\tSystem.out.println(res[i]);\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[] res = new int[N+1];",
"res",
"new int[N+1]",
"N+1",
"N",
"1",
"for (int i = 0; i < N-1; i++) {\n\t\t\tint tmp = sc.nextInt();\n\t\t\tres[tmp]++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint tmp = sc.nextInt();\n\t\t\tres[tmp]++;\n\t\t}",
"{\n\t\t\tint tmp = sc.nextInt();\n\t\t\tres[tmp]++;\n\t\t}",
"int tmp = sc.nextInt();",
"tmp",
"sc.nextInt()",
"sc.nextInt",
"sc",
"res[tmp]++",
"res[tmp]",
"res",
"tmp",
"for (int i = 1; i < res.length; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < res.length",
"i",
"res.length",
"res",
"res.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(res[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(res[i]);\n\t\t}",
"System.out.println(res[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"res[i]",
"res",
"i",
"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[] res = new int[N+1];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint tmp = sc.nextInt();\n\t\t\tres[tmp]++;\n\t\t}\n\t\tfor (int i = 1; i < res.length; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\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[] res = new int[N+1];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint tmp = sc.nextInt();\n\t\t\tres[tmp]++;\n\t\t}\n\t\tfor (int i = 1; i < res.length; i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\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[] res = new int[N+1];
for (int i = 0; i < N-1; i++) {
int tmp = sc.nextInt();
res[tmp]++;
}
for (int i = 1; i < res.length; i++) {
System.out.println(res[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
40,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
88,
5
],
[
88,
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
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
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
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
8,
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
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
6,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
] |
[
"import 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 // String s = sc.next();\n int[] a = new int[n+1];\n int[] b = new int[n+1];\n\n for (int i = 2; i <= n; i++) {\n a[i] = Integer.parseInt(sc.next());\n b[a[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(b[i]);\n }\n // System.out.println();\n sc.close();\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 = Integer.parseInt(sc.next());\n // String s = sc.next();\n int[] a = new int[n+1];\n int[] b = new int[n+1];\n\n for (int i = 2; i <= n; i++) {\n a[i] = Integer.parseInt(sc.next());\n b[a[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(b[i]);\n }\n // System.out.println();\n sc.close();\n }\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n // String s = sc.next();\n int[] a = new int[n+1];\n int[] b = new int[n+1];\n\n for (int i = 2; i <= n; i++) {\n a[i] = Integer.parseInt(sc.next());\n b[a[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(b[i]);\n }\n // System.out.println();\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n // String s = sc.next();\n int[] a = new int[n+1];\n int[] b = new int[n+1];\n\n for (int i = 2; i <= n; i++) {\n a[i] = Integer.parseInt(sc.next());\n b[a[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(b[i]);\n }\n // System.out.println();\n sc.close();\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[] a = new int[n+1];",
"a",
"new int[n+1]",
"n+1",
"n",
"1",
"int[] b = new int[n+1];",
"b",
"new int[n+1]",
"n+1",
"n",
"1",
"for (int i = 2; i <= n; i++) {\n a[i] = Integer.parseInt(sc.next());\n b[a[i]]++;\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = Integer.parseInt(sc.next());\n b[a[i]]++;\n }",
"{\n a[i] = Integer.parseInt(sc.next());\n b[a[i]]++;\n }",
"a[i] = Integer.parseInt(sc.next())",
"a[i]",
"a",
"i",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"b[a[i]]++",
"b[a[i]]",
"b",
"a[i]",
"a",
"i",
"for (int i = 1; i <= n; i++) {\n System.out.println(b[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n System.out.println(b[i]);\n }",
"{\n System.out.println(b[i]);\n }",
"System.out.println(b[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"b[i]",
"b",
"i",
"sc.close()",
"sc.close",
"sc",
"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 // String s = sc.next();\n int[] a = new int[n+1];\n int[] b = new int[n+1];\n\n for (int i = 2; i <= n; i++) {\n a[i] = Integer.parseInt(sc.next());\n b[a[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(b[i]);\n }\n // System.out.println();\n sc.close();\n }\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 // String s = sc.next();\n int[] a = new int[n+1];\n int[] b = new int[n+1];\n\n for (int i = 2; i <= n; i++) {\n a[i] = Integer.parseInt(sc.next());\n b[a[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(b[i]);\n }\n // System.out.println();\n sc.close();\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 = Integer.parseInt(sc.next());
// String s = sc.next();
int[] a = new int[n+1];
int[] b = new int[n+1];
for (int i = 2; i <= n; i++) {
a[i] = Integer.parseInt(sc.next());
b[a[i]]++;
}
for (int i = 1; i <= n; i++) {
System.out.println(b[i]);
}
// System.out.println();
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
28,
13,
13,
30,
4,
13,
2,
13,
17,
23,
13,
12,
13,
30,
4,
18,
18,
13,
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
],
[
156,
8
],
[
156,
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,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
40,
44
],
[
11,
45
],
[
45,
46
],
[
45,
47
],
[
45,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
9,
54
],
[
54,
55
],
[
156,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
56,
65
],
[
65,
66
],
[
0,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
67,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
67,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
82,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
92,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
81,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
67,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
67,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
123,
124
],
[
67,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
132,
133
],
[
67,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
140,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
136,
153
],
[
153,
154
],
[
0,
155
],
[
155,
156
],
[
155,
157
]
] |
[
"import java.util.*;\nimport java.io.*;\npublic class Main\n{\n\tpublic static void main(String args[]) throws IOException{\n\t\tBufferedReader in = new BufferedReader();\n\t\tint n =in.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor(int i=1; i<n; i++){\n\t\t\tarr[in.nextInt()-1]++;\n\t\t}\n\t\tfor(int i:arr)\n\t\tout(i+\"\\n\");\n\t\t\n\t}\n\tstatic void out(String s){\n\t\tSystem.out.print(s);\n\t}\n}\n\n\n\nclass BufferedReader \n{ \n java.io.BufferedReader br; \n StringTokenizer st; \n\n public BufferedReader() \n { \n br = new java.io.BufferedReader(new\n InputStreamReader(System.in)); \n } \n\n public 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 public int nextInt() \n { \n return Integer.parseInt(next()); \n } \n\n public long nextLong() \n { \n return Long.parseLong(next()); \n } \n\n public double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n\n public 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}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main\n{\n\tpublic static void main(String args[]) throws IOException{\n\t\tBufferedReader in = new BufferedReader();\n\t\tint n =in.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor(int i=1; i<n; i++){\n\t\t\tarr[in.nextInt()-1]++;\n\t\t}\n\t\tfor(int i:arr)\n\t\tout(i+\"\\n\");\n\t\t\n\t}\n\tstatic void out(String s){\n\t\tSystem.out.print(s);\n\t}\n}",
"Main",
"public static void main(String args[]) throws IOException{\n\t\tBufferedReader in = new BufferedReader();\n\t\tint n =in.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor(int i=1; i<n; i++){\n\t\t\tarr[in.nextInt()-1]++;\n\t\t}\n\t\tfor(int i:arr)\n\t\tout(i+\"\\n\");\n\t\t\n\t}",
"main",
"{\n\t\tBufferedReader in = new BufferedReader();\n\t\tint n =in.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor(int i=1; i<n; i++){\n\t\t\tarr[in.nextInt()-1]++;\n\t\t}\n\t\tfor(int i:arr)\n\t\tout(i+\"\\n\");\n\t\t\n\t}",
"BufferedReader in = new BufferedReader();",
"in",
"new BufferedReader()",
"int n =in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int[] arr = new int[n];",
"arr",
"new int[n]",
"n",
"for(int i=1; i<n; i++){\n\t\t\tarr[in.nextInt()-1]++;\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tarr[in.nextInt()-1]++;\n\t\t}",
"{\n\t\t\tarr[in.nextInt()-1]++;\n\t\t}",
"arr[in.nextInt()-1]++",
"arr[in.nextInt()-1]",
"arr",
"in.nextInt()-1",
"in.nextInt()",
"in.nextInt",
"in",
"1",
"for(int i:arr)\n\t\tout(i+\"\\n\");",
"int i",
"arr",
"out(i+\"\\n\");",
"out(i+\"\\n\")",
"out",
"i+\"\\n\"",
"i",
"\"\\n\"",
"String args[]",
"args",
"static void out(String s){\n\t\tSystem.out.print(s);\n\t}",
"out",
"{\n\t\tSystem.out.print(s);\n\t}",
"System.out.print(s)",
"System.out.print",
"System.out",
"System",
"System.out",
"s",
"String s",
"s",
"class BufferedReader \n{ \n java.io.BufferedReader br; \n StringTokenizer st; \n\n public BufferedReader() \n { \n br = new java.io.BufferedReader(new\n InputStreamReader(System.in)); \n } \n\n public 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 public int nextInt() \n { \n return Integer.parseInt(next()); \n } \n\n public long nextLong() \n { \n return Long.parseLong(next()); \n } \n\n public double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n\n public 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}",
"BufferedReader",
"java.io.BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public BufferedReader() \n { \n br = new java.io.BufferedReader(new\n InputStreamReader(System.in)); \n }",
"BufferedReader",
"{ \n br = new java.io.BufferedReader(new\n InputStreamReader(System.in)); \n }",
"br = new java.io.BufferedReader(new\n InputStreamReader(System.in))",
"br",
"new java.io.BufferedReader(new\n InputStreamReader(System.in))",
"public 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",
"public 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",
"public 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",
"public 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",
"public 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",
"public class Main\n{\n\tpublic static void main(String args[]) throws IOException{\n\t\tBufferedReader in = new BufferedReader();\n\t\tint n =in.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor(int i=1; i<n; i++){\n\t\t\tarr[in.nextInt()-1]++;\n\t\t}\n\t\tfor(int i:arr)\n\t\tout(i+\"\\n\");\n\t\t\n\t}\n\tstatic void out(String s){\n\t\tSystem.out.print(s);\n\t}\n}",
"public class Main\n{\n\tpublic static void main(String args[]) throws IOException{\n\t\tBufferedReader in = new BufferedReader();\n\t\tint n =in.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor(int i=1; i<n; i++){\n\t\t\tarr[in.nextInt()-1]++;\n\t\t}\n\t\tfor(int i:arr)\n\t\tout(i+\"\\n\");\n\t\t\n\t}\n\tstatic void out(String s){\n\t\tSystem.out.print(s);\n\t}\n}",
"Main"
] |
import java.util.*;
import java.io.*;
public class Main
{
public static void main(String args[]) throws IOException{
BufferedReader in = new BufferedReader();
int n =in.nextInt();
int[] arr = new int[n];
for(int i=1; i<n; i++){
arr[in.nextInt()-1]++;
}
for(int i:arr)
out(i+"\n");
}
static void out(String s){
System.out.print(s);
}
}
class BufferedReader
{
java.io.BufferedReader br;
StringTokenizer st;
public BufferedReader()
{
br = new java.io.BufferedReader(new
InputStreamReader(System.in));
}
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());
}
public long nextLong()
{
return Long.parseLong(next());
}
public double nextDouble()
{
return Double.parseDouble(next());
}
public String nextLine()
{
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
}
|
[
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,
4,
18,
13,
17,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
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
],
[
30,
31
],
[
31,
32
],
[
28,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
37,
38
],
[
37,
39
],
[
14,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
40,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
61,
63
],
[
14,
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
],
[
84,
86
],
[
12,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
]
] |
[
" import java.io.BufferedReader;\n import java.io.IOException;\n import java.io.InputStreamReader;\n\n public class Main {\n\n public static void main(String[] args) throws IOException {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n String [] line = br.readLine().split( \" \");\n int [] count = new int[N+1];\n\n for(int i = 0; i < line.length; i++){\n count[Integer.parseInt(line[i])]++;\n }\n\n for(int i = 1; i < count.length; i++){\n System.out.println(count[i]);\n }\n }\n }",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n String [] line = br.readLine().split( \" \");\n int [] count = new int[N+1];\n\n for(int i = 0; i < line.length; i++){\n count[Integer.parseInt(line[i])]++;\n }\n\n for(int i = 1; i < count.length; i++){\n System.out.println(count[i]);\n }\n }\n }",
"Main",
"public static void main(String[] args) throws IOException {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n String [] line = br.readLine().split( \" \");\n int [] count = new int[N+1];\n\n for(int i = 0; i < line.length; i++){\n count[Integer.parseInt(line[i])]++;\n }\n\n for(int i = 1; i < count.length; i++){\n System.out.println(count[i]);\n }\n }",
"main",
"{\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n String [] line = br.readLine().split( \" \");\n int [] count = new int[N+1];\n\n for(int i = 0; i < line.length; i++){\n count[Integer.parseInt(line[i])]++;\n }\n\n for(int i = 1; i < count.length; i++){\n System.out.println(count[i]);\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int N = Integer.parseInt(br.readLine());",
"N",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"String [] line = br.readLine().split( \" \");",
"line",
"br.readLine().split( \" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int [] count = new int[N+1];",
"count",
"new int[N+1]",
"N+1",
"N",
"1",
"for(int i = 0; i < line.length; i++){\n count[Integer.parseInt(line[i])]++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < line.length",
"i",
"line.length",
"line",
"line.length",
"i++",
"i++",
"i",
"{\n count[Integer.parseInt(line[i])]++;\n }",
"{\n count[Integer.parseInt(line[i])]++;\n }",
"count[Integer.parseInt(line[i])]++",
"count[Integer.parseInt(line[i])]",
"count",
"Integer.parseInt(line[i])",
"Integer.parseInt",
"Integer",
"line[i]",
"line",
"i",
"for(int i = 1; i < count.length; i++){\n System.out.println(count[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < count.length",
"i",
"count.length",
"count",
"count.length",
"i++",
"i++",
"i",
"{\n System.out.println(count[i]);\n }",
"{\n System.out.println(count[i]);\n }",
"System.out.println(count[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"count[i]",
"count",
"i",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n String [] line = br.readLine().split( \" \");\n int [] count = new int[N+1];\n\n for(int i = 0; i < line.length; i++){\n count[Integer.parseInt(line[i])]++;\n }\n\n for(int i = 1; i < count.length; i++){\n System.out.println(count[i]);\n }\n }\n }",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int N = Integer.parseInt(br.readLine());\n String [] line = br.readLine().split( \" \");\n int [] count = new int[N+1];\n\n for(int i = 0; i < line.length; i++){\n count[Integer.parseInt(line[i])]++;\n }\n\n for(int i = 1; i < count.length; i++){\n System.out.println(count[i]);\n }\n }\n }",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
String [] line = br.readLine().split( " ");
int [] count = new int[N+1];
for(int i = 0; i < line.length; i++){
count[Integer.parseInt(line[i])]++;
}
for(int i = 1; i < count.length; i++){
System.out.println(count[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
0,
18,
13,
17,
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,
18,
13,
13,
13,
30,
40,
18,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
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
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
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
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
8,
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
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
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\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tA[0] = N;\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(A[i] != N) {\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\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 scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tA[0] = N;\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(A[i] != N) {\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tA[0] = N;\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(A[i] != N) {\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tA[0] = N;\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(A[i] != N) {\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\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[] A = new int[N];",
"A",
"new int[N]",
"N",
"int[] ans = new int[N];",
"ans",
"new int[N]",
"N",
"A[0] = N",
"A[0]",
"A",
"0",
"N",
"for(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tA[i] = scan.nextInt();\n\t\t}",
"{\n\t\t\tA[i] = scan.nextInt();\n\t\t}",
"A[i] = scan.nextInt()",
"A[i]",
"A",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 0; i < N; i++) {\n\t\t\tif(A[i] != N) {\n\t\t\t\tans[A[i]-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] != N) {\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(A[i] != N) {\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}\n\t\t}",
"if(A[i] != N) {\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}",
"A[i] != N",
"A[i]",
"A",
"i",
"N",
"{\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}",
"ans[A[i]-1]++",
"ans[A[i]-1]",
"ans",
"A[i]-1",
"A[i]",
"A",
"i",
"1",
"for(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tA[0] = N;\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(A[i] != N) {\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\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 scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tA[0] = N;\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(A[i] != N) {\n\t\t\t\tans[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int[] A = new int[N];
int[] ans = new int[N];
A[0] = N;
for(int i = 1; i < N; i++) {
A[i] = scan.nextInt();
}
for(int i = 0; i < N; i++) {
if(A[i] != N) {
ans[A[i]-1]++;
}
}
for(int i = 0; i < N; i++) {
System.out.println(ans[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
40,
18,
13,
40,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
76,
5
],
[
76,
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
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
31,
33
],
[
24,
34
],
[
34,
35
],
[
35,
36
],
[
24,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
38,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
8,
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
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
6,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
] |
[
"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 = Integer.parseInt(sc.next());\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint jousi = Integer.parseInt(sc.next());\n\t\t\ta[--jousi]++;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\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\tScanner sc = new Scanner(System.in);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint jousi = Integer.parseInt(sc.next());\n\t\t\ta[--jousi]++;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\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[] a = new int[n];\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint jousi = Integer.parseInt(sc.next());\n\t\t\ta[--jousi]++;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint jousi = Integer.parseInt(sc.next());\n\t\t\ta[--jousi]++;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\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[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n - 1; i++) {\n\t\t\tint jousi = Integer.parseInt(sc.next());\n\t\t\ta[--jousi]++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 1",
"i",
"n - 1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint jousi = Integer.parseInt(sc.next());\n\t\t\ta[--jousi]++;\n\t\t}",
"{\n\t\t\tint jousi = Integer.parseInt(sc.next());\n\t\t\ta[--jousi]++;\n\t\t}",
"int jousi = Integer.parseInt(sc.next());",
"jousi",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"a[--jousi]++",
"a[--jousi]",
"a",
"--jousi",
"jousi",
"for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"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[] a = new int[n];\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint jousi = Integer.parseInt(sc.next());\n\t\t\ta[--jousi]++;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\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[] a = new int[n];\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint jousi = Integer.parseInt(sc.next());\n\t\t\ta[--jousi]++;\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\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 = Integer.parseInt(sc.next());
int[] a = new int[n];
for (int i = 0; i < n - 1; i++) {
int jousi = Integer.parseInt(sc.next());
a[--jousi]++;
}
for (int i = 0; i < n; i++) {
System.out.println(a[i]);
}
}
}
|
[
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,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
18,
13,
17,
17,
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,
18,
13,
13,
41,
13,
20,
13,
28,
13,
13,
30,
30,
40,
18,
13,
2,
13,
17,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
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
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
28,
38
],
[
38,
39
],
[
39,
40
],
[
28,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
20,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
20,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
20,
66
],
[
66,
67
],
[
66,
68
],
[
69,
70
],
[
69,
71
],
[
20,
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
],
[
88,
90
],
[
87,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
94,
96
],
[
20,
97
],
[
97,
98
],
[
97,
99
],
[
20,
101
],
[
101,
102
],
[
101,
103
],
[
101,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
20,
112
],
[
112,
113
],
[
112,
114
],
[
112,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
20,
123
],
[
123,
124
],
[
124,
125
],
[
18,
126
],
[
126,
127
]
] |
[
"import java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Scanner;\n\nclass Main {\n public static void main(final String[] args) {\n \n Scanner scanner = new Scanner(System.in);\n String[] arr = new String[2];\n for(int i = 0;i < arr.length;i++) {\n arr[i] = scanner.nextLine();\n }\n\n int n = Integer.parseInt(arr[0]);\n\n String[] line2 = arr[1].split(\" \");\n\n int[] a = new int[line2.length];\n for (int i = 0; i < line2.length; i++) {\n a[i] = Integer.parseInt(line2[i]);\n }\n\n int[] answers = new int[n];\n for (int id : a) {\n answers[id - 1] ++;\n }\n\n for (int answer : answers) {\n System.out.println(answer);\n }\n\n scanner.close();\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(final String[] args) {\n \n Scanner scanner = new Scanner(System.in);\n String[] arr = new String[2];\n for(int i = 0;i < arr.length;i++) {\n arr[i] = scanner.nextLine();\n }\n\n int n = Integer.parseInt(arr[0]);\n\n String[] line2 = arr[1].split(\" \");\n\n int[] a = new int[line2.length];\n for (int i = 0; i < line2.length; i++) {\n a[i] = Integer.parseInt(line2[i]);\n }\n\n int[] answers = new int[n];\n for (int id : a) {\n answers[id - 1] ++;\n }\n\n for (int answer : answers) {\n System.out.println(answer);\n }\n\n scanner.close();\n }\n}",
"Main",
"public static void main(final String[] args) {\n \n Scanner scanner = new Scanner(System.in);\n String[] arr = new String[2];\n for(int i = 0;i < arr.length;i++) {\n arr[i] = scanner.nextLine();\n }\n\n int n = Integer.parseInt(arr[0]);\n\n String[] line2 = arr[1].split(\" \");\n\n int[] a = new int[line2.length];\n for (int i = 0; i < line2.length; i++) {\n a[i] = Integer.parseInt(line2[i]);\n }\n\n int[] answers = new int[n];\n for (int id : a) {\n answers[id - 1] ++;\n }\n\n for (int answer : answers) {\n System.out.println(answer);\n }\n\n scanner.close();\n }",
"main",
"{\n \n Scanner scanner = new Scanner(System.in);\n String[] arr = new String[2];\n for(int i = 0;i < arr.length;i++) {\n arr[i] = scanner.nextLine();\n }\n\n int n = Integer.parseInt(arr[0]);\n\n String[] line2 = arr[1].split(\" \");\n\n int[] a = new int[line2.length];\n for (int i = 0; i < line2.length; i++) {\n a[i] = Integer.parseInt(line2[i]);\n }\n\n int[] answers = new int[n];\n for (int id : a) {\n answers[id - 1] ++;\n }\n\n for (int answer : answers) {\n System.out.println(answer);\n }\n\n scanner.close();\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String[] arr = new String[2];",
"arr",
"new String[2]",
"2",
"for(int i = 0;i < arr.length;i++) {\n arr[i] = scanner.nextLine();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n arr[i] = scanner.nextLine();\n }",
"{\n arr[i] = scanner.nextLine();\n }",
"arr[i] = scanner.nextLine()",
"arr[i]",
"arr",
"i",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"int n = Integer.parseInt(arr[0]);",
"n",
"Integer.parseInt(arr[0])",
"Integer.parseInt",
"Integer",
"arr[0]",
"arr",
"0",
"String[] line2 = arr[1].split(\" \");",
"line2",
"arr[1].split(\" \")",
"arr[1].split",
"arr[1]",
"arr",
"1",
"\" \"",
"int[] a = new int[line2.length];",
"a",
"new int[line2.length]",
"line2.length",
"line2",
"line2.length",
"for (int i = 0; i < line2.length; i++) {\n a[i] = Integer.parseInt(line2[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < line2.length",
"i",
"line2.length",
"line2",
"line2.length",
"i++",
"i++",
"i",
"{\n a[i] = Integer.parseInt(line2[i]);\n }",
"{\n a[i] = Integer.parseInt(line2[i]);\n }",
"a[i] = Integer.parseInt(line2[i])",
"a[i]",
"a",
"i",
"Integer.parseInt(line2[i])",
"Integer.parseInt",
"Integer",
"line2[i]",
"line2",
"i",
"int[] answers = new int[n];",
"answers",
"new int[n]",
"n",
"for (int id : a) {\n answers[id - 1] ++;\n }",
"int id",
"a",
"{\n answers[id - 1] ++;\n }",
"{\n answers[id - 1] ++;\n }",
"answers[id - 1] ++",
"answers[id - 1]",
"answers",
"id - 1",
"id",
"1",
"for (int answer : answers) {\n System.out.println(answer);\n }",
"int answer",
"answers",
"{\n System.out.println(answer);\n }",
"{\n System.out.println(answer);\n }",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"scanner.close()",
"scanner.close",
"scanner",
"final String[] args",
"args"
] |
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
class Main {
public static void main(final String[] args) {
Scanner scanner = new Scanner(System.in);
String[] arr = new String[2];
for(int i = 0;i < arr.length;i++) {
arr[i] = scanner.nextLine();
}
int n = Integer.parseInt(arr[0]);
String[] line2 = arr[1].split(" ");
int[] a = new int[line2.length];
for (int i = 0; i < line2.length; i++) {
a[i] = Integer.parseInt(line2[i]);
}
int[] answers = new int[n];
for (int id : a) {
answers[id - 1] ++;
}
for (int answer : answers) {
System.out.println(answer);
}
scanner.close();
}
}
|
[
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,
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,
2,
4,
18,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
13,
4,
18,
13,
13,
40,
13,
28,
13,
13,
30,
30,
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
],
[
0,
10
],
[
10,
11
],
[
10,
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
],
[
14,
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
],
[
42,
45
],
[
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
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
61,
68
],
[
58,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
58,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
79,
80
],
[
14,
81
],
[
81,
82
],
[
81,
83
],
[
81,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
12,
92
],
[
92,
93
]
] |
[
"\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint N = Integer.parseInt(sc.next());\n\n\t\tList<Integer> list = new ArrayList();\n\t\tfor(int i = 0; i < N;i++) {\n\t\t\tlist.add(0);\n\t\t}\n\n\t\tfor(int i = 1;i < N;i++) {\n\t\t\tint c = Integer.parseInt(sc.next()) -1;\n\t\t\tint a = list.get(c);\n\t\t\tlist.set(c, ++a);\n\t\t}\n\n\t\tfor(Integer b : list) {\n\t\t\tSystem.out.println(b);\n\t\t}\n\n\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint N = Integer.parseInt(sc.next());\n\n\t\tList<Integer> list = new ArrayList();\n\t\tfor(int i = 0; i < N;i++) {\n\t\t\tlist.add(0);\n\t\t}\n\n\t\tfor(int i = 1;i < N;i++) {\n\t\t\tint c = Integer.parseInt(sc.next()) -1;\n\t\t\tint a = list.get(c);\n\t\t\tlist.set(c, ++a);\n\t\t}\n\n\t\tfor(Integer b : list) {\n\t\t\tSystem.out.println(b);\n\t\t}\n\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint N = Integer.parseInt(sc.next());\n\n\t\tList<Integer> list = new ArrayList();\n\t\tfor(int i = 0; i < N;i++) {\n\t\t\tlist.add(0);\n\t\t}\n\n\t\tfor(int i = 1;i < N;i++) {\n\t\t\tint c = Integer.parseInt(sc.next()) -1;\n\t\t\tint a = list.get(c);\n\t\t\tlist.set(c, ++a);\n\t\t}\n\n\t\tfor(Integer b : list) {\n\t\t\tSystem.out.println(b);\n\t\t}\n\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint N = Integer.parseInt(sc.next());\n\n\t\tList<Integer> list = new ArrayList();\n\t\tfor(int i = 0; i < N;i++) {\n\t\t\tlist.add(0);\n\t\t}\n\n\t\tfor(int i = 1;i < N;i++) {\n\t\t\tint c = Integer.parseInt(sc.next()) -1;\n\t\t\tint a = list.get(c);\n\t\t\tlist.set(c, ++a);\n\t\t}\n\n\t\tfor(Integer b : list) {\n\t\t\tSystem.out.println(b);\n\t\t}\n\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",
"List<Integer> list = new ArrayList();",
"list",
"new ArrayList()",
"for(int i = 0; i < N;i++) {\n\t\t\tlist.add(0);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tlist.add(0);\n\t\t}",
"{\n\t\t\tlist.add(0);\n\t\t}",
"list.add(0)",
"list.add",
"list",
"0",
"for(int i = 1;i < N;i++) {\n\t\t\tint c = Integer.parseInt(sc.next()) -1;\n\t\t\tint a = list.get(c);\n\t\t\tlist.set(c, ++a);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tint c = Integer.parseInt(sc.next()) -1;\n\t\t\tint a = list.get(c);\n\t\t\tlist.set(c, ++a);\n\t\t}",
"{\n\t\t\tint c = Integer.parseInt(sc.next()) -1;\n\t\t\tint a = list.get(c);\n\t\t\tlist.set(c, ++a);\n\t\t}",
"int c = Integer.parseInt(sc.next()) -1;",
"c",
"Integer.parseInt(sc.next()) -1",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"1",
"int a = list.get(c);",
"a",
"list.get(c)",
"list.get",
"list",
"c",
"list.set(c, ++a)",
"list.set",
"list",
"c",
"++a",
"a",
"for(Integer b : list) {\n\t\t\tSystem.out.println(b);\n\t\t}",
"Integer b",
"list",
"{\n\t\t\tSystem.out.println(b);\n\t\t}",
"{\n\t\t\tSystem.out.println(b);\n\t\t}",
"System.out.println(b)",
"System.out.println",
"System.out",
"System",
"System.out",
"b",
"String[] args",
"args"
] |
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.next());
List<Integer> list = new ArrayList();
for(int i = 0; i < N;i++) {
list.add(0);
}
for(int i = 1;i < N;i++) {
int c = Integer.parseInt(sc.next()) -1;
int a = list.get(c);
list.set(c, ++a);
}
for(Integer b : list) {
System.out.println(b);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
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,
17,
4,
18,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
27,
37
],
[
37,
38
],
[
38,
39
],
[
27,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
49,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
8,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
74,
84
],
[
84,
85
],
[
85,
86
],
[
74,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
97,
107
],
[
107,
108
],
[
108,
109
],
[
97,
110
],
[
111,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
6,
120
],
[
120,
121
]
] |
[
"import java.util.Scanner;\n\nclass Main {\n\n public static void main(String[] args) {\n Scanner stdIn=new Scanner(System.in);\n \n int n=stdIn.nextInt();\n int []x=new int[n-1];\n int []y=new int[n];\n\n for(int i=0; i<x.length; i++){\n x[i]=stdIn.nextInt();\n }\n for(int i=0; i<y.length; i++){\n y[i]=0;\n }\n \n System.out.println();\n \n for(int i=0; i<n-1; i++){\n y[x[i]-1]++;\n }\n\n for(int i=0; i<y.length; i++){\n System.out.println(y[i]);\n \n }\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n public static void main(String[] args) {\n Scanner stdIn=new Scanner(System.in);\n \n int n=stdIn.nextInt();\n int []x=new int[n-1];\n int []y=new int[n];\n\n for(int i=0; i<x.length; i++){\n x[i]=stdIn.nextInt();\n }\n for(int i=0; i<y.length; i++){\n y[i]=0;\n }\n \n System.out.println();\n \n for(int i=0; i<n-1; i++){\n y[x[i]-1]++;\n }\n\n for(int i=0; i<y.length; i++){\n System.out.println(y[i]);\n \n }\n }\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner stdIn=new Scanner(System.in);\n \n int n=stdIn.nextInt();\n int []x=new int[n-1];\n int []y=new int[n];\n\n for(int i=0; i<x.length; i++){\n x[i]=stdIn.nextInt();\n }\n for(int i=0; i<y.length; i++){\n y[i]=0;\n }\n \n System.out.println();\n \n for(int i=0; i<n-1; i++){\n y[x[i]-1]++;\n }\n\n for(int i=0; i<y.length; i++){\n System.out.println(y[i]);\n \n }\n }",
"main",
"{\n Scanner stdIn=new Scanner(System.in);\n \n int n=stdIn.nextInt();\n int []x=new int[n-1];\n int []y=new int[n];\n\n for(int i=0; i<x.length; i++){\n x[i]=stdIn.nextInt();\n }\n for(int i=0; i<y.length; i++){\n y[i]=0;\n }\n \n System.out.println();\n \n for(int i=0; i<n-1; i++){\n y[x[i]-1]++;\n }\n\n for(int i=0; i<y.length; i++){\n System.out.println(y[i]);\n \n }\n }",
"Scanner stdIn=new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int n=stdIn.nextInt();",
"n",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int []x=new int[n-1];",
"x",
"new int[n-1]",
"n-1",
"n",
"1",
"int []y=new int[n];",
"y",
"new int[n]",
"n",
"for(int i=0; i<x.length; i++){\n x[i]=stdIn.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<x.length",
"i",
"x.length",
"x",
"x.length",
"i++",
"i++",
"i",
"{\n x[i]=stdIn.nextInt();\n }",
"{\n x[i]=stdIn.nextInt();\n }",
"x[i]=stdIn.nextInt()",
"x[i]",
"x",
"i",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"for(int i=0; i<y.length; i++){\n y[i]=0;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<y.length",
"i",
"y.length",
"y",
"y.length",
"i++",
"i++",
"i",
"{\n y[i]=0;\n }",
"{\n y[i]=0;\n }",
"y[i]=0",
"y[i]",
"y",
"i",
"0",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"for(int i=0; i<n-1; i++){\n y[x[i]-1]++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n y[x[i]-1]++;\n }",
"{\n y[x[i]-1]++;\n }",
"y[x[i]-1]++",
"y[x[i]-1]",
"y",
"x[i]-1",
"x[i]",
"x",
"i",
"1",
"for(int i=0; i<y.length; i++){\n System.out.println(y[i]);\n \n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<y.length",
"i",
"y.length",
"y",
"y.length",
"i++",
"i++",
"i",
"{\n System.out.println(y[i]);\n \n }",
"{\n System.out.println(y[i]);\n \n }",
"System.out.println(y[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"y[i]",
"y",
"i",
"String[] args",
"args"
] |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner stdIn=new Scanner(System.in);
int n=stdIn.nextInt();
int []x=new int[n-1];
int []y=new int[n];
for(int i=0; i<x.length; i++){
x[i]=stdIn.nextInt();
}
for(int i=0; i<y.length; i++){
y[i]=0;
}
System.out.println();
for(int i=0; i<n-1; i++){
y[x[i]-1]++;
}
for(int i=0; i<y.length; i++){
System.out.println(y[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
17,
42,
2,
13,
13,
30,
0,
18,
13,
13,
17,
0,
13,
2,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
0,
18,
13,
13,
2,
4,
18,
13,
17,
0,
13,
2,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
0,
18,
13,
18,
13,
13,
2,
18,
13,
18,
13,
13,
17,
0,
13,
2,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
0,
13,
2,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
115,
5
],
[
115,
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
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
8,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
55,
59
],
[
50,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
79,
85
],
[
72,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
8,
91
],
[
91,
92
],
[
91,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
98,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
6,
112
],
[
112,
113
],
[
0,
114
],
[
114,
115
],
[
114,
116
]
] |
[
"\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n\n Scanner scan =new Scanner(System.in);\n\n int N= scan.nextInt();\n int A[] = new int[N];\nint B[]=new int[N];\n\nint i2=0;\n\nwhile (i2<N)\n{A[i2]=0;\ni2=i2+1;\n}\nint i1=1;\n\n while(i1<N){\n B[i1]=scan.nextInt()-1;\n i1=i1+1;\n\n }\n int i=1;\n while (i<N) { A[B[i]]=A[B[i]]+1;\n i=i+1;\n\n\n }\nint i3=0;\nwhile (i3<N){System.out.println(A[i3]);\ni3=i3+1;\n\n}\n\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n\n Scanner scan =new Scanner(System.in);\n\n int N= scan.nextInt();\n int A[] = new int[N];\nint B[]=new int[N];\n\nint i2=0;\n\nwhile (i2<N)\n{A[i2]=0;\ni2=i2+1;\n}\nint i1=1;\n\n while(i1<N){\n B[i1]=scan.nextInt()-1;\n i1=i1+1;\n\n }\n int i=1;\n while (i<N) { A[B[i]]=A[B[i]]+1;\n i=i+1;\n\n\n }\nint i3=0;\nwhile (i3<N){System.out.println(A[i3]);\ni3=i3+1;\n\n}\n\n\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner scan =new Scanner(System.in);\n\n int N= scan.nextInt();\n int A[] = new int[N];\nint B[]=new int[N];\n\nint i2=0;\n\nwhile (i2<N)\n{A[i2]=0;\ni2=i2+1;\n}\nint i1=1;\n\n while(i1<N){\n B[i1]=scan.nextInt()-1;\n i1=i1+1;\n\n }\n int i=1;\n while (i<N) { A[B[i]]=A[B[i]]+1;\n i=i+1;\n\n\n }\nint i3=0;\nwhile (i3<N){System.out.println(A[i3]);\ni3=i3+1;\n\n}\n\n\n }",
"main",
"{\n\n Scanner scan =new Scanner(System.in);\n\n int N= scan.nextInt();\n int A[] = new int[N];\nint B[]=new int[N];\n\nint i2=0;\n\nwhile (i2<N)\n{A[i2]=0;\ni2=i2+1;\n}\nint i1=1;\n\n while(i1<N){\n B[i1]=scan.nextInt()-1;\n i1=i1+1;\n\n }\n int i=1;\n while (i<N) { A[B[i]]=A[B[i]]+1;\n i=i+1;\n\n\n }\nint i3=0;\nwhile (i3<N){System.out.println(A[i3]);\ni3=i3+1;\n\n}\n\n\n }",
"Scanner scan =new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N= scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int A[] = new int[N];",
"A",
"new int[N]",
"N",
"int B[]=new int[N];",
"B",
"new int[N]",
"N",
"int i2=0;",
"i2",
"0",
"while (i2<N)\n{A[i2]=0;\ni2=i2+1;\n}",
"i2<N",
"i2",
"N",
"{A[i2]=0;\ni2=i2+1;\n}",
"A[i2]=0",
"A[i2]",
"A",
"i2",
"0",
"i2=i2+1",
"i2",
"i2+1",
"i2",
"1",
"int i1=1;",
"i1",
"1",
"while(i1<N){\n B[i1]=scan.nextInt()-1;\n i1=i1+1;\n\n }",
"i1<N",
"i1",
"N",
"{\n B[i1]=scan.nextInt()-1;\n i1=i1+1;\n\n }",
"B[i1]=scan.nextInt()-1",
"B[i1]",
"B",
"i1",
"scan.nextInt()-1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"i1=i1+1",
"i1",
"i1+1",
"i1",
"1",
"int i=1;",
"i",
"1",
"while (i<N) { A[B[i]]=A[B[i]]+1;\n i=i+1;\n\n\n }",
"i<N",
"i",
"N",
"{ A[B[i]]=A[B[i]]+1;\n i=i+1;\n\n\n }",
"A[B[i]]=A[B[i]]+1",
"A[B[i]]",
"A",
"B[i]",
"B",
"i",
"A[B[i]]+1",
"A[B[i]]",
"A",
"B[i]",
"B",
"i",
"1",
"i=i+1",
"i",
"i+1",
"i",
"1",
"int i3=0;",
"i3",
"0",
"while (i3<N){System.out.println(A[i3]);\ni3=i3+1;\n\n}",
"i3<N",
"i3",
"N",
"{System.out.println(A[i3]);\ni3=i3+1;\n\n}",
"System.out.println(A[i3])",
"System.out.println",
"System.out",
"System",
"System.out",
"A[i3]",
"A",
"i3",
"i3=i3+1",
"i3",
"i3+1",
"i3",
"1",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n\n Scanner scan =new Scanner(System.in);\n\n int N= scan.nextInt();\n int A[] = new int[N];\nint B[]=new int[N];\n\nint i2=0;\n\nwhile (i2<N)\n{A[i2]=0;\ni2=i2+1;\n}\nint i1=1;\n\n while(i1<N){\n B[i1]=scan.nextInt()-1;\n i1=i1+1;\n\n }\n int i=1;\n while (i<N) { A[B[i]]=A[B[i]]+1;\n i=i+1;\n\n\n }\nint i3=0;\nwhile (i3<N){System.out.println(A[i3]);\ni3=i3+1;\n\n}\n\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n\n Scanner scan =new Scanner(System.in);\n\n int N= scan.nextInt();\n int A[] = new int[N];\nint B[]=new int[N];\n\nint i2=0;\n\nwhile (i2<N)\n{A[i2]=0;\ni2=i2+1;\n}\nint i1=1;\n\n while(i1<N){\n B[i1]=scan.nextInt()-1;\n i1=i1+1;\n\n }\n int i=1;\n while (i<N) { A[B[i]]=A[B[i]]+1;\n i=i+1;\n\n\n }\nint i3=0;\nwhile (i3<N){System.out.println(A[i3]);\ni3=i3+1;\n\n}\n\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 A[] = new int[N];
int B[]=new int[N];
int i2=0;
while (i2<N)
{A[i2]=0;
i2=i2+1;
}
int i1=1;
while(i1<N){
B[i1]=scan.nextInt()-1;
i1=i1+1;
}
int i=1;
while (i<N) { A[B[i]]=A[B[i]]+1;
i=i+1;
}
int i3=0;
while (i3<N){System.out.println(A[i3]);
i3=i3+1;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
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,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
0,
18,
13,
2,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
42,
52
],
[
52,
53
],
[
53,
54
],
[
42,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
8,
63
],
[
63,
64
],
[
63,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
80,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
87,
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
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
6,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
] |
[
"import java.util.*;\n public class Main {\n \n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n \tint N = scanner.nextInt();//会社に何人いるか\n \n //List <Integer> n = new ArrayList<Integer>();//各社員の部下の数を格納\n List <Integer> a = new ArrayList <Integer>();//各社員の上司番号を格納\n int n[] = new int[N];\n for(int i=0; i<N; i++){\n //n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]\n n[i] = 0;\n }\n \n for(int i=0; i<N-1; i++){\n a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]\n }\n \n int b = 0;\n for(int i=0; i<N-1; i++){\n b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく\n //n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える\n //n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している\n n[b-1] +=1;//[b-1]番目にずつ1加算していく\n }\n for(int i=0; i<N; i++){\n System.out.println(n[i]);\n }\n }\n }",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n \n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n \tint N = scanner.nextInt();//会社に何人いるか\n \n //List <Integer> n = new ArrayList<Integer>();//各社員の部下の数を格納\n List <Integer> a = new ArrayList <Integer>();//各社員の上司番号を格納\n int n[] = new int[N];\n for(int i=0; i<N; i++){\n //n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]\n n[i] = 0;\n }\n \n for(int i=0; i<N-1; i++){\n a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]\n }\n \n int b = 0;\n for(int i=0; i<N-1; i++){\n b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく\n //n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える\n //n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している\n n[b-1] +=1;//[b-1]番目にずつ1加算していく\n }\n for(int i=0; i<N; i++){\n System.out.println(n[i]);\n }\n }\n }",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n \tint N = scanner.nextInt();//会社に何人いるか\n \n //List <Integer> n = new ArrayList<Integer>();//各社員の部下の数を格納\n List <Integer> a = new ArrayList <Integer>();//各社員の上司番号を格納\n int n[] = new int[N];\n for(int i=0; i<N; i++){\n //n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]\n n[i] = 0;\n }\n \n for(int i=0; i<N-1; i++){\n a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]\n }\n \n int b = 0;\n for(int i=0; i<N-1; i++){\n b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく\n //n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える\n //n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している\n n[b-1] +=1;//[b-1]番目にずつ1加算していく\n }\n for(int i=0; i<N; i++){\n System.out.println(n[i]);\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n \tint N = scanner.nextInt();//会社に何人いるか\n \n //List <Integer> n = new ArrayList<Integer>();//各社員の部下の数を格納\n List <Integer> a = new ArrayList <Integer>();//各社員の上司番号を格納\n int n[] = new int[N];\n for(int i=0; i<N; i++){\n //n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]\n n[i] = 0;\n }\n \n for(int i=0; i<N-1; i++){\n a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]\n }\n \n int b = 0;\n for(int i=0; i<N-1; i++){\n b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく\n //n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える\n //n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している\n n[b-1] +=1;//[b-1]番目にずつ1加算していく\n }\n for(int i=0; i<N; i++){\n System.out.println(n[i]);\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int N = scanner.nextInt();",
"N",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"List <Integer> a = new ArrayList <Integer>();",
"a",
"new ArrayList <Integer>()",
"int n[] = new int[N];",
"n",
"new int[N]",
"N",
"for(int i=0; i<N; i++){\n //n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]\n n[i] = 0;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n //n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]\n n[i] = 0;\n }",
"{\n //n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]\n n[i] = 0;\n }",
"n[i] = 0",
"n[i]",
"n",
"i",
"0",
"for(int i=0; i<N-1; i++){\n a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]\n }",
"{\n a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]\n }",
"a.add(scanner.nextInt())",
"a.add",
"a",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int b = 0;",
"b",
"0",
"for(int i=0; i<N-1; i++){\n b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく\n //n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える\n //n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している\n n[b-1] +=1;//[b-1]番目にずつ1加算していく\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく\n //n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える\n //n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している\n n[b-1] +=1;//[b-1]番目にずつ1加算していく\n }",
"{\n b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく\n //n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える\n //n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している\n n[b-1] +=1;//[b-1]番目にずつ1加算していく\n }",
"b = a.get(i)",
"b",
"a.get(i)",
"a.get",
"a",
"i",
"n[b-1] +=1",
"n[b-1]",
"n",
"b-1",
"b",
"1",
"1",
"for(int i=0; i<N; i++){\n System.out.println(n[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n System.out.println(n[i]);\n }",
"{\n System.out.println(n[i]);\n }",
"System.out.println(n[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"n[i]",
"n",
"i",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n \tint N = scanner.nextInt();//会社に何人いるか\n \n //List <Integer> n = new ArrayList<Integer>();//各社員の部下の数を格納\n List <Integer> a = new ArrayList <Integer>();//各社員の上司番号を格納\n int n[] = new int[N];\n for(int i=0; i<N; i++){\n //n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]\n n[i] = 0;\n }\n \n for(int i=0; i<N-1; i++){\n a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]\n }\n \n int b = 0;\n for(int i=0; i<N-1; i++){\n b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく\n //n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える\n //n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している\n n[b-1] +=1;//[b-1]番目にずつ1加算していく\n }\n for(int i=0; i<N; i++){\n System.out.println(n[i]);\n }\n }\n }",
"public class Main {\n \n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n \tint N = scanner.nextInt();//会社に何人いるか\n \n //List <Integer> n = new ArrayList<Integer>();//各社員の部下の数を格納\n List <Integer> a = new ArrayList <Integer>();//各社員の上司番号を格納\n int n[] = new int[N];\n for(int i=0; i<N; i++){\n //n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]\n n[i] = 0;\n }\n \n for(int i=0; i<N-1; i++){\n a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]\n }\n \n int b = 0;\n for(int i=0; i<N-1; i++){\n b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく\n //n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える\n //n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している\n n[b-1] +=1;//[b-1]番目にずつ1加算していく\n }\n for(int i=0; i<N; i++){\n System.out.println(n[i]);\n }\n }\n }",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();//会社に何人いるか
//List <Integer> n = new ArrayList<Integer>();//各社員の部下の数を格納
List <Integer> a = new ArrayList <Integer>();//各社員の上司番号を格納
int n[] = new int[N];
for(int i=0; i<N; i++){
//n.add(0);//各社員の部下の数の表記を一旦0と置く...[0,0,0,0,0]
n[i] = 0;
}
for(int i=0; i<N-1; i++){
a.add(scanner.nextInt());//各社員の上司番号を入れる...[1,1,2,2]
}
int b = 0;
for(int i=0; i<N-1; i++){
b = a.get(i);//[1,1,2,2]をbに一つずつ代入していく
//n.set(b-1,n.get(b-1)+1);//n.set(0,1)...0番目のところに1を置き換える
//n.get(b-1)+1はi=0で始まっているため,nの0番目に+1加算していくことを表している
n[b-1] +=1;//[b-1]番目にずつ1加算していく
}
for(int i=0; i<N; i++){
System.out.println(n[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
20,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
105,
5
],
[
105,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
40,
41
],
[
41,
42
],
[
8,
43
],
[
43,
44
],
[
43,
45
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
51,
55
],
[
8,
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
],
[
71,
73
],
[
68,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
79,
89
],
[
89,
90
],
[
90,
91
],
[
79,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
6,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n // long N = s.nextLong();\n int M = s.nextInt();\n int[] a = new int[M];\n for (int i = 0; i < M-1; i++) {\n a[i] = s.nextInt();\n }\n\n int[] b = new int[a.length+1];\n Arrays.fill(b, 0);\n for (int i = 0; i < M; i++) {\n int l = a[i];\n b[l] += 1;\n }\n\n for (int i = 1; i < b.length; i++) {\n System.out.println(b[i]);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n // long N = s.nextLong();\n int M = s.nextInt();\n int[] a = new int[M];\n for (int i = 0; i < M-1; i++) {\n a[i] = s.nextInt();\n }\n\n int[] b = new int[a.length+1];\n Arrays.fill(b, 0);\n for (int i = 0; i < M; i++) {\n int l = a[i];\n b[l] += 1;\n }\n\n for (int i = 1; i < b.length; i++) {\n System.out.println(b[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n // long N = s.nextLong();\n int M = s.nextInt();\n int[] a = new int[M];\n for (int i = 0; i < M-1; i++) {\n a[i] = s.nextInt();\n }\n\n int[] b = new int[a.length+1];\n Arrays.fill(b, 0);\n for (int i = 0; i < M; i++) {\n int l = a[i];\n b[l] += 1;\n }\n\n for (int i = 1; i < b.length; i++) {\n System.out.println(b[i]);\n }\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n // long N = s.nextLong();\n int M = s.nextInt();\n int[] a = new int[M];\n for (int i = 0; i < M-1; i++) {\n a[i] = s.nextInt();\n }\n\n int[] b = new int[a.length+1];\n Arrays.fill(b, 0);\n for (int i = 0; i < M; i++) {\n int l = a[i];\n b[l] += 1;\n }\n\n for (int i = 1; i < b.length; i++) {\n System.out.println(b[i]);\n }\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int M = s.nextInt();",
"M",
"s.nextInt()",
"s.nextInt",
"s",
"int[] a = new int[M];",
"a",
"new int[M]",
"M",
"for (int i = 0; i < M-1; i++) {\n a[i] = s.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < M-1",
"i",
"M-1",
"M",
"1",
"i++",
"i++",
"i",
"{\n a[i] = s.nextInt();\n }",
"{\n a[i] = s.nextInt();\n }",
"a[i] = s.nextInt()",
"a[i]",
"a",
"i",
"s.nextInt()",
"s.nextInt",
"s",
"int[] b = new int[a.length+1];",
"b",
"new int[a.length+1]",
"a.length+1",
"a.length",
"a",
"a.length",
"1",
"Arrays.fill(b, 0)",
"Arrays.fill",
"Arrays",
"b",
"0",
"for (int i = 0; i < M; i++) {\n int l = a[i];\n b[l] += 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < M",
"i",
"M",
"i++",
"i++",
"i",
"{\n int l = a[i];\n b[l] += 1;\n }",
"{\n int l = a[i];\n b[l] += 1;\n }",
"int l = a[i];",
"l",
"a[i]",
"a",
"i",
"b[l] += 1",
"b[l]",
"b",
"l",
"1",
"for (int i = 1; i < b.length; i++) {\n System.out.println(b[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < b.length",
"i",
"b.length",
"b",
"b.length",
"i++",
"i++",
"i",
"{\n System.out.println(b[i]);\n }",
"{\n System.out.println(b[i]);\n }",
"System.out.println(b[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"b[i]",
"b",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n // long N = s.nextLong();\n int M = s.nextInt();\n int[] a = new int[M];\n for (int i = 0; i < M-1; i++) {\n a[i] = s.nextInt();\n }\n\n int[] b = new int[a.length+1];\n Arrays.fill(b, 0);\n for (int i = 0; i < M; i++) {\n int l = a[i];\n b[l] += 1;\n }\n\n for (int i = 1; i < b.length; i++) {\n System.out.println(b[i]);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n // long N = s.nextLong();\n int M = s.nextInt();\n int[] a = new int[M];\n for (int i = 0; i < M-1; i++) {\n a[i] = s.nextInt();\n }\n\n int[] b = new int[a.length+1];\n Arrays.fill(b, 0);\n for (int i = 0; i < M; i++) {\n int l = a[i];\n b[l] += 1;\n }\n\n for (int i = 1; i < b.length; i++) {\n System.out.println(b[i]);\n }\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
// long N = s.nextLong();
int M = s.nextInt();
int[] a = new int[M];
for (int i = 0; i < M-1; i++) {
a[i] = s.nextInt();
}
int[] b = new int[a.length+1];
Arrays.fill(b, 0);
for (int i = 0; i < M; i++) {
int l = a[i];
b[l] += 1;
}
for (int i = 1; i < b.length; i++) {
System.out.println(b[i]);
}
}
}
|
[
7,
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,
20,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
2,
17,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
13,
2,
17,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
2,
4,
18,
13,
13,
17,
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,
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,
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,
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,
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,
29,
4,
18,
13,
4,
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
],
[
397,
17
],
[
397,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
397,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
55,
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
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
84,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
90,
94
],
[
55,
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
],
[
108,
111
],
[
108,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
114,
118
],
[
55,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
119,
130
],
[
131,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
135,
140
],
[
53,
141
],
[
141,
142
],
[
53,
143
],
[
143,
144
],
[
53,
145
],
[
145,
146
],
[
397,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
147,
151
],
[
151,
152
],
[
151,
153
],
[
147,
155
],
[
155,
156
],
[
147,
157
],
[
157,
158
],
[
147,
159
],
[
159,
160
],
[
147,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
164,
168
],
[
161,
169
],
[
169,
170
],
[
147,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
174,
179
],
[
179,
180
],
[
173,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
181,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
185,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
189,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
198,
201
],
[
185,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
202,
206
],
[
206,
207
],
[
207,
208
],
[
173,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
147,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
216,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
221,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
216,
229
],
[
229,
230
],
[
229,
231
],
[
216,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
236,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
216,
245
],
[
245,
246
],
[
245,
247
],
[
216,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
248,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
255,
259
],
[
259,
260
],
[
259,
261
],
[
254,
262
],
[
262,
263
],
[
253,
264
],
[
264,
265
],
[
264,
266
],
[
253,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
269,
271
],
[
253,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
216,
276
],
[
276,
277
],
[
277,
278
],
[
277,
279
],
[
147,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
285,
286
],
[
282,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
287,
291
],
[
291,
292
],
[
291,
293
],
[
293,
294
],
[
282,
295
],
[
295,
296
],
[
295,
297
],
[
282,
298
],
[
298,
299
],
[
299,
300
],
[
300,
301
],
[
300,
302
],
[
298,
303
],
[
303,
304
],
[
304,
305
],
[
305,
306
],
[
304,
307
],
[
303,
308
],
[
308,
309
],
[
308,
310
],
[
310,
311
],
[
282,
312
],
[
312,
313
],
[
313,
314
],
[
314,
315
],
[
147,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
319,
323
],
[
323,
324
],
[
324,
325
],
[
325,
326
],
[
324,
327
],
[
318,
328
],
[
328,
329
],
[
332,
330
],
[
342,
331
],
[
339,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
336
],
[
336,
337
],
[
336,
338
],
[
339,
339
],
[
339,
340
],
[
339,
341
],
[
342,
342
],
[
342,
343
],
[
342,
344
],
[
332,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
316,
349
],
[
349,
350
],
[
147,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
354,
355
],
[
354,
356
],
[
353,
358
],
[
358,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
358,
363
],
[
363,
364
],
[
363,
365
],
[
358,
366
],
[
366,
367
],
[
367,
368
],
[
358,
369
],
[
370,
370
],
[
370,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
371,
375
],
[
375,
376
],
[
353,
377
],
[
377,
378
],
[
351,
379
],
[
379,
380
],
[
147,
381
],
[
381,
382
],
[
381,
383
],
[
383,
384
],
[
384,
385
],
[
385,
386
],
[
386,
387
],
[
385,
388
],
[
388,
389
],
[
147,
390
],
[
390,
391
],
[
390,
392
],
[
392,
393
],
[
392,
394
],
[
394,
395
],
[
0,
396
],
[
396,
397
],
[
396,
398
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskA solver = new TaskA();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskA {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n=in.nextInt();\n HashMap<Integer,Integer> h=new HashMap<>();\n for(int i=0;i<n-1;++i) {\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }\n for(int i=1;i<=n;++i) {\n \th.put(i, 1+h.getOrDefault(i, 0));\n }\n for(int i=1;i<=n;++i) {\n \tout.println(h.get(i)-1);\n }\n }\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n\n curChar = 0;\n\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n\n return buf[curChar++];\n }\n\n public int nextInt() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public String next() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n StringBuilder res = new StringBuilder();\n\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n\n if (filter != null)\n return filter.isSpaceChar(c);\n\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 public int[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = nextInt();\n }\n return array;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\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.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskA solver = new TaskA();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskA {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n=in.nextInt();\n HashMap<Integer,Integer> h=new HashMap<>();\n for(int i=0;i<n-1;++i) {\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }\n for(int i=1;i<=n;++i) {\n \th.put(i, 1+h.getOrDefault(i, 0));\n }\n for(int i=1;i<=n;++i) {\n \tout.println(h.get(i)-1);\n }\n }\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n\n curChar = 0;\n\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n\n return buf[curChar++];\n }\n\n public int nextInt() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public String next() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n StringBuilder res = new StringBuilder();\n\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n\n if (filter != null)\n return filter.isSpaceChar(c);\n\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 public int[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = nextInt();\n }\n return array;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskA solver = new TaskA();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskA solver = new TaskA();\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",
"FastReader in = new FastReader(inputStream);",
"in",
"new FastReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"TaskA solver = new TaskA();",
"solver",
"new TaskA()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class TaskA {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n=in.nextInt();\n HashMap<Integer,Integer> h=new HashMap<>();\n for(int i=0;i<n-1;++i) {\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }\n for(int i=1;i<=n;++i) {\n \th.put(i, 1+h.getOrDefault(i, 0));\n }\n for(int i=1;i<=n;++i) {\n \tout.println(h.get(i)-1);\n }\n }\n }",
"TaskA",
"public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n=in.nextInt();\n HashMap<Integer,Integer> h=new HashMap<>();\n for(int i=0;i<n-1;++i) {\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }\n for(int i=1;i<=n;++i) {\n \th.put(i, 1+h.getOrDefault(i, 0));\n }\n for(int i=1;i<=n;++i) {\n \tout.println(h.get(i)-1);\n }\n }",
"solve",
"{\n int n=in.nextInt();\n HashMap<Integer,Integer> h=new HashMap<>();\n for(int i=0;i<n-1;++i) {\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }\n for(int i=1;i<=n;++i) {\n \th.put(i, 1+h.getOrDefault(i, 0));\n }\n for(int i=1;i<=n;++i) {\n \tout.println(h.get(i)-1);\n }\n }",
"int n=in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"HashMap<Integer,Integer> h=new HashMap<>();",
"h",
"new HashMap<>()",
"for(int i=0;i<n-1;++i) {\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-1",
"i",
"n-1",
"n",
"1",
"++i",
"++i",
"i",
"{\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }",
"{\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }",
"int x=in.nextInt();",
"x",
"in.nextInt()",
"in.nextInt",
"in",
"h.put(x,1+h.getOrDefault(x, 0))",
"h.put",
"h",
"x",
"1+h.getOrDefault(x, 0)",
"1",
"h.getOrDefault(x, 0)",
"h.getOrDefault",
"h",
"x",
"0",
"for(int i=1;i<=n;++i) {\n \th.put(i, 1+h.getOrDefault(i, 0));\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"++i",
"++i",
"i",
"{\n \th.put(i, 1+h.getOrDefault(i, 0));\n }",
"{\n \th.put(i, 1+h.getOrDefault(i, 0));\n }",
"h.put(i, 1+h.getOrDefault(i, 0))",
"h.put",
"h",
"i",
"1+h.getOrDefault(i, 0)",
"1",
"h.getOrDefault(i, 0)",
"h.getOrDefault",
"h",
"i",
"0",
"for(int i=1;i<=n;++i) {\n \tout.println(h.get(i)-1);\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"++i",
"++i",
"i",
"{\n \tout.println(h.get(i)-1);\n }",
"{\n \tout.println(h.get(i)-1);\n }",
"out.println(h.get(i)-1)",
"out.println",
"out",
"h.get(i)-1",
"h.get(i)",
"h.get",
"h",
"i",
"1",
"int testNumber",
"testNumber",
"FastReader in",
"in",
"PrintWriter out",
"out",
"static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n\n curChar = 0;\n\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n\n return buf[curChar++];\n }\n\n public int nextInt() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public String next() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n StringBuilder res = new StringBuilder();\n\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n\n if (filter != null)\n return filter.isSpaceChar(c);\n\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 public int[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = nextInt();\n }\n return array;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n }",
"FastReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private FastReader.SpaceCharFilter filter;",
"filter",
"public FastReader(InputStream stream) {\n this.stream = stream;\n }",
"FastReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int read() {\n\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n\n curChar = 0;\n\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n\n return buf[curChar++];\n }",
"read",
"{\n\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n\n curChar = 0;\n\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n\n return buf[curChar++];\n }",
"if (numChars == -1)\n throw new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n\n curChar = 0;\n\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n\n curChar = 0;\n\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\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;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }",
"nextInt",
"{\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n c = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"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 }\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();",
"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 = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public String next() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n StringBuilder res = new StringBuilder();\n\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }",
"next",
"{\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n StringBuilder res = new StringBuilder();\n\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n c = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res.appendCodePoint(c);\n c = read();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public boolean isSpaceChar(int c) {\n\n if (filter != null)\n return filter.isSpaceChar(c);\n\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\n\n if (filter != null)\n return filter.isSpaceChar(c);\n\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"if (filter != null)\n 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",
"public int[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = nextInt();\n }\n return array;\n }",
"readIntArray",
"{\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = nextInt();\n }\n return array;\n }",
"int[] array = new int[size];",
"array",
"new int[size]",
"size",
"for (int i = 0; i < size; i++) {\n array[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n array[i] = nextInt();\n }",
"{\n array[i] = nextInt();\n }",
"array[i] = nextInt()",
"array[i]",
"array",
"i",
"nextInt()",
"nextInt",
"return array;",
"array",
"int size",
"size",
"public 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",
"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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskA solver = new TaskA();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskA {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n=in.nextInt();\n HashMap<Integer,Integer> h=new HashMap<>();\n for(int i=0;i<n-1;++i) {\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }\n for(int i=1;i<=n;++i) {\n \th.put(i, 1+h.getOrDefault(i, 0));\n }\n for(int i=1;i<=n;++i) {\n \tout.println(h.get(i)-1);\n }\n }\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n\n curChar = 0;\n\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n\n return buf[curChar++];\n }\n\n public int nextInt() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public String next() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n StringBuilder res = new StringBuilder();\n\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n\n if (filter != null)\n return filter.isSpaceChar(c);\n\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 public int[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = nextInt();\n }\n return array;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskA solver = new TaskA();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskA {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n=in.nextInt();\n HashMap<Integer,Integer> h=new HashMap<>();\n for(int i=0;i<n-1;++i) {\n \tint x=in.nextInt();\n \th.put(x,1+h.getOrDefault(x, 0));\n }\n for(int i=1;i<=n;++i) {\n \th.put(i, 1+h.getOrDefault(i, 0));\n }\n for(int i=1;i<=n;++i) {\n \tout.println(h.get(i)-1);\n }\n }\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n\n if (numChars == -1)\n throw new InputMismatchException();\n\n if (curChar >= numChars) {\n\n curChar = 0;\n\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n\n if (numChars <= 0)\n return -1;\n }\n\n return buf[curChar++];\n }\n\n public int nextInt() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public String next() {\n\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n StringBuilder res = new StringBuilder();\n\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n\n if (filter != null)\n return filter.isSpaceChar(c);\n\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 public int[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = nextInt();\n }\n return array;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"Main"
] |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
FastReader in = new FastReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
TaskA solver = new TaskA();
solver.solve(1, in, out);
out.close();
}
static class TaskA {
public void solve(int testNumber, FastReader in, PrintWriter out) {
int n=in.nextInt();
HashMap<Integer,Integer> h=new HashMap<>();
for(int i=0;i<n-1;++i) {
int x=in.nextInt();
h.put(x,1+h.getOrDefault(x, 0));
}
for(int i=1;i<=n;++i) {
h.put(i, 1+h.getOrDefault(i, 0));
}
for(int i=1;i<=n;++i) {
out.println(h.get(i)-1);
}
}
}
static class FastReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private FastReader.SpaceCharFilter filter;
public FastReader(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 nextInt() {
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;
}
public String next() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
}
while (!isSpaceChar(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;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
public int[] readIntArray(int size) {
int[] array = new int[size];
for (int i = 0; i < size; i++) {
array[i] = nextInt();
}
return array;
}
public long nextLong() {
return Long.parseLong(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,
4,
18,
13,
13,
41,
13,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
40,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
91,
5
],
[
91,
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
],
[
24,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
38,
48
],
[
48,
49
],
[
49,
50
],
[
38,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
58,
60
],
[
52,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
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
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
6,
88
],
[
88,
89
],
[
0,
90
],
[
90,
91
],
[
90,
92
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n String data1 = sc.nextLine();\n String data2 = sc.nextLine();\n \n int n = Integer.parseInt(data1);\n \n String[] array2 = data2.split(\" \");\n \n int[] shain = new int[n];\n \n for(int i = 0; i < array2.length; i++)\n {\n int buf = Integer.parseInt(array2[i]);\n shain[buf - 1] ++;\n }\n \n for(int j = 0; j < n; j++)\n {\n System.out.println(shain[j]);\n }\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n String data1 = sc.nextLine();\n String data2 = sc.nextLine();\n \n int n = Integer.parseInt(data1);\n \n String[] array2 = data2.split(\" \");\n \n int[] shain = new int[n];\n \n for(int i = 0; i < array2.length; i++)\n {\n int buf = Integer.parseInt(array2[i]);\n shain[buf - 1] ++;\n }\n \n for(int j = 0; j < n; j++)\n {\n System.out.println(shain[j]);\n }\n \n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n String data1 = sc.nextLine();\n String data2 = sc.nextLine();\n \n int n = Integer.parseInt(data1);\n \n String[] array2 = data2.split(\" \");\n \n int[] shain = new int[n];\n \n for(int i = 0; i < array2.length; i++)\n {\n int buf = Integer.parseInt(array2[i]);\n shain[buf - 1] ++;\n }\n \n for(int j = 0; j < n; j++)\n {\n System.out.println(shain[j]);\n }\n \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String data1 = sc.nextLine();\n String data2 = sc.nextLine();\n \n int n = Integer.parseInt(data1);\n \n String[] array2 = data2.split(\" \");\n \n int[] shain = new int[n];\n \n for(int i = 0; i < array2.length; i++)\n {\n int buf = Integer.parseInt(array2[i]);\n shain[buf - 1] ++;\n }\n \n for(int j = 0; j < n; j++)\n {\n System.out.println(shain[j]);\n }\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String data1 = sc.nextLine();",
"data1",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String data2 = sc.nextLine();",
"data2",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int n = Integer.parseInt(data1);",
"n",
"Integer.parseInt(data1)",
"Integer.parseInt",
"Integer",
"data1",
"String[] array2 = data2.split(\" \");",
"array2",
"data2.split(\" \")",
"data2.split",
"data2",
"\" \"",
"int[] shain = new int[n];",
"shain",
"new int[n]",
"n",
"for(int i = 0; i < array2.length; i++)\n {\n int buf = Integer.parseInt(array2[i]);\n shain[buf - 1] ++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < array2.length",
"i",
"array2.length",
"array2",
"array2.length",
"i++",
"i++",
"i",
"{\n int buf = Integer.parseInt(array2[i]);\n shain[buf - 1] ++;\n }",
"{\n int buf = Integer.parseInt(array2[i]);\n shain[buf - 1] ++;\n }",
"int buf = Integer.parseInt(array2[i]);",
"buf",
"Integer.parseInt(array2[i])",
"Integer.parseInt",
"Integer",
"array2[i]",
"array2",
"i",
"shain[buf - 1] ++",
"shain[buf - 1]",
"shain",
"buf - 1",
"buf",
"1",
"for(int j = 0; j < n; j++)\n {\n System.out.println(shain[j]);\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n System.out.println(shain[j]);\n }",
"{\n System.out.println(shain[j]);\n }",
"System.out.println(shain[j])",
"System.out.println",
"System.out",
"System",
"System.out",
"shain[j]",
"shain",
"j",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n String data1 = sc.nextLine();\n String data2 = sc.nextLine();\n \n int n = Integer.parseInt(data1);\n \n String[] array2 = data2.split(\" \");\n \n int[] shain = new int[n];\n \n for(int i = 0; i < array2.length; i++)\n {\n int buf = Integer.parseInt(array2[i]);\n shain[buf - 1] ++;\n }\n \n for(int j = 0; j < n; j++)\n {\n System.out.println(shain[j]);\n }\n \n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n String data1 = sc.nextLine();\n String data2 = sc.nextLine();\n \n int n = Integer.parseInt(data1);\n \n String[] array2 = data2.split(\" \");\n \n int[] shain = new int[n];\n \n for(int i = 0; i < array2.length; i++)\n {\n int buf = Integer.parseInt(array2[i]);\n shain[buf - 1] ++;\n }\n \n for(int j = 0; j < n; j++)\n {\n System.out.println(shain[j]);\n }\n \n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String data1 = sc.nextLine();
String data2 = sc.nextLine();
int n = Integer.parseInt(data1);
String[] array2 = data2.split(" ");
int[] shain = new int[n];
for(int i = 0; i < array2.length; i++)
{
int buf = Integer.parseInt(array2[i]);
shain[buf - 1] ++;
}
for(int j = 0; j < n; j++)
{
System.out.println(shain[j]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
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,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
18,
13,
18,
13,
13,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
17,
4,
18,
13,
18,
13,
13,
13,
30,
4,
18,
13,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
18,
13,
13,
30,
41,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
140,
5
],
[
140,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
44,
54
],
[
54,
55
],
[
55,
56
],
[
44,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
63,
65
],
[
59,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
69,
76
],
[
66,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
77,
83
],
[
59,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
85,
91
],
[
8,
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
],
[
108,
111
],
[
107,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
112,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
107,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
8,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
6,
137
],
[
137,
138
],
[
0,
139
],
[
139,
140
],
[
139,
141
]
] |
[
"import java.util.*;\n\npublic class Main\n{\n\tpublic static void main (String[] args) \n\t{\n\t\t\n\t\tScanner scn = new Scanner(System.in);\n Map<Integer,Integer> map = new HashMap<Integer,Integer>();\n int n = scn.nextInt();\n int []arr = new int[n];\n for(int i=1;i<n;i++){\n arr[i] = scn.nextInt();\n }\n for(int i=1;i<arr.length;i++){\n if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n } \n }\n \n for(int i=1;i<arr.length;i++){\n \tif(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);\n \n }\n System.out.println(0);\n\t\t\n\t\t\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main\n{\n\tpublic static void main (String[] args) \n\t{\n\t\t\n\t\tScanner scn = new Scanner(System.in);\n Map<Integer,Integer> map = new HashMap<Integer,Integer>();\n int n = scn.nextInt();\n int []arr = new int[n];\n for(int i=1;i<n;i++){\n arr[i] = scn.nextInt();\n }\n for(int i=1;i<arr.length;i++){\n if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n } \n }\n \n for(int i=1;i<arr.length;i++){\n \tif(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);\n \n }\n System.out.println(0);\n\t\t\n\t\t\n\t}\n}",
"Main",
"public static void main (String[] args) \n\t{\n\t\t\n\t\tScanner scn = new Scanner(System.in);\n Map<Integer,Integer> map = new HashMap<Integer,Integer>();\n int n = scn.nextInt();\n int []arr = new int[n];\n for(int i=1;i<n;i++){\n arr[i] = scn.nextInt();\n }\n for(int i=1;i<arr.length;i++){\n if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n } \n }\n \n for(int i=1;i<arr.length;i++){\n \tif(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);\n \n }\n System.out.println(0);\n\t\t\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tScanner scn = new Scanner(System.in);\n Map<Integer,Integer> map = new HashMap<Integer,Integer>();\n int n = scn.nextInt();\n int []arr = new int[n];\n for(int i=1;i<n;i++){\n arr[i] = scn.nextInt();\n }\n for(int i=1;i<arr.length;i++){\n if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n } \n }\n \n for(int i=1;i<arr.length;i++){\n \tif(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);\n \n }\n System.out.println(0);\n\t\t\n\t\t\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"Map<Integer,Integer> map = new HashMap<Integer,Integer>();",
"map",
"new HashMap<Integer,Integer>()",
"int n = scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int []arr = new int[n];",
"arr",
"new int[n]",
"n",
"for(int i=1;i<n;i++){\n arr[i] = scn.nextInt();\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = scn.nextInt();\n }",
"{\n arr[i] = scn.nextInt();\n }",
"arr[i] = scn.nextInt()",
"arr[i]",
"arr",
"i",
"scn.nextInt()",
"scn.nextInt",
"scn",
"for(int i=1;i<arr.length;i++){\n if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n } \n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n } \n }",
"{\n if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n } \n }",
"if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n }",
"map.containsKey(arr[i])",
"map.containsKey",
"map",
"arr[i]",
"arr",
"i",
"{\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }",
"int val = map.get(arr[i]) + 1;",
"val",
"map.get(arr[i]) + 1",
"map.get(arr[i])",
"map.get",
"map",
"arr[i]",
"arr",
"i",
"1",
"map.put(arr[i],val)",
"map.put",
"map",
"arr[i]",
"arr",
"i",
"val",
"{\n map.put(arr[i],1);\n }",
"map.put(arr[i],1)",
"map.put",
"map",
"arr[i]",
"arr",
"i",
"1",
"for(int i=1;i<arr.length;i++){\n \tif(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);\n \n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n \tif(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);\n \n }",
"{\n \tif(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);\n \n }",
"if(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);",
"map.containsKey(i)",
"map.containsKey",
"map",
"i",
"{\n int val = map.get(i);\n System.out.println(val);\n \t}",
"int val = map.get(i);",
"val",
"map.get(i)",
"map.get",
"map",
"i",
"System.out.println(val)",
"System.out.println",
"System.out",
"System",
"System.out",
"val",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"String[] args",
"args",
"public class Main\n{\n\tpublic static void main (String[] args) \n\t{\n\t\t\n\t\tScanner scn = new Scanner(System.in);\n Map<Integer,Integer> map = new HashMap<Integer,Integer>();\n int n = scn.nextInt();\n int []arr = new int[n];\n for(int i=1;i<n;i++){\n arr[i] = scn.nextInt();\n }\n for(int i=1;i<arr.length;i++){\n if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n } \n }\n \n for(int i=1;i<arr.length;i++){\n \tif(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);\n \n }\n System.out.println(0);\n\t\t\n\t\t\n\t}\n}",
"public class Main\n{\n\tpublic static void main (String[] args) \n\t{\n\t\t\n\t\tScanner scn = new Scanner(System.in);\n Map<Integer,Integer> map = new HashMap<Integer,Integer>();\n int n = scn.nextInt();\n int []arr = new int[n];\n for(int i=1;i<n;i++){\n arr[i] = scn.nextInt();\n }\n for(int i=1;i<arr.length;i++){\n if(map.containsKey(arr[i])){\n int val = map.get(arr[i]) + 1;\n map.put(arr[i],val);\n }else{\n map.put(arr[i],1);\n } \n }\n \n for(int i=1;i<arr.length;i++){\n \tif(map.containsKey(i)){\n int val = map.get(i);\n System.out.println(val);\n \t}\n else\n System.out.println(0);\n \n }\n System.out.println(0);\n\t\t\n\t\t\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main
{
public static void main (String[] args)
{
Scanner scn = new Scanner(System.in);
Map<Integer,Integer> map = new HashMap<Integer,Integer>();
int n = scn.nextInt();
int []arr = new int[n];
for(int i=1;i<n;i++){
arr[i] = scn.nextInt();
}
for(int i=1;i<arr.length;i++){
if(map.containsKey(arr[i])){
int val = map.get(arr[i]) + 1;
map.put(arr[i],val);
}else{
map.put(arr[i],1);
}
}
for(int i=1;i<arr.length;i++){
if(map.containsKey(i)){
int val = map.get(i);
System.out.println(val);
}
else
System.out.println(0);
}
System.out.println(0);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
124,
5
],
[
124,
6
],
[
6,
7
],
[
124,
8
],
[
8,
9
],
[
124,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
124,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
23,
32
],
[
32,
33
],
[
32,
34
],
[
23,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
36,
46
],
[
46,
47
],
[
47,
48
],
[
36,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
23,
58
],
[
58,
59
],
[
59,
60
],
[
23,
61
],
[
61,
62
],
[
124,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
70,
74
],
[
65,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
75,
87
],
[
87,
88
],
[
88,
89
],
[
75,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
65,
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
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
0,
123
],
[
123,
124
],
[
123,
125
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n int n;\n int a[];\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n a = new int[n];\n for (int i = 0; i < n-1; i++) {\n a[i] = sc.nextInt();\n }\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n int[] s = new int[n];\n Arrays.fill(s, 0);\n for (int i = 0; i < a.length-1; i++) {\n s[a[i] - 1]++;\n }\n for (int i = 0; i < s.length; i++) {\n System.out.println(s[i]); \n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n int n;\n int a[];\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n a = new int[n];\n for (int i = 0; i < n-1; i++) {\n a[i] = sc.nextInt();\n }\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n int[] s = new int[n];\n Arrays.fill(s, 0);\n for (int i = 0; i < a.length-1; i++) {\n s[a[i] - 1]++;\n }\n for (int i = 0; i < s.length; i++) {\n System.out.println(s[i]); \n }\n }\n}",
"Main",
"// 変数一覧\n int n;",
"n",
"int a[];",
"a",
"public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }",
"main",
"{\n Main main = new Main();\n main.run();\n }",
"Main main = new Main();",
"main",
"new Main()",
"main.run()",
"main.run",
"main",
"String[] args",
"args",
"public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n a = new int[n];\n for (int i = 0; i < n-1; i++) {\n a[i] = sc.nextInt();\n }\n sc.close();\n\n // 解答処理\n solve();\n }",
"run",
"{\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n a = new int[n];\n for (int i = 0; i < n-1; i++) {\n a[i] = sc.nextInt();\n }\n sc.close();\n\n // 解答処理\n solve();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a = new int[n]",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n-1; i++) {\n a[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n a[i] = sc.nextInt();\n }",
"{\n a[i] = sc.nextInt();\n }",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"solve()",
"solve",
"private void solve() {\n int[] s = new int[n];\n Arrays.fill(s, 0);\n for (int i = 0; i < a.length-1; i++) {\n s[a[i] - 1]++;\n }\n for (int i = 0; i < s.length; i++) {\n System.out.println(s[i]); \n }\n }",
"solve",
"{\n int[] s = new int[n];\n Arrays.fill(s, 0);\n for (int i = 0; i < a.length-1; i++) {\n s[a[i] - 1]++;\n }\n for (int i = 0; i < s.length; i++) {\n System.out.println(s[i]); \n }\n }",
"int[] s = new int[n];",
"s",
"new int[n]",
"n",
"Arrays.fill(s, 0)",
"Arrays.fill",
"Arrays",
"s",
"0",
"for (int i = 0; i < a.length-1; i++) {\n s[a[i] - 1]++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a.length-1",
"i",
"a.length-1",
"a.length",
"a",
"a.length",
"1",
"i++",
"i++",
"i",
"{\n s[a[i] - 1]++;\n }",
"{\n s[a[i] - 1]++;\n }",
"s[a[i] - 1]++",
"s[a[i] - 1]",
"s",
"a[i] - 1",
"a[i]",
"a",
"i",
"1",
"for (int i = 0; i < s.length; i++) {\n System.out.println(s[i]); \n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length",
"i",
"s.length",
"s",
"s.length",
"i++",
"i++",
"i",
"{\n System.out.println(s[i]); \n }",
"{\n System.out.println(s[i]); \n }",
"System.out.println(s[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"s[i]",
"s",
"i",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n int n;\n int a[];\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n a = new int[n];\n for (int i = 0; i < n-1; i++) {\n a[i] = sc.nextInt();\n }\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n int[] s = new int[n];\n Arrays.fill(s, 0);\n for (int i = 0; i < a.length-1; i++) {\n s[a[i] - 1]++;\n }\n for (int i = 0; i < s.length; i++) {\n System.out.println(s[i]); \n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n int n;\n int a[];\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n n = sc.nextInt();\n a = new int[n];\n for (int i = 0; i < n-1; i++) {\n a[i] = sc.nextInt();\n }\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n int[] s = new int[n];\n Arrays.fill(s, 0);\n for (int i = 0; i < a.length-1; i++) {\n s[a[i] - 1]++;\n }\n for (int i = 0; i < s.length; i++) {\n System.out.println(s[i]); \n }\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.run();
}
// 変数一覧
int n;
int a[];
public void run() {
// 入力情報取得
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
a = new int[n];
for (int i = 0; i < n-1; i++) {
a[i] = sc.nextInt();
}
sc.close();
// 解答処理
solve();
}
private void solve() {
int[] s = new int[n];
Arrays.fill(s, 0);
for (int i = 0; i < a.length-1; i++) {
s[a[i] - 1]++;
}
for (int i = 0; i < s.length; i++) {
System.out.println(s[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
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,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
68,
5
],
[
68,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
39,
43
],
[
8,
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
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
6,
65
],
[
65,
66
],
[
0,
67
],
[
67,
68
],
[
67,
69
]
] |
[
"import java .util.*;\n\npublic class Main {\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint[] sum = new int[N];\n\tfor (int i=0; i<N-1; i++) {\n\t sum[sc.nextInt()-1]++;\n\t}\n\tfor (int i=0; i<N; i++) {\n\t System.out.println(sum[i]);\n\t}\n }\n}",
"import java .util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint[] sum = new int[N];\n\tfor (int i=0; i<N-1; i++) {\n\t sum[sc.nextInt()-1]++;\n\t}\n\tfor (int i=0; i<N; i++) {\n\t System.out.println(sum[i]);\n\t}\n }\n}",
"Main",
"public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint[] sum = new int[N];\n\tfor (int i=0; i<N-1; i++) {\n\t sum[sc.nextInt()-1]++;\n\t}\n\tfor (int i=0; i<N; i++) {\n\t System.out.println(sum[i]);\n\t}\n }",
"main",
"{\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint[] sum = new int[N];\n\tfor (int i=0; i<N-1; i++) {\n\t sum[sc.nextInt()-1]++;\n\t}\n\tfor (int i=0; i<N; i++) {\n\t System.out.println(sum[i]);\n\t}\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] sum = new int[N];",
"sum",
"new int[N]",
"N",
"for (int i=0; i<N-1; i++) {\n\t sum[sc.nextInt()-1]++;\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n\t sum[sc.nextInt()-1]++;\n\t}",
"{\n\t sum[sc.nextInt()-1]++;\n\t}",
"sum[sc.nextInt()-1]++",
"sum[sc.nextInt()-1]",
"sum",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"for (int i=0; i<N; i++) {\n\t System.out.println(sum[i]);\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t System.out.println(sum[i]);\n\t}",
"{\n\t System.out.println(sum[i]);\n\t}",
"System.out.println(sum[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"sum[i]",
"sum",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint[] sum = new int[N];\n\tfor (int i=0; i<N-1; i++) {\n\t sum[sc.nextInt()-1]++;\n\t}\n\tfor (int i=0; i<N; i++) {\n\t System.out.println(sum[i]);\n\t}\n }\n}",
"public class Main {\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint[] sum = new int[N];\n\tfor (int i=0; i<N-1; i++) {\n\t sum[sc.nextInt()-1]++;\n\t}\n\tfor (int i=0; i<N; i++) {\n\t System.out.println(sum[i]);\n\t}\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[] sum = new int[N];
for (int i=0; i<N-1; i++) {
sum[sc.nextInt()-1]++;
}
for (int i=0; i<N; i++) {
System.out.println(sum[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
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,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
116,
5
],
[
116,
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
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
27,
37
],
[
37,
38
],
[
38,
39
],
[
27,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
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
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
8,
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
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
90,
100
],
[
100,
101
],
[
101,
102
],
[
90,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
6,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
] |
[
"import 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 stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint[] A = new int[N - 1];\n\t\tint[] ans = new int[N];\n\t\tfor(int i = 0; i < N - 1; i ++) {\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tans[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < A.length; i ++) {\n\t\t\tans[A[i] - 1] ++;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < ans.length; i ++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n}",
"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 stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint[] A = new int[N - 1];\n\t\tint[] ans = new int[N];\n\t\tfor(int i = 0; i < N - 1; i ++) {\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tans[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < A.length; i ++) {\n\t\t\tans[A[i] - 1] ++;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < ans.length; i ++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint[] A = new int[N - 1];\n\t\tint[] ans = new int[N];\n\t\tfor(int i = 0; i < N - 1; i ++) {\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tans[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < A.length; i ++) {\n\t\t\tans[A[i] - 1] ++;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < ans.length; i ++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint[] A = new int[N - 1];\n\t\tint[] ans = new int[N];\n\t\tfor(int i = 0; i < N - 1; i ++) {\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tans[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < A.length; i ++) {\n\t\t\tans[A[i] - 1] ++;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < ans.length; i ++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int N = stdIn.nextInt();",
"N",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int[] A = new int[N - 1];",
"A",
"new int[N - 1]",
"N - 1",
"N",
"1",
"int[] ans = new int[N];",
"ans",
"new int[N]",
"N",
"for(int i = 0; i < N - 1; i ++) {\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N - 1",
"i",
"N - 1",
"N",
"1",
"i ++",
"i ++",
"i",
"{\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}",
"{\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}",
"A[i] = stdIn.nextInt()",
"A[i]",
"A",
"i",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"for(int i = 0; i < N; i ++) {\n\t\t\tans[i] = 0;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i ++",
"i ++",
"i",
"{\n\t\t\tans[i] = 0;\n\t\t}",
"{\n\t\t\tans[i] = 0;\n\t\t}",
"ans[i] = 0",
"ans[i]",
"ans",
"i",
"0",
"for(int i = 0; i < A.length; i ++) {\n\t\t\tans[A[i] - 1] ++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < A.length",
"i",
"A.length",
"A",
"A.length",
"i ++",
"i ++",
"i",
"{\n\t\t\tans[A[i] - 1] ++;\n\t\t}",
"{\n\t\t\tans[A[i] - 1] ++;\n\t\t}",
"ans[A[i] - 1] ++",
"ans[A[i] - 1]",
"ans",
"A[i] - 1",
"A[i]",
"A",
"i",
"1",
"for(int i = 0; i < ans.length; i ++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < ans.length",
"i",
"ans.length",
"ans",
"ans.length",
"i ++",
"i ++",
"i",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"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 stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint[] A = new int[N - 1];\n\t\tint[] ans = new int[N];\n\t\tfor(int i = 0; i < N - 1; i ++) {\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tans[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < A.length; i ++) {\n\t\t\tans[A[i] - 1] ++;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < ans.length; i ++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint[] A = new int[N - 1];\n\t\tint[] ans = new int[N];\n\t\tfor(int i = 0; i < N - 1; i ++) {\n\t\t\tA[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tans[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < A.length; i ++) {\n\t\t\tans[A[i] - 1] ++;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < ans.length; i ++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner stdIn = new Scanner(System.in);
int N = stdIn.nextInt();
int[] A = new int[N - 1];
int[] ans = new int[N];
for(int i = 0; i < N - 1; i ++) {
A[i] = stdIn.nextInt();
}
for(int i = 0; i < N; i ++) {
ans[i] = 0;
}
for(int i = 0; i < A.length; i ++) {
ans[A[i] - 1] ++;
}
for(int i = 0; i < ans.length; i ++) {
System.out.println(ans[i]);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
40,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
13,
18,
13,
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,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
161,
8
],
[
161,
9
],
[
9,
10
],
[
9,
11
],
[
161,
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
],
[
26,
27
],
[
26,
28
],
[
14,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
29,
39
],
[
39,
40
],
[
40,
41
],
[
29,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
14,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
14,
67
],
[
67,
68
],
[
68,
69
],
[
12,
70
],
[
70,
71
],
[
161,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
72,
76
],
[
76,
77
],
[
72,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
72,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
87,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
97,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
86,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
72,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
119,
120
],
[
72,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
128,
129
],
[
72,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
137,
138
],
[
72,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
141,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
145,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
141,
158
],
[
158,
159
],
[
0,
160
],
[
160,
161
],
[
160,
162
]
] |
[
"import java.io.*;\nimport java.util.*;\npublic class Main {\nstatic PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] args) {\n\t// write your code here\n MyScanner mc = new MyScanner();\n int N = mc.nextInt();\n int [] arr = new int[N+1];\n for (int i=0;i<N-1;i++)\n arr[mc.nextInt()]++;\n for (int i=1;i<=N;i++)\n pw.println(arr[i]);\n pw.flush();\n }\n\npublic static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }\n\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\nstatic PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] args) {\n\t// write your code here\n MyScanner mc = new MyScanner();\n int N = mc.nextInt();\n int [] arr = new int[N+1];\n for (int i=0;i<N-1;i++)\n arr[mc.nextInt()]++;\n for (int i=1;i<=N;i++)\n pw.println(arr[i]);\n pw.flush();\n }\n\npublic static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }\n\n}",
"Main",
"static PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));",
"pw",
"new PrintWriter(new OutputStreamWriter(System.out))",
"public static void main(String[] args) {\n\t// write your code here\n MyScanner mc = new MyScanner();\n int N = mc.nextInt();\n int [] arr = new int[N+1];\n for (int i=0;i<N-1;i++)\n arr[mc.nextInt()]++;\n for (int i=1;i<=N;i++)\n pw.println(arr[i]);\n pw.flush();\n }",
"main",
"{\n\t// write your code here\n MyScanner mc = new MyScanner();\n int N = mc.nextInt();\n int [] arr = new int[N+1];\n for (int i=0;i<N-1;i++)\n arr[mc.nextInt()]++;\n for (int i=1;i<=N;i++)\n pw.println(arr[i]);\n pw.flush();\n }",
"MyScanner mc = new MyScanner();",
"mc",
"new MyScanner()",
"int N = mc.nextInt();",
"N",
"mc.nextInt()",
"mc.nextInt",
"mc",
"int [] arr = new int[N+1];",
"arr",
"new int[N+1]",
"N+1",
"N",
"1",
"for (int i=0;i<N-1;i++)\n arr[mc.nextInt()]++;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"arr[mc.nextInt()]++;",
"arr[mc.nextInt()]++",
"arr[mc.nextInt()]",
"arr",
"mc.nextInt()",
"mc.nextInt",
"mc",
"for (int i=1;i<=N;i++)\n pw.println(arr[i]);",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=N",
"i",
"N",
"i++",
"i++",
"i",
"pw.println(arr[i]);",
"pw.println(arr[i])",
"pw.println",
"pw",
"arr[i]",
"arr",
"i",
"pw.flush()",
"pw.flush",
"pw",
"String[] args",
"args",
"public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }",
"MyScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"MyScanner",
"{\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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }",
"nextLine",
"{\n String str = \"\";\n\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }",
"catch (IOException e) {\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 {\nstatic PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] args) {\n\t// write your code here\n MyScanner mc = new MyScanner();\n int N = mc.nextInt();\n int [] arr = new int[N+1];\n for (int i=0;i<N-1;i++)\n arr[mc.nextInt()]++;\n for (int i=1;i<=N;i++)\n pw.println(arr[i]);\n pw.flush();\n }\n\npublic static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }\n\n}",
"public class Main {\nstatic PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] args) {\n\t// write your code here\n MyScanner mc = new MyScanner();\n int N = mc.nextInt();\n int [] arr = new int[N+1];\n for (int i=0;i<N-1;i++)\n arr[mc.nextInt()]++;\n for (int i=1;i<=N;i++)\n pw.println(arr[i]);\n pw.flush();\n }\n\npublic static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }\n\n}",
"Main"
] |
import java.io.*;
import java.util.*;
public class Main {
static PrintWriter pw =new PrintWriter(new OutputStreamWriter(System.out));
public static void main(String[] args) {
// write your code here
MyScanner mc = new MyScanner();
int N = mc.nextInt();
int [] arr = new int[N+1];
for (int i=0;i<N-1;i++)
arr[mc.nextInt()]++;
for (int i=1;i<=N;i++)
pw.println(arr[i]);
pw.flush();
}
public static class MyScanner {
BufferedReader br;
StringTokenizer st;
public MyScanner() {
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,
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,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
18,
13,
18,
13,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
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,
0,
18,
13,
2,
13,
17,
17,
30,
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,
41,
13,
17,
14,
2,
18,
13,
13,
17,
30,
0,
13,
17,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
17,
41,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
2,
13,
13,
13,
23,
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,
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,
29,
4,
18,
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
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
],
[
0,
37
],
[
37,
38
],
[
37,
39
],
[
0,
40
],
[
261,
41
],
[
261,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
48,
50
],
[
44,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
44,
56
],
[
56,
57
],
[
56,
58
],
[
44,
60
],
[
60,
61
],
[
60,
62
],
[
44,
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
],
[
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
],
[
93,
99
],
[
92,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
100,
106
],
[
84,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
44,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
121,
129
],
[
129,
130
],
[
130,
131
],
[
121,
132
],
[
133,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
137,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
137,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
150,
152
],
[
133,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
153,
158
],
[
42,
159
],
[
159,
160
],
[
0,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
161,
165
],
[
165,
166
],
[
165,
167
],
[
161,
168
],
[
168,
169
],
[
168,
170
],
[
0,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
176,
180
],
[
180,
181
],
[
175,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
185,
187
],
[
183,
188
],
[
173,
189
],
[
189,
190
],
[
173,
191
],
[
191,
192
],
[
0,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
193,
197
],
[
197,
198
],
[
193,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
201,
205
],
[
205,
206
],
[
205,
207
],
[
199,
208
],
[
208,
209
],
[
193,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
213,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
212,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
193,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
231,
232
],
[
230,
233
],
[
233,
234
],
[
193,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
238,
239
],
[
239,
240
],
[
240,
241
],
[
239,
242
],
[
242,
243
],
[
193,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
248,
251
],
[
251,
252
],
[
193,
253
],
[
253,
254
],
[
253,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
0,
260
],
[
260,
261
],
[
260,
262
]
] |
[
"import javax.management.MBeanRegistration;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.lang.reflect.Array;\nimport java.util.StringTokenizer;\nimport java.util.Scanner;\nimport java.lang.*;\nimport java.io.*;\nimport java.util.*;\nimport java.lang.Integer;\nimport java.util.HashMap;\n\npublic class Main {\n // driver function to test the above functions\n public static void main(String args[]) throws IOException {\n\n Reader.init(System.in);\n int n= Reader.nextInt();\n int[] arr = new int[n];\n\n boolean[] veri = new boolean[n];\n for (int i=0; i<n-1\n ; i++){\n int val = Reader.nextInt();\n if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }\n }\n\n for (int i=0; i<n; i++){\n int val=0;\n if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }\n\n System.out.println(val);\n }\n\n }\n}\n\nclass Node{\n char val;\n Node nxt = null;\n Node prev=null;\n\n\n}\n\n\n\nclass solu{\n int gcd(int a, int b)\n {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n}\n\n/** Class for buffered reading int and double values */\nclass Reader {\n static BufferedReader reader;\n static StringTokenizer tokenizer;\n\n /** call this method to initialize reader for InputStream */\n static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }\n\n /** get next word */\n static String next() throws IOException {\n while ( ! tokenizer.hasMoreTokens() ) {\n //TODO add check for eof if necessary\n tokenizer = new StringTokenizer(\n reader.readLine() );\n }\n return tokenizer.nextToken();\n }\n\n static int nextInt() throws IOException {\n return Integer.parseInt( next() );\n }\n\n static long nextLong() throws IOException {\n return Long.parseLong( next() );\n }\n\n static double nextDouble() throws IOException {\n return Double.parseDouble( next() );\n }\n\n static String line() throws IOException {\n return reader.readLine();\n }\n}",
"import javax.management.MBeanRegistration;",
"MBeanRegistration",
"javax.management",
"import java.io.BufferedReader;",
"BufferedReader",
"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.lang.reflect.Array;",
"Array",
"java.lang.reflect",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.lang.Integer;",
"Integer",
"java.lang",
"import java.util.HashMap;",
"HashMap",
"java.util",
"public class Main {\n // driver function to test the above functions\n public static void main(String args[]) throws IOException {\n\n Reader.init(System.in);\n int n= Reader.nextInt();\n int[] arr = new int[n];\n\n boolean[] veri = new boolean[n];\n for (int i=0; i<n-1\n ; i++){\n int val = Reader.nextInt();\n if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }\n }\n\n for (int i=0; i<n; i++){\n int val=0;\n if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }\n\n System.out.println(val);\n }\n\n }\n}",
"Main",
"// driver function to test the above functions\n public static void main(String args[]) throws IOException {\n\n Reader.init(System.in);\n int n= Reader.nextInt();\n int[] arr = new int[n];\n\n boolean[] veri = new boolean[n];\n for (int i=0; i<n-1\n ; i++){\n int val = Reader.nextInt();\n if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }\n }\n\n for (int i=0; i<n; i++){\n int val=0;\n if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }\n\n System.out.println(val);\n }\n\n }",
"main",
"{\n\n Reader.init(System.in);\n int n= Reader.nextInt();\n int[] arr = new int[n];\n\n boolean[] veri = new boolean[n];\n for (int i=0; i<n-1\n ; i++){\n int val = Reader.nextInt();\n if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }\n }\n\n for (int i=0; i<n; i++){\n int val=0;\n if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }\n\n System.out.println(val);\n }\n\n }",
"Reader.init(System.in)",
"Reader.init",
"Reader",
"System.in",
"System",
"System.in",
"int n= Reader.nextInt();",
"n",
"Reader.nextInt()",
"Reader.nextInt",
"Reader",
"int[] arr = new int[n];",
"arr",
"new int[n]",
"n",
"boolean[] veri = new boolean[n];",
"veri",
"new boolean[n]",
"n",
"for (int i=0; i<n-1\n ; i++){\n int val = Reader.nextInt();\n if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n int val = Reader.nextInt();\n if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }\n }",
"{\n int val = Reader.nextInt();\n if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }\n }",
"int val = Reader.nextInt();",
"val",
"Reader.nextInt()",
"Reader.nextInt",
"Reader",
"if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }",
"veri[val-1]==false",
"veri[val-1]",
"veri",
"val-1",
"val",
"1",
"false",
"{\n arr[val-1] = 1;\n veri[val-1]= true;\n }",
"arr[val-1] = 1",
"arr[val-1]",
"arr",
"val-1",
"val",
"1",
"1",
"veri[val-1]= true",
"veri[val-1]",
"veri",
"val-1",
"val",
"1",
"true",
"{\n arr[val-1] = arr[val-1]+1;\n }",
"arr[val-1] = arr[val-1]+1",
"arr[val-1]",
"arr",
"val-1",
"val",
"1",
"arr[val-1]+1",
"arr[val-1]",
"arr",
"val-1",
"val",
"1",
"1",
"for (int i=0; i<n; i++){\n int val=0;\n if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }\n\n System.out.println(val);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int val=0;\n if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }\n\n System.out.println(val);\n }",
"{\n int val=0;\n if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }\n\n System.out.println(val);\n }",
"int val=0;",
"val",
"0",
"if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }",
"veri[i]==false",
"veri[i]",
"veri",
"i",
"false",
"{\n val=0;\n }",
"val=0",
"val",
"0",
"{\n val= arr[i];\n }",
"val= arr[i]",
"val",
"arr[i]",
"arr",
"i",
"System.out.println(val)",
"System.out.println",
"System.out",
"System",
"System.out",
"val",
"String args[]",
"args",
"class Node{\n char val;\n Node nxt = null;\n Node prev=null;\n\n\n}",
"Node",
"char val;",
"val",
"Node nxt = null;",
"nxt",
"null",
"Node prev=null;",
"prev",
"null",
"class solu{\n int gcd(int a, int b)\n {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n}",
"solu",
"int gcd(int a, int b)\n {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }",
"gcd",
"{\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }",
"if (a == 0)\n return b;",
"a == 0",
"a",
"0",
"return b;",
"b",
"return gcd(b % a, a);",
"gcd(b % a, a)",
"gcd",
"b % a",
"b",
"a",
"a",
"int a",
"a",
"int b",
"b",
"class Reader {\n static BufferedReader reader;\n static StringTokenizer tokenizer;\n\n /** call this method to initialize reader for InputStream */\n static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }\n\n /** get next word */\n static String next() throws IOException {\n while ( ! tokenizer.hasMoreTokens() ) {\n //TODO add check for eof if necessary\n tokenizer = new StringTokenizer(\n reader.readLine() );\n }\n return tokenizer.nextToken();\n }\n\n static int nextInt() throws IOException {\n return Integer.parseInt( next() );\n }\n\n static long nextLong() throws IOException {\n return Long.parseLong( next() );\n }\n\n static double nextDouble() throws IOException {\n return Double.parseDouble( next() );\n }\n\n static String line() throws IOException {\n return reader.readLine();\n }\n}",
"Reader",
"static BufferedReader reader;",
"reader",
"static StringTokenizer tokenizer;",
"tokenizer",
"/** call this method to initialize reader for InputStream */\n static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }",
"init",
"{\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }",
"reader = new BufferedReader(\n new InputStreamReader(input) )",
"reader",
"new BufferedReader(\n new InputStreamReader(input) )",
"tokenizer = new StringTokenizer(\"\")",
"tokenizer",
"new StringTokenizer(\"\")",
"InputStream input",
"input",
"/** get next word */\n static String next() throws IOException {\n while ( ! tokenizer.hasMoreTokens() ) {\n //TODO add check for eof if necessary\n tokenizer = new StringTokenizer(\n reader.readLine() );\n }\n return tokenizer.nextToken();\n }",
"next",
"{\n while ( ! tokenizer.hasMoreTokens() ) {\n //TODO add check for eof if necessary\n tokenizer = new StringTokenizer(\n reader.readLine() );\n }\n return tokenizer.nextToken();\n }",
"while ( ! tokenizer.hasMoreTokens() ) {\n //TODO add check for eof if necessary\n tokenizer = new StringTokenizer(\n reader.readLine() );\n }",
"! tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n //TODO add check for eof if necessary\n tokenizer = new StringTokenizer(\n reader.readLine() );\n }",
"tokenizer = new StringTokenizer(\n reader.readLine() )",
"tokenizer",
"new StringTokenizer(\n reader.readLine() )",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"static int nextInt() throws IOException {\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",
"static long nextLong() throws IOException {\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",
"static double nextDouble() throws IOException {\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",
"static String line() throws IOException {\n return reader.readLine();\n }",
"line",
"{\n return reader.readLine();\n }",
"return reader.readLine();",
"reader.readLine()",
"reader.readLine",
"reader",
"public class Main {\n // driver function to test the above functions\n public static void main(String args[]) throws IOException {\n\n Reader.init(System.in);\n int n= Reader.nextInt();\n int[] arr = new int[n];\n\n boolean[] veri = new boolean[n];\n for (int i=0; i<n-1\n ; i++){\n int val = Reader.nextInt();\n if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }\n }\n\n for (int i=0; i<n; i++){\n int val=0;\n if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }\n\n System.out.println(val);\n }\n\n }\n}",
"public class Main {\n // driver function to test the above functions\n public static void main(String args[]) throws IOException {\n\n Reader.init(System.in);\n int n= Reader.nextInt();\n int[] arr = new int[n];\n\n boolean[] veri = new boolean[n];\n for (int i=0; i<n-1\n ; i++){\n int val = Reader.nextInt();\n if (veri[val-1]==false){\n arr[val-1] = 1;\n veri[val-1]= true;\n }\n else {\n arr[val-1] = arr[val-1]+1;\n }\n }\n\n for (int i=0; i<n; i++){\n int val=0;\n if (veri[i]==false){\n val=0;\n }\n else {\n val= arr[i];\n }\n\n System.out.println(val);\n }\n\n }\n}",
"Main"
] |
import javax.management.MBeanRegistration;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.StringTokenizer;
import java.util.Scanner;
import java.lang.*;
import java.io.*;
import java.util.*;
import java.lang.Integer;
import java.util.HashMap;
public class Main {
// driver function to test the above functions
public static void main(String args[]) throws IOException {
Reader.init(System.in);
int n= Reader.nextInt();
int[] arr = new int[n];
boolean[] veri = new boolean[n];
for (int i=0; i<n-1
; i++){
int val = Reader.nextInt();
if (veri[val-1]==false){
arr[val-1] = 1;
veri[val-1]= true;
}
else {
arr[val-1] = arr[val-1]+1;
}
}
for (int i=0; i<n; i++){
int val=0;
if (veri[i]==false){
val=0;
}
else {
val= arr[i];
}
System.out.println(val);
}
}
}
class Node{
char val;
Node nxt = null;
Node prev=null;
}
class solu{
int gcd(int a, int b)
{
if (a == 0)
return b;
return gcd(b % a, a);
}
}
/** Class for buffered reading int and double values */
class Reader {
static BufferedReader reader;
static StringTokenizer tokenizer;
/** call this method to initialize reader for InputStream */
static void init(InputStream input) {
reader = new BufferedReader(
new InputStreamReader(input) );
tokenizer = new StringTokenizer("");
}
/** get next word */
static String next() throws IOException {
while ( ! tokenizer.hasMoreTokens() ) {
//TODO add check for eof if necessary
tokenizer = new StringTokenizer(
reader.readLine() );
}
return tokenizer.nextToken();
}
static int nextInt() throws IOException {
return Integer.parseInt( next() );
}
static long nextLong() throws IOException {
return Long.parseLong( next() );
}
static double nextDouble() throws IOException {
return Double.parseDouble( next() );
}
static String line() throws IOException {
return reader.readLine();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
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,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
41,
53
],
[
53,
54
],
[
54,
55
],
[
41,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
61,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
6,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
] |
[
"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[] A = new int[N];\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < A.length - 1; i++) {\n\t\t\tA[sc.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tSystem.out.println(A[i]);\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\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < A.length - 1; i++) {\n\t\t\tA[sc.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}\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[] A = new int[N];\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < A.length - 1; i++) {\n\t\t\tA[sc.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < A.length - 1; i++) {\n\t\t\tA[sc.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tSystem.out.println(A[i]);\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[] A = new int[N];",
"A",
"new int[N]",
"N",
"for (int i = 0; i < A.length; i++) {\n\t\t\tA[i] = 0;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < A.length",
"i",
"A.length",
"A",
"A.length",
"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 < A.length - 1; i++) {\n\t\t\tA[sc.nextInt() - 1]++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < A.length - 1",
"i",
"A.length - 1",
"A.length",
"A",
"A.length",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tA[sc.nextInt() - 1]++;\n\t\t}",
"{\n\t\t\tA[sc.nextInt() - 1]++;\n\t\t}",
"A[sc.nextInt() - 1]++",
"A[sc.nextInt() - 1]",
"A",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"for (int i = 0; i < A.length; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < A.length",
"i",
"A.length",
"A",
"A.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(A[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(A[i]);\n\t\t}",
"System.out.println(A[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"A[i]",
"A",
"i",
"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[] A = new int[N];\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < A.length - 1; i++) {\n\t\t\tA[sc.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}\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[] A = new int[N];\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < A.length - 1; i++) {\n\t\t\tA[sc.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}\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[] A = new int[N];
for (int i = 0; i < A.length; i++) {
A[i] = 0;
}
for (int i = 0; i < A.length - 1; i++) {
A[sc.nextInt() - 1]++;
}
for (int i = 0; i < A.length; i++) {
System.out.println(A[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
91,
5
],
[
91,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
39,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
57,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
8,
85
],
[
85,
86
],
[
86,
87
],
[
6,
88
],
[
88,
89
],
[
0,
90
],
[
90,
91
],
[
90,
92
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int N = s.nextInt();\n int A[] = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = 0;\n }\n for (int i = 1; i < N; i++) {\n int num = s.nextInt();\n A[num - 1] += 1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(A[i]);\n }\n s.close();\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 int N = s.nextInt();\n int A[] = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = 0;\n }\n for (int i = 1; i < N; i++) {\n int num = s.nextInt();\n A[num - 1] += 1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(A[i]);\n }\n s.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int N = s.nextInt();\n int A[] = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = 0;\n }\n for (int i = 1; i < N; i++) {\n int num = s.nextInt();\n A[num - 1] += 1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(A[i]);\n }\n s.close();\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n int N = s.nextInt();\n int A[] = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = 0;\n }\n for (int i = 1; i < N; i++) {\n int num = s.nextInt();\n A[num - 1] += 1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(A[i]);\n }\n s.close();\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int N = s.nextInt();",
"N",
"s.nextInt()",
"s.nextInt",
"s",
"int A[] = new int[N];",
"A",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n A[i] = 0;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n A[i] = 0;\n }",
"{\n A[i] = 0;\n }",
"A[i] = 0",
"A[i]",
"A",
"i",
"0",
"for (int i = 1; i < N; i++) {\n int num = s.nextInt();\n A[num - 1] += 1;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int num = s.nextInt();\n A[num - 1] += 1;\n }",
"{\n int num = s.nextInt();\n A[num - 1] += 1;\n }",
"int num = s.nextInt();",
"num",
"s.nextInt()",
"s.nextInt",
"s",
"A[num - 1] += 1",
"A[num - 1]",
"A",
"num - 1",
"num",
"1",
"1",
"for (int i = 0; i < N; i++) {\n System.out.println(A[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n System.out.println(A[i]);\n }",
"{\n System.out.println(A[i]);\n }",
"System.out.println(A[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"A[i]",
"A",
"i",
"s.close()",
"s.close",
"s",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int N = s.nextInt();\n int A[] = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = 0;\n }\n for (int i = 1; i < N; i++) {\n int num = s.nextInt();\n A[num - 1] += 1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(A[i]);\n }\n s.close();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int N = s.nextInt();\n int A[] = new int[N];\n for (int i = 0; i < N; i++) {\n A[i] = 0;\n }\n for (int i = 1; i < N; i++) {\n int num = s.nextInt();\n A[num - 1] += 1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(A[i]);\n }\n s.close();\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int N = s.nextInt();
int A[] = new int[N];
for (int i = 0; i < N; i++) {
A[i] = 0;
}
for (int i = 1; i < N; i++) {
int num = s.nextInt();
A[num - 1] += 1;
}
for (int i = 0; i < N; i++) {
System.out.println(A[i]);
}
s.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
2,
4,
18,
13,
17,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
72,
5
],
[
72,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
37,
41
],
[
34,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
46,
56
],
[
56,
57
],
[
57,
58
],
[
46,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
6,
69
],
[
69,
70
],
[
0,
71
],
[
71,
72
],
[
71,
73
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long a[] = new long[(int)n];\n for (long l = 1; l < n; l++) {\n a[sc.nextInt() - 1] += 1;\n }\n sc.close();\n\n for (int i = 0; i < a.length; i++) {\n System.out.println(a[i]);\n }\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 long n = sc.nextLong();\n long a[] = new long[(int)n];\n for (long l = 1; l < n; l++) {\n a[sc.nextInt() - 1] += 1;\n }\n sc.close();\n\n for (int i = 0; i < a.length; i++) {\n System.out.println(a[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long a[] = new long[(int)n];\n for (long l = 1; l < n; l++) {\n a[sc.nextInt() - 1] += 1;\n }\n sc.close();\n\n for (int i = 0; i < a.length; i++) {\n System.out.println(a[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long a[] = new long[(int)n];\n for (long l = 1; l < n; l++) {\n a[sc.nextInt() - 1] += 1;\n }\n sc.close();\n\n for (int i = 0; i < a.length; i++) {\n System.out.println(a[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long a[] = new long[(int)n];",
"a",
"new long[(int)n]",
"(int)n",
"for (long l = 1; l < n; l++) {\n a[sc.nextInt() - 1] += 1;\n }",
"long l = 1;",
"long l = 1;",
"l",
"1",
"l < n",
"l",
"n",
"l++",
"l++",
"l",
"{\n a[sc.nextInt() - 1] += 1;\n }",
"{\n a[sc.nextInt() - 1] += 1;\n }",
"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",
"for (int i = 0; i < a.length; i++) {\n System.out.println(a[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n System.out.println(a[i]);\n }",
"{\n System.out.println(a[i]);\n }",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long a[] = new long[(int)n];\n for (long l = 1; l < n; l++) {\n a[sc.nextInt() - 1] += 1;\n }\n sc.close();\n\n for (int i = 0; i < a.length; i++) {\n System.out.println(a[i]);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long a[] = new long[(int)n];\n for (long l = 1; l < n; l++) {\n a[sc.nextInt() - 1] += 1;\n }\n sc.close();\n\n for (int i = 0; i < a.length; i++) {\n System.out.println(a[i]);\n }\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long a[] = new long[(int)n];
for (long l = 1; l < n; l++) {
a[sc.nextInt() - 1] += 1;
}
sc.close();
for (int i = 0; i < a.length; i++) {
System.out.println(a[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
21,
33
],
[
33,
34
],
[
34,
35
],
[
21,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
41,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
46,
56
],
[
56,
57
],
[
57,
58
],
[
46,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"import java.util.*;\npublic class Main {\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\t\n\t\tint arr[] = new int[N];\n\t\t\n\t\tfor (int i = 0; i < arr.length-1; i++) {\n\t\t\tarr[sc.nextInt()-1]++;\n\t\t}\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t\tsc.close();\n }\t\n\t\t\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\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\t\n\t\tint arr[] = new int[N];\n\t\t\n\t\tfor (int i = 0; i < arr.length-1; i++) {\n\t\t\tarr[sc.nextInt()-1]++;\n\t\t}\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t\tsc.close();\n }\t\n\t\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\t\n\t\tint arr[] = new int[N];\n\t\t\n\t\tfor (int i = 0; i < arr.length-1; i++) {\n\t\t\tarr[sc.nextInt()-1]++;\n\t\t}\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t\tsc.close();\n }",
"main",
"{\n \t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\t\n\t\tint arr[] = new int[N];\n\t\t\n\t\tfor (int i = 0; i < arr.length-1; i++) {\n\t\t\tarr[sc.nextInt()-1]++;\n\t\t}\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t\tsc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int arr[] = new int[N];",
"arr",
"new int[N]",
"N",
"for (int i = 0; i < arr.length-1; i++) {\n\t\t\tarr[sc.nextInt()-1]++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < arr.length-1",
"i",
"arr.length-1",
"arr.length",
"arr",
"arr.length",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tarr[sc.nextInt()-1]++;\n\t\t}",
"{\n\t\t\tarr[sc.nextInt()-1]++;\n\t\t}",
"arr[sc.nextInt()-1]++",
"arr[sc.nextInt()-1]",
"arr",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"for (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(arr[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(arr[i]);\n\t\t}",
"System.out.println(arr[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"arr[i]",
"arr",
"i",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\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\t\n\t\tint arr[] = new int[N];\n\t\t\n\t\tfor (int i = 0; i < arr.length-1; i++) {\n\t\t\tarr[sc.nextInt()-1]++;\n\t\t}\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t\tsc.close();\n }\t\n\t\t\n}",
"public class Main {\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\t\n\t\tint arr[] = new int[N];\n\t\t\n\t\tfor (int i = 0; i < arr.length-1; i++) {\n\t\t\tarr[sc.nextInt()-1]++;\n\t\t}\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tSystem.out.println(arr[i]);\n\t\t}\n\t\tsc.close();\n }\t\n\t\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 arr[] = new int[N];
for (int i = 0; i < arr.length-1; i++) {
arr[sc.nextInt()-1]++;
}
for (int i = 0; i < arr.length; i++) {
System.out.println(arr[i]);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
14,
13,
30,
0,
13,
4,
18,
13,
13,
40,
13,
4,
18,
13,
13,
13,
30,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
115,
5
],
[
115,
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
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
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
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
41,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
55,
62
],
[
62,
63
],
[
55,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
64,
68
],
[
53,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
70,
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
],
[
91,
92
],
[
90,
93
],
[
89,
94
],
[
88,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
88,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
6,
112
],
[
112,
113
],
[
0,
114
],
[
114,
115
],
[
114,
116
]
] |
[
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int key = 0;\n int num = 0;\n boolean flag = false;\n Map<Integer, Integer> map = new HashMap<>();\n\n for(int i = 1; i < N; i++) {\n \tkey = sc.nextInt();\n \tflag = map.containsKey(key);\n \tif(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}\n }\n\n for(int j = 1; j <= N; j++) {\n \tif(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int key = 0;\n int num = 0;\n boolean flag = false;\n Map<Integer, Integer> map = new HashMap<>();\n\n for(int i = 1; i < N; i++) {\n \tkey = sc.nextInt();\n \tflag = map.containsKey(key);\n \tif(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}\n }\n\n for(int j = 1; j <= N; j++) {\n \tif(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int key = 0;\n int num = 0;\n boolean flag = false;\n Map<Integer, Integer> map = new HashMap<>();\n\n for(int i = 1; i < N; i++) {\n \tkey = sc.nextInt();\n \tflag = map.containsKey(key);\n \tif(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}\n }\n\n for(int j = 1; j <= N; j++) {\n \tif(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int key = 0;\n int num = 0;\n boolean flag = false;\n Map<Integer, Integer> map = new HashMap<>();\n\n for(int i = 1; i < N; i++) {\n \tkey = sc.nextInt();\n \tflag = map.containsKey(key);\n \tif(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}\n }\n\n for(int j = 1; j <= N; j++) {\n \tif(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int key = 0;",
"key",
"0",
"int num = 0;",
"num",
"0",
"boolean flag = false;",
"flag",
"false",
"Map<Integer, Integer> map = new HashMap<>();",
"map",
"new HashMap<>()",
"for(int i = 1; i < N; i++) {\n \tkey = sc.nextInt();\n \tflag = map.containsKey(key);\n \tif(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \tkey = sc.nextInt();\n \tflag = map.containsKey(key);\n \tif(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}\n }",
"{\n \tkey = sc.nextInt();\n \tflag = map.containsKey(key);\n \tif(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}\n }",
"key = sc.nextInt()",
"key",
"sc.nextInt()",
"sc.nextInt",
"sc",
"flag = map.containsKey(key)",
"flag",
"map.containsKey(key)",
"map.containsKey",
"map",
"key",
"if(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}",
"flag",
"{\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t}",
"num = map.get(key)",
"num",
"map.get(key)",
"map.get",
"map",
"key",
"num++",
"num",
"map.put(key, num)",
"map.put",
"map",
"key",
"num",
"{\n \t\tmap.put(key, 1);\n \t}",
"map.put(key, 1)",
"map.put",
"map",
"key",
"1",
"for(int j = 1; j <= N; j++) {\n \tif(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}\n }",
"int j = 1;",
"int j = 1;",
"j",
"1",
"j <= N",
"j",
"N",
"j++",
"j++",
"j",
"{\n \tif(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}\n }",
"{\n \tif(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}\n }",
"if(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}",
"map.get(j) != null",
"map.get(j)",
"map.get",
"map",
"j",
"null",
"{\n \t\tSystem.out.println(map.get(j));\n \t}",
"System.out.println(map.get(j))",
"System.out.println",
"System.out",
"System",
"System.out",
"map.get(j)",
"map.get",
"map",
"j",
"{\n \t\tSystem.out.println(0);\n \t}",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int key = 0;\n int num = 0;\n boolean flag = false;\n Map<Integer, Integer> map = new HashMap<>();\n\n for(int i = 1; i < N; i++) {\n \tkey = sc.nextInt();\n \tflag = map.containsKey(key);\n \tif(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}\n }\n\n for(int j = 1; j <= N; j++) {\n \tif(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}\n }\n }\n}",
"public class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int key = 0;\n int num = 0;\n boolean flag = false;\n Map<Integer, Integer> map = new HashMap<>();\n\n for(int i = 1; i < N; i++) {\n \tkey = sc.nextInt();\n \tflag = map.containsKey(key);\n \tif(flag) {\n \t\tnum = map.get(key);\n \t\tnum++;\n \t\tmap.put(key, num);\n \t} else {\n \t\tmap.put(key, 1);\n \t}\n }\n\n for(int j = 1; j <= N; j++) {\n \tif(map.get(j) != null) {\n \t\tSystem.out.println(map.get(j));\n \t} else {\n \t\tSystem.out.println(0);\n \t}\n }\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 key = 0;
int num = 0;
boolean flag = false;
Map<Integer, Integer> map = new HashMap<>();
for(int i = 1; i < N; i++) {
key = sc.nextInt();
flag = map.containsKey(key);
if(flag) {
num = map.get(key);
num++;
map.put(key, num);
} else {
map.put(key, 1);
}
}
for(int j = 1; j <= N; j++) {
if(map.get(j) != null) {
System.out.println(map.get(j));
} else {
System.out.println(0);
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
40,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
24,
25
],
[
24,
26
],
[
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
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
39,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
8,
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
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
] |
[
"\n\nimport java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n + 1];\n\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta[i] = Integer.parseInt(sc.next());\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\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\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n + 1];\n\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta[i] = Integer.parseInt(sc.next());\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n + 1];\n\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta[i] = Integer.parseInt(sc.next());\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n + 1];\n\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta[i] = Integer.parseInt(sc.next());\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tSystem.out.println(ans[i]);\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[] a = new int[n];",
"a",
"new int[n]",
"n",
"int[] ans = new int[n + 1];",
"ans",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 1; i < n; i++) {\n\t\t\ta[i] = Integer.parseInt(sc.next());\n\t\t\tans[a[i]]++;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ta[i] = Integer.parseInt(sc.next());\n\t\t\tans[a[i]]++;\n\t\t}",
"{\n\t\t\ta[i] = Integer.parseInt(sc.next());\n\t\t\tans[a[i]]++;\n\t\t}",
"a[i] = Integer.parseInt(sc.next())",
"a[i]",
"a",
"i",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"ans[a[i]]++",
"ans[a[i]]",
"ans",
"a[i]",
"a",
"i",
"for (int i = 1; i < n + 1; i++) {\n\t\t\tSystem.out.println(ans[i]);\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\tSystem.out.println(ans[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n + 1];\n\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta[i] = Integer.parseInt(sc.next());\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n + 1];\n\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\ta[i] = Integer.parseInt(sc.next());\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i < n + 1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\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[] a = new int[n];
int[] ans = new int[n + 1];
for (int i = 1; i < n; i++) {
a[i] = Integer.parseInt(sc.next());
ans[a[i]]++;
}
for (int i = 1; i < n + 1; i++) {
System.out.println(ans[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
40,
18,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
83,
5
],
[
83,
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
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
27,
37
],
[
37,
38
],
[
38,
39
],
[
27,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
8,
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
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
6,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
] |
[
"\nimport java.util.*;\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\n\tScanner s = new Scanner(System.in);\n\n\t\tint m = s.nextInt();\n\t\t\tint arr[] = new int[m - 1];\n\t\tint ans[] = new int[m];\n\t\t\tfor (int i = 0; i < m - 1; i++) {\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tans[arr[i] - 1]++;\n\t\t\t}\n\n\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t\t}\n\n\t\t}\n}\n\n",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\n\tScanner s = new Scanner(System.in);\n\n\t\tint m = s.nextInt();\n\t\t\tint arr[] = new int[m - 1];\n\t\tint ans[] = new int[m];\n\t\t\tfor (int i = 0; i < m - 1; i++) {\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tans[arr[i] - 1]++;\n\t\t\t}\n\n\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t\t}\n\n\t\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\tScanner s = new Scanner(System.in);\n\n\t\tint m = s.nextInt();\n\t\t\tint arr[] = new int[m - 1];\n\t\tint ans[] = new int[m];\n\t\t\tfor (int i = 0; i < m - 1; i++) {\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tans[arr[i] - 1]++;\n\t\t\t}\n\n\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t\t}\n\n\t\t}",
"main",
"{\n\n\tScanner s = new Scanner(System.in);\n\n\t\tint m = s.nextInt();\n\t\t\tint arr[] = new int[m - 1];\n\t\tint ans[] = new int[m];\n\t\t\tfor (int i = 0; i < m - 1; i++) {\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tans[arr[i] - 1]++;\n\t\t\t}\n\n\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t\t}\n\n\t\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int m = s.nextInt();",
"m",
"s.nextInt()",
"s.nextInt",
"s",
"int arr[] = new int[m - 1];",
"arr",
"new int[m - 1]",
"m - 1",
"m",
"1",
"int ans[] = new int[m];",
"ans",
"new int[m]",
"m",
"for (int i = 0; i < m - 1; i++) {\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tans[arr[i] - 1]++;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m - 1",
"i",
"m - 1",
"m",
"1",
"i++",
"i++",
"i",
"{\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tans[arr[i] - 1]++;\n\t\t\t}",
"{\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tans[arr[i] - 1]++;\n\t\t\t}",
"arr[i] = s.nextInt()",
"arr[i]",
"arr",
"i",
"s.nextInt()",
"s.nextInt",
"s",
"ans[arr[i] - 1]++",
"ans[arr[i] - 1]",
"ans",
"arr[i] - 1",
"arr[i]",
"arr",
"i",
"1",
"for (int i = 0; i < ans.length; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < ans.length",
"i",
"ans.length",
"ans",
"ans.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t\t}",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t\t}",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\n\tScanner s = new Scanner(System.in);\n\n\t\tint m = s.nextInt();\n\t\t\tint arr[] = new int[m - 1];\n\t\tint ans[] = new int[m];\n\t\t\tfor (int i = 0; i < m - 1; i++) {\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tans[arr[i] - 1]++;\n\t\t\t}\n\n\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t\t}\n\n\t\t}\n}",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\n\tScanner s = new Scanner(System.in);\n\n\t\tint m = s.nextInt();\n\t\t\tint arr[] = new int[m - 1];\n\t\tint ans[] = new int[m];\n\t\t\tfor (int i = 0; i < m - 1; i++) {\n\t\t\t\tarr[i] = s.nextInt();\n\t\t\tans[arr[i] - 1]++;\n\t\t\t}\n\n\t\tfor (int i = 0; i < ans.length; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t\t}\n\n\t\t}\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int m = s.nextInt();
int arr[] = new int[m - 1];
int ans[] = new int[m];
for (int i = 0; i < m - 1; i++) {
arr[i] = s.nextInt();
ans[arr[i] - 1]++;
}
for (int i = 0; i < ans.length; i++) {
System.out.println(ans[i]);
}
}
}
|
[
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,
20,
2,
13,
17,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
94,
14
],
[
94,
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
],
[
32,
33
],
[
32,
34
],
[
17,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
35,
39
],
[
17,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
40,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
54,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
17,
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
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
15,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
] |
[
"import java.util.Map.Entry;\nimport java.util.*;\nimport java.math.*;\nimport org.w3c.dom.css.Counter;\n \npublic class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n //モンスターの体力\n //int H = Integer.valueOf(s.next());\n //社員番号\n int N = Integer.valueOf(s.next());\n //部下持ち数\n int[] Ai = new int[N+1];\n Arrays.fill(Ai, 0);\n\t\tfor(int i = 0; i < N-1; i++) {\n int hoge = Integer.valueOf(s.next());\n\t\t\tAi[hoge] += 1;\n }\n for(int i = 1; i < Ai.length; i++) {\n System.out.println(Ai[i]);\n }\n }\n}",
"import java.util.Map.Entry;",
"Entry",
"java.util.Map",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import org.w3c.dom.css.Counter;",
"Counter",
"org.w3c.dom.css",
"public class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n //モンスターの体力\n //int H = Integer.valueOf(s.next());\n //社員番号\n int N = Integer.valueOf(s.next());\n //部下持ち数\n int[] Ai = new int[N+1];\n Arrays.fill(Ai, 0);\n\t\tfor(int i = 0; i < N-1; i++) {\n int hoge = Integer.valueOf(s.next());\n\t\t\tAi[hoge] += 1;\n }\n for(int i = 1; i < Ai.length; i++) {\n System.out.println(Ai[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n //モンスターの体力\n //int H = Integer.valueOf(s.next());\n //社員番号\n int N = Integer.valueOf(s.next());\n //部下持ち数\n int[] Ai = new int[N+1];\n Arrays.fill(Ai, 0);\n\t\tfor(int i = 0; i < N-1; i++) {\n int hoge = Integer.valueOf(s.next());\n\t\t\tAi[hoge] += 1;\n }\n for(int i = 1; i < Ai.length; i++) {\n System.out.println(Ai[i]);\n }\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n //モンスターの体力\n //int H = Integer.valueOf(s.next());\n //社員番号\n int N = Integer.valueOf(s.next());\n //部下持ち数\n int[] Ai = new int[N+1];\n Arrays.fill(Ai, 0);\n\t\tfor(int i = 0; i < N-1; i++) {\n int hoge = Integer.valueOf(s.next());\n\t\t\tAi[hoge] += 1;\n }\n for(int i = 1; i < Ai.length; i++) {\n System.out.println(Ai[i]);\n }\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int N = Integer.valueOf(s.next());",
"N",
"Integer.valueOf(s.next())",
"Integer.valueOf",
"Integer",
"s.next()",
"s.next",
"s",
"int[] Ai = new int[N+1];",
"Ai",
"new int[N+1]",
"N+1",
"N",
"1",
"Arrays.fill(Ai, 0)",
"Arrays.fill",
"Arrays",
"Ai",
"0",
"for(int i = 0; i < N-1; i++) {\n int hoge = Integer.valueOf(s.next());\n\t\t\tAi[hoge] += 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n int hoge = Integer.valueOf(s.next());\n\t\t\tAi[hoge] += 1;\n }",
"{\n int hoge = Integer.valueOf(s.next());\n\t\t\tAi[hoge] += 1;\n }",
"int hoge = Integer.valueOf(s.next());",
"hoge",
"Integer.valueOf(s.next())",
"Integer.valueOf",
"Integer",
"s.next()",
"s.next",
"s",
"Ai[hoge] += 1",
"Ai[hoge]",
"Ai",
"hoge",
"1",
"for(int i = 1; i < Ai.length; i++) {\n System.out.println(Ai[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < Ai.length",
"i",
"Ai.length",
"Ai",
"Ai.length",
"i++",
"i++",
"i",
"{\n System.out.println(Ai[i]);\n }",
"{\n System.out.println(Ai[i]);\n }",
"System.out.println(Ai[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"Ai[i]",
"Ai",
"i",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n //モンスターの体力\n //int H = Integer.valueOf(s.next());\n //社員番号\n int N = Integer.valueOf(s.next());\n //部下持ち数\n int[] Ai = new int[N+1];\n Arrays.fill(Ai, 0);\n\t\tfor(int i = 0; i < N-1; i++) {\n int hoge = Integer.valueOf(s.next());\n\t\t\tAi[hoge] += 1;\n }\n for(int i = 1; i < Ai.length; i++) {\n System.out.println(Ai[i]);\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n //モンスターの体力\n //int H = Integer.valueOf(s.next());\n //社員番号\n int N = Integer.valueOf(s.next());\n //部下持ち数\n int[] Ai = new int[N+1];\n Arrays.fill(Ai, 0);\n\t\tfor(int i = 0; i < N-1; i++) {\n int hoge = Integer.valueOf(s.next());\n\t\t\tAi[hoge] += 1;\n }\n for(int i = 1; i < Ai.length; i++) {\n System.out.println(Ai[i]);\n }\n }\n}",
"Main"
] |
import java.util.Map.Entry;
import java.util.*;
import java.math.*;
import org.w3c.dom.css.Counter;
public class Main{
public static void main(String[] args){
Scanner s = new Scanner(System.in);
//モンスターの体力
//int H = Integer.valueOf(s.next());
//社員番号
int N = Integer.valueOf(s.next());
//部下持ち数
int[] Ai = new int[N+1];
Arrays.fill(Ai, 0);
for(int i = 0; i < N-1; i++) {
int hoge = Integer.valueOf(s.next());
Ai[hoge] += 1;
}
for(int i = 1; i < Ai.length; i++) {
System.out.println(Ai[i]);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
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,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
30,
40
],
[
40,
41
],
[
41,
42
],
[
30,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
11,
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
],
[
66,
68
],
[
65,
69
],
[
11,
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
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
11,
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
],
[
108,
110
],
[
106,
111
],
[
111,
112
],
[
111,
113
],
[
9,
114
],
[
114,
115
]
] |
[
"import java.util.Scanner;\nimport java.util.Arrays;\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N=sc.nextInt();\n int As[]=new int[N-1];\n int Bs[]=new int[N];\n for (int i=0;i<N-1 ;i++ ) {\n As[i]=sc.nextInt();\n }\n for (int i=0;i<N;i++ ) {\n Bs[i]=0;\n }\n for (int i=0;i<N-1;i++ ) {\n\n Bs[As[i]-1]++;\n\n }\n\n for (int i=0;i<N;i++) {\n System.out.println(Bs[i]);\n }\n\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N=sc.nextInt();\n int As[]=new int[N-1];\n int Bs[]=new int[N];\n for (int i=0;i<N-1 ;i++ ) {\n As[i]=sc.nextInt();\n }\n for (int i=0;i<N;i++ ) {\n Bs[i]=0;\n }\n for (int i=0;i<N-1;i++ ) {\n\n Bs[As[i]-1]++;\n\n }\n\n for (int i=0;i<N;i++) {\n System.out.println(Bs[i]);\n }\n\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N=sc.nextInt();\n int As[]=new int[N-1];\n int Bs[]=new int[N];\n for (int i=0;i<N-1 ;i++ ) {\n As[i]=sc.nextInt();\n }\n for (int i=0;i<N;i++ ) {\n Bs[i]=0;\n }\n for (int i=0;i<N-1;i++ ) {\n\n Bs[As[i]-1]++;\n\n }\n\n for (int i=0;i<N;i++) {\n System.out.println(Bs[i]);\n }\n\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N=sc.nextInt();\n int As[]=new int[N-1];\n int Bs[]=new int[N];\n for (int i=0;i<N-1 ;i++ ) {\n As[i]=sc.nextInt();\n }\n for (int i=0;i<N;i++ ) {\n Bs[i]=0;\n }\n for (int i=0;i<N-1;i++ ) {\n\n Bs[As[i]-1]++;\n\n }\n\n for (int i=0;i<N;i++) {\n System.out.println(Bs[i]);\n }\n\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N=sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int As[]=new int[N-1];",
"As",
"new int[N-1]",
"N-1",
"N",
"1",
"int Bs[]=new int[N];",
"Bs",
"new int[N]",
"N",
"for (int i=0;i<N-1 ;i++ ) {\n As[i]=sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n As[i]=sc.nextInt();\n }",
"{\n As[i]=sc.nextInt();\n }",
"As[i]=sc.nextInt()",
"As[i]",
"As",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i=0;i<N;i++ ) {\n Bs[i]=0;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n Bs[i]=0;\n }",
"{\n Bs[i]=0;\n }",
"Bs[i]=0",
"Bs[i]",
"Bs",
"i",
"0",
"for (int i=0;i<N-1;i++ ) {\n\n Bs[As[i]-1]++;\n\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n\n Bs[As[i]-1]++;\n\n }",
"{\n\n Bs[As[i]-1]++;\n\n }",
"Bs[As[i]-1]++",
"Bs[As[i]-1]",
"Bs",
"As[i]-1",
"As[i]",
"As",
"i",
"1",
"for (int i=0;i<N;i++) {\n System.out.println(Bs[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n System.out.println(Bs[i]);\n }",
"{\n System.out.println(Bs[i]);\n }",
"System.out.println(Bs[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"Bs[i]",
"Bs",
"i",
"String[] args",
"args"
] |
import java.util.Scanner;
import java.util.Arrays;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N=sc.nextInt();
int As[]=new int[N-1];
int Bs[]=new int[N];
for (int i=0;i<N-1 ;i++ ) {
As[i]=sc.nextInt();
}
for (int i=0;i<N;i++ ) {
Bs[i]=0;
}
for (int i=0;i<N-1;i++ ) {
Bs[As[i]-1]++;
}
for (int i=0;i<N;i++) {
System.out.println(Bs[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
41,
13,
20,
2,
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,
13,
1,
40,
13,
30,
30,
40,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
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
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
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
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
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
],
[
63,
64
],
[
63,
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
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
6,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N+1];\n\t\tint answer[] = new int[N+1];\n //社員番号xの社員の直属の部下はA[i]=xを満たす。\n //つまり、各数がAに何度登場するかを求めればよい\n\t\tfor(int i=2; i<=N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tfor(int i=2; i<=N;i++) {\n\t\t\tanswer[A[i]]++;\n\t\t}\n\t\tfor(int i=1; i<=N; i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\n\t}\t\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\t\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N+1];\n\t\tint answer[] = new int[N+1];\n //社員番号xの社員の直属の部下はA[i]=xを満たす。\n //つまり、各数がAに何度登場するかを求めればよい\n\t\tfor(int i=2; i<=N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tfor(int i=2; i<=N;i++) {\n\t\t\tanswer[A[i]]++;\n\t\t}\n\t\tfor(int i=1; i<=N; i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\n\t}\t\t\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N+1];\n\t\tint answer[] = new int[N+1];\n //社員番号xの社員の直属の部下はA[i]=xを満たす。\n //つまり、各数がAに何度登場するかを求めればよい\n\t\tfor(int i=2; i<=N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tfor(int i=2; i<=N;i++) {\n\t\t\tanswer[A[i]]++;\n\t\t}\n\t\tfor(int i=1; i<=N; i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N+1];\n\t\tint answer[] = new int[N+1];\n //社員番号xの社員の直属の部下はA[i]=xを満たす。\n //つまり、各数がAに何度登場するかを求めればよい\n\t\tfor(int i=2; i<=N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tfor(int i=2; i<=N;i++) {\n\t\t\tanswer[A[i]]++;\n\t\t}\n\t\tfor(int i=1; i<=N; i++) {\n\t\t\tSystem.out.println(answer[i]);\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 A[] = new int[N+1];",
"A",
"new int[N+1]",
"N+1",
"N",
"1",
"int answer[] = new int[N+1];",
"answer",
"new int[N+1]",
"N+1",
"N",
"1",
"for(int i=2; i<=N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"A[i] = sc.nextInt()",
"A[i]",
"A",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=2; i<=N;i++) {\n\t\t\tanswer[A[i]]++;\n\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tanswer[A[i]]++;\n\t\t}",
"{\n\t\t\tanswer[A[i]]++;\n\t\t}",
"answer[A[i]]++",
"answer[A[i]]",
"answer",
"A[i]",
"A",
"i",
"for(int i=1; i<=N; i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(answer[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(answer[i]);\n\t\t}",
"System.out.println(answer[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"answer[i]",
"answer",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N+1];\n\t\tint answer[] = new int[N+1];\n //社員番号xの社員の直属の部下はA[i]=xを満たす。\n //つまり、各数がAに何度登場するかを求めればよい\n\t\tfor(int i=2; i<=N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tfor(int i=2; i<=N;i++) {\n\t\t\tanswer[A[i]]++;\n\t\t}\n\t\tfor(int i=1; i<=N; i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\n\t}\t\t\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N+1];\n\t\tint answer[] = new int[N+1];\n //社員番号xの社員の直属の部下はA[i]=xを満たす。\n //つまり、各数がAに何度登場するかを求めればよい\n\t\tfor(int i=2; i<=N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tfor(int i=2; i<=N;i++) {\n\t\t\tanswer[A[i]]++;\n\t\t}\n\t\tfor(int i=1; i<=N; i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\n\t}\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 A[] = new int[N+1];
int answer[] = new int[N+1];
//社員番号xの社員の直属の部下はA[i]=xを満たす。
//つまり、各数がAに何度登場するかを求めればよい
for(int i=2; i<=N; i++) {
A[i] = sc.nextInt();
}
for(int i=2; i<=N;i++) {
answer[A[i]]++;
}
for(int i=1; i<=N; i++) {
System.out.println(answer[i]);
}
}
}
|
[
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,
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,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
40,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
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,
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,
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,
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,
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,
4,
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
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
404,
26
],
[
404,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
29,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
29,
40
],
[
40,
41
],
[
40,
42
],
[
29,
43
],
[
43,
44
],
[
43,
45
],
[
29,
46
],
[
46,
47
],
[
46,
48
],
[
29,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
49,
53
],
[
49,
54
],
[
29,
55
],
[
55,
56
],
[
56,
57
],
[
27,
58
],
[
58,
59
],
[
404,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
73,
74
],
[
73,
75
],
[
64,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
76,
86
],
[
86,
87
],
[
87,
88
],
[
76,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
64,
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
],
[
109,
112
],
[
112,
113
],
[
112,
114
],
[
62,
115
],
[
115,
116
],
[
62,
117
],
[
117,
118
],
[
62,
119
],
[
119,
120
],
[
404,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
121,
125
],
[
125,
126
],
[
125,
127
],
[
121,
129
],
[
129,
130
],
[
121,
131
],
[
131,
132
],
[
121,
133
],
[
133,
134
],
[
121,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
135,
143
],
[
143,
144
],
[
121,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
148,
153
],
[
153,
154
],
[
147,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
163,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
159,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
176,
180
],
[
180,
181
],
[
181,
182
],
[
147,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
121,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
190,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
190,
203
],
[
203,
204
],
[
203,
205
],
[
190,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
206,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
210,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
190,
219
],
[
219,
220
],
[
219,
221
],
[
190,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
222,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
233
],
[
233,
234
],
[
233,
235
],
[
228,
236
],
[
236,
237
],
[
227,
238
],
[
238,
239
],
[
238,
240
],
[
227,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
243,
245
],
[
227,
246
],
[
246,
247
],
[
246,
248
],
[
248,
249
],
[
190,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
121,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
256,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
261,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
256,
269
],
[
269,
270
],
[
269,
271
],
[
256,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
272,
276
],
[
276,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
276,
281
],
[
281,
282
],
[
281,
283
],
[
283,
284
],
[
256,
285
],
[
285,
286
],
[
285,
287
],
[
256,
288
],
[
288,
289
],
[
289,
290
],
[
290,
291
],
[
290,
292
],
[
288,
293
],
[
293,
294
],
[
294,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
295,
299
],
[
299,
300
],
[
299,
301
],
[
294,
302
],
[
302,
303
],
[
293,
304
],
[
304,
305
],
[
304,
306
],
[
293,
307
],
[
307,
308
],
[
307,
309
],
[
309,
310
],
[
309,
311
],
[
293,
312
],
[
312,
313
],
[
312,
314
],
[
314,
315
],
[
256,
316
],
[
316,
317
],
[
317,
318
],
[
317,
319
],
[
121,
320
],
[
320,
321
],
[
320,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
325,
326
],
[
322,
327
],
[
327,
328
],
[
328,
329
],
[
328,
330
],
[
327,
331
],
[
331,
332
],
[
331,
333
],
[
333,
334
],
[
322,
335
],
[
335,
336
],
[
335,
337
],
[
322,
338
],
[
338,
339
],
[
339,
340
],
[
340,
341
],
[
340,
342
],
[
338,
343
],
[
343,
344
],
[
344,
345
],
[
345,
346
],
[
344,
347
],
[
343,
348
],
[
348,
349
],
[
348,
350
],
[
350,
351
],
[
322,
352
],
[
352,
353
],
[
353,
354
],
[
354,
355
],
[
121,
356
],
[
356,
357
],
[
356,
358
],
[
358,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
359,
363
],
[
363,
364
],
[
364,
365
],
[
365,
366
],
[
364,
367
],
[
358,
368
],
[
368,
369
],
[
372,
370
],
[
382,
371
],
[
379,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
372,
376
],
[
376,
377
],
[
376,
378
],
[
379,
379
],
[
379,
380
],
[
379,
381
],
[
382,
382
],
[
382,
383
],
[
382,
384
],
[
372,
385
],
[
385,
386
],
[
385,
387
],
[
387,
388
],
[
356,
389
],
[
389,
390
],
[
121,
391
],
[
391,
392
],
[
391,
393
],
[
393,
394
],
[
394,
395
],
[
395,
396
],
[
121,
397
],
[
397,
398
],
[
397,
399
],
[
399,
400
],
[
399,
401
],
[
401,
402
],
[
0,
403
],
[
403,
404
],
[
403,
405
]
] |
[
" import java.io.OutputStream;\n import java.io.IOException;\n import java.io.InputStream;\n import java.io.PrintWriter;\n import java.util.InputMismatchException;\n import java.io.IOException;\n import java.io.InputStream;\n import java.util.*;\n /**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author Manan Patel\n */\n public class Main{\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }\n\n static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt();\n int a[] = new int[n + 1];\n for(int i = 0 ; i < n - 1 ; i++)\n a[sc.nextInt()]++;\n for(int i = 1 ; i <= n ; i++){\n w.println(a[i]);\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\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\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",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }\n\n static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt();\n int a[] = new int[n + 1];\n for(int i = 0 ; i < n - 1 ; i++)\n a[sc.nextInt()]++;\n for(int i = 1 ; i <= n ; i++){\n w.println(a[i]);\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\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\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 sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader sc = new InputReader(inputStream);",
"sc",
"new InputReader(inputStream)",
"PrintWriter w = new PrintWriter(outputStream);",
"w",
"new PrintWriter(outputStream)",
"solution solver = new solution();",
"solver",
"new solution()",
"solver.solve(1 , sc , w)",
"solver.solve",
"solver",
"1",
"sc",
"w",
"w.close()",
"w.close",
"w",
"String[] args",
"args",
"static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt();\n int a[] = new int[n + 1];\n for(int i = 0 ; i < n - 1 ; i++)\n a[sc.nextInt()]++;\n for(int i = 1 ; i <= n ; i++){\n w.println(a[i]);\n }\n }\n }",
"solution",
"public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt();\n int a[] = new int[n + 1];\n for(int i = 0 ; i < n - 1 ; i++)\n a[sc.nextInt()]++;\n for(int i = 1 ; i <= n ; i++){\n w.println(a[i]);\n }\n }",
"solve",
"{\n int n = sc.nextInt();\n int a[] = new int[n + 1];\n for(int i = 0 ; i < n - 1 ; i++)\n a[sc.nextInt()]++;\n for(int i = 1 ; i <= n ; i++){\n w.println(a[i]);\n }\n }",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a[] = new int[n + 1];",
"a",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for(int i = 0 ; i < n - 1 ; i++)\n a[sc.nextInt()]++;",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n - 1",
"i",
"n - 1",
"n",
"1",
"i++",
"i++",
"i",
"a[sc.nextInt()]++;",
"a[sc.nextInt()]++",
"a[sc.nextInt()]",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 1 ; i <= n ; i++){\n w.println(a[i]);\n }",
"int i = 1 ;",
"int i = 1 ;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n w.println(a[i]);\n }",
"{\n w.println(a[i]);\n }",
"w.println(a[i])",
"w.println",
"w",
"a[i]",
"a",
"i",
"int tc",
"tc",
"InputReader sc",
"sc",
"PrintWriter w",
"w",
"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\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\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\n if (numChars <= 0)\n return -1;\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\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (numChars == -1)\n throw new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"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\n if (numChars <= 0)\n return -1;\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\n if (numChars <= 0)\n return -1;\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;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }",
"nextInt",
"{\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n c = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"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 res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }",
"if (c < '0' || c > '9')\n 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 = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextLong",
"{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n c = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"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",
"long res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }",
"if (c < '0' || c > '9')\n 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 = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }",
"readString",
"{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n c = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res.appendCodePoint(c);\n c = read();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"if (filter != null)\n 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",
"public String next() {\n return readString();\n }",
"next",
"{\n return readString();\n }",
"return readString();",
"readString()",
"readString",
"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 sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }\n\n static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt();\n int a[] = new int[n + 1];\n for(int i = 0 ; i < n - 1 ; i++)\n a[sc.nextInt()]++;\n for(int i = 1 ; i <= n ; i++){\n w.println(a[i]);\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\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\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 sc = new InputReader(inputStream);\n PrintWriter w = new PrintWriter(outputStream);\n solution solver = new solution();\n //int t = sc.nextInt();\n //for(int i = 1 ; i <= t ; i++)\n solver.solve(1 , sc , w);\n \n w.close();\n }\n\n static class solution {\n public void solve(int tc, InputReader sc, PrintWriter w) {\n int n = sc.nextInt();\n int a[] = new int[n + 1];\n for(int i = 0 ; i < n - 1 ; i++)\n a[sc.nextInt()]++;\n for(int i = 1 ; i <= n ; i++){\n w.println(a[i]);\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\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n\n while (isSpaceChar(c))\n c = read();\n\n int sgn = 1;\n\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n }\n while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n }\n while (!isSpaceChar(c));\n\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public String next() {\n return readString();\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;
import java.util.*;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Manan Patel
*/
public class Main{
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader sc = new InputReader(inputStream);
PrintWriter w = new PrintWriter(outputStream);
solution solver = new solution();
//int t = sc.nextInt();
//for(int i = 1 ; i <= t ; i++)
solver.solve(1 , sc , w);
w.close();
}
static class solution {
public void solve(int tc, InputReader sc, PrintWriter w) {
int n = sc.nextInt();
int a[] = new int[n + 1];
for(int i = 0 ; i < n - 1 ; i++)
a[sc.nextInt()]++;
for(int i = 1 ; i <= n ; i++){
w.println(a[i]);
}
}
}
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 nextInt() {
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;
}
public long nextLong() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
}
while (!isSpaceChar(c));
return res * sgn;
}
public String readString() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
}
while (!isSpaceChar(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;
}
public String next() {
return readString();
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
17,
40,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
71,
5
],
[
71,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
38,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
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
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
6,
68
],
[
68,
69
],
[
0,
70
],
[
70,
71
],
[
70,
72
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main (String args[]) throws Exception{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\n\t\tint a[] = new int[n]; \n\t\t\n\t\tfor(int i= 0; i < n -1 ; i++) {\n\t\t\tint temp = scan.nextInt()-1;\n\t\t\ta[temp]++;\n\t\t}\n\t\t\n\t\tfor(int i= 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\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 scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\n\t\tint a[] = new int[n]; \n\t\t\n\t\tfor(int i= 0; i < n -1 ; i++) {\n\t\t\tint temp = scan.nextInt()-1;\n\t\t\ta[temp]++;\n\t\t}\n\t\t\n\t\tfor(int i= 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main (String args[]) throws Exception{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\n\t\tint a[] = new int[n]; \n\t\t\n\t\tfor(int i= 0; i < n -1 ; i++) {\n\t\t\tint temp = scan.nextInt()-1;\n\t\t\ta[temp]++;\n\t\t}\n\t\t\n\t\tfor(int i= 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\n\t\tint a[] = new int[n]; \n\t\t\n\t\tfor(int i= 0; i < n -1 ; i++) {\n\t\t\tint temp = scan.nextInt()-1;\n\t\t\ta[temp]++;\n\t\t}\n\t\t\n\t\tfor(int i= 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\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 a[] = new int[n];",
"a",
"new int[n]",
"n",
"for(int i= 0; i < n -1 ; i++) {\n\t\t\tint temp = scan.nextInt()-1;\n\t\t\ta[temp]++;\n\t\t}",
"int i= 0;",
"int i= 0;",
"i",
"0",
"i < n -1",
"i",
"n -1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint temp = scan.nextInt()-1;\n\t\t\ta[temp]++;\n\t\t}",
"{\n\t\t\tint temp = scan.nextInt()-1;\n\t\t\ta[temp]++;\n\t\t}",
"int temp = scan.nextInt()-1;",
"temp",
"scan.nextInt()-1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"1",
"a[temp]++",
"a[temp]",
"a",
"temp",
"for(int i= 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"int i= 0;",
"int i= 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(a[i]);\n\t\t}",
"System.out.println(a[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[i]",
"a",
"i",
"String args[]",
"args",
"public class Main {\n\tpublic static void main (String args[]) throws Exception{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\n\t\tint a[] = new int[n]; \n\t\t\n\t\tfor(int i= 0; i < n -1 ; i++) {\n\t\t\tint temp = scan.nextInt()-1;\n\t\t\ta[temp]++;\n\t\t}\n\t\t\n\t\tfor(int i= 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main (String args[]) throws Exception{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\n\t\tint a[] = new int[n]; \n\t\t\n\t\tfor(int i= 0; i < n -1 ; i++) {\n\t\t\tint temp = scan.nextInt()-1;\n\t\t\ta[temp]++;\n\t\t}\n\t\t\n\t\tfor(int i= 0; i < n; i++) {\n\t\t\tSystem.out.println(a[i]);\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main (String args[]) throws Exception{
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int a[] = new int[n];
for(int i= 0; i < n -1 ; i++) {
int temp = scan.nextInt()-1;
a[temp]++;
}
for(int i= 0; i < n; i++) {
System.out.println(a[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
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
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
48,
49
],
[
48,
50
],
[
8,
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
],
[
67,
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
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
6,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] |
[
"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[] A = new int[N-1];\n\t\t\n\t\tfor(int i=0; i<N-1; i++) {\n\t\t\tA[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint[] SV = new int[N+1];\n\t\t\n\t\tfor(int j=0; j<N-1; j++) {\n\t\t\tSV[A[j]] ++;\n\t\t}\n\t\t\n\t\tfor(int k=1; k<=N; k++) {\n\t\t\tSystem.out.println(SV[k]);\n\t\t}\n\t\tkeyboard.close();\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[] A = new int[N-1];\n\t\t\n\t\tfor(int i=0; i<N-1; i++) {\n\t\t\tA[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint[] SV = new int[N+1];\n\t\t\n\t\tfor(int j=0; j<N-1; j++) {\n\t\t\tSV[A[j]] ++;\n\t\t}\n\t\t\n\t\tfor(int k=1; k<=N; k++) {\n\t\t\tSystem.out.println(SV[k]);\n\t\t}\n\t\tkeyboard.close();\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[] A = new int[N-1];\n\t\t\n\t\tfor(int i=0; i<N-1; i++) {\n\t\t\tA[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint[] SV = new int[N+1];\n\t\t\n\t\tfor(int j=0; j<N-1; j++) {\n\t\t\tSV[A[j]] ++;\n\t\t}\n\t\t\n\t\tfor(int k=1; k<=N; k++) {\n\t\t\tSystem.out.println(SV[k]);\n\t\t}\n\t\tkeyboard.close();\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[] A = new int[N-1];\n\t\t\n\t\tfor(int i=0; i<N-1; i++) {\n\t\t\tA[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint[] SV = new int[N+1];\n\t\t\n\t\tfor(int j=0; j<N-1; j++) {\n\t\t\tSV[A[j]] ++;\n\t\t}\n\t\t\n\t\tfor(int k=1; k<=N; k++) {\n\t\t\tSystem.out.println(SV[k]);\n\t\t}\n\t\tkeyboard.close();\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[] A = new int[N-1];",
"A",
"new int[N-1]",
"N-1",
"N",
"1",
"for(int i=0; i<N-1; i++) {\n\t\t\tA[i] = keyboard.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tA[i] = keyboard.nextInt();\n\t\t}",
"{\n\t\t\tA[i] = keyboard.nextInt();\n\t\t}",
"A[i] = keyboard.nextInt()",
"A[i]",
"A",
"i",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"int[] SV = new int[N+1];",
"SV",
"new int[N+1]",
"N+1",
"N",
"1",
"for(int j=0; j<N-1; j++) {\n\t\t\tSV[A[j]] ++;\n\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<N-1",
"j",
"N-1",
"N",
"1",
"j++",
"j++",
"j",
"{\n\t\t\tSV[A[j]] ++;\n\t\t}",
"{\n\t\t\tSV[A[j]] ++;\n\t\t}",
"SV[A[j]] ++",
"SV[A[j]]",
"SV",
"A[j]",
"A",
"j",
"for(int k=1; k<=N; k++) {\n\t\t\tSystem.out.println(SV[k]);\n\t\t}",
"int k=1;",
"int k=1;",
"k",
"1",
"k<=N",
"k",
"N",
"k++",
"k++",
"k",
"{\n\t\t\tSystem.out.println(SV[k]);\n\t\t}",
"{\n\t\t\tSystem.out.println(SV[k]);\n\t\t}",
"System.out.println(SV[k])",
"System.out.println",
"System.out",
"System",
"System.out",
"SV[k]",
"SV",
"k",
"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[] A = new int[N-1];\n\t\t\n\t\tfor(int i=0; i<N-1; i++) {\n\t\t\tA[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint[] SV = new int[N+1];\n\t\t\n\t\tfor(int j=0; j<N-1; j++) {\n\t\t\tSV[A[j]] ++;\n\t\t}\n\t\t\n\t\tfor(int k=1; k<=N; k++) {\n\t\t\tSystem.out.println(SV[k]);\n\t\t}\n\t\tkeyboard.close();\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[] A = new int[N-1];\n\t\t\n\t\tfor(int i=0; i<N-1; i++) {\n\t\t\tA[i] = keyboard.nextInt();\n\t\t}\n\t\t\n\t\tint[] SV = new int[N+1];\n\t\t\n\t\tfor(int j=0; j<N-1; j++) {\n\t\t\tSV[A[j]] ++;\n\t\t}\n\t\t\n\t\tfor(int k=1; k<=N; k++) {\n\t\t\tSystem.out.println(SV[k]);\n\t\t}\n\t\tkeyboard.close();\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[] A = new int[N-1];
for(int i=0; i<N-1; i++) {
A[i] = keyboard.nextInt();
}
int[] SV = new int[N+1];
for(int j=0; j<N-1; j++) {
SV[A[j]] ++;
}
for(int k=1; k<=N; k++) {
System.out.println(SV[k]);
}
keyboard.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
0,
18,
13,
17,
17,
9,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
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,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
9,
40,
18,
13,
2,
18,
13,
13,
17,
29,
13,
23,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
151,
5
],
[
151,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
38,
44
],
[
33,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
57,
60
],
[
8,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
61,
71
],
[
71,
72
],
[
72,
73
],
[
61,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
6,
84
],
[
84,
85
],
[
151,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
93,
103
],
[
103,
104
],
[
104,
105
],
[
93,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
88,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
113,
123
],
[
123,
124
],
[
124,
125
],
[
113,
126
],
[
127,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
128,
134
],
[
134,
135
],
[
127,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
88,
144
],
[
144,
145
],
[
86,
146
],
[
146,
147
],
[
86,
148
],
[
148,
149
],
[
0,
150
],
[
150,
151
],
[
150,
152
]
] |
[
"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[] A = new int[N];\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tint[] ret = getProcess(N, A);\n\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}\n\n\tpublic static int[] getProcess(int N, int[] A){\n\t\tint[] ret = new int[N];\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tret[i] = 0;\n\t\t}\n\n\t\tfor(int i=0; i<A.length; i++){\n\t\t\tif(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tret[ A[i]-1 ] ++;\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\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[] A = new int[N];\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tint[] ret = getProcess(N, A);\n\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}\n\n\tpublic static int[] getProcess(int N, int[] A){\n\t\tint[] ret = new int[N];\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tret[i] = 0;\n\t\t}\n\n\t\tfor(int i=0; i<A.length; i++){\n\t\t\tif(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tret[ A[i]-1 ] ++;\n\t\t}\n\n\t\treturn ret;\n\t}\n\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[] A = new int[N];\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tint[] ret = getProcess(N, A);\n\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tint[] ret = getProcess(N, A);\n\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tSystem.out.println(ret[i]);\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[] A = new int[N];",
"A",
"new int[N]",
"N",
"for(int i=0; i<N; i++){\n\t\t\tif(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tif(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tif(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"if(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}",
"i==0",
"i",
"0",
"{\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}",
"A[0] = 0",
"A[0]",
"A",
"0",
"0",
"continue;",
"A[i] = sc.nextInt()",
"A[i]",
"A",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"int[] ret = getProcess(N, A);",
"ret",
"getProcess(N, A)",
"getProcess",
"N",
"A",
"for(int i=0; i<ret.length; i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<ret.length",
"i",
"ret.length",
"ret",
"ret.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(ret[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(ret[i]);\n\t\t}",
"System.out.println(ret[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ret[i]",
"ret",
"i",
"String[] args",
"args",
"public static int[] getProcess(int N, int[] A){\n\t\tint[] ret = new int[N];\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tret[i] = 0;\n\t\t}\n\n\t\tfor(int i=0; i<A.length; i++){\n\t\t\tif(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tret[ A[i]-1 ] ++;\n\t\t}\n\n\t\treturn ret;\n\t}",
"getProcess",
"{\n\t\tint[] ret = new int[N];\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tret[i] = 0;\n\t\t}\n\n\t\tfor(int i=0; i<A.length; i++){\n\t\t\tif(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tret[ A[i]-1 ] ++;\n\t\t}\n\n\t\treturn ret;\n\t}",
"int[] ret = new int[N];",
"ret",
"new int[N]",
"N",
"for(int i=0; i<ret.length; i++){\n\t\t\tret[i] = 0;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<ret.length",
"i",
"ret.length",
"ret",
"ret.length",
"i++",
"i++",
"i",
"{\n\t\t\tret[i] = 0;\n\t\t}",
"{\n\t\t\tret[i] = 0;\n\t\t}",
"ret[i] = 0",
"ret[i]",
"ret",
"i",
"0",
"for(int i=0; i<A.length; i++){\n\t\t\tif(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tret[ A[i]-1 ] ++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<A.length",
"i",
"A.length",
"A",
"A.length",
"i++",
"i++",
"i",
"{\n\t\t\tif(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tret[ A[i]-1 ] ++;\n\t\t}",
"{\n\t\t\tif(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tret[ A[i]-1 ] ++;\n\t\t}",
"if(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}",
"A[i]==0",
"A[i]",
"A",
"i",
"0",
"{\n\t\t\t\tcontinue;\n\t\t\t}",
"continue;",
"ret[ A[i]-1 ] ++",
"ret[ A[i]-1 ]",
"ret",
"A[i]-1",
"A[i]",
"A",
"i",
"1",
"return ret;",
"ret",
"int N",
"N",
"int[] A",
"A",
"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[] A = new int[N];\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tint[] ret = getProcess(N, A);\n\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}\n\n\tpublic static int[] getProcess(int N, int[] A){\n\t\tint[] ret = new int[N];\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tret[i] = 0;\n\t\t}\n\n\t\tfor(int i=0; i<A.length; i++){\n\t\t\tif(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tret[ A[i]-1 ] ++;\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\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[] A = new int[N];\n\t\tfor(int i=0; i<N; i++){\n\t\t\tif(i==0){\n\t\t\t\tA[0] = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tint[] ret = getProcess(N, A);\n\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tSystem.out.println(ret[i]);\n\t\t}\n\t}\n\n\tpublic static int[] getProcess(int N, int[] A){\n\t\tint[] ret = new int[N];\n\t\tfor(int i=0; i<ret.length; i++){\n\t\t\tret[i] = 0;\n\t\t}\n\n\t\tfor(int i=0; i<A.length; i++){\n\t\t\tif(A[i]==0){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tret[ A[i]-1 ] ++;\n\t\t}\n\n\t\treturn ret;\n\t}\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[] A = new int[N];
for(int i=0; i<N; i++){
if(i==0){
A[0] = 0;
continue;
}
A[i] = sc.nextInt();
}
sc.close();
int[] ret = getProcess(N, A);
for(int i=0; i<ret.length; i++){
System.out.println(ret[i]);
}
}
public static int[] getProcess(int N, int[] A){
int[] ret = new int[N];
for(int i=0; i<ret.length; i++){
ret[i] = 0;
}
for(int i=0; i<A.length; i++){
if(A[i]==0){
continue;
}
ret[ A[i]-1 ] ++;
}
return ret;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
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,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
4,
18,
13,
2,
13,
17,
2,
4,
18,
13,
2,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
17,
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
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
26,
36
],
[
36,
37
],
[
37,
38
],
[
26,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
11,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
50,
60
],
[
60,
61
],
[
61,
62
],
[
50,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
11,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
69,
79
],
[
79,
80
],
[
80,
81
],
[
69,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
83,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
93,
94
],
[
93,
95
],
[
90,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
96,
103
],
[
11,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
104,
114
],
[
114,
115
],
[
115,
116
],
[
104,
117
],
[
118,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
11,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
9,
134
],
[
134,
135
]
] |
[
"import java.util.Scanner;\nimport java.util.ArrayList;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n ArrayList <Integer> li = new ArrayList <Integer>();\n ArrayList <Integer> lili = new ArrayList <Integer>();\n for(int i=0; i<number-1; i++){\n int a = sc.nextInt();\n li.add(a);\n }\n for(int i=0;i<number-1;i++){\n lili.add(0);\n }\n for(int i=0; i<number-1; i++){\n int a = li.get(i);\n lili.set(a-1,lili.get(a-1)+1);\n }\n for(int i=0; i<number-1; i++){\n System.out.println(lili.get(i));\n }\n System.out.println(0);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n ArrayList <Integer> li = new ArrayList <Integer>();\n ArrayList <Integer> lili = new ArrayList <Integer>();\n for(int i=0; i<number-1; i++){\n int a = sc.nextInt();\n li.add(a);\n }\n for(int i=0;i<number-1;i++){\n lili.add(0);\n }\n for(int i=0; i<number-1; i++){\n int a = li.get(i);\n lili.set(a-1,lili.get(a-1)+1);\n }\n for(int i=0; i<number-1; i++){\n System.out.println(lili.get(i));\n }\n System.out.println(0);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n ArrayList <Integer> li = new ArrayList <Integer>();\n ArrayList <Integer> lili = new ArrayList <Integer>();\n for(int i=0; i<number-1; i++){\n int a = sc.nextInt();\n li.add(a);\n }\n for(int i=0;i<number-1;i++){\n lili.add(0);\n }\n for(int i=0; i<number-1; i++){\n int a = li.get(i);\n lili.set(a-1,lili.get(a-1)+1);\n }\n for(int i=0; i<number-1; i++){\n System.out.println(lili.get(i));\n }\n System.out.println(0);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n ArrayList <Integer> li = new ArrayList <Integer>();\n ArrayList <Integer> lili = new ArrayList <Integer>();\n for(int i=0; i<number-1; i++){\n int a = sc.nextInt();\n li.add(a);\n }\n for(int i=0;i<number-1;i++){\n lili.add(0);\n }\n for(int i=0; i<number-1; i++){\n int a = li.get(i);\n lili.set(a-1,lili.get(a-1)+1);\n }\n for(int i=0; i<number-1; i++){\n System.out.println(lili.get(i));\n }\n System.out.println(0);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int number = sc.nextInt();",
"number",
"sc.nextInt()",
"sc.nextInt",
"sc",
"ArrayList <Integer> li = new ArrayList <Integer>();",
"li",
"new ArrayList <Integer>()",
"ArrayList <Integer> lili = new ArrayList <Integer>();",
"lili",
"new ArrayList <Integer>()",
"for(int i=0; i<number-1; i++){\n int a = sc.nextInt();\n li.add(a);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<number-1",
"i",
"number-1",
"number",
"1",
"i++",
"i++",
"i",
"{\n int a = sc.nextInt();\n li.add(a);\n }",
"{\n int a = sc.nextInt();\n li.add(a);\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"li.add(a)",
"li.add",
"li",
"a",
"for(int i=0;i<number-1;i++){\n lili.add(0);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<number-1",
"i",
"number-1",
"number",
"1",
"i++",
"i++",
"i",
"{\n lili.add(0);\n }",
"{\n lili.add(0);\n }",
"lili.add(0)",
"lili.add",
"lili",
"0",
"for(int i=0; i<number-1; i++){\n int a = li.get(i);\n lili.set(a-1,lili.get(a-1)+1);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<number-1",
"i",
"number-1",
"number",
"1",
"i++",
"i++",
"i",
"{\n int a = li.get(i);\n lili.set(a-1,lili.get(a-1)+1);\n }",
"{\n int a = li.get(i);\n lili.set(a-1,lili.get(a-1)+1);\n }",
"int a = li.get(i);",
"a",
"li.get(i)",
"li.get",
"li",
"i",
"lili.set(a-1,lili.get(a-1)+1)",
"lili.set",
"lili",
"a-1",
"a",
"1",
"lili.get(a-1)+1",
"lili.get(a-1)",
"lili.get",
"lili",
"a-1",
"a",
"1",
"1",
"for(int i=0; i<number-1; i++){\n System.out.println(lili.get(i));\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<number-1",
"i",
"number-1",
"number",
"1",
"i++",
"i++",
"i",
"{\n System.out.println(lili.get(i));\n }",
"{\n System.out.println(lili.get(i));\n }",
"System.out.println(lili.get(i))",
"System.out.println",
"System.out",
"System",
"System.out",
"lili.get(i)",
"lili.get",
"lili",
"i",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"String[] args",
"args"
] |
import java.util.Scanner;
import java.util.ArrayList;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
ArrayList <Integer> li = new ArrayList <Integer>();
ArrayList <Integer> lili = new ArrayList <Integer>();
for(int i=0; i<number-1; i++){
int a = sc.nextInt();
li.add(a);
}
for(int i=0;i<number-1;i++){
lili.add(0);
}
for(int i=0; i<number-1; i++){
int a = li.get(i);
lili.set(a-1,lili.get(a-1)+1);
}
for(int i=0; i<number-1; i++){
System.out.println(lili.get(i));
}
System.out.println(0);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
40,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
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
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
50,
60
],
[
60,
61
],
[
61,
62
],
[
50,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"import java.util.*;\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\t\n\t\tint N= sc.nextInt();\n\t\tint[]member= new int[N+1];\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<N-1;i++){\n\t\t\tint x= sc.nextInt();\n\t\t\tmember[x]++;\n\t\t}\n\t\t\n\t\tsc.close();\n\t\t\n\t\tfor(int i=1;i<N+1;i++)System.out.println(member[i]);\n\t\t\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"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\t\n\t\tint N= sc.nextInt();\n\t\tint[]member= new int[N+1];\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<N-1;i++){\n\t\t\tint x= sc.nextInt();\n\t\t\tmember[x]++;\n\t\t}\n\t\t\n\t\tsc.close();\n\t\t\n\t\tfor(int i=1;i<N+1;i++)System.out.println(member[i]);\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\t\n\t\tint N= sc.nextInt();\n\t\tint[]member= new int[N+1];\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<N-1;i++){\n\t\t\tint x= sc.nextInt();\n\t\t\tmember[x]++;\n\t\t}\n\t\t\n\t\tsc.close();\n\t\t\n\t\tfor(int i=1;i<N+1;i++)System.out.println(member[i]);\n\t\t\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc= new Scanner(System.in);\n\t\t\n\t\tint N= sc.nextInt();\n\t\tint[]member= new int[N+1];\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<N-1;i++){\n\t\t\tint x= sc.nextInt();\n\t\t\tmember[x]++;\n\t\t}\n\t\t\n\t\tsc.close();\n\t\t\n\t\tfor(int i=1;i<N+1;i++)System.out.println(member[i]);\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[]member= new int[N+1];",
"member",
"new int[N+1]",
"N+1",
"N",
"1",
"for(int i=0;i<N-1;i++){\n\t\t\tint x= sc.nextInt();\n\t\t\tmember[x]++;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint x= sc.nextInt();\n\t\t\tmember[x]++;\n\t\t}",
"{\n\t\t\tint x= sc.nextInt();\n\t\t\tmember[x]++;\n\t\t}",
"int x= sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"member[x]++",
"member[x]",
"member",
"x",
"sc.close()",
"sc.close",
"sc",
"for(int i=1;i<N+1;i++)System.out.println(member[i]);",
"int i=1;",
"int i=1;",
"i",
"1",
"i<N+1",
"i",
"N+1",
"N",
"1",
"i++",
"i++",
"i",
"System.out.println(member[i]);",
"System.out.println(member[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"member[i]",
"member",
"i",
"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\t\n\t\tint N= sc.nextInt();\n\t\tint[]member= new int[N+1];\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<N-1;i++){\n\t\t\tint x= sc.nextInt();\n\t\t\tmember[x]++;\n\t\t}\n\t\t\n\t\tsc.close();\n\t\t\n\t\tfor(int i=1;i<N+1;i++)System.out.println(member[i]);\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\t\n\t\tint N= sc.nextInt();\n\t\tint[]member= new int[N+1];\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<N-1;i++){\n\t\t\tint x= sc.nextInt();\n\t\t\tmember[x]++;\n\t\t}\n\t\t\n\t\tsc.close();\n\t\t\n\t\tfor(int i=1;i<N+1;i++)System.out.println(member[i]);\n\t\t\n\t}\n\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc= new Scanner(System.in);
int N= sc.nextInt();
int[]member= new int[N+1];
for(int i=0;i<N-1;i++){
int x= sc.nextInt();
member[x]++;
}
sc.close();
for(int i=1;i<N+1;i++)System.out.println(member[i]);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
17,
41,
13,
20,
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,
13,
1,
40,
13,
30,
30,
40,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
91,
5
],
[
91,
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
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
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
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
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
],
[
61,
62
],
[
61,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
8,
85
],
[
85,
86
],
[
86,
87
],
[
6,
88
],
[
88,
89
],
[
0,
90
],
[
90,
91
],
[
90,
92
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] array = new int[200010];\n\t\tint[] count = new int[200010];\n\n\t\tfor(int i =2;i<=n;i++) {\n\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=2;i<=n;i++) {\n\t\t\tcount[array[i]]++;\n\t\t}\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\tSystem.out.println(count[i]);\n\t\t}\n\t\tscan.close();\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] array = new int[200010];\n\t\tint[] count = new int[200010];\n\n\t\tfor(int i =2;i<=n;i++) {\n\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=2;i<=n;i++) {\n\t\t\tcount[array[i]]++;\n\t\t}\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\tSystem.out.println(count[i]);\n\t\t}\n\t\tscan.close();\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] array = new int[200010];\n\t\tint[] count = new int[200010];\n\n\t\tfor(int i =2;i<=n;i++) {\n\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=2;i<=n;i++) {\n\t\t\tcount[array[i]]++;\n\t\t}\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\tSystem.out.println(count[i]);\n\t\t}\n\t\tscan.close();\n\n\t}",
"main",
"{\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] array = new int[200010];\n\t\tint[] count = new int[200010];\n\n\t\tfor(int i =2;i<=n;i++) {\n\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=2;i<=n;i++) {\n\t\t\tcount[array[i]]++;\n\t\t}\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\tSystem.out.println(count[i]);\n\t\t}\n\t\tscan.close();\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[] array = new int[200010];",
"array",
"new int[200010]",
"200010",
"int[] count = new int[200010];",
"count",
"new int[200010]",
"200010",
"for(int i =2;i<=n;i++) {\n\n\t\t\tarray[i] = scan.nextInt();\n\t\t}",
"int i =2;",
"int i =2;",
"i",
"2",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n\t\t\tarray[i] = scan.nextInt();\n\t\t}",
"{\n\n\t\t\tarray[i] = scan.nextInt();\n\t\t}",
"array[i] = scan.nextInt()",
"array[i]",
"array",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i=2;i<=n;i++) {\n\t\t\tcount[array[i]]++;\n\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tcount[array[i]]++;\n\t\t}",
"{\n\t\t\tcount[array[i]]++;\n\t\t}",
"count[array[i]]++",
"count[array[i]]",
"count",
"array[i]",
"array",
"i",
"for(int i=1;i<=n;i++) {\n\t\tSystem.out.println(count[i]);\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\tSystem.out.println(count[i]);\n\t\t}",
"{\n\t\tSystem.out.println(count[i]);\n\t\t}",
"System.out.println(count[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"count[i]",
"count",
"i",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] array = new int[200010];\n\t\tint[] count = new int[200010];\n\n\t\tfor(int i =2;i<=n;i++) {\n\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=2;i<=n;i++) {\n\t\t\tcount[array[i]]++;\n\t\t}\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\tSystem.out.println(count[i]);\n\t\t}\n\t\tscan.close();\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] array = new int[200010];\n\t\tint[] count = new int[200010];\n\n\t\tfor(int i =2;i<=n;i++) {\n\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tfor(int i=2;i<=n;i++) {\n\t\t\tcount[array[i]]++;\n\t\t}\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\tSystem.out.println(count[i]);\n\t\t}\n\t\tscan.close();\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[] array = new int[200010];
int[] count = new int[200010];
for(int i =2;i<=n;i++) {
array[i] = scan.nextInt();
}
for(int i=2;i<=n;i++) {
count[array[i]]++;
}
for(int i=1;i<=n;i++) {
System.out.println(count[i]);
}
scan.close();
}
}
|
[
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,
4,
18,
13,
41,
13,
20,
2,
13,
17,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
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
],
[
171,
17
],
[
171,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
32,
33
],
[
32,
34
],
[
20,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
35,
39
],
[
20,
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
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
20,
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
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
18,
80
],
[
80,
81
],
[
171,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
82,
86
],
[
86,
87
],
[
82,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
82,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
97,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
107,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
96,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
82,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
129,
130
],
[
82,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
135,
138
],
[
138,
139
],
[
82,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
147,
148
],
[
82,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
151,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
155,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
151,
168
],
[
168,
169
],
[
0,
170
],
[
170,
171
],
[
170,
172
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.lang.reflect.Array;\nimport java.util.*;\n\npublic class Main {\n 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 }\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 String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }\n }\n public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n=in.nextInt();\n int b[]=new int [n+1];\n Arrays.fill(b,0);\n\n for(int i=1;i<n;i++){\n b[in.nextInt()]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(b[i]);\n }\n\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.lang.reflect.Array;",
"Array",
"java.lang.reflect",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n 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 }\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 String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }\n }\n public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n=in.nextInt();\n int b[]=new int [n+1];\n Arrays.fill(b,0);\n\n for(int i=1;i<n;i++){\n b[in.nextInt()]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(b[i]);\n }\n\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n=in.nextInt();\n int b[]=new int [n+1];\n Arrays.fill(b,0);\n\n for(int i=1;i<n;i++){\n b[in.nextInt()]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(b[i]);\n }\n\n }",
"main",
"{\n FastReader in = new FastReader();\n int n=in.nextInt();\n int b[]=new int [n+1];\n Arrays.fill(b,0);\n\n for(int i=1;i<n;i++){\n b[in.nextInt()]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(b[i]);\n }\n\n }",
"FastReader in = new FastReader();",
"in",
"new FastReader()",
"int n=in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int b[]=new int [n+1];",
"b",
"new int [n+1]",
"n+1",
"n",
"1",
"Arrays.fill(b,0)",
"Arrays.fill",
"Arrays",
"b",
"0",
"for(int i=1;i<n;i++){\n b[in.nextInt()]++;\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n b[in.nextInt()]++;\n }",
"{\n b[in.nextInt()]++;\n }",
"b[in.nextInt()]++",
"b[in.nextInt()]",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"for(int i=1;i<=n;i++){\n System.out.println(b[i]);\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n System.out.println(b[i]);\n }",
"{\n System.out.println(b[i]);\n }",
"System.out.println(b[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"b[i]",
"b",
"i",
"String[] args",
"args",
"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 }\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 String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\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 }\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 }\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 }\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 }\n catch(IOException e){\n e.printStackTrace();\n }\n }",
"try{\n st=new StringTokenizer(br.readLine());\n }\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 }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }",
"String str=\"\";",
"str",
"\"\"",
"try{\n str=br.readLine();\n }\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 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 }\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 String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }\n }\n public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n=in.nextInt();\n int b[]=new int [n+1];\n Arrays.fill(b,0);\n\n for(int i=1;i<n;i++){\n b[in.nextInt()]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(b[i]);\n }\n\n }\n}",
"public class Main {\n 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 }\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 String nextLine(){\n String str=\"\";\n try{\n str=br.readLine();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n return str;\n }\n }\n public static void main(String[] args) throws IOException {\n FastReader in = new FastReader();\n int n=in.nextInt();\n int b[]=new int [n+1];\n Arrays.fill(b,0);\n\n for(int i=1;i<n;i++){\n b[in.nextInt()]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(b[i]);\n }\n\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.*;
public class Main {
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(String[] args) throws IOException {
FastReader in = new FastReader();
int n=in.nextInt();
int b[]=new int [n+1];
Arrays.fill(b,0);
for(int i=1;i<n;i++){
b[in.nextInt()]++;
}
for(int i=1;i<=n;i++){
System.out.println(b[i]);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
0,
18,
13,
2,
4,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
75,
8
],
[
75,
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,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
24,
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
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
45,
49
],
[
42,
50
],
[
11,
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
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
9,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n int[] subordinate = new int[N];\n Arrays.fill(subordinate,0);\n for(int i = 1; i < N; i++){\n subordinate[in.nextInt()-1] += 1;\n }\n for(int i = 0; i < N; i++){\n System.out.println(subordinate[i]);\n }\n }\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 in = new Scanner(System.in);\n int N = in.nextInt();\n int[] subordinate = new int[N];\n Arrays.fill(subordinate,0);\n for(int i = 1; i < N; i++){\n subordinate[in.nextInt()-1] += 1;\n }\n for(int i = 0; i < N; i++){\n System.out.println(subordinate[i]);\n }\n }\n\n}",
"Main",
"public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n int[] subordinate = new int[N];\n Arrays.fill(subordinate,0);\n for(int i = 1; i < N; i++){\n subordinate[in.nextInt()-1] += 1;\n }\n for(int i = 0; i < N; i++){\n System.out.println(subordinate[i]);\n }\n }",
"main",
"{\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n int[] subordinate = new int[N];\n Arrays.fill(subordinate,0);\n for(int i = 1; i < N; i++){\n subordinate[in.nextInt()-1] += 1;\n }\n for(int i = 0; i < N; i++){\n System.out.println(subordinate[i]);\n }\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int N = in.nextInt();",
"N",
"in.nextInt()",
"in.nextInt",
"in",
"int[] subordinate = new int[N];",
"subordinate",
"new int[N]",
"N",
"Arrays.fill(subordinate,0)",
"Arrays.fill",
"Arrays",
"subordinate",
"0",
"for(int i = 1; i < N; i++){\n subordinate[in.nextInt()-1] += 1;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n subordinate[in.nextInt()-1] += 1;\n }",
"{\n subordinate[in.nextInt()-1] += 1;\n }",
"subordinate[in.nextInt()-1] += 1",
"subordinate[in.nextInt()-1]",
"subordinate",
"in.nextInt()-1",
"in.nextInt()",
"in.nextInt",
"in",
"1",
"1",
"for(int i = 0; i < N; i++){\n System.out.println(subordinate[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n System.out.println(subordinate[i]);\n }",
"{\n System.out.println(subordinate[i]);\n }",
"System.out.println(subordinate[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"subordinate[i]",
"subordinate",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n int[] subordinate = new int[N];\n Arrays.fill(subordinate,0);\n for(int i = 1; i < N; i++){\n subordinate[in.nextInt()-1] += 1;\n }\n for(int i = 0; i < N; i++){\n System.out.println(subordinate[i]);\n }\n }\n\n}",
"public class Main {\n public static void main(String[] args){\n Scanner in = new Scanner(System.in);\n int N = in.nextInt();\n int[] subordinate = new int[N];\n Arrays.fill(subordinate,0);\n for(int i = 1; i < N; i++){\n subordinate[in.nextInt()-1] += 1;\n }\n for(int i = 0; i < N; i++){\n System.out.println(subordinate[i]);\n }\n }\n\n}",
"Main"
] |
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int[] subordinate = new int[N];
Arrays.fill(subordinate,0);
for(int i = 1; i < N; i++){
subordinate[in.nextInt()-1] += 1;
}
for(int i = 0; i < N; i++){
System.out.println(subordinate[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
17,
40,
18,
13,
13,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
66,
5
],
[
66,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
21,
33
],
[
33,
34
],
[
34,
35
],
[
21,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
40,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
49,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
8,
60
],
[
60,
61
],
[
61,
62
],
[
6,
63
],
[
63,
64
],
[
0,
65
],
[
65,
66
],
[
65,
67
]
] |
[
"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[] res = new int[N];\n for (int i = 0; i < res.length - 1; i++) {\n int index = sc.nextInt() - 1;\n res[index]++;\n }\n for (int i : res) {\n System.out.println(i);\n }\n sc.close();\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[] res = new int[N];\n for (int i = 0; i < res.length - 1; i++) {\n int index = sc.nextInt() - 1;\n res[index]++;\n }\n for (int i : res) {\n System.out.println(i);\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] res = new int[N];\n for (int i = 0; i < res.length - 1; i++) {\n int index = sc.nextInt() - 1;\n res[index]++;\n }\n for (int i : res) {\n System.out.println(i);\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] res = new int[N];\n for (int i = 0; i < res.length - 1; i++) {\n int index = sc.nextInt() - 1;\n res[index]++;\n }\n for (int i : res) {\n System.out.println(i);\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[] res = new int[N];",
"res",
"new int[N]",
"N",
"for (int i = 0; i < res.length - 1; i++) {\n int index = sc.nextInt() - 1;\n res[index]++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < res.length - 1",
"i",
"res.length - 1",
"res.length",
"res",
"res.length",
"1",
"i++",
"i++",
"i",
"{\n int index = sc.nextInt() - 1;\n res[index]++;\n }",
"{\n int index = sc.nextInt() - 1;\n res[index]++;\n }",
"int index = sc.nextInt() - 1;",
"index",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"res[index]++",
"res[index]",
"res",
"index",
"for (int i : res) {\n System.out.println(i);\n }",
"int i",
"res",
"{\n System.out.println(i);\n }",
"{\n System.out.println(i);\n }",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"sc.close()",
"sc.close",
"sc",
"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[] res = new int[N];\n for (int i = 0; i < res.length - 1; i++) {\n int index = sc.nextInt() - 1;\n res[index]++;\n }\n for (int i : res) {\n System.out.println(i);\n }\n sc.close();\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[] res = new int[N];\n for (int i = 0; i < res.length - 1; i++) {\n int index = sc.nextInt() - 1;\n res[index]++;\n }\n for (int i : res) {\n System.out.println(i);\n }\n sc.close();\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[] res = new int[N];
for (int i = 0; i < res.length - 1; i++) {
int index = sc.nextInt() - 1;
res[index]++;
}
for (int i : res) {
System.out.println(i);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
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
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
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
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
8,
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
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
6,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tans[A[i]-1]++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\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 scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tans[A[i]-1]++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tans[A[i]-1]++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tans[A[i]-1]++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\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[] A = new int[N];",
"A",
"new int[N]",
"N",
"int[] ans = new int[N];",
"ans",
"new int[N]",
"N",
"for(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tA[i] = scan.nextInt();\n\t\t}",
"{\n\t\t\tA[i] = scan.nextInt();\n\t\t}",
"A[i] = scan.nextInt()",
"A[i]",
"A",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 1; i < N; i++) {\n\t\t\tans[A[i]-1]++;\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tans[A[i]-1]++;\n\t\t}",
"{\n\t\t\tans[A[i]-1]++;\n\t\t}",
"ans[A[i]-1]++",
"ans[A[i]-1]",
"ans",
"A[i]-1",
"A[i]",
"A",
"i",
"1",
"for(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tans[A[i]-1]++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\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 scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] ans = new int[N];\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tans[A[i]-1]++;\n\t\t}\n\t\t\n\t\t\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int[] A = new int[N];
int[] ans = new int[N];
for(int i = 1; i < N; i++) {
A[i] = scan.nextInt();
}
for(int i = 1; i < N; i++) {
ans[A[i]-1]++;
}
for(int i = 0; i < N; i++) {
System.out.println(ans[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
2,
4,
18,
13,
4,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
12,
13,
30,
41,
13,
20,
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
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
31,
33
],
[
24,
34
],
[
34,
35
],
[
35,
36
],
[
24,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
47,
48
],
[
42,
49
],
[
39,
50
],
[
8,
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
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
4,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
72,
78
],
[
78,
79
]
] |
[
"import java.util.*;\n\nclass Main{\n public Main(){\n Scanner SC = new Scanner(System.in);\n int N = Integer.parseInt(SC.next());\n int[] A = new int[N];\n for(int i=0;i<N-1;i++){\n A[Integer.parseInt(SC.next())-1] += 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(A[i]);\n }\n }\n\n public static void main(String args[]){\n Main main = new Main();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public Main(){\n Scanner SC = new Scanner(System.in);\n int N = Integer.parseInt(SC.next());\n int[] A = new int[N];\n for(int i=0;i<N-1;i++){\n A[Integer.parseInt(SC.next())-1] += 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(A[i]);\n }\n }\n\n public static void main(String args[]){\n Main main = new Main();\n }\n}",
"Main",
"public Main(){\n Scanner SC = new Scanner(System.in);\n int N = Integer.parseInt(SC.next());\n int[] A = new int[N];\n for(int i=0;i<N-1;i++){\n A[Integer.parseInt(SC.next())-1] += 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(A[i]);\n }\n }",
"Main",
"{\n Scanner SC = new Scanner(System.in);\n int N = Integer.parseInt(SC.next());\n int[] A = new int[N];\n for(int i=0;i<N-1;i++){\n A[Integer.parseInt(SC.next())-1] += 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(A[i]);\n }\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[] A = new int[N];",
"A",
"new int[N]",
"N",
"for(int i=0;i<N-1;i++){\n A[Integer.parseInt(SC.next())-1] += 1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n A[Integer.parseInt(SC.next())-1] += 1;\n }",
"{\n A[Integer.parseInt(SC.next())-1] += 1;\n }",
"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",
"for(int i=0;i<N;i++){\n System.out.println(A[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n System.out.println(A[i]);\n }",
"{\n System.out.println(A[i]);\n }",
"System.out.println(A[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"A[i]",
"A",
"i",
"public static void main(String args[]){\n Main main = new Main();\n }",
"main",
"{\n Main main = new Main();\n }",
"Main main = new Main();",
"main",
"new Main()",
"String args[]",
"args"
] |
import java.util.*;
class Main{
public Main(){
Scanner SC = new Scanner(System.in);
int N = Integer.parseInt(SC.next());
int[] A = new int[N];
for(int i=0;i<N-1;i++){
A[Integer.parseInt(SC.next())-1] += 1;
}
for(int i=0;i<N;i++){
System.out.println(A[i]);
}
}
public static void main(String args[]){
Main main = new Main();
}
}
|
[
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,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
4,
18,
13,
13,
0,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
20,
13,
4,
18,
13,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
2,
13,
17,
41,
13,
4,
18,
13,
18,
13,
2,
13,
17,
0,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
17,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
150,
17
],
[
150,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
27
],
[
27,
28
],
[
27,
29
],
[
20,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
20,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
20,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
51,
57
],
[
20,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
60,
66
],
[
20,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
72,
74
],
[
20,
75
],
[
75,
76
],
[
75,
77
],
[
20,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
79,
83
],
[
20,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
91,
92
],
[
91,
93
],
[
84,
94
],
[
94,
95
],
[
95,
96
],
[
84,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
98,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
98,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
119,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
128,
129
],
[
128,
130
],
[
20,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
133,
140
],
[
20,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
141,
146
],
[
18,
147
],
[
147,
148
],
[
0,
149
],
[
149,
150
],
[
149,
151
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n\n String arr_result[] = new String[n];\n\n Arrays.fill(arr_result, \"0\");\n\n for (int i = n - 1; i >= 1; i--) {\n int a = Integer.valueOf(arr02[i - 1]);\n int val = Integer.valueOf(arr_result[a - 1]);\n arr_result[a - 1] = String.valueOf(val + 1);\n\n // System.out.println(Arrays.toString(arr_result));\n }\n String result = String.join(System.getProperty(\"line.separator\"), arr_result);\n\n System.out.println(result);\n }\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.List;",
"List",
"java.util",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n\n String arr_result[] = new String[n];\n\n Arrays.fill(arr_result, \"0\");\n\n for (int i = n - 1; i >= 1; i--) {\n int a = Integer.valueOf(arr02[i - 1]);\n int val = Integer.valueOf(arr_result[a - 1]);\n arr_result[a - 1] = String.valueOf(val + 1);\n\n // System.out.println(Arrays.toString(arr_result));\n }\n String result = String.join(System.getProperty(\"line.separator\"), arr_result);\n\n System.out.println(result);\n }\n\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n\n String arr_result[] = new String[n];\n\n Arrays.fill(arr_result, \"0\");\n\n for (int i = n - 1; i >= 1; i--) {\n int a = Integer.valueOf(arr02[i - 1]);\n int val = Integer.valueOf(arr_result[a - 1]);\n arr_result[a - 1] = String.valueOf(val + 1);\n\n // System.out.println(Arrays.toString(arr_result));\n }\n String result = String.join(System.getProperty(\"line.separator\"), arr_result);\n\n System.out.println(result);\n }",
"main",
"{\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n\n String arr_result[] = new String[n];\n\n Arrays.fill(arr_result, \"0\");\n\n for (int i = n - 1; i >= 1; i--) {\n int a = Integer.valueOf(arr02[i - 1]);\n int val = Integer.valueOf(arr_result[a - 1]);\n arr_result[a - 1] = String.valueOf(val + 1);\n\n // System.out.println(Arrays.toString(arr_result));\n }\n String result = String.join(System.getProperty(\"line.separator\"), arr_result);\n\n System.out.println(result);\n }",
"InputStreamReader is = new InputStreamReader(System.in);",
"is",
"new InputStreamReader(System.in)",
"BufferedReader reader = new BufferedReader(is);",
"reader",
"new BufferedReader(is)",
"List<String> mylist = new ArrayList<>();",
"mylist",
"new ArrayList<>()",
"String strinput = reader.readLine();",
"strinput",
"reader.readLine()",
"reader.readLine",
"reader",
"while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }",
"strinput != null",
"strinput",
"null",
"{\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }",
"mylist.add(strinput)",
"mylist.add",
"mylist",
"strinput",
"strinput = reader.readLine()",
"strinput",
"reader.readLine()",
"reader.readLine",
"reader",
"String arr01[] = mylist.get(0).split(\" \");",
"arr01",
"mylist.get(0).split(\" \")",
"mylist.get(0).split",
"mylist.get(0)",
"mylist.get",
"mylist",
"0",
"\" \"",
"String arr02[] = mylist.get(1).split(\" \");",
"arr02",
"mylist.get(1).split(\" \")",
"mylist.get(1).split",
"mylist.get(1)",
"mylist.get",
"mylist",
"1",
"\" \"",
"int n = Integer.valueOf(arr01[0]);",
"n",
"Integer.valueOf(arr01[0])",
"Integer.valueOf",
"Integer",
"arr01[0]",
"arr01",
"0",
"String arr_result[] = new String[n];",
"arr_result",
"new String[n]",
"n",
"Arrays.fill(arr_result, \"0\")",
"Arrays.fill",
"Arrays",
"arr_result",
"\"0\"",
"for (int i = n - 1; i >= 1; i--) {\n int a = Integer.valueOf(arr02[i - 1]);\n int val = Integer.valueOf(arr_result[a - 1]);\n arr_result[a - 1] = String.valueOf(val + 1);\n\n // System.out.println(Arrays.toString(arr_result));\n }",
"int i = n - 1;",
"int i = n - 1;",
"i",
"n - 1",
"n",
"1",
"i >= 1",
"i",
"1",
"i--",
"i--",
"i",
"{\n int a = Integer.valueOf(arr02[i - 1]);\n int val = Integer.valueOf(arr_result[a - 1]);\n arr_result[a - 1] = String.valueOf(val + 1);\n\n // System.out.println(Arrays.toString(arr_result));\n }",
"{\n int a = Integer.valueOf(arr02[i - 1]);\n int val = Integer.valueOf(arr_result[a - 1]);\n arr_result[a - 1] = String.valueOf(val + 1);\n\n // System.out.println(Arrays.toString(arr_result));\n }",
"int a = Integer.valueOf(arr02[i - 1]);",
"a",
"Integer.valueOf(arr02[i - 1])",
"Integer.valueOf",
"Integer",
"arr02[i - 1]",
"arr02",
"i - 1",
"i",
"1",
"int val = Integer.valueOf(arr_result[a - 1]);",
"val",
"Integer.valueOf(arr_result[a - 1])",
"Integer.valueOf",
"Integer",
"arr_result[a - 1]",
"arr_result",
"a - 1",
"a",
"1",
"arr_result[a - 1] = String.valueOf(val + 1)",
"arr_result[a - 1]",
"arr_result",
"a - 1",
"a",
"1",
"String.valueOf(val + 1)",
"String.valueOf",
"String",
"val + 1",
"val",
"1",
"String result = String.join(System.getProperty(\"line.separator\"), arr_result);",
"result",
"String.join(System.getProperty(\"line.separator\"), arr_result)",
"String.join",
"String",
"System.getProperty(\"line.separator\")",
"System.getProperty",
"System",
"\"line.separator\"",
"arr_result",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n\n String arr_result[] = new String[n];\n\n Arrays.fill(arr_result, \"0\");\n\n for (int i = n - 1; i >= 1; i--) {\n int a = Integer.valueOf(arr02[i - 1]);\n int val = Integer.valueOf(arr_result[a - 1]);\n arr_result[a - 1] = String.valueOf(val + 1);\n\n // System.out.println(Arrays.toString(arr_result));\n }\n String result = String.join(System.getProperty(\"line.separator\"), arr_result);\n\n System.out.println(result);\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n List<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n\n mylist.add(strinput);\n strinput = reader.readLine();\n\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n String arr02[] = mylist.get(1).split(\" \");\n int n = Integer.valueOf(arr01[0]);\n\n String arr_result[] = new String[n];\n\n Arrays.fill(arr_result, \"0\");\n\n for (int i = n - 1; i >= 1; i--) {\n int a = Integer.valueOf(arr02[i - 1]);\n int val = Integer.valueOf(arr_result[a - 1]);\n arr_result[a - 1] = String.valueOf(val + 1);\n\n // System.out.println(Arrays.toString(arr_result));\n }\n String result = String.join(System.getProperty(\"line.separator\"), arr_result);\n\n System.out.println(result);\n }\n\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Main {
public static void main(String[] args) throws Exception {
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(is);
List<String> mylist = new ArrayList<>();
// 標準入力からの値を変数strinputに代入
String strinput = reader.readLine();
while (strinput != null) {
mylist.add(strinput);
strinput = reader.readLine();
}
String arr01[] = mylist.get(0).split(" ");
String arr02[] = mylist.get(1).split(" ");
int n = Integer.valueOf(arr01[0]);
String arr_result[] = new String[n];
Arrays.fill(arr_result, "0");
for (int i = n - 1; i >= 1; i--) {
int a = Integer.valueOf(arr02[i - 1]);
int val = Integer.valueOf(arr_result[a - 1]);
arr_result[a - 1] = String.valueOf(val + 1);
// System.out.println(Arrays.toString(arr_result));
}
String result = String.join(System.getProperty("line.separator"), arr_result);
System.out.println(result);
}
}
|
[
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,
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,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
28,
13,
13,
30,
30,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
2,
17,
17,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
20,
0,
18,
36,
13,
20,
13,
0,
18,
36,
13,
0,
13,
17,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
20,
13,
0,
18,
36,
13,
0,
13,
17,
23,
13,
12,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
18,
36,
13,
20,
0,
18,
36,
13,
20,
13,
0,
18,
36,
13,
0,
13,
17,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
30,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
30,
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,
30,
29,
40,
13,
29,
13,
12,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
0,
13,
17,
13,
14,
2,
13,
40,
17,
30,
0,
18,
13,
17,
40,
17,
12,
13,
30,
14,
2,
13,
13,
30,
4,
13,
29,
18,
13,
40,
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
],
[
310,
29
],
[
310,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
32,
43
],
[
43,
44
],
[
43,
45
],
[
32,
46
],
[
46,
47
],
[
46,
48
],
[
32,
49
],
[
49,
50
],
[
49,
51
],
[
32,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
52,
56
],
[
52,
57
],
[
32,
58
],
[
58,
59
],
[
59,
60
],
[
30,
61
],
[
61,
62
],
[
310,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
67,
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
],
[
93,
97
],
[
67,
98
],
[
98,
99
],
[
98,
100
],
[
98,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
65,
107
],
[
107,
108
],
[
65,
109
],
[
109,
110
],
[
65,
111
],
[
111,
112
],
[
310,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
113,
120
],
[
120,
121
],
[
113,
122
],
[
122,
123
],
[
113,
124
],
[
124,
125
],
[
113,
126
],
[
126,
127
],
[
113,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
130,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
130,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
146,
147
],
[
146,
148
],
[
113,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
151,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
151,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
163,
167
],
[
167,
168
],
[
167,
169
],
[
149,
170
],
[
170,
171
],
[
113,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
175,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
181,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
181,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
193,
197
],
[
197,
198
],
[
197,
199
],
[
172,
200
],
[
200,
201
],
[
113,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
204,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
204,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
212,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
204,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
223,
225
],
[
204,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
204,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
235,
240
],
[
234,
241
],
[
241,
242
],
[
241,
243
],
[
233,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
249,
251
],
[
248,
252
],
[
247,
253
],
[
204,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
204,
260
],
[
260,
261
],
[
113,
262
],
[
262,
263
],
[
262,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
269,
270
],
[
265,
271
],
[
271,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
275,
276
],
[
274,
277
],
[
274,
278
],
[
278,
279
],
[
278,
280
],
[
274,
281
],
[
271,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
285,
286
],
[
282,
287
],
[
287,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
288,
292
],
[
292,
293
],
[
113,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
297,
301
],
[
301,
302
],
[
302,
303
],
[
296,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
0,
309
],
[
309,
310
],
[
309,
311
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.io.DataInputStream;\nimport java.io.IOException;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author iavanish\n */\npublic class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] countSubordinates = new int[n];\n for (int i = 1; i < n; i++) {\n countSubordinates[in.nextInt() - 1]++;\n }\n\n for (int i : countSubordinates) {\n out.println(i);\n }\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\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.io.DataInputStream;",
"DataInputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.FileInputStream;",
"FileInputStream",
"java.io",
"import java.io.FileNotFoundException;",
"FileNotFoundException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] countSubordinates = new int[n];\n for (int i = 1; i < n; i++) {\n countSubordinates[in.nextInt() - 1]++;\n }\n\n for (int i : countSubordinates) {\n out.println(i);\n }\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\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",
"FastReader in = new FastReader(inputStream);",
"in",
"new FastReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"CManagement solver = new CManagement();",
"solver",
"new CManagement()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class CManagement {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] countSubordinates = new int[n];\n for (int i = 1; i < n; i++) {\n countSubordinates[in.nextInt() - 1]++;\n }\n\n for (int i : countSubordinates) {\n out.println(i);\n }\n }\n\n }",
"CManagement",
"public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] countSubordinates = new int[n];\n for (int i = 1; i < n; i++) {\n countSubordinates[in.nextInt() - 1]++;\n }\n\n for (int i : countSubordinates) {\n out.println(i);\n }\n }",
"solve",
"{\n int n = in.nextInt();\n int[] countSubordinates = new int[n];\n for (int i = 1; i < n; i++) {\n countSubordinates[in.nextInt() - 1]++;\n }\n\n for (int i : countSubordinates) {\n out.println(i);\n }\n }",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int[] countSubordinates = new int[n];",
"countSubordinates",
"new int[n]",
"n",
"for (int i = 1; i < n; i++) {\n countSubordinates[in.nextInt() - 1]++;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n countSubordinates[in.nextInt() - 1]++;\n }",
"{\n countSubordinates[in.nextInt() - 1]++;\n }",
"countSubordinates[in.nextInt() - 1]++",
"countSubordinates[in.nextInt() - 1]",
"countSubordinates",
"in.nextInt() - 1",
"in.nextInt()",
"in.nextInt",
"in",
"1",
"for (int i : countSubordinates) {\n out.println(i);\n }",
"int i",
"countSubordinates",
"{\n out.println(i);\n }",
"{\n out.println(i);\n }",
"out.println(i)",
"out.println",
"out",
"i",
"int testNumber",
"testNumber",
"FastReader in",
"in",
"PrintWriter out",
"out",
"static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }",
"FastReader",
"private final int BUFFER_SIZE = 1 << 16;",
"BUFFER_SIZE",
"1 << 16",
"1",
"16",
"private final InputStream inputStream;",
"inputStream",
"private final byte[] buffer;",
"buffer",
"private int bufferPointer;",
"bufferPointer",
"private int bytesRead;",
"bytesRead",
"public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }",
"FastReader",
"{\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }",
"this.inputStream = new DataInputStream(System.in)",
"this.inputStream",
"this",
"this.inputStream",
"new DataInputStream(System.in)",
"this.buffer = new byte[BUFFER_SIZE]",
"this.buffer",
"this",
"this.buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"this.bufferPointer = bytesRead = 0",
"this.bufferPointer",
"this",
"this.bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }",
"FastReader",
"{\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }",
"this.inputStream = inputStream",
"this.inputStream",
"this",
"this.inputStream",
"inputStream",
"this.buffer = new byte[BUFFER_SIZE]",
"this.buffer",
"this",
"this.buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"this.bufferPointer = bytesRead = 0",
"this.bufferPointer",
"this",
"this.bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"InputStream inputStream",
"inputStream",
"public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }",
"FastReader",
"{\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }",
"catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }",
"FileNotFoundException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }",
"this.inputStream = new DataInputStream(new FileInputStream(fileName))",
"this.inputStream",
"this",
"this.inputStream",
"new DataInputStream(new FileInputStream(fileName))",
"this.buffer = new byte[BUFFER_SIZE]",
"this.buffer",
"this",
"this.buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"this.bufferPointer = bytesRead = 0",
"this.bufferPointer",
"this",
"this.bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"String fileName",
"fileName",
"public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }",
"nextInt",
"{\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }",
"int nextInt = 0;",
"nextInt",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ') {\n c = read();\n }",
"c <= ' '",
"c",
"' '",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"boolean negative = (c == '-');",
"negative",
"(c == '-')",
"c",
"'-'",
"if (negative) {\n c = read();\n }",
"negative",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"do {\n nextInt = nextInt * 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 nextInt = nextInt * 10 + c - '0';\n }",
"nextInt = nextInt * 10 + c - '0'",
"nextInt",
"nextInt * 10 + c - '0'",
"nextInt * 10 + c",
"nextInt * 10",
"nextInt",
"10",
"c",
"'0'",
"if (negative) {\n return -nextInt;\n }",
"negative",
"{\n return -nextInt;\n }",
"return -nextInt;",
"-nextInt",
"nextInt",
"return nextInt;",
"nextInt",
"private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"fillBuffer",
"{\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\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 bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n }",
"bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE)",
"bytesRead",
"inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE)",
"inputStream.read",
"inputStream",
"buffer",
"bufferPointer = 0",
"bufferPointer",
"0",
"BUFFER_SIZE",
"if (bytesRead == -1) {\n buffer[0] = -1;\n }",
"bytesRead == -1",
"bytesRead",
"-1",
"1",
"{\n buffer[0] = -1;\n }",
"buffer[0] = -1",
"buffer[0]",
"buffer",
"0",
"-1",
"1",
"private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }",
"read",
"{\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }",
"if (bufferPointer == bytesRead) {\n fillBuffer();\n }",
"bufferPointer == bytesRead",
"bufferPointer",
"bytesRead",
"{\n fillBuffer();\n }",
"fillBuffer()",
"fillBuffer",
"return buffer[bufferPointer++];",
"buffer[bufferPointer++]",
"buffer",
"bufferPointer++",
"bufferPointer",
"public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] countSubordinates = new int[n];\n for (int i = 1; i < n; i++) {\n countSubordinates[in.nextInt() - 1]++;\n }\n\n for (int i : countSubordinates) {\n out.println(i);\n }\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n int[] countSubordinates = new int[n];\n for (int i = 1; i < n; i++) {\n countSubordinates[in.nextInt() - 1]++;\n }\n\n for (int i : countSubordinates) {\n out.println(i);\n }\n }\n\n }\n\n static class FastReader {\n\n private final int BUFFER_SIZE = 1 << 16;\n private final InputStream inputStream;\n private final byte[] buffer;\n private int bufferPointer;\n private int bytesRead;\n\n public FastReader() {\n this.inputStream = new DataInputStream(System.in);\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(InputStream inputStream) {\n this.inputStream = inputStream;\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n }\n\n public FastReader(String fileName) {\n try {\n this.inputStream = new DataInputStream(new FileInputStream(fileName));\n this.buffer = new byte[BUFFER_SIZE];\n this.bufferPointer = bytesRead = 0;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n }\n }\n\n public int nextInt() {\n int nextInt = 0;\n byte c = read();\n while (c <= ' ') {\n c = read();\n }\n boolean negative = (c == '-');\n if (negative) {\n c = read();\n }\n do {\n nextInt = nextInt * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (negative) {\n return -nextInt;\n }\n return nextInt;\n }\n\n private void fillBuffer() {\n try {\n bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1) {\n buffer[0] = -1;\n }\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n private byte read() {\n if (bufferPointer == bytesRead) {\n fillBuffer();\n }\n return buffer[bufferPointer++];\n }\n\n }\n\n}",
"Main"
] |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author iavanish
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
FastReader in = new FastReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
CManagement solver = new CManagement();
solver.solve(1, in, out);
out.close();
}
static class CManagement {
public void solve(int testNumber, FastReader in, PrintWriter out) {
int n = in.nextInt();
int[] countSubordinates = new int[n];
for (int i = 1; i < n; i++) {
countSubordinates[in.nextInt() - 1]++;
}
for (int i : countSubordinates) {
out.println(i);
}
}
}
static class FastReader {
private final int BUFFER_SIZE = 1 << 16;
private final InputStream inputStream;
private final byte[] buffer;
private int bufferPointer;
private int bytesRead;
public FastReader() {
this.inputStream = new DataInputStream(System.in);
this.buffer = new byte[BUFFER_SIZE];
this.bufferPointer = bytesRead = 0;
}
public FastReader(InputStream inputStream) {
this.inputStream = inputStream;
this.buffer = new byte[BUFFER_SIZE];
this.bufferPointer = bytesRead = 0;
}
public FastReader(String fileName) {
try {
this.inputStream = new DataInputStream(new FileInputStream(fileName));
this.buffer = new byte[BUFFER_SIZE];
this.bufferPointer = bytesRead = 0;
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
}
public int nextInt() {
int nextInt = 0;
byte c = read();
while (c <= ' ') {
c = read();
}
boolean negative = (c == '-');
if (negative) {
c = read();
}
do {
nextInt = nextInt * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (negative) {
return -nextInt;
}
return nextInt;
}
private void fillBuffer() {
try {
bytesRead = inputStream.read(buffer, bufferPointer = 0, BUFFER_SIZE);
if (bytesRead == -1) {
buffer[0] = -1;
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
private byte read() {
if (bufferPointer == bytesRead) {
fillBuffer();
}
return buffer[bufferPointer++];
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
20,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
12,
13,
30,
4,
13,
18,
13,
13,
12,
13,
30,
0,
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,
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,
41,
13,
4,
13,
42,
4,
13,
13,
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,
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,
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,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
412,
11
],
[
412,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
412,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
32,
33
],
[
32,
34
],
[
20,
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
],
[
51,
52
],
[
52,
53
],
[
20,
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
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
20,
75
],
[
75,
76
],
[
76,
77
],
[
412,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
78,
82
],
[
82,
83
],
[
82,
84
],
[
78,
86
],
[
86,
87
],
[
78,
88
],
[
88,
89
],
[
78,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
78,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
98,
104
],
[
104,
105
],
[
78,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
109,
114
],
[
114,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
124,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
120,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
141,
142
],
[
142,
143
],
[
108,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
78,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
151,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
156,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
151,
164
],
[
164,
165
],
[
164,
166
],
[
151,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
173,
176
],
[
172,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
151,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
78,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
187,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
192,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
187,
200
],
[
200,
201
],
[
200,
202
],
[
187,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
203,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
209,
212
],
[
208,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
187,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
78,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
223,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
228,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
223,
236
],
[
236,
237
],
[
236,
238
],
[
223,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
239,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
243,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
223,
252
],
[
252,
253
],
[
252,
254
],
[
223,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
255,
260
],
[
260,
261
],
[
261,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
262,
266
],
[
266,
267
],
[
266,
268
],
[
261,
269
],
[
269,
270
],
[
260,
271
],
[
271,
272
],
[
271,
273
],
[
260,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
276,
278
],
[
260,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
223,
283
],
[
283,
284
],
[
284,
285
],
[
284,
286
],
[
78,
287
],
[
287,
288
],
[
287,
289
],
[
289,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
289,
294
],
[
294,
295
],
[
295,
296
],
[
295,
297
],
[
294,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
289,
302
],
[
302,
303
],
[
302,
304
],
[
289,
305
],
[
305,
306
],
[
306,
307
],
[
306,
308
],
[
305,
309
],
[
309,
310
],
[
310,
311
],
[
310,
312
],
[
312,
313
],
[
309,
314
],
[
314,
315
],
[
314,
316
],
[
316,
317
],
[
289,
318
],
[
318,
319
],
[
318,
320
],
[
289,
321
],
[
321,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
321,
326
],
[
326,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
328,
332
],
[
332,
333
],
[
332,
334
],
[
327,
335
],
[
335,
336
],
[
326,
337
],
[
337,
338
],
[
337,
339
],
[
326,
340
],
[
340,
341
],
[
340,
342
],
[
342,
343
],
[
342,
344
],
[
326,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
289,
349
],
[
349,
350
],
[
350,
351
],
[
350,
352
],
[
78,
353
],
[
353,
354
],
[
353,
355
],
[
355,
356
],
[
356,
357
],
[
360,
358
],
[
370,
359
],
[
367,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
360,
364
],
[
364,
365
],
[
364,
366
],
[
367,
367
],
[
367,
368
],
[
367,
369
],
[
370,
370
],
[
370,
371
],
[
370,
372
],
[
360,
373
],
[
373,
374
],
[
373,
375
],
[
375,
376
],
[
353,
377
],
[
377,
378
],
[
78,
379
],
[
379,
380
],
[
379,
381
],
[
381,
382
],
[
382,
383
],
[
384,
384
],
[
384,
385
],
[
385,
386
],
[
385,
387
],
[
384,
388
],
[
388,
389
],
[
388,
390
],
[
384,
391
],
[
391,
392
],
[
391,
393
],
[
393,
394
],
[
379,
395
],
[
395,
396
],
[
78,
397
],
[
397,
398
],
[
397,
399
],
[
399,
400
],
[
400,
401
],
[
401,
402
],
[
401,
403
],
[
403,
404
],
[
404,
405
],
[
405,
406
],
[
400,
407
],
[
407,
408
],
[
408,
409
],
[
409,
410
],
[
0,
411
],
[
411,
412
],
[
411,
413
]
] |
[
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.InputMismatchException;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\n\tpublic Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] parent = new int[n+1];\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tparent[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(parent[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\t\n\tclass FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\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\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\n\tpublic Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] parent = new int[n+1];\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tparent[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(parent[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\t\n\tclass FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tnew Main();\n\t}",
"main",
"{\n\t\tnew Main();\n\t}",
"new Main()",
"String[] args",
"args",
"public Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] parent = new int[n+1];\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tparent[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(parent[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}",
"Main",
"{\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] parent = new int[n+1];\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tparent[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(parent[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}",
"FasterScanner sc = new FasterScanner(System.in);",
"sc",
"new FasterScanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] parent = new int[n+1];",
"parent",
"new int[n+1]",
"n+1",
"n",
"1",
"for (int i = 2; i <= n; i++) {\n\t\t\tparent[sc.nextInt()]++;\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tparent[sc.nextInt()]++;\n\t\t}",
"{\n\t\t\tparent[sc.nextInt()]++;\n\t\t}",
"parent[sc.nextInt()]++",
"parent[sc.nextInt()]",
"parent",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(parent[i]);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(parent[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(parent[i]);\n\t\t}",
"System.out.println(parent[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"parent[i]",
"parent",
"i",
"sc.close()",
"sc.close",
"sc",
"class FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"FasterScanner",
"private InputStream mIs;",
"mIs",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"public FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}",
"FasterScanner",
"{\n\t\t\tthis(System.in);\n\t\t}",
"this(System.in)",
"this",
"System.in",
"System",
"System.in",
"public FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}",
"FasterScanner",
"{\n\t\t\tmIs = is;\n\t\t}",
"mIs = is",
"mIs",
"is",
"InputStream is",
"is",
"public int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}",
"read",
"{\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}",
"if (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}",
"curChar >= numChars",
"curChar",
"numChars",
"{\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}",
"curChar = 0",
"curChar",
"0",
"try {\n\t\t\t\t\tnumChars = mIs.read(buf);\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\tnumChars = mIs.read(buf);\n\t\t\t\t}",
"numChars = mIs.read(buf)",
"numChars",
"mIs.read(buf)",
"mIs.read",
"mIs",
"buf",
"if (numChars <= 0)\n\t\t\t\t\treturn -1;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}",
"nextLine",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));",
"!isEndOfLine(c)",
"isEndOfLine(c)",
"isEndOfLine",
"c",
"{\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t}",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}",
"nextString",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t}",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"nextLong",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"c == '-'",
"c",
"'-'",
"{\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\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 *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"nextInt",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"c == '-'",
"c",
"'-'",
"{\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\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 *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}",
"isSpaceChar",
"{\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}",
"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 boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}",
"isEndOfLine",
"{\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}",
"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 void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"close",
"{\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"try {\n\t\t\t\tmIs.close();\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\tmIs.close();\n\t\t\t}",
"mIs.close()",
"mIs.close",
"mIs",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\n\tpublic Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] parent = new int[n+1];\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tparent[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(parent[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\t\n\tclass FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\n\tpublic Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] parent = new int[n+1];\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tparent[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(parent[i]);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\t\n\tclass FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
public class Main {
public static void main(String[] args) {
new Main();
}
public Main() {
FasterScanner sc = new FasterScanner(System.in);
int n = sc.nextInt();
int[] parent = new int[n+1];
for (int i = 2; i <= n; i++) {
parent[sc.nextInt()]++;
}
for (int i = 1; i <= n; i++) {
System.out.println(parent[i]);
}
sc.close();
}
class FasterScanner {
private InputStream mIs;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
public FasterScanner() {
this(System.in);
}
public FasterScanner(InputStream is) {
mIs = is;
}
public int read() {
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = mIs.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public String nextLine() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isEndOfLine(c));
return res.toString();
}
public String nextString() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public long nextLong() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public int nextInt() {
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;
}
public boolean isSpaceChar(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
public void close() {
try {
mIs.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
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,
4,
18,
13,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
40,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
19,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
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
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
8,
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
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
70,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
8,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
85,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
103,
105
],
[
6,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
] |
[
"import java.io.*;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str = reader.readLine();\n\t\tint N = Integer.parseInt(str);\n\n\t\tint A[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\t\n\t\tString a = reader.readLine();//行を読み込む\n \tString[] data = a.split(\" \");//スペース区切りで配列に格納\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = Integer.parseInt(data[i]);//dataのi番目をintに変換\n\t\t\tA[count - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(A[i]);\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str = reader.readLine();\n\t\tint N = Integer.parseInt(str);\n\n\t\tint A[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\t\n\t\tString a = reader.readLine();//行を読み込む\n \tString[] data = a.split(\" \");//スペース区切りで配列に格納\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = Integer.parseInt(data[i]);//dataのi番目をintに変換\n\t\t\tA[count - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(A[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str = reader.readLine();\n\t\tint N = Integer.parseInt(str);\n\n\t\tint A[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\t\n\t\tString a = reader.readLine();//行を読み込む\n \tString[] data = a.split(\" \");//スペース区切りで配列に格納\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = Integer.parseInt(data[i]);//dataのi番目をintに変換\n\t\t\tA[count - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(A[i]);\n }\n }",
"main",
"{\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str = reader.readLine();\n\t\tint N = Integer.parseInt(str);\n\n\t\tint A[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\t\n\t\tString a = reader.readLine();//行を読み込む\n \tString[] data = a.split(\" \");//スペース区切りで配列に格納\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = Integer.parseInt(data[i]);//dataのi番目をintに変換\n\t\t\tA[count - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(A[i]);\n }\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String str = reader.readLine();",
"str",
"reader.readLine()",
"reader.readLine",
"reader",
"int N = Integer.parseInt(str);",
"N",
"Integer.parseInt(str)",
"Integer.parseInt",
"Integer",
"str",
"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",
"String a = reader.readLine();",
"a",
"reader.readLine()",
"reader.readLine",
"reader",
"String[] data = a.split(\" \");",
"data",
"a.split(\" \")",
"a.split",
"a",
"\" \"",
"for (int i = 0; i < N - 1; i++) {\n\t\t\tint count = Integer.parseInt(data[i]);//dataのi番目をintに変換\n\t\t\tA[count - 1]++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N - 1",
"i",
"N - 1",
"N",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint count = Integer.parseInt(data[i]);//dataのi番目をintに変換\n\t\t\tA[count - 1]++;\n\t\t}",
"{\n\t\t\tint count = Integer.parseInt(data[i]);//dataのi番目をintに変換\n\t\t\tA[count - 1]++;\n\t\t}",
"int count = Integer.parseInt(data[i]);",
"count",
"Integer.parseInt(data[i])",
"Integer.parseInt",
"Integer",
"data[i]",
"data",
"i",
"A[count - 1]++",
"A[count - 1]",
"A",
"count - 1",
"count",
"1",
"for (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(A[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(A[i]);\n }",
"{\n\t\t\tSystem.out.println(A[i]);\n }",
"System.out.println(A[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"A[i]",
"A",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str = reader.readLine();\n\t\tint N = Integer.parseInt(str);\n\n\t\tint A[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\t\n\t\tString a = reader.readLine();//行を読み込む\n \tString[] data = a.split(\" \");//スペース区切りで配列に格納\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = Integer.parseInt(data[i]);//dataのi番目をintに変換\n\t\t\tA[count - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(A[i]);\n }\n }\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str = reader.readLine();\n\t\tint N = Integer.parseInt(str);\n\n\t\tint A[] = new int[N];\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tA[i] = 0;\n\t\t}\n\t\t\n\t\tString a = reader.readLine();//行を読み込む\n \tString[] data = a.split(\" \");//スペース区切りで配列に格納\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = Integer.parseInt(data[i]);//dataのi番目をintに変換\n\t\t\tA[count - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(A[i]);\n }\n }\n}",
"Main"
] |
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String str = reader.readLine();
int N = Integer.parseInt(str);
int A[] = new int[N];
for (int i = 0; i < N; i++) {
A[i] = 0;
}
String a = reader.readLine();//行を読み込む
String[] data = a.split(" ");//スペース区切りで配列に格納
for (int i = 0; i < N - 1; i++) {
int count = Integer.parseInt(data[i]);//dataのi番目をintに変換
A[count - 1]++;
}
for (int i = 0; i < N; i++) {
System.out.println(A[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
13,
18,
13,
13,
2,
4,
18,
13,
18,
13,
13,
17,
28,
13,
4,
18,
13,
30,
30,
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
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
45,
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
],
[
61,
64
],
[
61,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
84,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
87,
94
],
[
8,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
95,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
6,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
] |
[
"//package atcoder;\n \nimport 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 A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new TreeMap<>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n\t\t\tmap.put(A[j],map.get(A[j])+1);\n\t\t}\n\t\tfor(Integer value:map.values()) {\n\t\t\tSystem.out.println(value);\n\t\t}\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 A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new TreeMap<>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n\t\t\tmap.put(A[j],map.get(A[j])+1);\n\t\t}\n\t\tfor(Integer value:map.values()) {\n\t\t\tSystem.out.println(value);\n\t\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 A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new TreeMap<>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n\t\t\tmap.put(A[j],map.get(A[j])+1);\n\t\t}\n\t\tfor(Integer value:map.values()) {\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new TreeMap<>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n\t\t\tmap.put(A[j],map.get(A[j])+1);\n\t\t}\n\t\tfor(Integer value:map.values()) {\n\t\t\tSystem.out.println(value);\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 A[] = new int [N-1];",
"A",
"new int [N-1]",
"N-1",
"N",
"1",
"for(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tA[i] = sc.nextInt();\n\t\t}",
"A[i] = sc.nextInt()",
"A[i]",
"A",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Map<Integer,Integer> map = new TreeMap<>();",
"map",
"new TreeMap<>()",
"for(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tmap.put(i,0);\n\t\t}",
"{\n\t\t\tmap.put(i,0);\n\t\t}",
"map.put(i,0)",
"map.put",
"map",
"i",
"0",
"for(int j=0;j<N-1;j++) {\n\t\t\tmap.put(A[j],map.get(A[j])+1);\n\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<N-1",
"j",
"N-1",
"N",
"1",
"j++",
"j++",
"j",
"{\n\t\t\tmap.put(A[j],map.get(A[j])+1);\n\t\t}",
"{\n\t\t\tmap.put(A[j],map.get(A[j])+1);\n\t\t}",
"map.put(A[j],map.get(A[j])+1)",
"map.put",
"map",
"A[j]",
"A",
"j",
"map.get(A[j])+1",
"map.get(A[j])",
"map.get",
"map",
"A[j]",
"A",
"j",
"1",
"for(Integer value:map.values()) {\n\t\t\tSystem.out.println(value);\n\t\t}",
"Integer value",
"map.values()",
"map.values",
"map",
"{\n\t\t\tSystem.out.println(value);\n\t\t}",
"{\n\t\t\tSystem.out.println(value);\n\t\t}",
"System.out.println(value)",
"System.out.println",
"System.out",
"System",
"System.out",
"value",
"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 A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new TreeMap<>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n\t\t\tmap.put(A[j],map.get(A[j])+1);\n\t\t}\n\t\tfor(Integer value:map.values()) {\n\t\t\tSystem.out.println(value);\n\t\t}\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 A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new TreeMap<>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n\t\t\tmap.put(A[j],map.get(A[j])+1);\n\t\t}\n\t\tfor(Integer value:map.values()) {\n\t\t\tSystem.out.println(value);\n\t\t}\n\t}\n}",
"Main"
] |
//package atcoder;
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int A[] = new int [N-1];
for(int i=0;i<N-1;i++) {
A[i] = sc.nextInt();
}
Map<Integer,Integer> map = new TreeMap<>();
for(int i=1;i<=N;i++) {
map.put(i,0);
}
for(int j=0;j<N-1;j++) {
map.put(A[j],map.get(A[j])+1);
}
for(Integer value:map.values()) {
System.out.println(value);
}
}
}
|
[
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,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
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
],
[
326,
11
],
[
326,
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
],
[
26,
27
],
[
26,
28
],
[
14,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
29,
39
],
[
39,
40
],
[
40,
41
],
[
29,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
14,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
50,
60
],
[
60,
61
],
[
61,
62
],
[
50,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
12,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
75,
82
],
[
82,
83
],
[
82,
84
],
[
75,
86
],
[
86,
87
],
[
86,
88
],
[
75,
89
],
[
89,
90
],
[
89,
91
],
[
75,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
95,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
106,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
102,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
124,
125
],
[
125,
126
],
[
94,
127
],
[
127,
128
],
[
75,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
132,
140
],
[
140,
141
],
[
141,
142
],
[
75,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
147,
151
],
[
151,
152
],
[
151,
153
],
[
143,
154
],
[
154,
155
],
[
75,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
160,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
166,
168
],
[
159,
169
],
[
169,
170
],
[
158,
171
],
[
171,
172
],
[
172,
173
],
[
75,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
177,
181
],
[
181,
182
],
[
176,
183
],
[
183,
184
],
[
183,
185
],
[
176,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
176,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
195,
198
],
[
194,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
176,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
75,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
210,
214
],
[
214,
215
],
[
209,
216
],
[
216,
217
],
[
216,
218
],
[
209,
219
],
[
219,
220
],
[
219,
221
],
[
209,
222
],
[
222,
223
],
[
222,
224
],
[
224,
225
],
[
209,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
226,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
230,
234
],
[
234,
235
],
[
234,
236
],
[
236,
237
],
[
209,
238
],
[
238,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
239,
243
],
[
243,
244
],
[
243,
245
],
[
238,
246
],
[
246,
247
],
[
247,
248
],
[
209,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
253,
257
],
[
257,
258
],
[
257,
259
],
[
252,
260
],
[
260,
261
],
[
261,
262
],
[
261,
263
],
[
260,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
266,
268
],
[
252,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
270,
275
],
[
275,
276
],
[
276,
277
],
[
276,
278
],
[
269,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
283,
284
],
[
281,
285
],
[
269,
286
],
[
286,
287
],
[
287,
288
],
[
251,
289
],
[
289,
290
],
[
289,
291
],
[
291,
292
],
[
75,
293
],
[
293,
294
],
[
293,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
298,
299
],
[
295,
300
],
[
300,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
304,
305
],
[
304,
306
],
[
301,
307
],
[
307,
308
],
[
307,
309
],
[
309,
310
],
[
309,
311
],
[
300,
312
],
[
312,
313
],
[
295,
314
],
[
314,
315
],
[
75,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
320,
323
],
[
323,
324
],
[
0,
325
],
[
325,
326
],
[
325,
327
]
] |
[
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int N = fs.nextInt();\n int[] arr = new int[N+1];\n\n for (int i = 0; i < N-1; ++i) {\n arr[fs.nextInt()]++;\n }\n\n for (int i = 1; i < N+1; ++i) {\n System.out.println(arr[i]);\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() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n\n public String next() {\n if (!hasNext()) 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()) 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) throw new NumberFormatException();\n return (int) nl;\n }\n\n public double nextDouble() { return Double.parseDouble(next());}\n}\n\n",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int N = fs.nextInt();\n int[] arr = new int[N+1];\n\n for (int i = 0; i < N-1; ++i) {\n arr[fs.nextInt()]++;\n }\n\n for (int i = 1; i < N+1; ++i) {\n System.out.println(arr[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int N = fs.nextInt();\n int[] arr = new int[N+1];\n\n for (int i = 0; i < N-1; ++i) {\n arr[fs.nextInt()]++;\n }\n\n for (int i = 1; i < N+1; ++i) {\n System.out.println(arr[i]);\n }\n }",
"main",
"{\n FastScanner fs = new FastScanner();\n int N = fs.nextInt();\n int[] arr = new int[N+1];\n\n for (int i = 0; i < N-1; ++i) {\n arr[fs.nextInt()]++;\n }\n\n for (int i = 1; i < N+1; ++i) {\n System.out.println(arr[i]);\n }\n }",
"FastScanner fs = new FastScanner();",
"fs",
"new FastScanner()",
"int N = fs.nextInt();",
"N",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int[] arr = new int[N+1];",
"arr",
"new int[N+1]",
"N+1",
"N",
"1",
"for (int i = 0; i < N-1; ++i) {\n arr[fs.nextInt()]++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N-1",
"i",
"N-1",
"N",
"1",
"++i",
"++i",
"i",
"{\n arr[fs.nextInt()]++;\n }",
"{\n arr[fs.nextInt()]++;\n }",
"arr[fs.nextInt()]++",
"arr[fs.nextInt()]",
"arr",
"fs.nextInt()",
"fs.nextInt",
"fs",
"for (int i = 1; i < N+1; ++i) {\n System.out.println(arr[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < N+1",
"i",
"N+1",
"N",
"1",
"++i",
"++i",
"i",
"{\n System.out.println(arr[i]);\n }",
"{\n System.out.println(arr[i]);\n }",
"System.out.println(arr[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"arr[i]",
"arr",
"i",
"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() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n\n public String next() {\n if (!hasNext()) 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()) 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) throw new NumberFormatException();\n return (int) nl;\n }\n\n public double nextDouble() { return Double.parseDouble(next());}\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() { if (hasNextByte()) return buffer[ptr++]; else return -1;}",
"readByte",
"{ if (hasNextByte()) return buffer[ptr++]; else return -1;}",
"if (hasNextByte()) return buffer[ptr++]; else return -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}",
"isPrintableChar",
"{ return 33 <= c && c <= 126;}",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}",
"hasNext",
"{ while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}",
"while(hasNextByte() && !isPrintableChar(buffer[ptr])) 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()) 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()) 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()) 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()) 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()) 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()) 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) throw new NumberFormatException();\n return (int) nl;\n }",
"nextInt",
"{\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) 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() { return Double.parseDouble(next());}",
"nextDouble",
"{ return Double.parseDouble(next());}",
"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 fs = new FastScanner();\n int N = fs.nextInt();\n int[] arr = new int[N+1];\n\n for (int i = 0; i < N-1; ++i) {\n arr[fs.nextInt()]++;\n }\n\n for (int i = 1; i < N+1; ++i) {\n System.out.println(arr[i]);\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int N = fs.nextInt();\n int[] arr = new int[N+1];\n\n for (int i = 0; i < N-1; ++i) {\n arr[fs.nextInt()]++;\n }\n\n for (int i = 1; i < N+1; ++i) {\n System.out.println(arr[i]);\n }\n }\n}",
"Main"
] |
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int N = fs.nextInt();
int[] arr = new int[N+1];
for (int i = 0; i < N-1; ++i) {
arr[fs.nextInt()]++;
}
for (int i = 1; i < N+1; ++i) {
System.out.println(arr[i]);
}
}
}
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,
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,
2,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
2,
18,
13,
13,
17,
4,
18,
13,
4,
18,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
12,
13,
30,
0,
13,
4,
18,
4,
18,
4,
18,
13,
17,
17,
17,
17,
17,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
20,
29,
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,
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,
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,
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
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
467,
26
],
[
467,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
29,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
29,
40
],
[
40,
41
],
[
40,
42
],
[
29,
43
],
[
43,
44
],
[
43,
45
],
[
29,
46
],
[
46,
47
],
[
46,
48
],
[
29,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
49,
53
],
[
49,
54
],
[
29,
55
],
[
55,
56
],
[
56,
57
],
[
27,
58
],
[
58,
59
],
[
467,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
64,
78
],
[
78,
79
],
[
78,
80
],
[
64,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
82,
92
],
[
92,
93
],
[
93,
94
],
[
82,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
64,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
62,
114
],
[
114,
115
],
[
62,
116
],
[
116,
117
],
[
62,
118
],
[
118,
119
],
[
60,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
131,
135
],
[
129,
136
],
[
129,
137
],
[
127,
138
],
[
127,
139
],
[
124,
140
],
[
140,
141
],
[
122,
142
],
[
142,
143
],
[
120,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
146,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
146,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
168,
171
],
[
146,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
180,
181
],
[
179,
182
],
[
146,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
190,
193
],
[
146,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
194,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
146,
205
],
[
205,
206
],
[
206,
207
],
[
206,
208
],
[
205,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
213,
214
],
[
212,
215
],
[
146,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
216,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
223,
226
],
[
146,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
231,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
235,
236
],
[
234,
237
],
[
146,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
238,
242
],
[
242,
243
],
[
243,
244
],
[
146,
245
],
[
245,
246
],
[
144,
247
],
[
247,
248
],
[
467,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
249,
253
],
[
253,
254
],
[
253,
255
],
[
249,
257
],
[
257,
258
],
[
249,
259
],
[
259,
260
],
[
249,
261
],
[
261,
262
],
[
249,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
266,
270
],
[
263,
271
],
[
271,
272
],
[
249,
273
],
[
273,
274
],
[
273,
275
],
[
275,
276
],
[
276,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
276,
281
],
[
281,
282
],
[
282,
283
],
[
275,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
284,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
288,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
295,
296
],
[
296,
297
],
[
292,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
301,
302
],
[
302,
303
],
[
301,
304
],
[
288,
305
],
[
305,
306
],
[
306,
307
],
[
306,
308
],
[
305,
309
],
[
309,
310
],
[
310,
311
],
[
311,
312
],
[
275,
313
],
[
313,
314
],
[
314,
315
],
[
314,
316
],
[
316,
317
],
[
249,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
323,
324
],
[
320,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
325,
329
],
[
329,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
320,
334
],
[
334,
335
],
[
334,
336
],
[
320,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
337,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
341,
346
],
[
346,
347
],
[
346,
348
],
[
348,
349
],
[
320,
350
],
[
350,
351
],
[
350,
352
],
[
320,
353
],
[
353,
354
],
[
354,
355
],
[
355,
356
],
[
355,
357
],
[
353,
358
],
[
358,
359
],
[
359,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
360,
364
],
[
364,
365
],
[
364,
366
],
[
359,
367
],
[
367,
368
],
[
368,
369
],
[
358,
370
],
[
370,
371
],
[
370,
372
],
[
358,
373
],
[
373,
374
],
[
373,
375
],
[
375,
376
],
[
375,
377
],
[
358,
378
],
[
378,
379
],
[
378,
380
],
[
380,
381
],
[
320,
382
],
[
382,
383
],
[
383,
384
],
[
383,
385
],
[
249,
386
],
[
386,
387
],
[
386,
388
],
[
388,
389
],
[
389,
390
],
[
390,
391
],
[
390,
392
],
[
389,
393
],
[
393,
394
],
[
394,
395
],
[
395,
396
],
[
396,
397
],
[
395,
398
],
[
388,
399
],
[
399,
400
],
[
400,
401
],
[
400,
402
],
[
386,
403
],
[
403,
404
],
[
249,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
408,
409
],
[
412,
410
],
[
422,
411
],
[
419,
412
],
[
412,
413
],
[
413,
414
],
[
413,
415
],
[
412,
416
],
[
416,
417
],
[
416,
418
],
[
419,
419
],
[
419,
420
],
[
419,
421
],
[
422,
422
],
[
422,
423
],
[
422,
424
],
[
412,
425
],
[
425,
426
],
[
425,
427
],
[
427,
428
],
[
405,
429
],
[
429,
430
],
[
249,
431
],
[
431,
432
],
[
431,
433
],
[
433,
434
],
[
434,
435
],
[
434,
436
],
[
433,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
440,
442
],
[
438,
443
],
[
443,
444
],
[
443,
445
],
[
438,
446
],
[
446,
447
],
[
447,
448
],
[
438,
449
],
[
449,
450
],
[
450,
451
],
[
451,
452
],
[
451,
453
],
[
450,
454
],
[
454,
455
],
[
433,
456
],
[
456,
457
],
[
431,
458
],
[
458,
459
],
[
249,
460
],
[
460,
461
],
[
460,
462
],
[
462,
463
],
[
462,
464
],
[
464,
465
],
[
0,
466
],
[
466,
467
],
[
466,
468
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\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 */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int[] arr = s.nextIntArray(n - 1);\n int[] ans = new int[n];\n ;\n ;\n ;\n ;\n ;\n for (int i = 0; i < n - 1; i++) {\n ans[arr[i] - 1]++;\n }\n\n out.println(CManagement.arrays.printArr(ans));\n }\n\n private static class arrays {\n static String formatString(String str) {\n str = str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\");\n return str;\n }\n\n static StringBuilder printArr(Object arr) {\n String str = null;\n if (arr instanceof int[]) {\n str = Arrays.toString((int[]) arr);\n }\n\n if (arr instanceof long[]) {\n str = Arrays.toString((long[]) arr);\n }\n\n if (arr instanceof char[]) {\n str = Arrays.toString((char[]) arr);\n }\n\n if (arr instanceof boolean[]) {\n str = Arrays.toString((boolean[]) arr);\n }\n\n if (arr instanceof byte[]) {\n str = Arrays.toString((byte[]) arr);\n }\n\n if (arr instanceof double[]) {\n str = Arrays.toString((double[]) arr);\n }\n\n if (arr instanceof float[]) {\n str = Arrays.toString((float[]) arr);\n }\n\n if (arr instanceof short[]) {\n str = Arrays.toString((short[]) arr);\n }\n\n if (str != null) {\n return new StringBuilder(formatString(str));\n }\n\n return null;\n\n }\n\n }\n\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(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 nextInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\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.Arrays;",
"Arrays",
"java.util",
"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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int[] arr = s.nextIntArray(n - 1);\n int[] ans = new int[n];\n ;\n ;\n ;\n ;\n ;\n for (int i = 0; i < n - 1; i++) {\n ans[arr[i] - 1]++;\n }\n\n out.println(CManagement.arrays.printArr(ans));\n }\n\n private static class arrays {\n static String formatString(String str) {\n str = str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\");\n return str;\n }\n\n static StringBuilder printArr(Object arr) {\n String str = null;\n if (arr instanceof int[]) {\n str = Arrays.toString((int[]) arr);\n }\n\n if (arr instanceof long[]) {\n str = Arrays.toString((long[]) arr);\n }\n\n if (arr instanceof char[]) {\n str = Arrays.toString((char[]) arr);\n }\n\n if (arr instanceof boolean[]) {\n str = Arrays.toString((boolean[]) arr);\n }\n\n if (arr instanceof byte[]) {\n str = Arrays.toString((byte[]) arr);\n }\n\n if (arr instanceof double[]) {\n str = Arrays.toString((double[]) arr);\n }\n\n if (arr instanceof float[]) {\n str = Arrays.toString((float[]) arr);\n }\n\n if (arr instanceof short[]) {\n str = Arrays.toString((short[]) arr);\n }\n\n if (str != null) {\n return new StringBuilder(formatString(str));\n }\n\n return null;\n\n }\n\n }\n\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(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 nextInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\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",
"FastReader in = new FastReader(inputStream);",
"in",
"new FastReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"CManagement solver = new CManagement();",
"solver",
"new CManagement()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class CManagement {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int[] arr = s.nextIntArray(n - 1);\n int[] ans = new int[n];\n ;\n ;\n ;\n ;\n ;\n for (int i = 0; i < n - 1; i++) {\n ans[arr[i] - 1]++;\n }\n\n out.println(CManagement.arrays.printArr(ans));\n }\n\n private static class arrays {\n static String formatString(String str) {\n str = str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\");\n return str;\n }\n\n static StringBuilder printArr(Object arr) {\n String str = null;\n if (arr instanceof int[]) {\n str = Arrays.toString((int[]) arr);\n }\n\n if (arr instanceof long[]) {\n str = Arrays.toString((long[]) arr);\n }\n\n if (arr instanceof char[]) {\n str = Arrays.toString((char[]) arr);\n }\n\n if (arr instanceof boolean[]) {\n str = Arrays.toString((boolean[]) arr);\n }\n\n if (arr instanceof byte[]) {\n str = Arrays.toString((byte[]) arr);\n }\n\n if (arr instanceof double[]) {\n str = Arrays.toString((double[]) arr);\n }\n\n if (arr instanceof float[]) {\n str = Arrays.toString((float[]) arr);\n }\n\n if (arr instanceof short[]) {\n str = Arrays.toString((short[]) arr);\n }\n\n if (str != null) {\n return new StringBuilder(formatString(str));\n }\n\n return null;\n\n }\n\n }\n\n }",
"CManagement",
"public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int[] arr = s.nextIntArray(n - 1);\n int[] ans = new int[n];\n ;\n ;\n ;\n ;\n ;\n for (int i = 0; i < n - 1; i++) {\n ans[arr[i] - 1]++;\n }\n\n out.println(CManagement.arrays.printArr(ans));\n }",
"solve",
"{\n int n = s.nextInt();\n int[] arr = s.nextIntArray(n - 1);\n int[] ans = new int[n];\n ;\n ;\n ;\n ;\n ;\n for (int i = 0; i < n - 1; i++) {\n ans[arr[i] - 1]++;\n }\n\n out.println(CManagement.arrays.printArr(ans));\n }",
"int n = s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int[] arr = s.nextIntArray(n - 1);",
"arr",
"s.nextIntArray(n - 1)",
"s.nextIntArray",
"s",
"n - 1",
"n",
"1",
"int[] ans = new int[n];",
"ans",
"new int[n]",
"n",
"for (int i = 0; i < n - 1; i++) {\n ans[arr[i] - 1]++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 1",
"i",
"n - 1",
"n",
"1",
"i++",
"i++",
"i",
"{\n ans[arr[i] - 1]++;\n }",
"{\n ans[arr[i] - 1]++;\n }",
"ans[arr[i] - 1]++",
"ans[arr[i] - 1]",
"ans",
"arr[i] - 1",
"arr[i]",
"arr",
"i",
"1",
"out.println(CManagement.arrays.printArr(ans))",
"out.println",
"out",
"CManagement.arrays.printArr(ans)",
"CManagement.arrays.printArr",
"CManagement.arrays",
"CManagement",
"CManagement.arrays",
"ans",
"int testNumber",
"testNumber",
"FastReader s",
"s",
"PrintWriter out",
"out",
"private static class arrays {\n static String formatString(String str) {\n str = str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\");\n return str;\n }\n\n static StringBuilder printArr(Object arr) {\n String str = null;\n if (arr instanceof int[]) {\n str = Arrays.toString((int[]) arr);\n }\n\n if (arr instanceof long[]) {\n str = Arrays.toString((long[]) arr);\n }\n\n if (arr instanceof char[]) {\n str = Arrays.toString((char[]) arr);\n }\n\n if (arr instanceof boolean[]) {\n str = Arrays.toString((boolean[]) arr);\n }\n\n if (arr instanceof byte[]) {\n str = Arrays.toString((byte[]) arr);\n }\n\n if (arr instanceof double[]) {\n str = Arrays.toString((double[]) arr);\n }\n\n if (arr instanceof float[]) {\n str = Arrays.toString((float[]) arr);\n }\n\n if (arr instanceof short[]) {\n str = Arrays.toString((short[]) arr);\n }\n\n if (str != null) {\n return new StringBuilder(formatString(str));\n }\n\n return null;\n\n }\n\n }",
"arrays",
"static String formatString(String str) {\n str = str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\");\n return str;\n }",
"formatString",
"{\n str = str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\");\n return str;\n }",
"str = str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\")",
"str",
"str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\")",
"str.replace(\",\", \"\").replace(\"[\", \"\").replace",
"str.replace(\",\", \"\").replace(\"[\", \"\")",
"str.replace(\",\", \"\").replace",
"str.replace(\",\", \"\")",
"str.replace",
"str",
"\",\"",
"\"\"",
"\"[\"",
"\"\"",
"\"]\"",
"\"\"",
"return str;",
"str",
"String str",
"str",
"static StringBuilder printArr(Object arr) {\n String str = null;\n if (arr instanceof int[]) {\n str = Arrays.toString((int[]) arr);\n }\n\n if (arr instanceof long[]) {\n str = Arrays.toString((long[]) arr);\n }\n\n if (arr instanceof char[]) {\n str = Arrays.toString((char[]) arr);\n }\n\n if (arr instanceof boolean[]) {\n str = Arrays.toString((boolean[]) arr);\n }\n\n if (arr instanceof byte[]) {\n str = Arrays.toString((byte[]) arr);\n }\n\n if (arr instanceof double[]) {\n str = Arrays.toString((double[]) arr);\n }\n\n if (arr instanceof float[]) {\n str = Arrays.toString((float[]) arr);\n }\n\n if (arr instanceof short[]) {\n str = Arrays.toString((short[]) arr);\n }\n\n if (str != null) {\n return new StringBuilder(formatString(str));\n }\n\n return null;\n\n }",
"printArr",
"{\n String str = null;\n if (arr instanceof int[]) {\n str = Arrays.toString((int[]) arr);\n }\n\n if (arr instanceof long[]) {\n str = Arrays.toString((long[]) arr);\n }\n\n if (arr instanceof char[]) {\n str = Arrays.toString((char[]) arr);\n }\n\n if (arr instanceof boolean[]) {\n str = Arrays.toString((boolean[]) arr);\n }\n\n if (arr instanceof byte[]) {\n str = Arrays.toString((byte[]) arr);\n }\n\n if (arr instanceof double[]) {\n str = Arrays.toString((double[]) arr);\n }\n\n if (arr instanceof float[]) {\n str = Arrays.toString((float[]) arr);\n }\n\n if (arr instanceof short[]) {\n str = Arrays.toString((short[]) arr);\n }\n\n if (str != null) {\n return new StringBuilder(formatString(str));\n }\n\n return null;\n\n }",
"String str = null;",
"str",
"null",
"if (arr instanceof int[]) {\n str = Arrays.toString((int[]) arr);\n }",
"arr instanceof int[]",
"arr",
"int[]",
"{\n str = Arrays.toString((int[]) arr);\n }",
"str = Arrays.toString((int[]) arr)",
"str",
"Arrays.toString((int[]) arr)",
"Arrays.toString",
"Arrays",
"(int[]) arr",
"if (arr instanceof long[]) {\n str = Arrays.toString((long[]) arr);\n }",
"arr instanceof long[]",
"arr",
"long[]",
"{\n str = Arrays.toString((long[]) arr);\n }",
"str = Arrays.toString((long[]) arr)",
"str",
"Arrays.toString((long[]) arr)",
"Arrays.toString",
"Arrays",
"(long[]) arr",
"if (arr instanceof char[]) {\n str = Arrays.toString((char[]) arr);\n }",
"arr instanceof char[]",
"arr",
"char[]",
"{\n str = Arrays.toString((char[]) arr);\n }",
"str = Arrays.toString((char[]) arr)",
"str",
"Arrays.toString((char[]) arr)",
"Arrays.toString",
"Arrays",
"(char[]) arr",
"if (arr instanceof boolean[]) {\n str = Arrays.toString((boolean[]) arr);\n }",
"arr instanceof boolean[]",
"arr",
"boolean[]",
"{\n str = Arrays.toString((boolean[]) arr);\n }",
"str = Arrays.toString((boolean[]) arr)",
"str",
"Arrays.toString((boolean[]) arr)",
"Arrays.toString",
"Arrays",
"(boolean[]) arr",
"if (arr instanceof byte[]) {\n str = Arrays.toString((byte[]) arr);\n }",
"arr instanceof byte[]",
"arr",
"byte[]",
"{\n str = Arrays.toString((byte[]) arr);\n }",
"str = Arrays.toString((byte[]) arr)",
"str",
"Arrays.toString((byte[]) arr)",
"Arrays.toString",
"Arrays",
"(byte[]) arr",
"if (arr instanceof double[]) {\n str = Arrays.toString((double[]) arr);\n }",
"arr instanceof double[]",
"arr",
"double[]",
"{\n str = Arrays.toString((double[]) arr);\n }",
"str = Arrays.toString((double[]) arr)",
"str",
"Arrays.toString((double[]) arr)",
"Arrays.toString",
"Arrays",
"(double[]) arr",
"if (arr instanceof float[]) {\n str = Arrays.toString((float[]) arr);\n }",
"arr instanceof float[]",
"arr",
"float[]",
"{\n str = Arrays.toString((float[]) arr);\n }",
"str = Arrays.toString((float[]) arr)",
"str",
"Arrays.toString((float[]) arr)",
"Arrays.toString",
"Arrays",
"(float[]) arr",
"if (arr instanceof short[]) {\n str = Arrays.toString((short[]) arr);\n }",
"arr instanceof short[]",
"arr",
"short[]",
"{\n str = Arrays.toString((short[]) arr);\n }",
"str = Arrays.toString((short[]) arr)",
"str",
"Arrays.toString((short[]) arr)",
"Arrays.toString",
"Arrays",
"(short[]) arr",
"if (str != null) {\n return new StringBuilder(formatString(str));\n }",
"str != null",
"str",
"null",
"{\n return new StringBuilder(formatString(str));\n }",
"return new StringBuilder(formatString(str));",
"new StringBuilder(formatString(str))",
"return null;",
"null",
"Object arr",
"arr",
"static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(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 nextInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }",
"FastReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private FastReader.SpaceCharFilter filter;",
"filter",
"public FastReader(InputStream stream) {\n this.stream = stream;\n }",
"FastReader",
"{\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 nextInt() {\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 }",
"nextInt",
"{\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",
"public 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",
"public 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 int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }",
"nextIntArray",
"{\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\n }",
"int[] array = new int[n];",
"array",
"new int[n]",
"n",
"for (int i = 0; i < n; ++i) array[i] = nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"array[i] = nextInt();",
"array[i] = nextInt()",
"array[i]",
"array",
"i",
"nextInt()",
"nextInt",
"return array;",
"array",
"int n",
"n",
"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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int[] arr = s.nextIntArray(n - 1);\n int[] ans = new int[n];\n ;\n ;\n ;\n ;\n ;\n for (int i = 0; i < n - 1; i++) {\n ans[arr[i] - 1]++;\n }\n\n out.println(CManagement.arrays.printArr(ans));\n }\n\n private static class arrays {\n static String formatString(String str) {\n str = str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\");\n return str;\n }\n\n static StringBuilder printArr(Object arr) {\n String str = null;\n if (arr instanceof int[]) {\n str = Arrays.toString((int[]) arr);\n }\n\n if (arr instanceof long[]) {\n str = Arrays.toString((long[]) arr);\n }\n\n if (arr instanceof char[]) {\n str = Arrays.toString((char[]) arr);\n }\n\n if (arr instanceof boolean[]) {\n str = Arrays.toString((boolean[]) arr);\n }\n\n if (arr instanceof byte[]) {\n str = Arrays.toString((byte[]) arr);\n }\n\n if (arr instanceof double[]) {\n str = Arrays.toString((double[]) arr);\n }\n\n if (arr instanceof float[]) {\n str = Arrays.toString((float[]) arr);\n }\n\n if (arr instanceof short[]) {\n str = Arrays.toString((short[]) arr);\n }\n\n if (str != null) {\n return new StringBuilder(formatString(str));\n }\n\n return null;\n\n }\n\n }\n\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(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 nextInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, FastReader s, PrintWriter out) {\n int n = s.nextInt();\n int[] arr = s.nextIntArray(n - 1);\n int[] ans = new int[n];\n ;\n ;\n ;\n ;\n ;\n for (int i = 0; i < n - 1; i++) {\n ans[arr[i] - 1]++;\n }\n\n out.println(CManagement.arrays.printArr(ans));\n }\n\n private static class arrays {\n static String formatString(String str) {\n str = str.replace(\",\", \"\").replace(\"[\", \"\").replace(\"]\", \"\");\n return str;\n }\n\n static StringBuilder printArr(Object arr) {\n String str = null;\n if (arr instanceof int[]) {\n str = Arrays.toString((int[]) arr);\n }\n\n if (arr instanceof long[]) {\n str = Arrays.toString((long[]) arr);\n }\n\n if (arr instanceof char[]) {\n str = Arrays.toString((char[]) arr);\n }\n\n if (arr instanceof boolean[]) {\n str = Arrays.toString((boolean[]) arr);\n }\n\n if (arr instanceof byte[]) {\n str = Arrays.toString((byte[]) arr);\n }\n\n if (arr instanceof double[]) {\n str = Arrays.toString((double[]) arr);\n }\n\n if (arr instanceof float[]) {\n str = Arrays.toString((float[]) arr);\n }\n\n if (arr instanceof short[]) {\n str = Arrays.toString((short[]) arr);\n }\n\n if (str != null) {\n return new StringBuilder(formatString(str));\n }\n\n return null;\n\n }\n\n }\n\n }\n\n static class FastReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private FastReader.SpaceCharFilter filter;\n\n public FastReader(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 nextInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; ++i) array[i] = nextInt();\n return array;\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.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
FastReader in = new FastReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
CManagement solver = new CManagement();
solver.solve(1, in, out);
out.close();
}
static class CManagement {
public void solve(int testNumber, FastReader s, PrintWriter out) {
int n = s.nextInt();
int[] arr = s.nextIntArray(n - 1);
int[] ans = new int[n];
;
;
;
;
;
for (int i = 0; i < n - 1; i++) {
ans[arr[i] - 1]++;
}
out.println(CManagement.arrays.printArr(ans));
}
private static class arrays {
static String formatString(String str) {
str = str.replace(",", "").replace("[", "").replace("]", "");
return str;
}
static StringBuilder printArr(Object arr) {
String str = null;
if (arr instanceof int[]) {
str = Arrays.toString((int[]) arr);
}
if (arr instanceof long[]) {
str = Arrays.toString((long[]) arr);
}
if (arr instanceof char[]) {
str = Arrays.toString((char[]) arr);
}
if (arr instanceof boolean[]) {
str = Arrays.toString((boolean[]) arr);
}
if (arr instanceof byte[]) {
str = Arrays.toString((byte[]) arr);
}
if (arr instanceof double[]) {
str = Arrays.toString((double[]) arr);
}
if (arr instanceof float[]) {
str = Arrays.toString((float[]) arr);
}
if (arr instanceof short[]) {
str = Arrays.toString((short[]) arr);
}
if (str != null) {
return new StringBuilder(formatString(str));
}
return null;
}
}
}
static class FastReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private FastReader.SpaceCharFilter filter;
public FastReader(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 nextInt() {
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;
}
public boolean isSpaceChar(int c) {
if (filter != null) {
return filter.isSpaceChar(c);
}
return isWhitespace(c);
}
public static boolean isWhitespace(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public int[] nextIntArray(int n) {
int[] array = new int[n];
for (int i = 0; i < n; ++i) array[i] = nextInt();
return array;
}
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,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
17,
0,
18,
13,
2,
13,
17,
13,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
18,
13,
13,
28,
13,
13,
30,
30,
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
],
[
106,
8
],
[
106,
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
],
[
27,
28
],
[
28,
29
],
[
25,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
11,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
39,
49
],
[
49,
50
],
[
50,
51
],
[
39,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
60,
62
],
[
56,
63
],
[
53,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
64,
70
],
[
11,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
71,
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
],
[
89,
91
],
[
11,
92
],
[
92,
93
],
[
92,
94
],
[
92,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
9,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] line = br.readLine().split(\" \");\n int[] relation = new int[n];\n int[] answer = new int[n];\n for(int i = 0; i < line.length; i++){\n int boss = Integer.parseInt(line[i]) - 1;\n relation[i + 1] = boss;\n }\n for(int i = n - 1; i > 0; i--){\n answer[relation[i]]++;\n }\n for(int a : answer){\n System.out.println(a);\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] line = br.readLine().split(\" \");\n int[] relation = new int[n];\n int[] answer = new int[n];\n for(int i = 0; i < line.length; i++){\n int boss = Integer.parseInt(line[i]) - 1;\n relation[i + 1] = boss;\n }\n for(int i = n - 1; i > 0; i--){\n answer[relation[i]]++;\n }\n for(int a : answer){\n System.out.println(a);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] line = br.readLine().split(\" \");\n int[] relation = new int[n];\n int[] answer = new int[n];\n for(int i = 0; i < line.length; i++){\n int boss = Integer.parseInt(line[i]) - 1;\n relation[i + 1] = boss;\n }\n for(int i = n - 1; i > 0; i--){\n answer[relation[i]]++;\n }\n for(int a : answer){\n System.out.println(a);\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] line = br.readLine().split(\" \");\n int[] relation = new int[n];\n int[] answer = new int[n];\n for(int i = 0; i < line.length; i++){\n int boss = Integer.parseInt(line[i]) - 1;\n relation[i + 1] = boss;\n }\n for(int i = n - 1; i > 0; i--){\n answer[relation[i]]++;\n }\n for(int a : answer){\n System.out.println(a);\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"String[] line = br.readLine().split(\" \");",
"line",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int[] relation = new int[n];",
"relation",
"new int[n]",
"n",
"int[] answer = new int[n];",
"answer",
"new int[n]",
"n",
"for(int i = 0; i < line.length; i++){\n int boss = Integer.parseInt(line[i]) - 1;\n relation[i + 1] = boss;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < line.length",
"i",
"line.length",
"line",
"line.length",
"i++",
"i++",
"i",
"{\n int boss = Integer.parseInt(line[i]) - 1;\n relation[i + 1] = boss;\n }",
"{\n int boss = Integer.parseInt(line[i]) - 1;\n relation[i + 1] = boss;\n }",
"int boss = Integer.parseInt(line[i]) - 1;",
"boss",
"Integer.parseInt(line[i]) - 1",
"Integer.parseInt(line[i])",
"Integer.parseInt",
"Integer",
"line[i]",
"line",
"i",
"1",
"relation[i + 1] = boss",
"relation[i + 1]",
"relation",
"i + 1",
"i",
"1",
"boss",
"for(int i = n - 1; i > 0; i--){\n answer[relation[i]]++;\n }",
"int i = n - 1;",
"int i = n - 1;",
"i",
"n - 1",
"n",
"1",
"i > 0",
"i",
"0",
"i--",
"i--",
"i",
"{\n answer[relation[i]]++;\n }",
"{\n answer[relation[i]]++;\n }",
"answer[relation[i]]++",
"answer[relation[i]]",
"answer",
"relation[i]",
"relation",
"i",
"for(int a : answer){\n System.out.println(a);\n }",
"int a",
"answer",
"{\n System.out.println(a);\n }",
"{\n System.out.println(a);\n }",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] line = br.readLine().split(\" \");\n int[] relation = new int[n];\n int[] answer = new int[n];\n for(int i = 0; i < line.length; i++){\n int boss = Integer.parseInt(line[i]) - 1;\n relation[i + 1] = boss;\n }\n for(int i = n - 1; i > 0; i--){\n answer[relation[i]]++;\n }\n for(int a : answer){\n System.out.println(a);\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] line = br.readLine().split(\" \");\n int[] relation = new int[n];\n int[] answer = new int[n];\n for(int i = 0; i < line.length; i++){\n int boss = Integer.parseInt(line[i]) - 1;\n relation[i + 1] = boss;\n }\n for(int i = n - 1; i > 0; i--){\n answer[relation[i]]++;\n }\n for(int a : answer){\n System.out.println(a);\n }\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String[] line = br.readLine().split(" ");
int[] relation = new int[n];
int[] answer = new int[n];
for(int i = 0; i < line.length; i++){
int boss = Integer.parseInt(line[i]) - 1;
relation[i + 1] = boss;
}
for(int i = n - 1; i > 0; i--){
answer[relation[i]]++;
}
for(int a : answer){
System.out.println(a);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
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,
4,
18,
18,
13,
13,
18,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
39,
49
],
[
49,
50
],
[
50,
51
],
[
39,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
53,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
65,
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
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
6,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n\n \tint[] member = new int[N];\n\n\n \tfor(int i=0;i<N;i++) {\n \t\tmember[i] = 0;\n \t}\n\n \tfor(int i=0;i<N-1;i++) {\n \t\tint joshiNumber = sc.nextInt();\n \t\tmember[joshiNumber-1] = member[joshiNumber-1] + 1;\n \t}\n \tfor(int i=0;i<N;i++) {\n \t\tSystem.out.println(member[i]);\n \t}\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n\n \tint[] member = new int[N];\n\n\n \tfor(int i=0;i<N;i++) {\n \t\tmember[i] = 0;\n \t}\n\n \tfor(int i=0;i<N-1;i++) {\n \t\tint joshiNumber = sc.nextInt();\n \t\tmember[joshiNumber-1] = member[joshiNumber-1] + 1;\n \t}\n \tfor(int i=0;i<N;i++) {\n \t\tSystem.out.println(member[i]);\n \t}\n\n }\n}",
"Main",
"public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n\n \tint[] member = new int[N];\n\n\n \tfor(int i=0;i<N;i++) {\n \t\tmember[i] = 0;\n \t}\n\n \tfor(int i=0;i<N-1;i++) {\n \t\tint joshiNumber = sc.nextInt();\n \t\tmember[joshiNumber-1] = member[joshiNumber-1] + 1;\n \t}\n \tfor(int i=0;i<N;i++) {\n \t\tSystem.out.println(member[i]);\n \t}\n\n }",
"main",
"{\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n\n \tint[] member = new int[N];\n\n\n \tfor(int i=0;i<N;i++) {\n \t\tmember[i] = 0;\n \t}\n\n \tfor(int i=0;i<N-1;i++) {\n \t\tint joshiNumber = sc.nextInt();\n \t\tmember[joshiNumber-1] = member[joshiNumber-1] + 1;\n \t}\n \tfor(int i=0;i<N;i++) {\n \t\tSystem.out.println(member[i]);\n \t}\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] member = new int[N];",
"member",
"new int[N]",
"N",
"for(int i=0;i<N;i++) {\n \t\tmember[i] = 0;\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \t\tmember[i] = 0;\n \t}",
"{\n \t\tmember[i] = 0;\n \t}",
"member[i] = 0",
"member[i]",
"member",
"i",
"0",
"for(int i=0;i<N-1;i++) {\n \t\tint joshiNumber = sc.nextInt();\n \t\tmember[joshiNumber-1] = member[joshiNumber-1] + 1;\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n \t\tint joshiNumber = sc.nextInt();\n \t\tmember[joshiNumber-1] = member[joshiNumber-1] + 1;\n \t}",
"{\n \t\tint joshiNumber = sc.nextInt();\n \t\tmember[joshiNumber-1] = member[joshiNumber-1] + 1;\n \t}",
"int joshiNumber = sc.nextInt();",
"joshiNumber",
"sc.nextInt()",
"sc.nextInt",
"sc",
"member[joshiNumber-1] = member[joshiNumber-1] + 1",
"member[joshiNumber-1]",
"member",
"joshiNumber-1",
"joshiNumber",
"1",
"member[joshiNumber-1] + 1",
"member[joshiNumber-1]",
"member",
"joshiNumber-1",
"joshiNumber",
"1",
"1",
"for(int i=0;i<N;i++) {\n \t\tSystem.out.println(member[i]);\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \t\tSystem.out.println(member[i]);\n \t}",
"{\n \t\tSystem.out.println(member[i]);\n \t}",
"System.out.println(member[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"member[i]",
"member",
"i",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n\n \tint[] member = new int[N];\n\n\n \tfor(int i=0;i<N;i++) {\n \t\tmember[i] = 0;\n \t}\n\n \tfor(int i=0;i<N-1;i++) {\n \t\tint joshiNumber = sc.nextInt();\n \t\tmember[joshiNumber-1] = member[joshiNumber-1] + 1;\n \t}\n \tfor(int i=0;i<N;i++) {\n \t\tSystem.out.println(member[i]);\n \t}\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n //コード\n \tScanner sc = new Scanner(System.in);\n \tint N = sc.nextInt();\n\n \tint[] member = new int[N];\n\n\n \tfor(int i=0;i<N;i++) {\n \t\tmember[i] = 0;\n \t}\n\n \tfor(int i=0;i<N-1;i++) {\n \t\tint joshiNumber = sc.nextInt();\n \t\tmember[joshiNumber-1] = member[joshiNumber-1] + 1;\n \t}\n \tfor(int i=0;i<N;i++) {\n \t\tSystem.out.println(member[i]);\n \t}\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[] member = new int[N];
for(int i=0;i<N;i++) {
member[i] = 0;
}
for(int i=0;i<N-1;i++) {
int joshiNumber = sc.nextInt();
member[joshiNumber-1] = member[joshiNumber-1] + 1;
}
for(int i=0;i<N;i++) {
System.out.println(member[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
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,
4,
18,
18,
13,
13,
18,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
39,
49
],
[
49,
50
],
[
50,
51
],
[
39,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
57,
61
],
[
8,
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
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
6,
83
],
[
83,
84
]
] |
[
"import java.util.*;\n\nclass Main\n{\n public static void main(String[] args)\n {\n Scanner stdIn = new Scanner(System.in);\n int n = stdIn.nextInt();\n int ans[] = new int[n];\n \n for(int i = 0; i < n; i++)\n {\n ans[i] = 0;\n }\n \n for(int i = 0; i < n-1; i++){\n ans[stdIn.nextInt()-1] ++;\n }\n \n for(int i = 0; i < n; i++){\n System.out.println(ans[i]);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main\n{\n public static void main(String[] args)\n {\n Scanner stdIn = new Scanner(System.in);\n int n = stdIn.nextInt();\n int ans[] = new int[n];\n \n for(int i = 0; i < n; i++)\n {\n ans[i] = 0;\n }\n \n for(int i = 0; i < n-1; i++){\n ans[stdIn.nextInt()-1] ++;\n }\n \n for(int i = 0; i < n; i++){\n System.out.println(ans[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args)\n {\n Scanner stdIn = new Scanner(System.in);\n int n = stdIn.nextInt();\n int ans[] = new int[n];\n \n for(int i = 0; i < n; i++)\n {\n ans[i] = 0;\n }\n \n for(int i = 0; i < n-1; i++){\n ans[stdIn.nextInt()-1] ++;\n }\n \n for(int i = 0; i < n; i++){\n System.out.println(ans[i]);\n }\n }",
"main",
"{\n Scanner stdIn = new Scanner(System.in);\n int n = stdIn.nextInt();\n int ans[] = new int[n];\n \n for(int i = 0; i < n; i++)\n {\n ans[i] = 0;\n }\n \n for(int i = 0; i < n-1; i++){\n ans[stdIn.nextInt()-1] ++;\n }\n \n for(int i = 0; i < n; i++){\n System.out.println(ans[i]);\n }\n }",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int n = stdIn.nextInt();",
"n",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int ans[] = new int[n];",
"ans",
"new int[n]",
"n",
"for(int i = 0; i < n; i++)\n {\n ans[i] = 0;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n ans[i] = 0;\n }",
"{\n ans[i] = 0;\n }",
"ans[i] = 0",
"ans[i]",
"ans",
"i",
"0",
"for(int i = 0; i < n-1; i++){\n ans[stdIn.nextInt()-1] ++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n ans[stdIn.nextInt()-1] ++;\n }",
"{\n ans[stdIn.nextInt()-1] ++;\n }",
"ans[stdIn.nextInt()-1] ++",
"ans[stdIn.nextInt()-1]",
"ans",
"stdIn.nextInt()-1",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"1",
"for(int i = 0; i < n; i++){\n System.out.println(ans[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n System.out.println(ans[i]);\n }",
"{\n System.out.println(ans[i]);\n }",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"String[] args",
"args"
] |
import java.util.*;
class Main
{
public static void main(String[] args)
{
Scanner stdIn = new Scanner(System.in);
int n = stdIn.nextInt();
int ans[] = new int[n];
for(int i = 0; i < n; i++)
{
ans[i] = 0;
}
for(int i = 0; i < n-1; i++){
ans[stdIn.nextInt()-1] ++;
}
for(int i = 0; i < n; i++){
System.out.println(ans[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
8,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
50,
51
],
[
50,
52
],
[
8,
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
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
8,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
74,
84
],
[
84,
85
],
[
85,
86
],
[
74,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
6,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tint emp;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\temp = scan.nextInt();\n\t\tint[] array = new int[emp-1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tint[] manager = new int[emp+1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tmanager[array[i]]++;\n\t\t}\n\n\t\tfor(int i = 1; i < manager.length; i++) {\n\t\t\tSystem.out.println(manager[i]);\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\tint emp;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\temp = scan.nextInt();\n\t\tint[] array = new int[emp-1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tint[] manager = new int[emp+1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tmanager[array[i]]++;\n\t\t}\n\n\t\tfor(int i = 1; i < manager.length; i++) {\n\t\t\tSystem.out.println(manager[i]);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tint emp;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\temp = scan.nextInt();\n\t\tint[] array = new int[emp-1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tint[] manager = new int[emp+1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tmanager[array[i]]++;\n\t\t}\n\n\t\tfor(int i = 1; i < manager.length; i++) {\n\t\t\tSystem.out.println(manager[i]);\n\t\t}\n\t}",
"main",
"{\n\t\tint emp;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\temp = scan.nextInt();\n\t\tint[] array = new int[emp-1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tint[] manager = new int[emp+1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tmanager[array[i]]++;\n\t\t}\n\n\t\tfor(int i = 1; i < manager.length; i++) {\n\t\t\tSystem.out.println(manager[i]);\n\t\t}\n\t}",
"int emp;",
"emp",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"emp = scan.nextInt()",
"emp",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] array = new int[emp-1];",
"array",
"new int[emp-1]",
"emp-1",
"emp",
"1",
"for(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = scan.nextInt();\n\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\tarray[i] = scan.nextInt();\n\t\t}",
"{\n\t\t\tarray[i] = scan.nextInt();\n\t\t}",
"array[i] = scan.nextInt()",
"array[i]",
"array",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] manager = new int[emp+1];",
"manager",
"new int[emp+1]",
"emp+1",
"emp",
"1",
"for(int i = 0; i < array.length; i++) {\n\t\t\tmanager[array[i]]++;\n\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\tmanager[array[i]]++;\n\t\t}",
"{\n\t\t\tmanager[array[i]]++;\n\t\t}",
"manager[array[i]]++",
"manager[array[i]]",
"manager",
"array[i]",
"array",
"i",
"for(int i = 1; i < manager.length; i++) {\n\t\t\tSystem.out.println(manager[i]);\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < manager.length",
"i",
"manager.length",
"manager",
"manager.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(manager[i]);\n\t\t}",
"{\n\t\t\tSystem.out.println(manager[i]);\n\t\t}",
"System.out.println(manager[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"manager[i]",
"manager",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tint emp;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\temp = scan.nextInt();\n\t\tint[] array = new int[emp-1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tint[] manager = new int[emp+1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tmanager[array[i]]++;\n\t\t}\n\n\t\tfor(int i = 1; i < manager.length; i++) {\n\t\t\tSystem.out.println(manager[i]);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tint emp;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\temp = scan.nextInt();\n\t\tint[] array = new int[emp-1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = scan.nextInt();\n\t\t}\n\n\t\tint[] manager = new int[emp+1];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tmanager[array[i]]++;\n\t\t}\n\n\t\tfor(int i = 1; i < manager.length; i++) {\n\t\t\tSystem.out.println(manager[i]);\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int emp;
Scanner scan = new Scanner(System.in);
emp = scan.nextInt();
int[] array = new int[emp-1];
for(int i = 0; i < array.length; i++) {
array[i] = scan.nextInt();
}
int[] manager = new int[emp+1];
for(int i = 0; i < array.length; i++) {
manager[array[i]]++;
}
for(int i = 1; i < manager.length; i++) {
System.out.println(manager[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
0,
18,
13,
2,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
41,
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
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
6,
69
],
[
69,
70
]
] |
[
"import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w[] = new int[n];\n for(int i=0;i<n-1;i++) {\n \tint a = sc.nextInt();\n \tw[a-1] += 1;\n }\n for(int j=0;j<n;j++) {\n \tSystem.out.println(w[j]);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w[] = new int[n];\n for(int i=0;i<n-1;i++) {\n \tint a = sc.nextInt();\n \tw[a-1] += 1;\n }\n for(int j=0;j<n;j++) {\n \tSystem.out.println(w[j]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w[] = new int[n];\n for(int i=0;i<n-1;i++) {\n \tint a = sc.nextInt();\n \tw[a-1] += 1;\n }\n for(int j=0;j<n;j++) {\n \tSystem.out.println(w[j]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int w[] = new int[n];\n for(int i=0;i<n-1;i++) {\n \tint a = sc.nextInt();\n \tw[a-1] += 1;\n }\n for(int j=0;j<n;j++) {\n \tSystem.out.println(w[j]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int w[] = new int[n];",
"w",
"new int[n]",
"n",
"for(int i=0;i<n-1;i++) {\n \tint a = sc.nextInt();\n \tw[a-1] += 1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n \tint a = sc.nextInt();\n \tw[a-1] += 1;\n }",
"{\n \tint a = sc.nextInt();\n \tw[a-1] += 1;\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"w[a-1] += 1",
"w[a-1]",
"w",
"a-1",
"a",
"1",
"1",
"for(int j=0;j<n;j++) {\n \tSystem.out.println(w[j]);\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<n",
"j",
"n",
"j++",
"j++",
"j",
"{\n \tSystem.out.println(w[j]);\n }",
"{\n \tSystem.out.println(w[j]);\n }",
"System.out.println(w[j])",
"System.out.println",
"System.out",
"System",
"System.out",
"w[j]",
"w",
"j",
"String[] args",
"args"
] |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int w[] = new int[n];
for(int i=0;i<n-1;i++) {
int a = sc.nextInt();
w[a-1] += 1;
}
for(int j=0;j<n;j++) {
System.out.println(w[j]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
40,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
74,
5
],
[
74,
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
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
44,
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
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
6,
71
],
[
71,
72
],
[
0,
73
],
[
73,
74
],
[
73,
75
]
] |
[
"import java.util.*;\n\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[] a = new int[n+1];\n\t\tfor(int i = 0; i<n-1; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ta[x]++;\n\t\t}\n\t\tfor(int j= 1; j<=n ;j++){\n\t\t\tSystem.out.println(a[j]);\n\t\t}\n\t\tsc.close();\t\t\n\t}\n\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[] a = new int[n+1];\n\t\tfor(int i = 0; i<n-1; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ta[x]++;\n\t\t}\n\t\tfor(int j= 1; j<=n ;j++){\n\t\t\tSystem.out.println(a[j]);\n\t\t}\n\t\tsc.close();\t\t\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[] a = new int[n+1];\n\t\tfor(int i = 0; i<n-1; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ta[x]++;\n\t\t}\n\t\tfor(int j= 1; j<=n ;j++){\n\t\t\tSystem.out.println(a[j]);\n\t\t}\n\t\tsc.close();\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n+1];\n\t\tfor(int i = 0; i<n-1; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ta[x]++;\n\t\t}\n\t\tfor(int j= 1; j<=n ;j++){\n\t\t\tSystem.out.println(a[j]);\n\t\t}\n\t\tsc.close();\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[] a = new int[n+1];",
"a",
"new int[n+1]",
"n+1",
"n",
"1",
"for(int i = 0; i<n-1; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ta[x]++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint x = sc.nextInt();\n\t\t\ta[x]++;\n\t\t}",
"{\n\t\t\tint x = sc.nextInt();\n\t\t\ta[x]++;\n\t\t}",
"int x = sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a[x]++",
"a[x]",
"a",
"x",
"for(int j= 1; j<=n ;j++){\n\t\t\tSystem.out.println(a[j]);\n\t\t}",
"int j= 1;",
"int j= 1;",
"j",
"1",
"j<=n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t\tSystem.out.println(a[j]);\n\t\t}",
"{\n\t\t\tSystem.out.println(a[j]);\n\t\t}",
"System.out.println(a[j])",
"System.out.println",
"System.out",
"System",
"System.out",
"a[j]",
"a",
"j",
"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 = sc.nextInt();\n\t\tint[] a = new int[n+1];\n\t\tfor(int i = 0; i<n-1; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ta[x]++;\n\t\t}\n\t\tfor(int j= 1; j<=n ;j++){\n\t\t\tSystem.out.println(a[j]);\n\t\t}\n\t\tsc.close();\t\t\n\t}\n\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[] a = new int[n+1];\n\t\tfor(int i = 0; i<n-1; i++) {\n\t\t\tint x = sc.nextInt();\n\t\t\ta[x]++;\n\t\t}\n\t\tfor(int j= 1; j<=n ;j++){\n\t\t\tSystem.out.println(a[j]);\n\t\t}\n\t\tsc.close();\t\t\n\t}\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[] a = new int[n+1];
for(int i = 0; i<n-1; i++) {
int x = sc.nextInt();
a[x]++;
}
for(int j= 1; j<=n ;j++){
System.out.println(a[j]);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
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,
40,
18,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
71,
5
],
[
71,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
10,
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
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
10,
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
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
6,
68
],
[
68,
69
],
[
0,
70
],
[
70,
71
],
[
70,
72
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint n = sc.nextInt();\n\t\t\t\n\t\t\tint[] mCount = new int[n];\n\t\t\t\n\t\t\tfor(int i = 1 ; i < n ; i++ ) {\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0 ; i < n ; i++ ) {\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint n = sc.nextInt();\n\t\t\t\n\t\t\tint[] mCount = new int[n];\n\t\t\t\n\t\t\tfor(int i = 1 ; i < n ; i++ ) {\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0 ; i < n ; i++ ) {\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint n = sc.nextInt();\n\t\t\t\n\t\t\tint[] mCount = new int[n];\n\t\t\t\n\t\t\tfor(int i = 1 ; i < n ; i++ ) {\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0 ; i < n ; i++ ) {\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}",
"main",
"{\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint n = sc.nextInt();\n\t\t\t\n\t\t\tint[] mCount = new int[n];\n\t\t\t\n\t\t\tfor(int i = 1 ; i < n ; i++ ) {\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0 ; i < n ; i++ ) {\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}",
"try(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint n = sc.nextInt();\n\t\t\t\n\t\t\tint[] mCount = new int[n];\n\t\t\t\n\t\t\tfor(int i = 1 ; i < n ; i++ ) {\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0 ; i < n ; i++ ) {\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"{\n\t\t\t\n\n\t\t\tint n = sc.nextInt();\n\t\t\t\n\t\t\tint[] mCount = new int[n];\n\t\t\t\n\t\t\tfor(int i = 1 ; i < n ; i++ ) {\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0 ; i < n ; i++ ) {\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"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[] mCount = new int[n];",
"mCount",
"new int[n]",
"n",
"for(int i = 1 ; i < n ; i++ ) {\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}",
"int i = 1 ;",
"int i = 1 ;",
"i",
"1",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}",
"int id = sc.nextInt();",
"id",
"sc.nextInt()",
"sc.nextInt",
"sc",
"mCount[id-1]++",
"mCount[id-1]",
"mCount",
"id-1",
"id",
"1",
"for(int i = 0 ; i < n ; i++ ) {\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}",
"{\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}",
"System.out.println(mCount[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"mCount[i]",
"mCount",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint n = sc.nextInt();\n\t\t\t\n\t\t\tint[] mCount = new int[n];\n\t\t\t\n\t\t\tfor(int i = 1 ; i < n ; i++ ) {\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0 ; i < n ; i++ ) {\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint n = sc.nextInt();\n\t\t\t\n\t\t\tint[] mCount = new int[n];\n\t\t\t\n\t\t\tfor(int i = 1 ; i < n ; i++ ) {\n\t\t\t\t\n\t\t\t\tint id = sc.nextInt();\n\t\t\t\t\n\t\t\t\tmCount[id-1]++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0 ; i < n ; i++ ) {\n\t\t\t\tSystem.out.println(mCount[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n\n}",
"Main"
] |
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[] mCount = new int[n];
for(int i = 1 ; i < n ; i++ ) {
int id = sc.nextInt();
mCount[id-1]++;
}
for(int i = 0 ; i < n ; i++ ) {
System.out.println(mCount[i]);
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
18,
4,
18,
13,
17,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
2,
4,
18,
13,
18,
13,
13,
17,
0,
18,
13,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
98,
5
],
[
98,
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
],
[
21,
22
],
[
22,
23
],
[
19,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
27,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
8,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
40,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
61,
63
],
[
57,
64
],
[
54,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
8,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
74,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
6,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
] |
[
"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 String[] Am = (scn.nextLine()).split(\" \");\n Am = (scn.nextLine()).split(\" \");\n int[] Aresult = new int[N];\n int A = 0;\n for(int i=0;i<N-1;i++){\n A = Integer.valueOf(Am[i])-1;\n Aresult[A] = Aresult[A] + 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(Aresult[i]);\n }\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 String[] Am = (scn.nextLine()).split(\" \");\n Am = (scn.nextLine()).split(\" \");\n int[] Aresult = new int[N];\n int A = 0;\n for(int i=0;i<N-1;i++){\n A = Integer.valueOf(Am[i])-1;\n Aresult[A] = Aresult[A] + 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(Aresult[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n String[] Am = (scn.nextLine()).split(\" \");\n Am = (scn.nextLine()).split(\" \");\n int[] Aresult = new int[N];\n int A = 0;\n for(int i=0;i<N-1;i++){\n A = Integer.valueOf(Am[i])-1;\n Aresult[A] = Aresult[A] + 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(Aresult[i]);\n }\n }",
"main",
"{\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n String[] Am = (scn.nextLine()).split(\" \");\n Am = (scn.nextLine()).split(\" \");\n int[] Aresult = new int[N];\n int A = 0;\n for(int i=0;i<N-1;i++){\n A = Integer.valueOf(Am[i])-1;\n Aresult[A] = Aresult[A] + 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(Aresult[i]);\n }\n }",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int N = scn.nextInt();",
"N",
"scn.nextInt()",
"scn.nextInt",
"scn",
"String[] Am = (scn.nextLine()).split(\" \");",
"Am",
"(scn.nextLine()).split(\" \")",
"(scn.nextLine()).split",
"(scn.nextLine())",
"scn.nextLine",
"scn",
"\" \"",
"Am = (scn.nextLine()).split(\" \")",
"Am",
"(scn.nextLine()).split(\" \")",
"(scn.nextLine()).split",
"(scn.nextLine())",
"scn.nextLine",
"scn",
"\" \"",
"int[] Aresult = new int[N];",
"Aresult",
"new int[N]",
"N",
"int A = 0;",
"A",
"0",
"for(int i=0;i<N-1;i++){\n A = Integer.valueOf(Am[i])-1;\n Aresult[A] = Aresult[A] + 1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n A = Integer.valueOf(Am[i])-1;\n Aresult[A] = Aresult[A] + 1;\n }",
"{\n A = Integer.valueOf(Am[i])-1;\n Aresult[A] = Aresult[A] + 1;\n }",
"A = Integer.valueOf(Am[i])-1",
"A",
"Integer.valueOf(Am[i])-1",
"Integer.valueOf(Am[i])",
"Integer.valueOf",
"Integer",
"Am[i]",
"Am",
"i",
"1",
"Aresult[A] = Aresult[A] + 1",
"Aresult[A]",
"Aresult",
"A",
"Aresult[A] + 1",
"Aresult[A]",
"Aresult",
"A",
"1",
"for(int i=0;i<N;i++){\n System.out.println(Aresult[i]);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n System.out.println(Aresult[i]);\n }",
"{\n System.out.println(Aresult[i]);\n }",
"System.out.println(Aresult[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"Aresult[i]",
"Aresult",
"i",
"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 String[] Am = (scn.nextLine()).split(\" \");\n Am = (scn.nextLine()).split(\" \");\n int[] Aresult = new int[N];\n int A = 0;\n for(int i=0;i<N-1;i++){\n A = Integer.valueOf(Am[i])-1;\n Aresult[A] = Aresult[A] + 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(Aresult[i]);\n }\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 String[] Am = (scn.nextLine()).split(\" \");\n Am = (scn.nextLine()).split(\" \");\n int[] Aresult = new int[N];\n int A = 0;\n for(int i=0;i<N-1;i++){\n A = Integer.valueOf(Am[i])-1;\n Aresult[A] = Aresult[A] + 1;\n }\n for(int i=0;i<N;i++){\n System.out.println(Aresult[i]);\n }\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();
String[] Am = (scn.nextLine()).split(" ");
Am = (scn.nextLine()).split(" ");
int[] Aresult = new int[N];
int A = 0;
for(int i=0;i<N-1;i++){
A = Integer.valueOf(Am[i])-1;
Aresult[A] = Aresult[A] + 1;
}
for(int i=0;i<N;i++){
System.out.println(Aresult[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
0,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
40,
18,
13,
13,
41,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
40,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
18,
13,
13,
18,
13,
13,
4,
18,
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
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
53,
55
],
[
8,
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
],
[
70,
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
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
6,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] |
[
"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 A[];\n A=new int[N-1];\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n A[i]--;\n }\n int ans[];\n ans=new int[N];\n for(int i=0;i<N-1;i++) ans[A[i]]++;\n for(int i=0;i<N;i++) System.out.println(ans[i]);\n sc.close();\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 A[];\n A=new int[N-1];\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n A[i]--;\n }\n int ans[];\n ans=new int[N];\n for(int i=0;i<N-1;i++) ans[A[i]]++;\n for(int i=0;i<N;i++) System.out.println(ans[i]);\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int N=sc.nextInt();\n int A[];\n A=new int[N-1];\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n A[i]--;\n }\n int ans[];\n ans=new int[N];\n for(int i=0;i<N-1;i++) ans[A[i]]++;\n for(int i=0;i<N;i++) System.out.println(ans[i]);\n sc.close();\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int N=sc.nextInt();\n int A[];\n A=new int[N-1];\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n A[i]--;\n }\n int ans[];\n ans=new int[N];\n for(int i=0;i<N-1;i++) ans[A[i]]++;\n for(int i=0;i<N;i++) System.out.println(ans[i]);\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 A[];",
"A",
"A=new int[N-1]",
"A",
"new int[N-1]",
"N-1",
"N",
"1",
"for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n A[i]--;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"{\n A[i]=sc.nextInt();\n A[i]--;\n }",
"{\n A[i]=sc.nextInt();\n A[i]--;\n }",
"A[i]=sc.nextInt()",
"A[i]",
"A",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"A[i]--",
"A[i]",
"A",
"i",
"int ans[];",
"ans",
"ans=new int[N]",
"ans",
"new int[N]",
"N",
"for(int i=0;i<N-1;i++) ans[A[i]]++;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N-1",
"i",
"N-1",
"N",
"1",
"i++",
"i++",
"i",
"ans[A[i]]++;",
"ans[A[i]]++",
"ans[A[i]]",
"ans",
"A[i]",
"A",
"i",
"for(int i=0;i<N;i++) System.out.println(ans[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"System.out.println(ans[i]);",
"System.out.println(ans[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"ans[i]",
"ans",
"i",
"sc.close()",
"sc.close",
"sc",
"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 A[];\n A=new int[N-1];\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n A[i]--;\n }\n int ans[];\n ans=new int[N];\n for(int i=0;i<N-1;i++) ans[A[i]]++;\n for(int i=0;i<N;i++) System.out.println(ans[i]);\n sc.close();\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 A[];\n A=new int[N-1];\n for(int i=0;i<N-1;i++){\n A[i]=sc.nextInt();\n A[i]--;\n }\n int ans[];\n ans=new int[N];\n for(int i=0;i<N-1;i++) ans[A[i]]++;\n for(int i=0;i<N;i++) System.out.println(ans[i]);\n sc.close();\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 A[];
A=new int[N-1];
for(int i=0;i<N-1;i++){
A[i]=sc.nextInt();
A[i]--;
}
int ans[];
ans=new int[N];
for(int i=0;i<N-1;i++) ans[A[i]]++;
for(int i=0;i<N;i++) System.out.println(ans[i]);
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,
4,
18,
13,
13,
41,
13,
20,
13,
41,
13,
4,
18,
13,
17,
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,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
18,
13,
13,
0,
18,
13,
2,
13,
17,
17,
28,
13,
13,
30,
30,
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
],
[
106,
11
],
[
106,
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
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
14,
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
],
[
57,
61
],
[
14,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
62,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
76,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
85,
91
],
[
14,
92
],
[
92,
93
],
[
92,
94
],
[
92,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
12,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tint counts = Integer.parseInt(line1);\n\t\tint[] bossCount = new int[counts];\n\t\tString[] bosses = line2.split(\" \");\n\t\tfor(int i = 0; i < counts; i++) {\n\t\t\tbossCount[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < bosses.length; i++) {\n\t\t\tint index = Integer.parseInt(bosses[i]);\n\t\t\tbossCount[index - 1] += 1;\n\t\t}\n\t\tfor (int i : bossCount) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tint counts = Integer.parseInt(line1);\n\t\tint[] bossCount = new int[counts];\n\t\tString[] bosses = line2.split(\" \");\n\t\tfor(int i = 0; i < counts; i++) {\n\t\t\tbossCount[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < bosses.length; i++) {\n\t\t\tint index = Integer.parseInt(bosses[i]);\n\t\t\tbossCount[index - 1] += 1;\n\t\t}\n\t\tfor (int i : bossCount) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tint counts = Integer.parseInt(line1);\n\t\tint[] bossCount = new int[counts];\n\t\tString[] bosses = line2.split(\" \");\n\t\tfor(int i = 0; i < counts; i++) {\n\t\t\tbossCount[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < bosses.length; i++) {\n\t\t\tint index = Integer.parseInt(bosses[i]);\n\t\t\tbossCount[index - 1] += 1;\n\t\t}\n\t\tfor (int i : bossCount) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tint counts = Integer.parseInt(line1);\n\t\tint[] bossCount = new int[counts];\n\t\tString[] bosses = line2.split(\" \");\n\t\tfor(int i = 0; i < counts; i++) {\n\t\t\tbossCount[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < bosses.length; i++) {\n\t\t\tint index = Integer.parseInt(bosses[i]);\n\t\t\tbossCount[index - 1] += 1;\n\t\t}\n\t\tfor (int i : bossCount) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String line1 = br.readLine();",
"line1",
"br.readLine()",
"br.readLine",
"br",
"String line2 = br.readLine();",
"line2",
"br.readLine()",
"br.readLine",
"br",
"int counts = Integer.parseInt(line1);",
"counts",
"Integer.parseInt(line1)",
"Integer.parseInt",
"Integer",
"line1",
"int[] bossCount = new int[counts];",
"bossCount",
"new int[counts]",
"counts",
"String[] bosses = line2.split(\" \");",
"bosses",
"line2.split(\" \")",
"line2.split",
"line2",
"\" \"",
"for(int i = 0; i < counts; i++) {\n\t\t\tbossCount[i] = 0;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < counts",
"i",
"counts",
"i++",
"i++",
"i",
"{\n\t\t\tbossCount[i] = 0;\n\t\t}",
"{\n\t\t\tbossCount[i] = 0;\n\t\t}",
"bossCount[i] = 0",
"bossCount[i]",
"bossCount",
"i",
"0",
"for(int i = 0; i < bosses.length; i++) {\n\t\t\tint index = Integer.parseInt(bosses[i]);\n\t\t\tbossCount[index - 1] += 1;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < bosses.length",
"i",
"bosses.length",
"bosses",
"bosses.length",
"i++",
"i++",
"i",
"{\n\t\t\tint index = Integer.parseInt(bosses[i]);\n\t\t\tbossCount[index - 1] += 1;\n\t\t}",
"{\n\t\t\tint index = Integer.parseInt(bosses[i]);\n\t\t\tbossCount[index - 1] += 1;\n\t\t}",
"int index = Integer.parseInt(bosses[i]);",
"index",
"Integer.parseInt(bosses[i])",
"Integer.parseInt",
"Integer",
"bosses[i]",
"bosses",
"i",
"bossCount[index - 1] += 1",
"bossCount[index - 1]",
"bossCount",
"index - 1",
"index",
"1",
"1",
"for (int i : bossCount) {\n\t\t\tSystem.out.println(i);\n\t\t}",
"int i",
"bossCount",
"{\n\t\t\tSystem.out.println(i);\n\t\t}",
"{\n\t\t\tSystem.out.println(i);\n\t\t}",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tint counts = Integer.parseInt(line1);\n\t\tint[] bossCount = new int[counts];\n\t\tString[] bosses = line2.split(\" \");\n\t\tfor(int i = 0; i < counts; i++) {\n\t\t\tbossCount[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < bosses.length; i++) {\n\t\t\tint index = Integer.parseInt(bosses[i]);\n\t\t\tbossCount[index - 1] += 1;\n\t\t}\n\t\tfor (int i : bossCount) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tint counts = Integer.parseInt(line1);\n\t\tint[] bossCount = new int[counts];\n\t\tString[] bosses = line2.split(\" \");\n\t\tfor(int i = 0; i < counts; i++) {\n\t\t\tbossCount[i] = 0;\n\t\t}\n\t\tfor(int i = 0; i < bosses.length; i++) {\n\t\t\tint index = Integer.parseInt(bosses[i]);\n\t\t\tbossCount[index - 1] += 1;\n\t\t}\n\t\tfor (int i : bossCount) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line1 = br.readLine();
String line2 = br.readLine();
int counts = Integer.parseInt(line1);
int[] bossCount = new int[counts];
String[] bosses = line2.split(" ");
for(int i = 0; i < counts; i++) {
bossCount[i] = 0;
}
for(int i = 0; i < bosses.length; i++) {
int index = Integer.parseInt(bosses[i]);
bossCount[index - 1] += 1;
}
for (int i : bossCount) {
System.out.println(i);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
40,
18,
13,
2,
13,
17,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
64,
5
],
[
64,
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
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
31,
33
],
[
24,
34
],
[
34,
35
],
[
35,
36
],
[
24,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
50,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
6,
61
],
[
61,
62
],
[
0,
63
],
[
63,
64
],
[
63,
65
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] leadingNum = new int[n];\n\t\t\n\t\tint index = 0;\n\t\tfor(int i =0;i<n-1;i++) {\n\t\t\tindex = scanner.nextInt();\n\t\t\tleadingNum[index-1]++;\n\t\t}\n\t\tfor (int i : leadingNum) {\n\t\t\tSystem.out.println(i);\n }\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] leadingNum = new int[n];\n\t\t\n\t\tint index = 0;\n\t\tfor(int i =0;i<n-1;i++) {\n\t\t\tindex = scanner.nextInt();\n\t\t\tleadingNum[index-1]++;\n\t\t}\n\t\tfor (int i : leadingNum) {\n\t\t\tSystem.out.println(i);\n }\n }\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] leadingNum = new int[n];\n\t\t\n\t\tint index = 0;\n\t\tfor(int i =0;i<n-1;i++) {\n\t\t\tindex = scanner.nextInt();\n\t\t\tleadingNum[index-1]++;\n\t\t}\n\t\tfor (int i : leadingNum) {\n\t\t\tSystem.out.println(i);\n }\n }",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] leadingNum = new int[n];\n\t\t\n\t\tint index = 0;\n\t\tfor(int i =0;i<n-1;i++) {\n\t\t\tindex = scanner.nextInt();\n\t\t\tleadingNum[index-1]++;\n\t\t}\n\t\tfor (int i : leadingNum) {\n\t\t\tSystem.out.println(i);\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int[] leadingNum = new int[n];",
"leadingNum",
"new int[n]",
"n",
"int index = 0;",
"index",
"0",
"for(int i =0;i<n-1;i++) {\n\t\t\tindex = scanner.nextInt();\n\t\t\tleadingNum[index-1]++;\n\t\t}",
"int i =0;",
"int i =0;",
"i",
"0",
"i<n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tindex = scanner.nextInt();\n\t\t\tleadingNum[index-1]++;\n\t\t}",
"{\n\t\t\tindex = scanner.nextInt();\n\t\t\tleadingNum[index-1]++;\n\t\t}",
"index = scanner.nextInt()",
"index",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"leadingNum[index-1]++",
"leadingNum[index-1]",
"leadingNum",
"index-1",
"index",
"1",
"for (int i : leadingNum) {\n\t\t\tSystem.out.println(i);\n }",
"int i",
"leadingNum",
"{\n\t\t\tSystem.out.println(i);\n }",
"{\n\t\t\tSystem.out.println(i);\n }",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] leadingNum = new int[n];\n\t\t\n\t\tint index = 0;\n\t\tfor(int i =0;i<n-1;i++) {\n\t\t\tindex = scanner.nextInt();\n\t\t\tleadingNum[index-1]++;\n\t\t}\n\t\tfor (int i : leadingNum) {\n\t\t\tSystem.out.println(i);\n }\n }\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = scanner.nextInt();\n\t\t\n\t\tint[] leadingNum = new int[n];\n\t\t\n\t\tint index = 0;\n\t\tfor(int i =0;i<n-1;i++) {\n\t\t\tindex = scanner.nextInt();\n\t\t\tleadingNum[index-1]++;\n\t\t}\n\t\tfor (int i : leadingNum) {\n\t\t\tSystem.out.println(i);\n }\n }\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[] leadingNum = new int[n];
int index = 0;
for(int i =0;i<n-1;i++) {
index = scanner.nextInt();
leadingNum[index-1]++;
}
for (int i : leadingNum) {
System.out.println(i);
}
}
}
|
[
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,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
17,
40,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
18,
13,
13,
4,
18,
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
],
[
490,
20
],
[
490,
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
],
[
23,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
39,
51
],
[
51,
52
],
[
52,
53
],
[
39,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
58,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
23,
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
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
23,
88
],
[
88,
89
],
[
89,
90
],
[
21,
91
],
[
91,
92
],
[
490,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
93,
97
],
[
97,
98
],
[
97,
99
],
[
93,
101
],
[
101,
102
],
[
93,
103
],
[
103,
104
],
[
93,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
105,
122
],
[
122,
123
],
[
93,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
135,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
131,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
152,
153
],
[
126,
154
],
[
154,
155
],
[
93,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
159,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
159,
167
],
[
167,
168
],
[
168,
169
],
[
93,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
179,
180
],
[
179,
181
],
[
170,
182
],
[
182,
183
],
[
93,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
188,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
193,
195
],
[
187,
196
],
[
196,
197
],
[
93,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
201,
202
],
[
200,
203
],
[
203,
204
],
[
204,
205
],
[
93,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
209,
213
],
[
213,
214
],
[
208,
215
],
[
215,
216
],
[
215,
217
],
[
208,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
208,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
222,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
228,
231
],
[
227,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
208,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
93,
240
],
[
240,
241
],
[
240,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
245,
246
],
[
243,
247
],
[
247,
248
],
[
242,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
242,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
253,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
242,
261
],
[
261,
262
],
[
261,
263
],
[
242,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
264,
268
],
[
268,
269
],
[
269,
270
],
[
269,
271
],
[
268,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
242,
276
],
[
276,
277
],
[
276,
278
],
[
242,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
279,
284
],
[
284,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
286,
290
],
[
290,
291
],
[
290,
292
],
[
285,
293
],
[
293,
294
],
[
284,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
298,
302
],
[
297,
303
],
[
284,
304
],
[
304,
305
],
[
304,
306
],
[
306,
307
],
[
242,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
309,
313
],
[
93,
314
],
[
314,
315
],
[
314,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
317,
321
],
[
321,
322
],
[
316,
323
],
[
323,
324
],
[
323,
325
],
[
325,
326
],
[
316,
327
],
[
327,
328
],
[
328,
329
],
[
328,
330
],
[
327,
331
],
[
331,
332
],
[
331,
333
],
[
333,
334
],
[
316,
335
],
[
335,
336
],
[
335,
337
],
[
316,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
338,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
342,
346
],
[
346,
347
],
[
346,
348
],
[
348,
349
],
[
316,
350
],
[
350,
351
],
[
350,
352
],
[
316,
353
],
[
353,
354
],
[
354,
355
],
[
355,
356
],
[
355,
357
],
[
353,
358
],
[
358,
359
],
[
359,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
360,
364
],
[
364,
365
],
[
364,
366
],
[
359,
367
],
[
367,
368
],
[
358,
369
],
[
369,
370
],
[
369,
371
],
[
371,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
372,
376
],
[
371,
377
],
[
358,
378
],
[
378,
379
],
[
378,
380
],
[
380,
381
],
[
316,
382
],
[
382,
383
],
[
383,
384
],
[
383,
385
],
[
385,
386
],
[
383,
387
],
[
93,
388
],
[
388,
389
],
[
388,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
393,
394
],
[
392,
395
],
[
395,
396
],
[
93,
397
],
[
397,
398
],
[
397,
399
],
[
399,
400
],
[
400,
401
],
[
400,
402
],
[
399,
404
],
[
404,
405
],
[
405,
406
],
[
406,
407
],
[
406,
408
],
[
404,
409
],
[
409,
410
],
[
409,
411
],
[
404,
412
],
[
412,
413
],
[
413,
414
],
[
404,
415
],
[
415,
416
],
[
416,
417
],
[
417,
418
],
[
417,
419
],
[
416,
420
],
[
420,
421
],
[
399,
422
],
[
422,
423
],
[
397,
424
],
[
424,
425
],
[
93,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
429,
431
],
[
428,
433
],
[
433,
434
],
[
434,
435
],
[
435,
436
],
[
435,
437
],
[
433,
438
],
[
438,
439
],
[
438,
440
],
[
433,
441
],
[
441,
442
],
[
442,
443
],
[
433,
444
],
[
444,
445
],
[
445,
446
],
[
446,
447
],
[
446,
448
],
[
445,
449
],
[
449,
450
],
[
428,
451
],
[
451,
452
],
[
426,
453
],
[
453,
454
],
[
93,
455
],
[
455,
456
],
[
455,
457
],
[
457,
458
],
[
458,
459
],
[
458,
460
],
[
457,
463
],
[
463,
464
],
[
464,
465
],
[
465,
466
],
[
465,
467
],
[
463,
468
],
[
468,
469
],
[
468,
470
],
[
463,
471
],
[
471,
472
],
[
472,
473
],
[
463,
474
],
[
474,
475
],
[
475,
476
],
[
476,
477
],
[
476,
478
],
[
475,
479
],
[
479,
480
],
[
480,
481
],
[
481,
482
],
[
457,
483
],
[
483,
484
],
[
455,
485
],
[
485,
486
],
[
455,
487
],
[
487,
488
],
[
0,
489
],
[
489,
490
],
[
489,
491
]
] |
[
"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\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[] A=new int[N];\n\t\tfor (int i = 0; i < A.length-1; i++) {\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tA[a]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tout.println(A[i]);\n\t\t}\n\t\tout.flush();\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\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[] A=new int[N];\n\t\tfor (int i = 0; i < A.length-1; i++) {\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tA[a]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tout.println(A[i]);\n\t\t}\n\t\tout.flush();\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",
"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[] A=new int[N];\n\t\tfor (int i = 0; i < A.length-1; i++) {\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tA[a]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tout.println(A[i]);\n\t\t}\n\t\tout.flush();\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[] A=new int[N];\n\t\tfor (int i = 0; i < A.length-1; i++) {\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tA[a]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tout.println(A[i]);\n\t\t}\n\t\tout.flush();\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[] A=new int[N];",
"A",
"new int[N]",
"N",
"for (int i = 0; i < A.length-1; i++) {\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tA[a]++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < A.length-1",
"i",
"A.length-1",
"A.length",
"A",
"A.length",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tA[a]++;\n\t\t}",
"{\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tA[a]++;\n\t\t}",
"int a=sc.nextInt()-1;",
"a",
"sc.nextInt()-1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"A[a]++",
"A[a]",
"A",
"a",
"for (int i = 0; i < A.length; i++) {\n\t\t\tout.println(A[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < A.length",
"i",
"A.length",
"A",
"A.length",
"i++",
"i++",
"i",
"{\n\t\t\tout.println(A[i]);\n\t\t}",
"{\n\t\t\tout.println(A[i]);\n\t\t}",
"out.println(A[i])",
"out.println",
"out",
"A[i]",
"A",
"i",
"out.flush()",
"out.flush",
"out",
"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\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[] A=new int[N];\n\t\tfor (int i = 0; i < A.length-1; i++) {\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tA[a]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tout.println(A[i]);\n\t\t}\n\t\tout.flush();\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\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[] A=new int[N];\n\t\tfor (int i = 0; i < A.length-1; i++) {\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tA[a]++;\n\t\t}\n\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\tout.println(A[i]);\n\t\t}\n\t\tout.flush();\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 {
public static void main(String[] args){
PrintWriter out = new PrintWriter(System.out);
InputReader sc=new InputReader(System.in);
int N=sc.nextInt();
int[] A=new int[N];
for (int i = 0; i < A.length-1; i++) {
int a=sc.nextInt()-1;
A[a]++;
}
for (int i = 0; i < A.length; i++) {
out.println(A[i]);
}
out.flush();
}
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,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
4,
18,
13,
18,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
22,
23
],
[
22,
24
],
[
10,
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
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
10,
44
],
[
44,
45
],
[
44,
46
],
[
10,
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
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
65,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
10,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
86,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
77,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tvoid run() {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n + 1];\n\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\ta[sc.nextInt()]++;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}\n\n\t\t\tSystem.out.print(sb);\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tvoid run() {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n + 1];\n\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\ta[sc.nextInt()]++;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}\n\n\t\t\tSystem.out.print(sb);\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n}",
"Main",
"void run() {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n + 1];\n\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\ta[sc.nextInt()]++;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}\n\n\t\t\tSystem.out.print(sb);\n\t\t}\n\t}",
"run",
"{\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n + 1];\n\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\ta[sc.nextInt()]++;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}\n\n\t\t\tSystem.out.print(sb);\n\t\t}\n\t}",
"try (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n + 1];\n\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\ta[sc.nextInt()]++;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}\n\n\t\t\tSystem.out.print(sb);\n\t\t}",
"{\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n + 1];\n\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\ta[sc.nextInt()]++;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}\n\n\t\t\tSystem.out.print(sb);\n\t\t}",
"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[] a = new int[n + 1];",
"a",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 1; i < n; i++) {\n\t\t\t\ta[sc.nextInt()]++;\n\t\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\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",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"for (int i = 1; i <= n; i++) {\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}",
"{\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}",
"sb.append(a[i]).append(System.lineSeparator())",
"sb.append(a[i]).append",
"sb.append(a[i])",
"sb.append",
"sb",
"a[i]",
"a",
"i",
"System.lineSeparator()",
"System.lineSeparator",
"System",
"System.out.print(sb)",
"System.out.print",
"System.out",
"System",
"System.out",
"sb",
"public static void main(String[] args) {\n\t\tnew Main().run();\n\t}",
"main",
"{\n\t\tnew Main().run();\n\t}",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"public class Main {\n\n\tvoid run() {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n + 1];\n\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\ta[sc.nextInt()]++;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}\n\n\t\t\tSystem.out.print(sb);\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n}",
"public class Main {\n\n\tvoid run() {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint[] a = new int[n + 1];\n\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\ta[sc.nextInt()]++;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tsb.append(a[i]).append(System.lineSeparator());\n\t\t\t}\n\n\t\t\tSystem.out.print(sb);\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
void run() {
try (Scanner sc = new Scanner(System.in)) {
int n = sc.nextInt();
int[] a = new int[n + 1];
for (int i = 1; i < n; i++) {
a[sc.nextInt()]++;
}
StringBuilder sb = new StringBuilder();
for (int i = 1; i <= n; i++) {
sb.append(a[i]).append(System.lineSeparator());
}
System.out.print(sb);
}
}
public static void main(String[] args) {
new Main().run();
}
}
|
[
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,
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,
2,
13,
17,
41,
13,
20,
13,
4,
18,
13,
13,
17,
28,
13,
13,
30,
30,
40,
18,
13,
2,
13,
17,
28,
13,
13,
30,
30,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
4,
18,
13,
12,
13,
30,
4,
18,
13,
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,
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,
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
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
],
[
0,
37
],
[
381,
38
],
[
381,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
41,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
41,
52
],
[
52,
53
],
[
52,
54
],
[
41,
55
],
[
55,
56
],
[
55,
57
],
[
41,
58
],
[
58,
59
],
[
58,
60
],
[
41,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
61,
66
],
[
41,
67
],
[
67,
68
],
[
68,
69
],
[
39,
70
],
[
70,
71
],
[
381,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
76,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
76,
90
],
[
90,
91
],
[
90,
92
],
[
76,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
94,
98
],
[
76,
99
],
[
99,
100
],
[
99,
101
],
[
99,
102
],
[
103,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
76,
110
],
[
110,
111
],
[
110,
112
],
[
110,
113
],
[
114,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
74,
119
],
[
119,
120
],
[
74,
121
],
[
121,
122
],
[
74,
123
],
[
123,
124
],
[
381,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
125,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
129,
135
],
[
135,
136
],
[
125,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
137,
145
],
[
145,
146
],
[
125,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
125,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
153,
160
],
[
160,
161
],
[
381,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
162,
166
],
[
166,
167
],
[
166,
168
],
[
162,
170
],
[
170,
171
],
[
162,
172
],
[
172,
173
],
[
162,
174
],
[
174,
175
],
[
162,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
179,
183
],
[
176,
184
],
[
184,
185
],
[
162,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
193,
198
],
[
198,
199
],
[
198,
200
],
[
193,
201
],
[
201,
202
],
[
202,
203
],
[
193,
204
],
[
205,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
206,
210
],
[
210,
211
],
[
188,
212
],
[
212,
213
],
[
186,
214
],
[
214,
215
],
[
162,
216
],
[
216,
217
],
[
216,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
219,
224
],
[
224,
225
],
[
225,
226
],
[
218,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
231,
232
],
[
232,
233
],
[
232,
234
],
[
231,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
239,
240
],
[
235,
241
],
[
241,
242
],
[
242,
243
],
[
242,
244
],
[
244,
245
],
[
245,
246
],
[
244,
247
],
[
231,
248
],
[
248,
249
],
[
249,
250
],
[
249,
251
],
[
248,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
218,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
162,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
263,
268
],
[
268,
269
],
[
269,
270
],
[
269,
271
],
[
268,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
275,
276
],
[
263,
277
],
[
277,
278
],
[
277,
279
],
[
263,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
280,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
284,
289
],
[
289,
290
],
[
289,
291
],
[
291,
292
],
[
263,
293
],
[
293,
294
],
[
293,
295
],
[
263,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
296,
301
],
[
301,
302
],
[
302,
303
],
[
303,
304
],
[
304,
305
],
[
304,
306
],
[
303,
307
],
[
307,
308
],
[
307,
309
],
[
302,
310
],
[
310,
311
],
[
311,
312
],
[
301,
313
],
[
313,
314
],
[
313,
315
],
[
301,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
318,
320
],
[
301,
321
],
[
321,
322
],
[
321,
323
],
[
323,
324
],
[
263,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
162,
329
],
[
329,
330
],
[
329,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
339,
340
],
[
338,
341
],
[
331,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
329,
346
],
[
346,
347
],
[
162,
348
],
[
348,
349
],
[
348,
350
],
[
350,
351
],
[
351,
352
],
[
355,
353
],
[
365,
354
],
[
362,
355
],
[
355,
356
],
[
356,
357
],
[
356,
358
],
[
355,
359
],
[
359,
360
],
[
359,
361
],
[
362,
362
],
[
362,
363
],
[
362,
364
],
[
365,
365
],
[
365,
366
],
[
365,
367
],
[
355,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
348,
372
],
[
372,
373
],
[
162,
374
],
[
374,
375
],
[
374,
376
],
[
376,
377
],
[
376,
378
],
[
378,
379
],
[
0,
380
],
[
380,
381
],
[
380,
382
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.io.BufferedWriter;\nimport java.io.Writer;\nimport java.io.OutputStreamWriter;\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 Gargoris ([email protected])\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 OutputWriter out = new OutputWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int N = in.readInt();\n int[] people = in.readIntArray(N - 1);\n int[] z = new int[N];\n Arrays.fill(z, 0);\n for (int person : people) {\n z[person - 1]++;\n }\n for (int i : z) {\n out.printLine(i);\n }\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void printLine(int i) {\n writer.println(i);\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[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = readInt();\n }\n return array;\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 readInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public 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.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.io.BufferedWriter;",
"BufferedWriter",
"java.io",
"import java.io.Writer;",
"Writer",
"java.io",
"import java.io.OutputStreamWriter;",
"OutputStreamWriter",
"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 OutputWriter out = new OutputWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int N = in.readInt();\n int[] people = in.readIntArray(N - 1);\n int[] z = new int[N];\n Arrays.fill(z, 0);\n for (int person : people) {\n z[person - 1]++;\n }\n for (int i : z) {\n out.printLine(i);\n }\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void printLine(int i) {\n writer.println(i);\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[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = readInt();\n }\n return array;\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 readInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public 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 OutputWriter out = new OutputWriter(outputStream);\n CManagement solver = new CManagement();\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 OutputWriter out = new OutputWriter(outputStream);\n CManagement solver = new CManagement();\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)",
"OutputWriter out = new OutputWriter(outputStream);",
"out",
"new OutputWriter(outputStream)",
"CManagement solver = new CManagement();",
"solver",
"new CManagement()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class CManagement {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int N = in.readInt();\n int[] people = in.readIntArray(N - 1);\n int[] z = new int[N];\n Arrays.fill(z, 0);\n for (int person : people) {\n z[person - 1]++;\n }\n for (int i : z) {\n out.printLine(i);\n }\n }\n\n }",
"CManagement",
"public void solve(int testNumber, InputReader in, OutputWriter out) {\n int N = in.readInt();\n int[] people = in.readIntArray(N - 1);\n int[] z = new int[N];\n Arrays.fill(z, 0);\n for (int person : people) {\n z[person - 1]++;\n }\n for (int i : z) {\n out.printLine(i);\n }\n }",
"solve",
"{\n int N = in.readInt();\n int[] people = in.readIntArray(N - 1);\n int[] z = new int[N];\n Arrays.fill(z, 0);\n for (int person : people) {\n z[person - 1]++;\n }\n for (int i : z) {\n out.printLine(i);\n }\n }",
"int N = in.readInt();",
"N",
"in.readInt()",
"in.readInt",
"in",
"int[] people = in.readIntArray(N - 1);",
"people",
"in.readIntArray(N - 1)",
"in.readIntArray",
"in",
"N - 1",
"N",
"1",
"int[] z = new int[N];",
"z",
"new int[N]",
"N",
"Arrays.fill(z, 0)",
"Arrays.fill",
"Arrays",
"z",
"0",
"for (int person : people) {\n z[person - 1]++;\n }",
"int person",
"people",
"{\n z[person - 1]++;\n }",
"{\n z[person - 1]++;\n }",
"z[person - 1]++",
"z[person - 1]",
"z",
"person - 1",
"person",
"1",
"for (int i : z) {\n out.printLine(i);\n }",
"int i",
"z",
"{\n out.printLine(i);\n }",
"{\n out.printLine(i);\n }",
"out.printLine(i)",
"out.printLine",
"out",
"i",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"OutputWriter out",
"out",
"static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void printLine(int i) {\n writer.println(i);\n }\n\n }",
"OutputWriter",
"private final PrintWriter writer;",
"writer",
"public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"OutputWriter",
"{\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"writer",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"OutputStream outputStream",
"outputStream",
"public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }",
"OutputWriter",
"{\n this.writer = new PrintWriter(writer);\n }",
"this.writer = new PrintWriter(writer)",
"this.writer",
"this",
"this.writer",
"new PrintWriter(writer)",
"Writer writer",
"writer",
"public void close() {\n writer.close();\n }",
"close",
"{\n writer.close();\n }",
"writer.close()",
"writer.close",
"writer",
"public void printLine(int i) {\n writer.println(i);\n }",
"printLine",
"{\n writer.println(i);\n }",
"writer.println(i)",
"writer.println",
"writer",
"i",
"int i",
"i",
"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[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = readInt();\n }\n return array;\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 readInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public 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[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = readInt();\n }\n return array;\n }",
"readIntArray",
"{\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = readInt();\n }\n return array;\n }",
"int[] array = new int[size];",
"array",
"new int[size]",
"size",
"for (int i = 0; i < size; i++) {\n array[i] = readInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n array[i] = readInt();\n }",
"{\n array[i] = readInt();\n }",
"array[i] = readInt()",
"array[i]",
"array",
"i",
"readInt()",
"readInt",
"return array;",
"array",
"int size",
"size",
"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 readInt() {\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 }",
"readInt",
"{\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",
"public 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",
"public 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 OutputWriter out = new OutputWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int N = in.readInt();\n int[] people = in.readIntArray(N - 1);\n int[] z = new int[N];\n Arrays.fill(z, 0);\n for (int person : people) {\n z[person - 1]++;\n }\n for (int i : z) {\n out.printLine(i);\n }\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void printLine(int i) {\n writer.println(i);\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[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = readInt();\n }\n return array;\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 readInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public 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 OutputWriter out = new OutputWriter(outputStream);\n CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int N = in.readInt();\n int[] people = in.readIntArray(N - 1);\n int[] z = new int[N];\n Arrays.fill(z, 0);\n for (int person : people) {\n z[person - 1]++;\n }\n for (int i : z) {\n out.printLine(i);\n }\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void printLine(int i) {\n writer.println(i);\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[] readIntArray(int size) {\n int[] array = new int[size];\n for (int i = 0; i < size; i++) {\n array[i] = readInt();\n }\n return array;\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 readInt() {\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 public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public 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.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Gargoris ([email protected])
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
OutputWriter out = new OutputWriter(outputStream);
CManagement solver = new CManagement();
solver.solve(1, in, out);
out.close();
}
static class CManagement {
public void solve(int testNumber, InputReader in, OutputWriter out) {
int N = in.readInt();
int[] people = in.readIntArray(N - 1);
int[] z = new int[N];
Arrays.fill(z, 0);
for (int person : people) {
z[person - 1]++;
}
for (int i : z) {
out.printLine(i);
}
}
}
static class OutputWriter {
private final PrintWriter writer;
public OutputWriter(OutputStream outputStream) {
writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
}
public OutputWriter(Writer writer) {
this.writer = new PrintWriter(writer);
}
public void close() {
writer.close();
}
public void printLine(int i) {
writer.println(i);
}
}
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[] readIntArray(int size) {
int[] array = new int[size];
for (int i = 0; i < size; i++) {
array[i] = readInt();
}
return array;
}
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 readInt() {
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;
}
public boolean isSpaceChar(int c) {
if (filter != null) {
return filter.isSpaceChar(c);
}
return isWhitespace(c);
}
public 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,
6,
13,
12,
13,
30,
41,
13,
20,
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,
40,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
69,
5
],
[
69,
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
],
[
20,
21
],
[
20,
22
],
[
8,
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
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
8,
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
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
6,
66
],
[
66,
67
],
[
0,
68
],
[
68,
69
],
[
68,
70
]
] |
[
"\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n\n int[] count = new int[N + 1];\n\n for (int i = 2 ; i <= N ; i++) {\n int boss = scanner.nextInt();\n count[boss]++;\n }\n\n\n for (int i = 1; i <= N ; i++) {\n System.out.println(count[i]);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n\n int[] count = new int[N + 1];\n\n for (int i = 2 ; i <= N ; i++) {\n int boss = scanner.nextInt();\n count[boss]++;\n }\n\n\n for (int i = 1; i <= N ; i++) {\n System.out.println(count[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n\n int[] count = new int[N + 1];\n\n for (int i = 2 ; i <= N ; i++) {\n int boss = scanner.nextInt();\n count[boss]++;\n }\n\n\n for (int i = 1; i <= N ; i++) {\n System.out.println(count[i]);\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n\n int[] count = new int[N + 1];\n\n for (int i = 2 ; i <= N ; i++) {\n int boss = scanner.nextInt();\n count[boss]++;\n }\n\n\n for (int i = 1; i <= N ; i++) {\n System.out.println(count[i]);\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int N = scanner.nextInt();",
"N",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int[] count = new int[N + 1];",
"count",
"new int[N + 1]",
"N + 1",
"N",
"1",
"for (int i = 2 ; i <= N ; i++) {\n int boss = scanner.nextInt();\n count[boss]++;\n }",
"int i = 2 ;",
"int i = 2 ;",
"i",
"2",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int boss = scanner.nextInt();\n count[boss]++;\n }",
"{\n int boss = scanner.nextInt();\n count[boss]++;\n }",
"int boss = scanner.nextInt();",
"boss",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"count[boss]++",
"count[boss]",
"count",
"boss",
"for (int i = 1; i <= N ; i++) {\n System.out.println(count[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n System.out.println(count[i]);\n }",
"{\n System.out.println(count[i]);\n }",
"System.out.println(count[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"count[i]",
"count",
"i",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n\n int[] count = new int[N + 1];\n\n for (int i = 2 ; i <= N ; i++) {\n int boss = scanner.nextInt();\n count[boss]++;\n }\n\n\n for (int i = 1; i <= N ; i++) {\n System.out.println(count[i]);\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n\n int[] count = new int[N + 1];\n\n for (int i = 2 ; i <= N ; i++) {\n int boss = scanner.nextInt();\n count[boss]++;\n }\n\n\n for (int i = 1; i <= N ; i++) {\n System.out.println(count[i]);\n }\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[] count = new int[N + 1];
for (int i = 2 ; i <= N ; i++) {
int boss = scanner.nextInt();
count[boss]++;
}
for (int i = 1; i <= N ; i++) {
System.out.println(count[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
40,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
69,
5
],
[
69,
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
],
[
20,
21
],
[
20,
22
],
[
8,
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
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
8,
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
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
6,
66
],
[
66,
67
],
[
0,
68
],
[
68,
69
],
[
68,
70
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] array = new int[n+1];\n for (int i = 1; i < n; i++) {\n int a = sc.nextInt();\n array[a]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(array[i]);\n }\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[] array = new int[n+1];\n for (int i = 1; i < n; i++) {\n int a = sc.nextInt();\n array[a]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(array[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] array = new int[n+1];\n for (int i = 1; i < n; i++) {\n int a = sc.nextInt();\n array[a]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(array[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] array = new int[n+1];\n for (int i = 1; i < n; i++) {\n int a = sc.nextInt();\n array[a]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(array[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] array = new int[n+1];",
"array",
"new int[n+1]",
"n+1",
"n",
"1",
"for (int i = 1; i < n; i++) {\n int a = sc.nextInt();\n array[a]++;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a = sc.nextInt();\n array[a]++;\n }",
"{\n int a = sc.nextInt();\n array[a]++;\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"array[a]++",
"array[a]",
"array",
"a",
"for (int i = 1; i <= n; i++) {\n System.out.println(array[i]);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n System.out.println(array[i]);\n }",
"{\n System.out.println(array[i]);\n }",
"System.out.println(array[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"array[i]",
"array",
"i",
"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[] array = new int[n+1];\n for (int i = 1; i < n; i++) {\n int a = sc.nextInt();\n array[a]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(array[i]);\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[] array = new int[n+1];\n for (int i = 1; i < n; i++) {\n int a = sc.nextInt();\n array[a]++;\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(array[i]);\n }\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[] array = new int[n+1];
for (int i = 1; i < n; i++) {
int a = sc.nextInt();
array[a]++;
}
for (int i = 1; i <= n; i++) {
System.out.println(array[i]);
}
}
}
|
[
7,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
55,
2
],
[
55,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
6,
8
],
[
5,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
5,
14
],
[
14,
15
],
[
14,
16
],
[
5,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
18,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
18,
28
],
[
28,
29
],
[
29,
30
],
[
18,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
36,
40
],
[
5,
41
],
[
41,
42
],
[
41,
43
],
[
41,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
3,
52
],
[
52,
53
],
[
0,
54
],
[
54,
55
],
[
54,
56
]
] |
[
"public class Main {\n\n public static void main(String[] args) {\n\n java.util.Scanner sc = new java.util.Scanner(System.in);\n\n int n = sc.nextInt();\n int[] arrn = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n arrn[sc.nextInt() - 1]++;\n }\n\n for (int i : arrn) {\n System.out.println(i);\n }\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n\n java.util.Scanner sc = new java.util.Scanner(System.in);\n\n int n = sc.nextInt();\n int[] arrn = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n arrn[sc.nextInt() - 1]++;\n }\n\n for (int i : arrn) {\n System.out.println(i);\n }\n }\n\n}",
"Main",
"public static void main(String[] args) {\n\n java.util.Scanner sc = new java.util.Scanner(System.in);\n\n int n = sc.nextInt();\n int[] arrn = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n arrn[sc.nextInt() - 1]++;\n }\n\n for (int i : arrn) {\n System.out.println(i);\n }\n }",
"main",
"{\n\n java.util.Scanner sc = new java.util.Scanner(System.in);\n\n int n = sc.nextInt();\n int[] arrn = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n arrn[sc.nextInt() - 1]++;\n }\n\n for (int i : arrn) {\n System.out.println(i);\n }\n }",
"java.util.Scanner sc = new java.util.Scanner(System.in);",
"sc",
"new java.util.Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] arrn = new int[n];",
"arrn",
"new int[n]",
"n",
"for (int i = 0; i < n - 1; i++) {\n arrn[sc.nextInt() - 1]++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 1",
"i",
"n - 1",
"n",
"1",
"i++",
"i++",
"i",
"{\n arrn[sc.nextInt() - 1]++;\n }",
"{\n arrn[sc.nextInt() - 1]++;\n }",
"arrn[sc.nextInt() - 1]++",
"arrn[sc.nextInt() - 1]",
"arrn",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"for (int i : arrn) {\n System.out.println(i);\n }",
"int i",
"arrn",
"{\n System.out.println(i);\n }",
"{\n System.out.println(i);\n }",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\n java.util.Scanner sc = new java.util.Scanner(System.in);\n\n int n = sc.nextInt();\n int[] arrn = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n arrn[sc.nextInt() - 1]++;\n }\n\n for (int i : arrn) {\n System.out.println(i);\n }\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n\n java.util.Scanner sc = new java.util.Scanner(System.in);\n\n int n = sc.nextInt();\n int[] arrn = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n arrn[sc.nextInt() - 1]++;\n }\n\n for (int i : arrn) {\n System.out.println(i);\n }\n }\n\n}",
"Main"
] |
public class Main {
public static void main(String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
int n = sc.nextInt();
int[] arrn = new int[n];
for (int i = 0; i < n - 1; i++) {
arrn[sc.nextInt() - 1]++;
}
for (int i : arrn) {
System.out.println(i);
}
}
}
|
[
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,
41,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
4,
18,
13,
13,
2,
4,
18,
13,
13,
17,
30,
4,
18,
13,
13,
17,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
106,
8
],
[
106,
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
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
41,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
51,
56
],
[
41,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
11,
63
],
[
63,
64
],
[
64,
65
],
[
11,
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
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
80,
85
],
[
79,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
79,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
9,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"import java.util.HashMap;\nimport java.util.Scanner;\n\n// https://atcoder.jp/contests/abc163/tasks/abc163_c\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\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint str = sc.nextInt();\n\t\t\tif (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}\n\n\t\t}\n\t}\n}",
"import java.util.HashMap;",
"HashMap",
"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\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint str = sc.nextInt();\n\t\t\tif (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}\n\n\t\t}\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\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint str = sc.nextInt();\n\t\t\tif (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}\n\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint str = sc.nextInt();\n\t\t\tif (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}\n\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",
"HashMap<Integer, Integer> map = new HashMap<>();",
"map",
"new HashMap<>()",
"for (int i = 1; i < n; i++) {\n\t\t\tint str = sc.nextInt();\n\t\t\tif (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\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\tint str = sc.nextInt();\n\t\t\tif (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\n\t\t\t}\n\t\t}",
"{\n\t\t\tint str = sc.nextInt();\n\t\t\tif (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\n\t\t\t}\n\t\t}",
"int str = sc.nextInt();",
"str",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\n\t\t\t}",
"map.containsKey(str)",
"map.containsKey",
"map",
"str",
"{\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t}",
"map.put(str, map.get(str)+1)",
"map.put",
"map",
"str",
"map.get(str)+1",
"map.get(str)",
"map.get",
"map",
"str",
"1",
"{\n\t\t\t\tmap.put(str, 1);\n\t\t\t}",
"map.put(str, 1)",
"map.put",
"map",
"str",
"1",
"sc.close()",
"sc.close",
"sc",
"for(int i=1;i<=n;i++) {\n\t\t\tif(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}\n\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}\n\n\t\t}",
"{\n\t\t\tif(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}\n\n\t\t}",
"if(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}",
"map.get(i)==null",
"map.get(i)",
"map.get",
"map",
"i",
"null",
"{\n\t\t\t\tSystem.out.println(0);\n\t\t\t}",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}",
"System.out.println(map.get(i))",
"System.out.println",
"System.out",
"System",
"System.out",
"map.get(i)",
"map.get",
"map",
"i",
"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\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint str = sc.nextInt();\n\t\t\tif (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}\n\n\t\t}\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\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint str = sc.nextInt();\n\t\t\tif (map.containsKey(str)) {\n\t\t\t\tmap.put(str, map.get(str)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(str, 1);\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(map.get(i)==null) {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t}\n\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.HashMap;
import java.util.Scanner;
// https://atcoder.jp/contests/abc163/tasks/abc163_c
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
HashMap<Integer, Integer> map = new HashMap<>();
for (int i = 1; i < n; i++) {
int str = sc.nextInt();
if (map.containsKey(str)) {
map.put(str, map.get(str)+1);
} else {
map.put(str, 1);
}
}
sc.close();
for(int i=1;i<=n;i++) {
if(map.get(i)==null) {
System.out.println(0);
}else {
System.out.println(map.get(i));
}
}
}
}
|
[
7,
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,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
40,
18,
13,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
13,
2,
18,
13,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
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,
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,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
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,
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
],
[
271,
14
],
[
271,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
20,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
17,
28
],
[
28,
29
],
[
28,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
17,
34
],
[
34,
35
],
[
34,
36
],
[
17,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
37,
41
],
[
37,
42
],
[
17,
43
],
[
43,
44
],
[
44,
45
],
[
15,
46
],
[
46,
47
],
[
271,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
52,
58
],
[
58,
59
],
[
58,
60
],
[
61,
62
],
[
61,
63
],
[
52,
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
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
52,
88
],
[
88,
89
],
[
88,
90
],
[
52,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
91,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
52,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
50,
117
],
[
117,
118
],
[
50,
119
],
[
119,
120
],
[
50,
121
],
[
121,
122
],
[
271,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
123,
131
],
[
131,
132
],
[
123,
133
],
[
133,
134
],
[
123,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
135,
143
],
[
143,
144
],
[
123,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
148,
153
],
[
153,
154
],
[
147,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
163,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
159,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
176,
180
],
[
180,
181
],
[
181,
182
],
[
147,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
123,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
190,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
190,
203
],
[
203,
204
],
[
203,
205
],
[
190,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
206,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
210,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
190,
219
],
[
219,
220
],
[
219,
221
],
[
190,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
222,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
233,
235
],
[
227,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
190,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
123,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
247,
248
],
[
251,
249
],
[
261,
250
],
[
258,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
251,
255
],
[
255,
256
],
[
255,
257
],
[
258,
258
],
[
258,
259
],
[
258,
260
],
[
261,
261
],
[
261,
262
],
[
261,
263
],
[
251,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
244,
268
],
[
268,
269
],
[
0,
270
],
[
270,
271
],
[
270,
272
]
] |
[
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author Spandan Mishra\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 CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.readInt();\n int[] a = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n int num = in.readInt();\n a[num]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 1; i <= n; i++)\n sb.append(a[i] + \"\\n\");\n\n System.out.println(sb);\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\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new RuntimeException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int readInt() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n }\n}\n",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"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 CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.readInt();\n int[] a = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n int num = in.readInt();\n a[num]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 1; i <= n; i++)\n sb.append(a[i] + \"\\n\");\n\n System.out.println(sb);\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\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new RuntimeException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int readInt() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\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 CManagement solver = new CManagement();\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 CManagement solver = new CManagement();\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)",
"CManagement solver = new CManagement();",
"solver",
"new CManagement()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class CManagement {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.readInt();\n int[] a = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n int num = in.readInt();\n a[num]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 1; i <= n; i++)\n sb.append(a[i] + \"\\n\");\n\n System.out.println(sb);\n }\n\n }",
"CManagement",
"public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.readInt();\n int[] a = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n int num = in.readInt();\n a[num]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 1; i <= n; i++)\n sb.append(a[i] + \"\\n\");\n\n System.out.println(sb);\n }",
"solve",
"{\n int n = in.readInt();\n int[] a = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n int num = in.readInt();\n a[num]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 1; i <= n; i++)\n sb.append(a[i] + \"\\n\");\n\n System.out.println(sb);\n }",
"int n = in.readInt();",
"n",
"in.readInt()",
"in.readInt",
"in",
"int[] a = new int[n + 1];",
"a",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 0; i < n - 1; i++) {\n int num = in.readInt();\n a[num]++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 1",
"i",
"n - 1",
"n",
"1",
"i++",
"i++",
"i",
"{\n int num = in.readInt();\n a[num]++;\n }",
"{\n int num = in.readInt();\n a[num]++;\n }",
"int num = in.readInt();",
"num",
"in.readInt()",
"in.readInt",
"in",
"a[num]++",
"a[num]",
"a",
"num",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"for (int i = 1; i <= n; i++)\n sb.append(a[i] + \"\\n\");",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"sb.append(a[i] + \"\\n\");",
"sb.append(a[i] + \"\\n\")",
"sb.append",
"sb",
"a[i] + \"\\n\"",
"a[i]",
"a",
"i",
"\"\\n\"",
"System.out.println(sb)",
"System.out.println",
"System.out",
"System",
"System.out",
"sb",
"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\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new RuntimeException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int readInt() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\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",
"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 RuntimeException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"read",
"{\n if (numChars == -1)\n throw new RuntimeException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (numChars == -1)\n throw new RuntimeException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new RuntimeException();",
"new RuntimeException()",
"if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }",
"catch (IOException e) {\n throw new RuntimeException();\n }",
"IOException e",
"{\n throw new RuntimeException();\n }",
"throw new RuntimeException();",
"new RuntimeException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0)\n return -1;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int readInt() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"readInt",
"{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\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();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"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 res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res *= 10;\n res += c - '0';\n c = read();\n }",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\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 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 CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.readInt();\n int[] a = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n int num = in.readInt();\n a[num]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 1; i <= n; i++)\n sb.append(a[i] + \"\\n\");\n\n System.out.println(sb);\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\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new RuntimeException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int readInt() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\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 CManagement solver = new CManagement();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CManagement {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.readInt();\n int[] a = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n int num = in.readInt();\n a[num]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 1; i <= n; i++)\n sb.append(a[i] + \"\\n\");\n\n System.out.println(sb);\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\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new RuntimeException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int readInt() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n }\n}",
"Main"
] |
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Spandan Mishra
*/
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);
CManagement solver = new CManagement();
solver.solve(1, in, out);
out.close();
}
static class CManagement {
public void solve(int testNumber, InputReader in, PrintWriter out) {
int n = in.readInt();
int[] a = new int[n + 1];
for (int i = 0; i < n - 1; i++) {
int num = in.readInt();
a[num]++;
}
StringBuilder sb = new StringBuilder();
for (int i = 1; i <= n; i++)
sb.append(a[i] + "\n");
System.out.println(sb);
}
}
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int read() {
if (numChars == -1)
throw new RuntimeException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new RuntimeException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public int readInt() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public boolean isSpaceChar(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
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,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
18,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
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
],
[
43,
44
],
[
44,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
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
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
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
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
6,
92
],
[
92,
93
]
] |
[
"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 Integer a[] = new Integer[N];\n \ta[0] = 0;\n for (int i=1; i<N; i++) {\n a[i] = sc.nextInt();\n }\n \n int[] res = new int[N];\n \n for (int i = 1; i < N; i++){\n res[a[i] - 1]++;\n }\n \n\t for (int i = 0; i < N; i++){\n System.out.println(res[i]);\n }\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 Integer a[] = new Integer[N];\n \ta[0] = 0;\n for (int i=1; i<N; i++) {\n a[i] = sc.nextInt();\n }\n \n int[] res = new int[N];\n \n for (int i = 1; i < N; i++){\n res[a[i] - 1]++;\n }\n \n\t for (int i = 0; i < N; i++){\n System.out.println(res[i]);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n Integer a[] = new Integer[N];\n \ta[0] = 0;\n for (int i=1; i<N; i++) {\n a[i] = sc.nextInt();\n }\n \n int[] res = new int[N];\n \n for (int i = 1; i < N; i++){\n res[a[i] - 1]++;\n }\n \n\t for (int i = 0; i < N; i++){\n System.out.println(res[i]);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n Integer a[] = new Integer[N];\n \ta[0] = 0;\n for (int i=1; i<N; i++) {\n a[i] = sc.nextInt();\n }\n \n int[] res = new int[N];\n \n for (int i = 1; i < N; i++){\n res[a[i] - 1]++;\n }\n \n\t for (int i = 0; i < N; i++){\n System.out.println(res[i]);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Integer a[] = new Integer[N];",
"a",
"new Integer[N]",
"N",
"a[0] = 0",
"a[0]",
"a",
"0",
"0",
"for (int i=1; i<N; i++) {\n a[i] = sc.nextInt();\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n a[i] = sc.nextInt();\n }",
"{\n a[i] = sc.nextInt();\n }",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] res = new int[N];",
"res",
"new int[N]",
"N",
"for (int i = 1; i < N; i++){\n res[a[i] - 1]++;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n res[a[i] - 1]++;\n }",
"{\n res[a[i] - 1]++;\n }",
"res[a[i] - 1]++",
"res[a[i] - 1]",
"res",
"a[i] - 1",
"a[i]",
"a",
"i",
"1",
"for (int i = 0; i < N; i++){\n System.out.println(res[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n System.out.println(res[i]);\n }",
"{\n System.out.println(res[i]);\n }",
"System.out.println(res[i])",
"System.out.println",
"System.out",
"System",
"System.out",
"res[i]",
"res",
"i",
"String[] args",
"args"
] |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
Integer a[] = new Integer[N];
a[0] = 0;
for (int i=1; i<N; i++) {
a[i] = sc.nextInt();
}
int[] res = new int[N];
for (int i = 1; i < N; i++){
res[a[i] - 1]++;
}
for (int i = 0; i < N; i++){
System.out.println(res[i]);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
40,
18,
13,
2,
4,
18,
13,
17,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
13,
4,
18,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
39,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
44,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
6,
58
],
[
58,
59
]
] |
[
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] $){\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\ta[sc.nextInt() - 1]++;\n\t\t}\n\n\t\tfor (int x : a) {\n\t\t\tSystem.out.println(x);\n\t\t}\n\n\t\tsc.close();\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] $){\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\ta[sc.nextInt() - 1]++;\n\t\t}\n\n\t\tfor (int x : a) {\n\t\t\tSystem.out.println(x);\n\t\t}\n\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] $){\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\ta[sc.nextInt() - 1]++;\n\t\t}\n\n\t\tfor (int x : a) {\n\t\t\tSystem.out.println(x);\n\t\t}\n\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc =new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n];\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\ta[sc.nextInt() - 1]++;\n\t\t}\n\n\t\tfor (int x : a) {\n\t\t\tSystem.out.println(x);\n\t\t}\n\n\t\tsc.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 a[] = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n - 1; i++) {\n\t\t\ta[sc.nextInt() - 1]++;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 1",
"i",
"n - 1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\ta[sc.nextInt() - 1]++;\n\t\t}",
"{\n\t\t\ta[sc.nextInt() - 1]++;\n\t\t}",
"a[sc.nextInt() - 1]++",
"a[sc.nextInt() - 1]",
"a",
"sc.nextInt() - 1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1",
"for (int x : a) {\n\t\t\tSystem.out.println(x);\n\t\t}",
"int x",
"a",
"{\n\t\t\tSystem.out.println(x);\n\t\t}",
"{\n\t\t\tSystem.out.println(x);\n\t\t}",
"System.out.println(x)",
"System.out.println",
"System.out",
"System",
"System.out",
"x",
"sc.close()",
"sc.close",
"sc",
"String[] $",
"$"
] |
import java.util.Scanner;
class Main {
public static void main(String[] $){
Scanner sc =new Scanner(System.in);
int n = sc.nextInt();
int a[] = new int[n];
for (int i = 0; i < n - 1; i++) {
a[sc.nextInt() - 1]++;
}
for (int x : a) {
System.out.println(x);
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
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,
18,
13,
2,
13,
17,
17,
28,
13,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
59,
5
],
[
59,
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
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
39,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
6,
56
],
[
56,
57
],
[
0,
58
],
[
58,
59
],
[
58,
60
]
] |
[
"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[] array = new int[N];\n for (int i=1; i<N; i++) {\n int n = sc.nextInt();\n array[n-1] += 1;\n }\n for (int ans : array)\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 int N = sc.nextInt();\n int[] array = new int[N];\n for (int i=1; i<N; i++) {\n int n = sc.nextInt();\n array[n-1] += 1;\n }\n for (int ans : array)\n System.out.println(ans);\n }\n}",
"Main",
"public static void main (String[] args) {\n Scanner sc = new Scanner (System.in);\n int N = sc.nextInt();\n int[] array = new int[N];\n for (int i=1; i<N; i++) {\n int n = sc.nextInt();\n array[n-1] += 1;\n }\n for (int ans : array)\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner (System.in);\n int N = sc.nextInt();\n int[] array = new int[N];\n for (int i=1; i<N; i++) {\n int n = sc.nextInt();\n array[n-1] += 1;\n }\n for (int ans : array)\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[] array = new int[N];",
"array",
"new int[N]",
"N",
"for (int i=1; i<N; i++) {\n int n = sc.nextInt();\n array[n-1] += 1;\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int n = sc.nextInt();\n array[n-1] += 1;\n }",
"{\n int n = sc.nextInt();\n array[n-1] += 1;\n }",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"array[n-1] += 1",
"array[n-1]",
"array",
"n-1",
"n",
"1",
"1",
"for (int ans : array)\n System.out.println(ans);",
"int ans",
"array",
"System.out.println(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 int N = sc.nextInt();\n int[] array = new int[N];\n for (int i=1; i<N; i++) {\n int n = sc.nextInt();\n array[n-1] += 1;\n }\n for (int ans : array)\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 int N = sc.nextInt();\n int[] array = new int[N];\n for (int i=1; i<N; i++) {\n int n = sc.nextInt();\n array[n-1] += 1;\n }\n for (int ans : array)\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);
int N = sc.nextInt();
int[] array = new int[N];
for (int i=1; i<N; i++) {
int n = sc.nextInt();
array[n-1] += 1;
}
for (int ans : array)
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
17,
14,
4,
18,
13,
17,
30,
0,
13,
17,
3,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
79,
5
],
[
79,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
11,
13
],
[
8,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
21,
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
],
[
43,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
50,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
60,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n int num;\n Scanner scan = new Scanner(System.in);\n\n num = scan.nextInt();\n\n String num_s = String.valueOf(num);\n\n boolean bool = false;\n for(int i = 0; i < 3; i++) {\n String s = num_s.substring(i, i+1);\n if(s.equals(\"7\")) {\n bool = true;\n break;\n }\n }\n\n if(bool) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n int num;\n Scanner scan = new Scanner(System.in);\n\n num = scan.nextInt();\n\n String num_s = String.valueOf(num);\n\n boolean bool = false;\n for(int i = 0; i < 3; i++) {\n String s = num_s.substring(i, i+1);\n if(s.equals(\"7\")) {\n bool = true;\n break;\n }\n }\n\n if(bool) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n int num;\n Scanner scan = new Scanner(System.in);\n\n num = scan.nextInt();\n\n String num_s = String.valueOf(num);\n\n boolean bool = false;\n for(int i = 0; i < 3; i++) {\n String s = num_s.substring(i, i+1);\n if(s.equals(\"7\")) {\n bool = true;\n break;\n }\n }\n\n if(bool) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n int num;\n Scanner scan = new Scanner(System.in);\n\n num = scan.nextInt();\n\n String num_s = String.valueOf(num);\n\n boolean bool = false;\n for(int i = 0; i < 3; i++) {\n String s = num_s.substring(i, i+1);\n if(s.equals(\"7\")) {\n bool = true;\n break;\n }\n }\n\n if(bool) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"int num;",
"num",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"num = scan.nextInt()",
"num",
"scan.nextInt()",
"scan.nextInt",
"scan",
"String num_s = String.valueOf(num);",
"num_s",
"String.valueOf(num)",
"String.valueOf",
"String",
"num",
"boolean bool = false;",
"bool",
"false",
"for(int i = 0; i < 3; i++) {\n String s = num_s.substring(i, i+1);\n if(s.equals(\"7\")) {\n bool = true;\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 3",
"i",
"3",
"i++",
"i++",
"i",
"{\n String s = num_s.substring(i, i+1);\n if(s.equals(\"7\")) {\n bool = true;\n break;\n }\n }",
"{\n String s = num_s.substring(i, i+1);\n if(s.equals(\"7\")) {\n bool = true;\n break;\n }\n }",
"String s = num_s.substring(i, i+1);",
"s",
"num_s.substring(i, i+1)",
"num_s.substring",
"num_s",
"i",
"i+1",
"i",
"1",
"if(s.equals(\"7\")) {\n bool = true;\n break;\n }",
"s.equals(\"7\")",
"s.equals",
"s",
"\"7\"",
"{\n bool = true;\n break;\n }",
"bool = true",
"bool",
"true",
"break;",
"if(bool) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"bool",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n int num;\n Scanner scan = new Scanner(System.in);\n\n num = scan.nextInt();\n\n String num_s = String.valueOf(num);\n\n boolean bool = false;\n for(int i = 0; i < 3; i++) {\n String s = num_s.substring(i, i+1);\n if(s.equals(\"7\")) {\n bool = true;\n break;\n }\n }\n\n if(bool) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n int num;\n Scanner scan = new Scanner(System.in);\n\n num = scan.nextInt();\n\n String num_s = String.valueOf(num);\n\n boolean bool = false;\n for(int i = 0; i < 3; i++) {\n String s = num_s.substring(i, i+1);\n if(s.equals(\"7\")) {\n bool = true;\n break;\n }\n }\n\n if(bool) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int num;
Scanner scan = new Scanner(System.in);
num = scan.nextInt();
String num_s = String.valueOf(num);
boolean bool = false;
for(int i = 0; i < 3; i++) {
String s = num_s.substring(i, i+1);
if(s.equals("7")) {
bool = true;
break;
}
}
if(bool) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
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,
4,
18,
20,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
14,
2,
4,
18,
13,
13,
17,
30,
4,
18,
13,
17,
29,
4,
18,
13,
17,
23,
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,
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
],
[
152,
23
],
[
152,
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
],
[
44,
45
],
[
43,
46
],
[
43,
47
],
[
26,
48
],
[
48,
49
],
[
49,
50
],
[
24,
51
],
[
51,
52
],
[
152,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
63,
73
],
[
73,
74
],
[
74,
75
],
[
63,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
78,
83
],
[
77,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
84,
89
],
[
57,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
55,
94
],
[
94,
95
],
[
55,
96
],
[
96,
97
],
[
152,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
98,
102
],
[
102,
103
],
[
98,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
110,
112
],
[
104,
113
],
[
113,
114
],
[
98,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
118,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
128,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
117,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
98,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
149,
150
],
[
0,
151
],
[
151,
152
],
[
151,
153
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tInputReader in = new InputReader(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tnew Solution().solve(in, out);\n\t\tout.close();\n\t}\n\t\n\tprivate static class Solution {\n\t\tprivate void solve(InputReader in, PrintWriter out) {\n\t\t\tString N = in.next();\n\t\t\tfor (int i = 0; i < N.length(); ++i) if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tout.println(\"No\");\n\t\t}\n\t}\n\t\n\tprivate static class InputReader {\n\t\tpublic BufferedReader reader;\n\t\tpublic StringTokenizer tokenizer;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\treader = new BufferedReader(new InputStreamReader(stream), 32678);\n\t\t\ttokenizer = null;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t}\n\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"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.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tInputReader in = new InputReader(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tnew Solution().solve(in, out);\n\t\tout.close();\n\t}\n\t\n\tprivate static class Solution {\n\t\tprivate void solve(InputReader in, PrintWriter out) {\n\t\t\tString N = in.next();\n\t\t\tfor (int i = 0; i < N.length(); ++i) if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tout.println(\"No\");\n\t\t}\n\t}\n\t\n\tprivate static class InputReader {\n\t\tpublic BufferedReader reader;\n\t\tpublic StringTokenizer tokenizer;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\treader = new BufferedReader(new InputStreamReader(stream), 32678);\n\t\t\ttokenizer = null;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t}\n\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tInputReader in = new InputReader(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tnew Solution().solve(in, out);\n\t\tout.close();\n\t}",
"main",
"{\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tInputReader in = new InputReader(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tnew Solution().solve(in, out);\n\t\tout.close();\n\t}",
"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)",
"new Solution().solve(in, out)",
"new Solution().solve",
"new Solution()",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"private static class Solution {\n\t\tprivate void solve(InputReader in, PrintWriter out) {\n\t\t\tString N = in.next();\n\t\t\tfor (int i = 0; i < N.length(); ++i) if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tout.println(\"No\");\n\t\t}\n\t}",
"Solution",
"private void solve(InputReader in, PrintWriter out) {\n\t\t\tString N = in.next();\n\t\t\tfor (int i = 0; i < N.length(); ++i) if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tout.println(\"No\");\n\t\t}",
"solve",
"{\n\t\t\tString N = in.next();\n\t\t\tfor (int i = 0; i < N.length(); ++i) if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tout.println(\"No\");\n\t\t}",
"String N = in.next();",
"N",
"in.next()",
"in.next",
"in",
"for (int i = 0; i < N.length(); ++i) if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N.length()",
"i",
"N.length()",
"N.length",
"N",
"++i",
"++i",
"i",
"if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"N.charAt(i) == '7'",
"N.charAt(i)",
"N.charAt",
"N",
"i",
"'7'",
"{\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"return;",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"InputReader in",
"in",
"PrintWriter out",
"out",
"private static class InputReader {\n\t\tpublic BufferedReader reader;\n\t\tpublic StringTokenizer tokenizer;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\treader = new BufferedReader(new InputStreamReader(stream), 32678);\n\t\t\ttokenizer = null;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t}",
"InputReader",
"public BufferedReader reader;",
"reader",
"public StringTokenizer tokenizer;",
"tokenizer",
"public InputReader(InputStream stream) {\n\t\t\treader = new BufferedReader(new InputStreamReader(stream), 32678);\n\t\t\ttokenizer = null;\n\t\t}",
"InputReader",
"{\n\t\t\treader = new BufferedReader(new InputStreamReader(stream), 32678);\n\t\t\ttokenizer = null;\n\t\t}",
"reader = new BufferedReader(new InputStreamReader(stream), 32678)",
"reader",
"new BufferedReader(new InputStreamReader(stream), 32678)",
"tokenizer = null",
"tokenizer",
"null",
"InputStream stream",
"stream",
"public String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}",
"while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}",
"try {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t}",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"public 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",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tInputReader in = new InputReader(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tnew Solution().solve(in, out);\n\t\tout.close();\n\t}\n\t\n\tprivate static class Solution {\n\t\tprivate void solve(InputReader in, PrintWriter out) {\n\t\t\tString N = in.next();\n\t\t\tfor (int i = 0; i < N.length(); ++i) if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tout.println(\"No\");\n\t\t}\n\t}\n\t\n\tprivate static class InputReader {\n\t\tpublic BufferedReader reader;\n\t\tpublic StringTokenizer tokenizer;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\treader = new BufferedReader(new InputStreamReader(stream), 32678);\n\t\t\ttokenizer = null;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t}\n\n\n}",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tInputReader in = new InputReader(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tnew Solution().solve(in, out);\n\t\tout.close();\n\t}\n\t\n\tprivate static class Solution {\n\t\tprivate void solve(InputReader in, PrintWriter out) {\n\t\t\tString N = in.next();\n\t\t\tfor (int i = 0; i < N.length(); ++i) if (N.charAt(i) == '7') {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tout.println(\"No\");\n\t\t}\n\t}\n\t\n\tprivate static class InputReader {\n\t\tpublic BufferedReader reader;\n\t\tpublic StringTokenizer tokenizer;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\treader = new BufferedReader(new InputStreamReader(stream), 32678);\n\t\t\ttokenizer = null;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t}\n\n\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
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);
new Solution().solve(in, out);
out.close();
}
private static class Solution {
private void solve(InputReader in, PrintWriter out) {
String N = in.next();
for (int i = 0; i < N.length(); ++i) if (N.charAt(i) == '7') {
out.println("Yes");
return;
}
out.println("No");
}
}
private static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32678);
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 nextInt() {
return Integer.parseInt(next());
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
39,
17,
17,
41,
13,
17,
42,
2,
13,
17,
30,
41,
13,
2,
13,
17,
41,
13,
2,
13,
2,
13,
17,
14,
2,
13,
17,
0,
13,
17,
0,
13,
17,
4,
18,
13,
4,
18,
18,
13,
13,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
66,
5
],
[
66,
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
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
29,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
29,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
29,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
6,
63
],
[
63,
64
],
[
0,
65
],
[
65,
66
],
[
65,
67
]
] |
[
"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\tString string[] = {\"Yes\", \"No\"};\n\t\tint ans = 1;\n\t\twhile(n > 0){\n\t\t\tint tmp = n / 10;\n\t\t\tint digitnum = n - tmp * 10;\n\t\t\tif(digitnum == 7)ans = 0;\n\t\t\tn /= 10;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(string[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\tString string[] = {\"Yes\", \"No\"};\n\t\tint ans = 1;\n\t\twhile(n > 0){\n\t\t\tint tmp = n / 10;\n\t\t\tint digitnum = n - tmp * 10;\n\t\t\tif(digitnum == 7)ans = 0;\n\t\t\tn /= 10;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(string[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\tString string[] = {\"Yes\", \"No\"};\n\t\tint ans = 1;\n\t\twhile(n > 0){\n\t\t\tint tmp = n / 10;\n\t\t\tint digitnum = n - tmp * 10;\n\t\t\tif(digitnum == 7)ans = 0;\n\t\t\tn /= 10;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(string[ans]);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tString string[] = {\"Yes\", \"No\"};\n\t\tint ans = 1;\n\t\twhile(n > 0){\n\t\t\tint tmp = n / 10;\n\t\t\tint digitnum = n - tmp * 10;\n\t\t\tif(digitnum == 7)ans = 0;\n\t\t\tn /= 10;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(string[ans]);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String string[] = {\"Yes\", \"No\"};",
"string",
"{\"Yes\", \"No\"}",
"\"Yes\"",
"\"No\"",
"int ans = 1;",
"ans",
"1",
"while(n > 0){\n\t\t\tint tmp = n / 10;\n\t\t\tint digitnum = n - tmp * 10;\n\t\t\tif(digitnum == 7)ans = 0;\n\t\t\tn /= 10;\n\t\t}",
"n > 0",
"n",
"0",
"{\n\t\t\tint tmp = n / 10;\n\t\t\tint digitnum = n - tmp * 10;\n\t\t\tif(digitnum == 7)ans = 0;\n\t\t\tn /= 10;\n\t\t}",
"int tmp = n / 10;",
"tmp",
"n / 10",
"n",
"10",
"int digitnum = n - tmp * 10;",
"digitnum",
"n - tmp * 10",
"n",
"tmp * 10",
"tmp",
"10",
"if(digitnum == 7)ans = 0;",
"digitnum == 7",
"digitnum",
"7",
"ans = 0",
"ans",
"0",
"n /= 10",
"n",
"10",
"sc.close()",
"sc.close",
"sc",
"System.out.println(string[ans])",
"System.out.println",
"System.out",
"System",
"System.out",
"string[ans]",
"string",
"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\tString string[] = {\"Yes\", \"No\"};\n\t\tint ans = 1;\n\t\twhile(n > 0){\n\t\t\tint tmp = n / 10;\n\t\t\tint digitnum = n - tmp * 10;\n\t\t\tif(digitnum == 7)ans = 0;\n\t\t\tn /= 10;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(string[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\tString string[] = {\"Yes\", \"No\"};\n\t\tint ans = 1;\n\t\twhile(n > 0){\n\t\t\tint tmp = n / 10;\n\t\t\tint digitnum = n - tmp * 10;\n\t\t\tif(digitnum == 7)ans = 0;\n\t\t\tn /= 10;\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(string[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();
String string[] = {"Yes", "No"};
int ans = 1;
while(n > 0){
int tmp = n / 10;
int digitnum = n - tmp * 10;
if(digitnum == 7)ans = 0;
n /= 10;
}
sc.close();
System.out.println(string[ans]);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
2,
4,
18,
13,
17,
17,
2,
4,
18,
13,
17,
17,
2,
4,
18,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
58,
5
],
[
58,
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
],
[
19,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
19,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
19,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
17,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
17,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
6,
55
],
[
55,
56
],
[
0,
57
],
[
57,
58
],
[
57,
59
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString numberStr = scanner.next();\n\t\t\n\n\t\tif (numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7') {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\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 scanner = new Scanner(System.in);\n\n\t\tString numberStr = scanner.next();\n\t\t\n\n\t\tif (numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7') {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString numberStr = scanner.next();\n\t\t\n\n\t\tif (numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7') {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString numberStr = scanner.next();\n\t\t\n\n\t\tif (numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7') {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String numberStr = scanner.next();",
"numberStr",
"scanner.next()",
"scanner.next",
"scanner",
"if (numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7') {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7'",
"numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7'",
"numberStr.charAt(0) == '7'",
"numberStr.charAt(0)",
"numberStr.charAt",
"numberStr",
"0",
"'7'",
"numberStr.charAt(1) == '7'",
"numberStr.charAt(1)",
"numberStr.charAt",
"numberStr",
"1",
"'7'",
"numberStr.charAt(2) == '7'",
"numberStr.charAt(2)",
"numberStr.charAt",
"numberStr",
"2",
"'7'",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"scanner.close()",
"scanner.close",
"scanner",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString numberStr = scanner.next();\n\t\t\n\n\t\tif (numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7') {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString numberStr = scanner.next();\n\t\t\n\n\t\tif (numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7') {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String numberStr = scanner.next();
if (numberStr.charAt(0) == '7' || numberStr.charAt(1) == '7' || numberStr.charAt(2) == '7') {
System.out.println("Yes");
} else {
System.out.println("No");
}
scanner.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
20,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
14,
2,
13,
17,
0,
13,
17,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
12,
13,
30,
4,
13,
18,
13,
13,
12,
13,
30,
0,
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,
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,
41,
13,
4,
13,
42,
4,
13,
13,
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,
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,
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,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
411,
11
],
[
411,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
411,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
20,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
32,
42
],
[
42,
43
],
[
43,
44
],
[
32,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
46,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
20,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
20,
74
],
[
74,
75
],
[
75,
76
],
[
411,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
77,
81
],
[
81,
82
],
[
81,
83
],
[
77,
85
],
[
85,
86
],
[
77,
87
],
[
87,
88
],
[
77,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
77,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
97,
103
],
[
103,
104
],
[
77,
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
],
[
77,
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
],
[
159,
161
],
[
161,
162
],
[
150,
163
],
[
163,
164
],
[
163,
165
],
[
150,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
166,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
171,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
150,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
77,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
186,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
191,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
186,
199
],
[
199,
200
],
[
199,
201
],
[
186,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
202,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
208,
211
],
[
207,
212
],
[
212,
213
],
[
212,
214
],
[
214,
215
],
[
186,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
77,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
222,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
222,
235
],
[
235,
236
],
[
235,
237
],
[
222,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
238,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
242,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
222,
251
],
[
251,
252
],
[
251,
253
],
[
222,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
254,
259
],
[
259,
260
],
[
260,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
261,
265
],
[
265,
266
],
[
265,
267
],
[
260,
268
],
[
268,
269
],
[
259,
270
],
[
270,
271
],
[
270,
272
],
[
259,
273
],
[
273,
274
],
[
273,
275
],
[
275,
276
],
[
275,
277
],
[
259,
278
],
[
278,
279
],
[
278,
280
],
[
280,
281
],
[
222,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
77,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
291,
292
],
[
288,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
293,
297
],
[
297,
298
],
[
297,
299
],
[
299,
300
],
[
288,
301
],
[
301,
302
],
[
301,
303
],
[
288,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
304,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
308,
313
],
[
313,
314
],
[
313,
315
],
[
315,
316
],
[
288,
317
],
[
317,
318
],
[
317,
319
],
[
288,
320
],
[
320,
321
],
[
321,
322
],
[
322,
323
],
[
322,
324
],
[
320,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
328,
329
],
[
328,
330
],
[
327,
331
],
[
331,
332
],
[
331,
333
],
[
326,
334
],
[
334,
335
],
[
325,
336
],
[
336,
337
],
[
336,
338
],
[
325,
339
],
[
339,
340
],
[
339,
341
],
[
341,
342
],
[
341,
343
],
[
325,
344
],
[
344,
345
],
[
344,
346
],
[
346,
347
],
[
288,
348
],
[
348,
349
],
[
349,
350
],
[
349,
351
],
[
77,
352
],
[
352,
353
],
[
352,
354
],
[
354,
355
],
[
355,
356
],
[
359,
357
],
[
369,
358
],
[
366,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
359,
363
],
[
363,
364
],
[
363,
365
],
[
366,
366
],
[
366,
367
],
[
366,
368
],
[
369,
369
],
[
369,
370
],
[
369,
371
],
[
359,
372
],
[
372,
373
],
[
372,
374
],
[
374,
375
],
[
352,
376
],
[
376,
377
],
[
77,
378
],
[
378,
379
],
[
378,
380
],
[
380,
381
],
[
381,
382
],
[
383,
383
],
[
383,
384
],
[
384,
385
],
[
384,
386
],
[
383,
387
],
[
387,
388
],
[
387,
389
],
[
383,
390
],
[
390,
391
],
[
390,
392
],
[
392,
393
],
[
378,
394
],
[
394,
395
],
[
77,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
400,
402
],
[
402,
403
],
[
403,
404
],
[
404,
405
],
[
399,
406
],
[
406,
407
],
[
407,
408
],
[
408,
409
],
[
0,
410
],
[
410,
411
],
[
410,
412
]
] |
[
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.InputMismatchException;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\n\tpublic Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tString n = sc.nextString();\n\t\tboolean c7 = false;\n\t\tfor (int i = 0; i < n.length(); i++) {\n\t\t\tchar c = n.charAt(i);\n\t\t\tif (c == '7') c7 = true;\n\t\t}\n\t\tif (c7) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t\tsc.close();\n\t}\n\t\n\tclass FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\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\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\n\tpublic Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tString n = sc.nextString();\n\t\tboolean c7 = false;\n\t\tfor (int i = 0; i < n.length(); i++) {\n\t\t\tchar c = n.charAt(i);\n\t\t\tif (c == '7') c7 = true;\n\t\t}\n\t\tif (c7) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t\tsc.close();\n\t}\n\t\n\tclass FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tnew Main();\n\t}",
"main",
"{\n\t\tnew Main();\n\t}",
"new Main()",
"String[] args",
"args",
"public Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tString n = sc.nextString();\n\t\tboolean c7 = false;\n\t\tfor (int i = 0; i < n.length(); i++) {\n\t\t\tchar c = n.charAt(i);\n\t\t\tif (c == '7') c7 = true;\n\t\t}\n\t\tif (c7) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t\tsc.close();\n\t}",
"Main",
"{\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tString n = sc.nextString();\n\t\tboolean c7 = false;\n\t\tfor (int i = 0; i < n.length(); i++) {\n\t\t\tchar c = n.charAt(i);\n\t\t\tif (c == '7') c7 = true;\n\t\t}\n\t\tif (c7) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t\tsc.close();\n\t}",
"FasterScanner sc = new FasterScanner(System.in);",
"sc",
"new FasterScanner(System.in)",
"String n = sc.nextString();",
"n",
"sc.nextString()",
"sc.nextString",
"sc",
"boolean c7 = false;",
"c7",
"false",
"for (int i = 0; i < n.length(); i++) {\n\t\t\tchar c = n.charAt(i);\n\t\t\tif (c == '7') c7 = true;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n.length()",
"i",
"n.length()",
"n.length",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tchar c = n.charAt(i);\n\t\t\tif (c == '7') c7 = true;\n\t\t}",
"{\n\t\t\tchar c = n.charAt(i);\n\t\t\tif (c == '7') c7 = true;\n\t\t}",
"char c = n.charAt(i);",
"c",
"n.charAt(i)",
"n.charAt",
"n",
"i",
"if (c == '7') c7 = true;",
"c == '7'",
"c",
"'7'",
"c7 = true",
"c7",
"true",
"if (c7) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");",
"c7",
"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\"",
"sc.close()",
"sc.close",
"sc",
"class FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"FasterScanner",
"private InputStream mIs;",
"mIs",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"public FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}",
"FasterScanner",
"{\n\t\t\tthis(System.in);\n\t\t}",
"this(System.in)",
"this",
"System.in",
"System",
"System.in",
"public FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}",
"FasterScanner",
"{\n\t\t\tmIs = is;\n\t\t}",
"mIs = is",
"mIs",
"is",
"InputStream is",
"is",
"public int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}",
"read",
"{\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}",
"if (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}",
"curChar >= numChars",
"curChar",
"numChars",
"{\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}",
"curChar = 0",
"curChar",
"0",
"try {\n\t\t\t\t\tnumChars = mIs.read(buf);\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\tnumChars = mIs.read(buf);\n\t\t\t\t}",
"numChars = mIs.read(buf)",
"numChars",
"mIs.read(buf)",
"mIs.read",
"mIs",
"buf",
"if (numChars <= 0)\n\t\t\t\t\treturn -1;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}",
"nextLine",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));",
"!isEndOfLine(c)",
"isEndOfLine(c)",
"isEndOfLine",
"c",
"{\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t}",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}",
"nextString",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t}",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"nextLong",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"c == '-'",
"c",
"'-'",
"{\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\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 *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"nextInt",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"c == '-'",
"c",
"'-'",
"{\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\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 *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}",
"isSpaceChar",
"{\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}",
"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 boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}",
"isEndOfLine",
"{\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}",
"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 void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"close",
"{\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"try {\n\t\t\t\tmIs.close();\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\tmIs.close();\n\t\t\t}",
"mIs.close()",
"mIs.close",
"mIs",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\n\tpublic Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tString n = sc.nextString();\n\t\tboolean c7 = false;\n\t\tfor (int i = 0; i < n.length(); i++) {\n\t\t\tchar c = n.charAt(i);\n\t\t\tif (c == '7') c7 = true;\n\t\t}\n\t\tif (c7) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t\tsc.close();\n\t}\n\t\n\tclass FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n\n\tpublic Main() {\n\t\tFasterScanner sc = new FasterScanner(System.in);\n\n\t\tString n = sc.nextString();\n\t\tboolean c7 = false;\n\t\tfor (int i = 0; i < n.length(); i++) {\n\t\t\tchar c = n.charAt(i);\n\t\t\tif (c == '7') c7 = true;\n\t\t}\n\t\tif (c7) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t\tsc.close();\n\t}\n\t\n\tclass FasterScanner {\n\t\tprivate InputStream mIs;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\n\t\tpublic FasterScanner() {\n\t\t\tthis(System.in);\n\t\t}\n\n\t\tpublic FasterScanner(InputStream is) {\n\t\t\tmIs = is;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = mIs.read(buf);\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 (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isEndOfLine(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic String nextString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\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 *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t\tpublic void close() {\n\t\t\ttry {\n\t\t\t\tmIs.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.IOException;
import java.io.InputStream;
import java.util.InputMismatchException;
public class Main {
public static void main(String[] args) {
new Main();
}
public Main() {
FasterScanner sc = new FasterScanner(System.in);
String n = sc.nextString();
boolean c7 = false;
for (int i = 0; i < n.length(); i++) {
char c = n.charAt(i);
if (c == '7') c7 = true;
}
if (c7) System.out.println("Yes");
else System.out.println("No");
sc.close();
}
class FasterScanner {
private InputStream mIs;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
public FasterScanner() {
this(System.in);
}
public FasterScanner(InputStream is) {
mIs = is;
}
public int read() {
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = mIs.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public String nextLine() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isEndOfLine(c));
return res.toString();
}
public String nextString() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public long nextLong() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public int nextInt() {
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;
}
public boolean isSpaceChar(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
public void close() {
try {
mIs.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
42,
5
],
[
42,
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
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
20,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
6,
39
],
[
39,
40
],
[
0,
41
],
[
41,
42
],
[
41,
43
]
] |
[
"import java.util.*;\n\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n// String s = sc.nextLine();\n// int k = sc.nextInt();\n// int a = sc.nextInt();\n// int b = sc.nextInt(); \n// int r = sc.nextInt();\n String n = sc.nextLine();\n sc.close();\n if(n.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// System.out.println(n);\n// if(s <= w){\n// System.out.println(Math.PI);\n// }else{\n// System.out.println(\"safe\");\n// }\n// System.out.println(s);\n// if(s.contains(\"RRR\")){\n// System.out.println(3);\n// }else if(s.contains(\"RR\")){\n// System.out.println(2); \n// }else if(s.contains(\"R\")){\n// System.out.println(1);\n// }else{\n// System.out.println(0);\n// }\n// String s = sc.nextLine();\n// String t = sc.next();\n// String[] arr = s.split(\" \");\n// sc.close();\n// System.out.println(\"input: \"+ s);\n// System.out.println(\"k:\" + k);\n// System.out.println(\"a:\" + a);\n// System.out.println(\"b:\" + b);\n// String ans = \"NG\";\n// for(int x = a; x<=b; x++){\n// if(x%k == 0){\n// ans = \"OK\";\n// }\n// }\n// System.out.println(ans);\n// \\\n// System.out.println(\"arr[1]:\" + arr[1]);\n//\n// if(s.equals(\"ABC\")){\n// System.out.println(\"ARC\");\n// }else{\n// System.out.println(\"ABC\");\n// }\n// String[] arr1 = s.split(\"\");\n// String[] arr2 = t.split(\"\");\n//// List<String> list1 = Arrays.asList(s.split(\"\"));\n// List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n//// List<String> list2 = Arrays.asList(t.split(\"\"));\n// List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n//// int num = Integer.parseInt(arr[arr.length - 1]);\n// list2.remove(arr2.length - 1);\n//// System.out.println(list1);\n//// System.out.println(list2);\n// if(list1.toString().contentEquals(list2.toString())){\n// System.out.println(\"Yes\");\n// }else{\n// System.out.println(\"No\");\n// }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\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();\n// int k = sc.nextInt();\n// int a = sc.nextInt();\n// int b = sc.nextInt(); \n// int r = sc.nextInt();\n String n = sc.nextLine();\n sc.close();\n if(n.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// System.out.println(n);\n// if(s <= w){\n// System.out.println(Math.PI);\n// }else{\n// System.out.println(\"safe\");\n// }\n// System.out.println(s);\n// if(s.contains(\"RRR\")){\n// System.out.println(3);\n// }else if(s.contains(\"RR\")){\n// System.out.println(2); \n// }else if(s.contains(\"R\")){\n// System.out.println(1);\n// }else{\n// System.out.println(0);\n// }\n// String s = sc.nextLine();\n// String t = sc.next();\n// String[] arr = s.split(\" \");\n// sc.close();\n// System.out.println(\"input: \"+ s);\n// System.out.println(\"k:\" + k);\n// System.out.println(\"a:\" + a);\n// System.out.println(\"b:\" + b);\n// String ans = \"NG\";\n// for(int x = a; x<=b; x++){\n// if(x%k == 0){\n// ans = \"OK\";\n// }\n// }\n// System.out.println(ans);\n// \\\n// System.out.println(\"arr[1]:\" + arr[1]);\n//\n// if(s.equals(\"ABC\")){\n// System.out.println(\"ARC\");\n// }else{\n// System.out.println(\"ABC\");\n// }\n// String[] arr1 = s.split(\"\");\n// String[] arr2 = t.split(\"\");\n//// List<String> list1 = Arrays.asList(s.split(\"\"));\n// List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n//// List<String> list2 = Arrays.asList(t.split(\"\"));\n// List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n//// int num = Integer.parseInt(arr[arr.length - 1]);\n// list2.remove(arr2.length - 1);\n//// System.out.println(list1);\n//// System.out.println(list2);\n// if(list1.toString().contentEquals(list2.toString())){\n// System.out.println(\"Yes\");\n// }else{\n// System.out.println(\"No\");\n// }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n// String s = sc.nextLine();\n// int k = sc.nextInt();\n// int a = sc.nextInt();\n// int b = sc.nextInt(); \n// int r = sc.nextInt();\n String n = sc.nextLine();\n sc.close();\n if(n.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// System.out.println(n);\n// if(s <= w){\n// System.out.println(Math.PI);\n// }else{\n// System.out.println(\"safe\");\n// }\n// System.out.println(s);\n// if(s.contains(\"RRR\")){\n// System.out.println(3);\n// }else if(s.contains(\"RR\")){\n// System.out.println(2); \n// }else if(s.contains(\"R\")){\n// System.out.println(1);\n// }else{\n// System.out.println(0);\n// }\n// String s = sc.nextLine();\n// String t = sc.next();\n// String[] arr = s.split(\" \");\n// sc.close();\n// System.out.println(\"input: \"+ s);\n// System.out.println(\"k:\" + k);\n// System.out.println(\"a:\" + a);\n// System.out.println(\"b:\" + b);\n// String ans = \"NG\";\n// for(int x = a; x<=b; x++){\n// if(x%k == 0){\n// ans = \"OK\";\n// }\n// }\n// System.out.println(ans);\n// \\\n// System.out.println(\"arr[1]:\" + arr[1]);\n//\n// if(s.equals(\"ABC\")){\n// System.out.println(\"ARC\");\n// }else{\n// System.out.println(\"ABC\");\n// }\n// String[] arr1 = s.split(\"\");\n// String[] arr2 = t.split(\"\");\n//// List<String> list1 = Arrays.asList(s.split(\"\"));\n// List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n//// List<String> list2 = Arrays.asList(t.split(\"\"));\n// List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n//// int num = Integer.parseInt(arr[arr.length - 1]);\n// list2.remove(arr2.length - 1);\n//// System.out.println(list1);\n//// System.out.println(list2);\n// if(list1.toString().contentEquals(list2.toString())){\n// System.out.println(\"Yes\");\n// }else{\n// System.out.println(\"No\");\n// }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n// String s = sc.nextLine();\n// int k = sc.nextInt();\n// int a = sc.nextInt();\n// int b = sc.nextInt(); \n// int r = sc.nextInt();\n String n = sc.nextLine();\n sc.close();\n if(n.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// System.out.println(n);\n// if(s <= w){\n// System.out.println(Math.PI);\n// }else{\n// System.out.println(\"safe\");\n// }\n// System.out.println(s);\n// if(s.contains(\"RRR\")){\n// System.out.println(3);\n// }else if(s.contains(\"RR\")){\n// System.out.println(2); \n// }else if(s.contains(\"R\")){\n// System.out.println(1);\n// }else{\n// System.out.println(0);\n// }\n// String s = sc.nextLine();\n// String t = sc.next();\n// String[] arr = s.split(\" \");\n// sc.close();\n// System.out.println(\"input: \"+ s);\n// System.out.println(\"k:\" + k);\n// System.out.println(\"a:\" + a);\n// System.out.println(\"b:\" + b);\n// String ans = \"NG\";\n// for(int x = a; x<=b; x++){\n// if(x%k == 0){\n// ans = \"OK\";\n// }\n// }\n// System.out.println(ans);\n// \\\n// System.out.println(\"arr[1]:\" + arr[1]);\n//\n// if(s.equals(\"ABC\")){\n// System.out.println(\"ARC\");\n// }else{\n// System.out.println(\"ABC\");\n// }\n// String[] arr1 = s.split(\"\");\n// String[] arr2 = t.split(\"\");\n//// List<String> list1 = Arrays.asList(s.split(\"\"));\n// List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n//// List<String> list2 = Arrays.asList(t.split(\"\"));\n// List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n//// int num = Integer.parseInt(arr[arr.length - 1]);\n// list2.remove(arr2.length - 1);\n//// System.out.println(list1);\n//// System.out.println(list2);\n// if(list1.toString().contentEquals(list2.toString())){\n// System.out.println(\"Yes\");\n// }else{\n// System.out.println(\"No\");\n// }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String n = sc.nextLine();",
"n",
"sc.nextLine()",
"sc.nextLine",
"sc",
"sc.close()",
"sc.close",
"sc",
"if(n.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"n.contains(\"7\")",
"n.contains",
"n",
"\"7\"",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"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();\n// int k = sc.nextInt();\n// int a = sc.nextInt();\n// int b = sc.nextInt(); \n// int r = sc.nextInt();\n String n = sc.nextLine();\n sc.close();\n if(n.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// System.out.println(n);\n// if(s <= w){\n// System.out.println(Math.PI);\n// }else{\n// System.out.println(\"safe\");\n// }\n// System.out.println(s);\n// if(s.contains(\"RRR\")){\n// System.out.println(3);\n// }else if(s.contains(\"RR\")){\n// System.out.println(2); \n// }else if(s.contains(\"R\")){\n// System.out.println(1);\n// }else{\n// System.out.println(0);\n// }\n// String s = sc.nextLine();\n// String t = sc.next();\n// String[] arr = s.split(\" \");\n// sc.close();\n// System.out.println(\"input: \"+ s);\n// System.out.println(\"k:\" + k);\n// System.out.println(\"a:\" + a);\n// System.out.println(\"b:\" + b);\n// String ans = \"NG\";\n// for(int x = a; x<=b; x++){\n// if(x%k == 0){\n// ans = \"OK\";\n// }\n// }\n// System.out.println(ans);\n// \\\n// System.out.println(\"arr[1]:\" + arr[1]);\n//\n// if(s.equals(\"ABC\")){\n// System.out.println(\"ARC\");\n// }else{\n// System.out.println(\"ABC\");\n// }\n// String[] arr1 = s.split(\"\");\n// String[] arr2 = t.split(\"\");\n//// List<String> list1 = Arrays.asList(s.split(\"\"));\n// List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n//// List<String> list2 = Arrays.asList(t.split(\"\"));\n// List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n//// int num = Integer.parseInt(arr[arr.length - 1]);\n// list2.remove(arr2.length - 1);\n//// System.out.println(list1);\n//// System.out.println(list2);\n// if(list1.toString().contentEquals(list2.toString())){\n// System.out.println(\"Yes\");\n// }else{\n// System.out.println(\"No\");\n// }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n// String s = sc.nextLine();\n// int k = sc.nextInt();\n// int a = sc.nextInt();\n// int b = sc.nextInt(); \n// int r = sc.nextInt();\n String n = sc.nextLine();\n sc.close();\n if(n.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// System.out.println(n);\n// if(s <= w){\n// System.out.println(Math.PI);\n// }else{\n// System.out.println(\"safe\");\n// }\n// System.out.println(s);\n// if(s.contains(\"RRR\")){\n// System.out.println(3);\n// }else if(s.contains(\"RR\")){\n// System.out.println(2); \n// }else if(s.contains(\"R\")){\n// System.out.println(1);\n// }else{\n// System.out.println(0);\n// }\n// String s = sc.nextLine();\n// String t = sc.next();\n// String[] arr = s.split(\" \");\n// sc.close();\n// System.out.println(\"input: \"+ s);\n// System.out.println(\"k:\" + k);\n// System.out.println(\"a:\" + a);\n// System.out.println(\"b:\" + b);\n// String ans = \"NG\";\n// for(int x = a; x<=b; x++){\n// if(x%k == 0){\n// ans = \"OK\";\n// }\n// }\n// System.out.println(ans);\n// \\\n// System.out.println(\"arr[1]:\" + arr[1]);\n//\n// if(s.equals(\"ABC\")){\n// System.out.println(\"ARC\");\n// }else{\n// System.out.println(\"ABC\");\n// }\n// String[] arr1 = s.split(\"\");\n// String[] arr2 = t.split(\"\");\n//// List<String> list1 = Arrays.asList(s.split(\"\"));\n// List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n//// List<String> list2 = Arrays.asList(t.split(\"\"));\n// List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n//// int num = Integer.parseInt(arr[arr.length - 1]);\n// list2.remove(arr2.length - 1);\n//// System.out.println(list1);\n//// System.out.println(list2);\n// if(list1.toString().contentEquals(list2.toString())){\n// System.out.println(\"Yes\");\n// }else{\n// System.out.println(\"No\");\n// }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\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();
// int k = sc.nextInt();
// int a = sc.nextInt();
// int b = sc.nextInt();
// int r = sc.nextInt();
String n = sc.nextLine();
sc.close();
if(n.contains("7")){
System.out.println("Yes");
}else{
System.out.println("No");
}
// System.out.println(n);
// if(s <= w){
// System.out.println(Math.PI);
// }else{
// System.out.println("safe");
// }
// System.out.println(s);
// if(s.contains("RRR")){
// System.out.println(3);
// }else if(s.contains("RR")){
// System.out.println(2);
// }else if(s.contains("R")){
// System.out.println(1);
// }else{
// System.out.println(0);
// }
// String s = sc.nextLine();
// String t = sc.next();
// String[] arr = s.split(" ");
// sc.close();
// System.out.println("input: "+ s);
// System.out.println("k:" + k);
// System.out.println("a:" + a);
// System.out.println("b:" + b);
// String ans = "NG";
// for(int x = a; x<=b; x++){
// if(x%k == 0){
// ans = "OK";
// }
// }
// System.out.println(ans);
// \
// System.out.println("arr[1]:" + arr[1]);
//
// if(s.equals("ABC")){
// System.out.println("ARC");
// }else{
// System.out.println("ABC");
// }
// String[] arr1 = s.split("");
// String[] arr2 = t.split("");
//// List<String> list1 = Arrays.asList(s.split(""));
// List list1 = new LinkedList(Arrays.asList(s.split("")));
//// List<String> list2 = Arrays.asList(t.split(""));
// List list2 = new LinkedList(Arrays.asList(t.split("")));
//// int num = Integer.parseInt(arr[arr.length - 1]);
// list2.remove(arr2.length - 1);
//// System.out.println(list1);
//// System.out.println(list2);
// if(list1.toString().contentEquals(list2.toString())){
// System.out.println("Yes");
// }else{
// System.out.println("No");
// }
// switch(num){
// case 3:
// System.out.println("bon");
// break;
// case 0:
// case 1:
// case 6:
// case 8:
// System.out.println("pon");
// break;
// default:
// System.out.println("hon");
// break;
// }
// String[] array = str.split(" ");
// int sum = 0;
// for(int i=0; i<array.length; i++) {
// int num = Integer.parseInt(array[i]);
// sum += num;
// }
// System.out.println(15-sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
14,
2,
2,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
64,
5
],
[
64,
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
],
[
8,
28
],
[
28,
29
],
[
30,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
30,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
30,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
28,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
28,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
8,
60
],
[
6,
61
],
[
61,
62
],
[
0,
63
],
[
63,
64
],
[
63,
65
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tString B = String.valueOf(A);\n\n\t\tchar[] C = B.toCharArray();\n\n\t\tif (C[0] == '7' || C[1] == '7' || C[2] == '7') {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\treturn;\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tString B = String.valueOf(A);\n\n\t\tchar[] C = B.toCharArray();\n\n\t\tif (C[0] == '7' || C[1] == '7' || C[2] == '7') {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\treturn;\n\n\t}\n}",
"Main",
"public static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tString B = String.valueOf(A);\n\n\t\tchar[] C = B.toCharArray();\n\n\t\tif (C[0] == '7' || C[1] == '7' || C[2] == '7') {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\treturn;\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tString B = String.valueOf(A);\n\n\t\tchar[] C = B.toCharArray();\n\n\t\tif (C[0] == '7' || C[1] == '7' || C[2] == '7') {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\treturn;\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String B = String.valueOf(A);",
"B",
"String.valueOf(A)",
"String.valueOf",
"String",
"A",
"char[] C = B.toCharArray();",
"C",
"B.toCharArray()",
"B.toCharArray",
"B",
"if (C[0] == '7' || C[1] == '7' || C[2] == '7') {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.print(\"No\");\n\t\t}",
"C[0] == '7' || C[1] == '7' || C[2] == '7'",
"C[0] == '7' || C[1] == '7' || C[2] == '7'",
"C[0] == '7'",
"C[0]",
"C",
"0",
"'7'",
"C[1] == '7'",
"C[1]",
"C",
"1",
"'7'",
"C[2] == '7'",
"C[2]",
"C",
"2",
"'7'",
"{\n\t\t\tSystem.out.print(\"Yes\");\n\t\t}",
"System.out.print(\"Yes\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.print(\"No\");\n\t\t}",
"System.out.print(\"No\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"No\"",
"return;",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tString B = String.valueOf(A);\n\n\t\tchar[] C = B.toCharArray();\n\n\t\tif (C[0] == '7' || C[1] == '7' || C[2] == '7') {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\treturn;\n\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tString B = String.valueOf(A);\n\n\t\tchar[] C = B.toCharArray();\n\n\t\tif (C[0] == '7' || C[1] == '7' || C[2] == '7') {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\treturn;\n\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
String B = String.valueOf(A);
char[] C = B.toCharArray();
if (C[0] == '7' || C[1] == '7' || C[2] == '7') {
System.out.print("Yes");
} else {
System.out.print("No");
}
return;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
13,
0,
13,
2,
13,
17,
0,
13,
2,
2,
13,
2,
13,
17,
17,
0,
13,
2,
2,
13,
2,
13,
17,
2,
13,
17,
14,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
77,
5
],
[
77,
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
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
30,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
39,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
54,
56
],
[
50,
57
],
[
57,
58
],
[
57,
59
],
[
48,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
48,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
6,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
] |
[
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n int H, J, I;\n int n = scan.nextInt();\n \n H = n/100;\n J = (n - (H*100))/10;\n I = (n - (H*100) - (J*10));\n \n if(H == 7||J == 7||I == 7){\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\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 int H, J, I;\n int n = scan.nextInt();\n \n H = n/100;\n J = (n - (H*100))/10;\n I = (n - (H*100) - (J*10));\n \n if(H == 7||J == 7||I == 7){\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }\n}",
"Main",
"public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n int H, J, I;\n int n = scan.nextInt();\n \n H = n/100;\n J = (n - (H*100))/10;\n I = (n - (H*100) - (J*10));\n \n if(H == 7||J == 7||I == 7){\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int H, J, I;\n int n = scan.nextInt();\n \n H = n/100;\n J = (n - (H*100))/10;\n I = (n - (H*100) - (J*10));\n \n if(H == 7||J == 7||I == 7){\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int H",
"H",
"J",
"J",
"I;",
"I",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"H = n/100",
"H",
"n/100",
"n",
"100",
"J = (n - (H*100))/10",
"J",
"(n - (H*100))/10",
"(n - (H*100))",
"n",
"(H*100)",
"H",
"100",
"10",
"I = (n - (H*100) - (J*10))",
"I",
"(n - (H*100) - (J*10))",
"n - (H*100) - (J*10)",
"n",
"(H*100)",
"H",
"100",
"(J*10)",
"J",
"10",
"if(H == 7||J == 7||I == 7){\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }",
"H == 7||J == 7||I == 7",
"H == 7||J == 7||I == 7",
"H == 7",
"H",
"7",
"J == 7",
"J",
"7",
"I == 7",
"I",
"7",
"{\n System.out.print(\"Yes\");\n }",
"System.out.print(\"Yes\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.print(\"No\");\n }",
"System.out.print(\"No\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args",
"public class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n int H, J, I;\n int n = scan.nextInt();\n \n H = n/100;\n J = (n - (H*100))/10;\n I = (n - (H*100) - (J*10));\n \n if(H == 7||J == 7||I == 7){\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }\n}",
"public class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n int H, J, I;\n int n = scan.nextInt();\n \n H = n/100;\n J = (n - (H*100))/10;\n I = (n - (H*100) - (J*10));\n \n if(H == 7||J == 7||I == 7){\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int H, J, I;
int n = scan.nextInt();
H = n/100;
J = (n - (H*100))/10;
I = (n - (H*100) - (J*10));
if(H == 7||J == 7||I == 7){
System.out.print("Yes");
} else {
System.out.print("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
40,
8
],
[
40,
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
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
20,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
9,
37
],
[
37,
38
],
[
0,
39
],
[
39,
40
],
[
39,
41
]
] |
[
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n String str = s.next();\n \t\n \tif (str.contains(\"7\")) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n String str = s.next();\n \t\n \tif (str.contains(\"7\")) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n }\n}",
"Main",
"public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n String str = s.next();\n \t\n \tif (str.contains(\"7\")) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n }",
"main",
"{\n final Scanner s = new Scanner(System.in);\n String str = s.next();\n \t\n \tif (str.contains(\"7\")) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n }",
"final Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"String str = s.next();",
"str",
"s.next()",
"s.next",
"s",
"if (str.contains(\"7\")) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");",
"str.contains(\"7\")",
"str.contains",
"str",
"\"7\"",
"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\"",
"final String[] args",
"args",
"public class Main {\n public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n String str = s.next();\n \t\n \tif (str.contains(\"7\")) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n }\n}",
"public class Main {\n public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n String str = s.next();\n \t\n \tif (str.contains(\"7\")) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n }\n}",
"Main"
] |
import java.util.*;
import java.io.*;
public class Main {
public static void main (final String[] args) {
final Scanner s = new Scanner(System.in);
String str = s.next();
if (str.contains("7")) System.out.println("Yes");
else System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
14,
2,
2,
2,
13,
17,
17,
17,
30,
4,
18,
18,
13,
13,
17,
14,
2,
2,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
68,
5
],
[
68,
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
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
17,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
31,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
30,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
45,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
45,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
6,
65
],
[
65,
66
],
[
0,
67
],
[
67,
68
],
[
67,
69
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int n = sc.nextInt();\n\n if (n % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if ((n / 10) % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if (n / 100 == 07){\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int n = sc.nextInt();\n\n if (n % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if ((n / 10) % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if (n / 100 == 07){\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int n = sc.nextInt();\n\n if (n % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if ((n / 10) % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if (n / 100 == 07){\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n final Scanner sc = new Scanner(System.in);\n\n final int n = sc.nextInt();\n\n if (n % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if ((n / 10) % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if (n / 100 == 07){\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }",
"final Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"final int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (n % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if ((n / 10) % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if (n / 100 == 07){\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }",
"n % 10 == 7",
"n % 10",
"n",
"10",
"7",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"if ((n / 10) % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if (n / 100 == 07){\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }",
"(n / 10) % 10 == 7",
"(n / 10) % 10",
"(n / 10)",
"n",
"10",
"10",
"7",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"if (n / 100 == 07){\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }",
"n / 100 == 07",
"n / 100",
"n",
"100",
"07",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"final String[] args",
"args",
"public class Main {\n public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int n = sc.nextInt();\n\n if (n % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if ((n / 10) % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if (n / 100 == 07){\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int n = sc.nextInt();\n\n if (n % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if ((n / 10) % 10 == 7) {\n System.out.println(\"Yes\");\n }\n else if (n / 100 == 07){\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(final String[] args) {
final Scanner sc = new Scanner(System.in);
final int n = sc.nextInt();
if (n % 10 == 7) {
System.out.println("Yes");
}
else if ((n / 10) % 10 == 7) {
System.out.println("Yes");
}
else if (n / 100 == 07){
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
2,
4,
18,
13,
17,
17,
2,
4,
18,
13,
17,
17,
2,
4,
18,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
55,
5
],
[
55,
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
],
[
19,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
19,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
19,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
17,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
17,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
6,
52
],
[
52,
53
],
[
0,
54
],
[
54,
55
],
[
54,
56
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \tString num = input.nextLine();\n if (num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7') {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \tString num = input.nextLine();\n if (num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7') {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \tString num = input.nextLine();\n if (num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7') {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner input = new Scanner(System.in);\n \tString num = input.nextLine();\n if (num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7') {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"String num = input.nextLine();",
"num",
"input.nextLine()",
"input.nextLine",
"input",
"if (num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7') {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }",
"num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7'",
"num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7'",
"num.charAt(0) == '7'",
"num.charAt(0)",
"num.charAt",
"num",
"0",
"'7'",
"num.charAt(1) == '7'",
"num.charAt(1)",
"num.charAt",
"num",
"1",
"'7'",
"num.charAt(2) == '7'",
"num.charAt(2)",
"num.charAt",
"num",
"2",
"'7'",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \tString num = input.nextLine();\n if (num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7') {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \tString num = input.nextLine();\n if (num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7') {\n System.out.println(\"Yes\");\n }\n else {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String num = input.nextLine();
if (num.charAt(0) == '7' || num.charAt(1) == '7' || num.charAt(2) == '7') {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
4,
18,
13,
13,
17,
0,
13,
17,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
63,
5
],
[
63,
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
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
34,
42
],
[
33,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
6,
60
],
[
60,
61
],
[
0,
62
],
[
62,
63
],
[
62,
64
]
] |
[
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tString N = sc.next();\n\tboolean result = false;\n\tfor(int i=0;i<3;i++){\n\t if(Character.getNumericValue(N.charAt(i)) == 7) result = true;\n\t}\n\tif(result) System.out.print(\"Yes\");\n\telse System.out.print(\"No\");\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tString N = sc.next();\n\tboolean result = false;\n\tfor(int i=0;i<3;i++){\n\t if(Character.getNumericValue(N.charAt(i)) == 7) result = true;\n\t}\n\tif(result) System.out.print(\"Yes\");\n\telse System.out.print(\"No\");\n }\n}",
"Main",
"public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tString N = sc.next();\n\tboolean result = false;\n\tfor(int i=0;i<3;i++){\n\t if(Character.getNumericValue(N.charAt(i)) == 7) result = true;\n\t}\n\tif(result) System.out.print(\"Yes\");\n\telse System.out.print(\"No\");\n }",
"main",
"{\n\tScanner sc = new Scanner(System.in);\n\tString N = sc.next();\n\tboolean result = false;\n\tfor(int i=0;i<3;i++){\n\t if(Character.getNumericValue(N.charAt(i)) == 7) result = true;\n\t}\n\tif(result) System.out.print(\"Yes\");\n\telse System.out.print(\"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String N = sc.next();",
"N",
"sc.next()",
"sc.next",
"sc",
"boolean result = false;",
"result",
"false",
"for(int i=0;i<3;i++){\n\t if(Character.getNumericValue(N.charAt(i)) == 7) result = true;\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<3",
"i",
"3",
"i++",
"i++",
"i",
"{\n\t if(Character.getNumericValue(N.charAt(i)) == 7) result = true;\n\t}",
"{\n\t if(Character.getNumericValue(N.charAt(i)) == 7) result = true;\n\t}",
"if(Character.getNumericValue(N.charAt(i)) == 7) result = true;",
"Character.getNumericValue(N.charAt(i)) == 7",
"Character.getNumericValue(N.charAt(i))",
"Character.getNumericValue",
"Character",
"N.charAt(i)",
"N.charAt",
"N",
"i",
"7",
"result = true",
"result",
"true",
"if(result) System.out.print(\"Yes\");\n\telse System.out.print(\"No\");",
"result",
"System.out.print(\"Yes\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.print(\"No\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tString N = sc.next();\n\tboolean result = false;\n\tfor(int i=0;i<3;i++){\n\t if(Character.getNumericValue(N.charAt(i)) == 7) result = true;\n\t}\n\tif(result) System.out.print(\"Yes\");\n\telse System.out.print(\"No\");\n }\n}",
"public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tString N = sc.next();\n\tboolean result = false;\n\tfor(int i=0;i<3;i++){\n\t if(Character.getNumericValue(N.charAt(i)) == 7) result = true;\n\t}\n\tif(result) System.out.print(\"Yes\");\n\telse System.out.print(\"No\");\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String N = sc.next();
boolean result = false;
for(int i=0;i<3;i++){
if(Character.getNumericValue(N.charAt(i)) == 7) result = true;
}
if(result) System.out.print("Yes");
else System.out.print("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
0,
13,
17,
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
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
32,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
6,
53
],
[
53,
54
]
] |
[
"import java.util.*;\nclass Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n String s = input.next();\n String ans = \"No\";\n for (int i = 0; i < 3; i++){\n char c = s.charAt(i);\n if (c == '7'){\n ans = \"Yes\";\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 input = new Scanner(System.in);\n String s = input.next();\n String ans = \"No\";\n for (int i = 0; i < 3; i++){\n char c = s.charAt(i);\n if (c == '7'){\n ans = \"Yes\";\n }\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n String s = input.next();\n String ans = \"No\";\n for (int i = 0; i < 3; i++){\n char c = s.charAt(i);\n if (c == '7'){\n ans = \"Yes\";\n }\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner input = new Scanner(System.in);\n String s = input.next();\n String ans = \"No\";\n for (int i = 0; i < 3; i++){\n char c = s.charAt(i);\n if (c == '7'){\n ans = \"Yes\";\n }\n }\n System.out.println(ans);\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"String s = input.next();",
"s",
"input.next()",
"input.next",
"input",
"String ans = \"No\";",
"ans",
"\"No\"",
"for (int i = 0; i < 3; i++){\n char c = s.charAt(i);\n if (c == '7'){\n ans = \"Yes\";\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 3",
"i",
"3",
"i++",
"i++",
"i",
"{\n char c = s.charAt(i);\n if (c == '7'){\n ans = \"Yes\";\n }\n }",
"{\n char c = s.charAt(i);\n if (c == '7'){\n ans = \"Yes\";\n }\n }",
"char c = s.charAt(i);",
"c",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"if (c == '7'){\n ans = \"Yes\";\n }",
"c == '7'",
"c",
"'7'",
"{\n ans = \"Yes\";\n }",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"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 input = new Scanner(System.in);
String s = input.next();
String ans = "No";
for (int i = 0; i < 3; i++){
char c = s.charAt(i);
if (c == '7'){
ans = "Yes";
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
17,
13,
14,
2,
4,
18,
13,
17,
40,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
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
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
23,
28
],
[
28,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
22,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
6,
42
],
[
42,
43
]
] |
[
"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 String s = \"\" + N;\n\n if (s.indexOf('7') != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\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 String s = \"\" + N;\n\n if (s.indexOf('7') != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n String s = \"\" + N;\n\n if (s.indexOf('7') != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n String s = \"\" + N;\n\n if (s.indexOf('7') != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String s = \"\" + N;",
"s",
"\"\" + N",
"\"\"",
"N",
"if (s.indexOf('7') != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");",
"s.indexOf('7') != -1",
"s.indexOf('7')",
"s.indexOf",
"s",
"'7'",
"-1",
"1",
"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\"",
"String[] args",
"args"
] |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
String s = "" + N;
if (s.indexOf('7') != -1)
System.out.println("Yes");
else
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
13,
17,
30,
41,
13,
4,
18,
13,
13,
14,
4,
18,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
52,
5
],
[
52,
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
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
22,
24
],
[
17,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
25,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
] |
[
"import java.util.Scanner;\npublic class Main {\n \n public static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\nint N=sc.nextInt();\nif(N>=100&&N<=999){\n String s=String.valueOf(N);\n if(s.contains(\"7\"))\n System.out.println(\" Yes \");\n else\n System.out.println(\" No \"); \n}\n } \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n \n public static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\nint N=sc.nextInt();\nif(N>=100&&N<=999){\n String s=String.valueOf(N);\n if(s.contains(\"7\"))\n System.out.println(\" Yes \");\n else\n System.out.println(\" No \"); \n}\n } \n}",
"Main",
"public static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\nint N=sc.nextInt();\nif(N>=100&&N<=999){\n String s=String.valueOf(N);\n if(s.contains(\"7\"))\n System.out.println(\" Yes \");\n else\n System.out.println(\" No \"); \n}\n }",
"main",
"{ \n\t\tScanner sc = new Scanner(System.in);\nint N=sc.nextInt();\nif(N>=100&&N<=999){\n String s=String.valueOf(N);\n if(s.contains(\"7\"))\n System.out.println(\" Yes \");\n else\n System.out.println(\" No \"); \n}\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N=sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(N>=100&&N<=999){\n String s=String.valueOf(N);\n if(s.contains(\"7\"))\n System.out.println(\" Yes \");\n else\n System.out.println(\" No \"); \n}",
"N>=100&&N<=999",
"N>=100",
"N",
"100",
"N<=999",
"N",
"999",
"{\n String s=String.valueOf(N);\n if(s.contains(\"7\"))\n System.out.println(\" Yes \");\n else\n System.out.println(\" No \"); \n}",
"String s=String.valueOf(N);",
"s",
"String.valueOf(N)",
"String.valueOf",
"String",
"N",
"if(s.contains(\"7\"))\n System.out.println(\" Yes \");\n else\n System.out.println(\" No \");",
"s.contains(\"7\")",
"s.contains",
"s",
"\"7\"",
"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 \"",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\nint N=sc.nextInt();\nif(N>=100&&N<=999){\n String s=String.valueOf(N);\n if(s.contains(\"7\"))\n System.out.println(\" Yes \");\n else\n System.out.println(\" No \"); \n}\n } \n}",
"public class Main {\n \n public static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\nint N=sc.nextInt();\nif(N>=100&&N<=999){\n String s=String.valueOf(N);\n if(s.contains(\"7\"))\n System.out.println(\" Yes \");\n else\n System.out.println(\" No \"); \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();
if(N>=100&&N<=999){
String s=String.valueOf(N);
if(s.contains("7"))
System.out.println(" Yes ");
else
System.out.println(" No ");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
2,
17,
17,
12,
13,
30,
4,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
8,
4,
18,
13,
17,
17,
17,
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,
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,
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,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
200,
11
],
[
200,
12
],
[
12,
13
],
[
12,
14
],
[
200,
15
],
[
15,
16
],
[
15,
17
],
[
200,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
20,
22
],
[
200,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
23,
31
],
[
31,
32
],
[
200,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
44,
49
],
[
44,
50
],
[
200,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
51,
55
],
[
55,
56
],
[
51,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
57,
63
],
[
63,
64
],
[
51,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
68,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
78,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
67,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
51,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
51,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
51,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
118,
119
],
[
51,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
126,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
122,
139
],
[
139,
140
],
[
51,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
148,
153
],
[
153,
154
],
[
153,
155
],
[
148,
156
],
[
156,
157
],
[
157,
158
],
[
148,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
160,
164
],
[
164,
165
],
[
143,
166
],
[
166,
167
],
[
141,
168
],
[
168,
169
],
[
51,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
177,
182
],
[
182,
183
],
[
182,
184
],
[
177,
185
],
[
185,
186
],
[
186,
187
],
[
177,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
189,
193
],
[
193,
194
],
[
172,
195
],
[
195,
196
],
[
170,
197
],
[
197,
198
],
[
0,
199
],
[
199,
200
],
[
199,
201
]
] |
[
"import java.awt.*;\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n private static FastReader in = new FastReader(System.in);\n private static PrintWriter out = new PrintWriter(System.out);\n\n private static final long MOD = (long) 1e9 + 7;\n\n public static void main(String[] args) {\n solve();\n out.flush();\n }\n\n private static void solve() {\n String s = in.next();\n out.println(s.contains(\"7\") ? \"Yes\" : \"No\");\n }\n\n // https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\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 // https://qiita.com/masakinpo/items/5f77f2a879578a85a0bb\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 return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }\n}",
"import java.awt.*;",
"awt.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n private static FastReader in = new FastReader(System.in);\n private static PrintWriter out = new PrintWriter(System.out);\n\n private static final long MOD = (long) 1e9 + 7;\n\n public static void main(String[] args) {\n solve();\n out.flush();\n }\n\n private static void solve() {\n String s = in.next();\n out.println(s.contains(\"7\") ? \"Yes\" : \"No\");\n }\n\n // https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\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 // https://qiita.com/masakinpo/items/5f77f2a879578a85a0bb\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 return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }\n}",
"Main",
"private static FastReader in = new FastReader(System.in);",
"in",
"new FastReader(System.in)",
"private static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"private static final long MOD = (long) 1e9 + 7;",
"MOD",
"(long) 1e9 + 7",
"(long) 1e9",
"7",
"public static void main(String[] args) {\n solve();\n out.flush();\n }",
"main",
"{\n solve();\n out.flush();\n }",
"solve()",
"solve",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"private static void solve() {\n String s = in.next();\n out.println(s.contains(\"7\") ? \"Yes\" : \"No\");\n }",
"solve",
"{\n String s = in.next();\n out.println(s.contains(\"7\") ? \"Yes\" : \"No\");\n }",
"String s = in.next();",
"s",
"in.next()",
"in.next",
"in",
"out.println(s.contains(\"7\") ? \"Yes\" : \"No\")",
"out.println",
"out",
"s.contains(\"7\") ? \"Yes\" : \"No\"",
"s.contains(\"7\")",
"s.contains",
"s",
"\"7\"",
"\"Yes\"",
"\"No\"",
"static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\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 // https://qiita.com/masakinpo/items/5f77f2a879578a85a0bb\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 return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\n }",
"FastReader",
"{\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",
"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",
"// https://qiita.com/masakinpo/items/5f77f2a879578a85a0bb\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 return a;\n }",
"nextIntArray",
"{\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\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();",
"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 long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }",
"nextLongArray",
"{\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n 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",
"public class Main {\n\n private static FastReader in = new FastReader(System.in);\n private static PrintWriter out = new PrintWriter(System.out);\n\n private static final long MOD = (long) 1e9 + 7;\n\n public static void main(String[] args) {\n solve();\n out.flush();\n }\n\n private static void solve() {\n String s = in.next();\n out.println(s.contains(\"7\") ? \"Yes\" : \"No\");\n }\n\n // https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\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 // https://qiita.com/masakinpo/items/5f77f2a879578a85a0bb\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 return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }\n}",
"public class Main {\n\n private static FastReader in = new FastReader(System.in);\n private static PrintWriter out = new PrintWriter(System.out);\n\n private static final long MOD = (long) 1e9 + 7;\n\n public static void main(String[] args) {\n solve();\n out.flush();\n }\n\n private static void solve() {\n String s = in.next();\n out.println(s.contains(\"7\") ? \"Yes\" : \"No\");\n }\n\n // https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader(InputStream inputStream) {\n br = new BufferedReader(new\n InputStreamReader(inputStream));\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 // https://qiita.com/masakinpo/items/5f77f2a879578a85a0bb\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 return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }\n}",
"Main"
] |
import java.awt.*;
import java.io.*;
import java.util.*;
public class Main {
private static FastReader in = new FastReader(System.in);
private static PrintWriter out = new PrintWriter(System.out);
private static final long MOD = (long) 1e9 + 7;
public static void main(String[] args) {
solve();
out.flush();
}
private static void solve() {
String s = in.next();
out.println(s.contains("7") ? "Yes" : "No");
}
// https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/
static class FastReader {
BufferedReader br;
StringTokenizer st;
FastReader(InputStream inputStream) {
br = new BufferedReader(new
InputStreamReader(inputStream));
}
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;
}
// https://qiita.com/masakinpo/items/5f77f2a879578a85a0bb
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;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
2,
4,
18,
13,
17,
40,
17,
17,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
35,
5
],
[
35,
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
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
23,
28
],
[
28,
29
],
[
22,
30
],
[
22,
31
],
[
6,
32
],
[
32,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
]
] |
[
"import java.io.*;\n\npublic class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String line = reader.readLine();\n System.out.println (line.indexOf (\"7\") == -1 ? \"No\" : \"Yes\");\n }\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String line = reader.readLine();\n System.out.println (line.indexOf (\"7\") == -1 ? \"No\" : \"Yes\");\n }\n}",
"Main",
"public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String line = reader.readLine();\n System.out.println (line.indexOf (\"7\") == -1 ? \"No\" : \"Yes\");\n }",
"main",
"{\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String line = reader.readLine();\n System.out.println (line.indexOf (\"7\") == -1 ? \"No\" : \"Yes\");\n }",
"BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));",
"reader",
"new BufferedReader (new InputStreamReader (System.in))",
"String line = reader.readLine();",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"System.out.println (line.indexOf (\"7\") == -1 ? \"No\" : \"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"line.indexOf (\"7\") == -1 ? \"No\" : \"Yes\"",
"line.indexOf (\"7\") == -1",
"line.indexOf (\"7\")",
"line.indexOf",
"line",
"\"7\"",
"-1",
"1",
"\"No\"",
"\"Yes\"",
"String[] args",
"args",
"public class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String line = reader.readLine();\n System.out.println (line.indexOf (\"7\") == -1 ? \"No\" : \"Yes\");\n }\n}",
"public class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String line = reader.readLine();\n System.out.println (line.indexOf (\"7\") == -1 ? \"No\" : \"Yes\");\n }\n}",
"Main"
] |
import java.io.*;
public class Main {
public static void main (String[] args) throws Exception {
BufferedReader reader =
new BufferedReader (new InputStreamReader (System.in));
String line = reader.readLine();
System.out.println (line.indexOf ("7") == -1 ? "No" : "Yes");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
39,
5
],
[
39,
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
],
[
18,
19
],
[
19,
20
],
[
18,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
17,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
6,
36
],
[
36,
37
],
[
0,
38
],
[
38,
39
],
[
38,
40
]
] |
[
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n String N = sc.next();\n if(N.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\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 String N = sc.next();\n if(N.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n String N = sc.next();\n if(N.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n String N = sc.next();\n if(N.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String N = sc.next();",
"N",
"sc.next()",
"sc.next",
"sc",
"if(N.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"N.contains(\"7\")",
"N.contains",
"N",
"\"7\"",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n String N = sc.next();\n if(N.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n String N = sc.next();\n if(N.contains(\"7\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String N = sc.next();
if(N.contains("7")){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
41,
13,
2,
13,
17,
41,
13,
2,
2,
13,
2,
2,
13,
17,
13,
17,
4,
18,
18,
13,
13,
8,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
17,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
60,
5
],
[
60,
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
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
29,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
45,
52
],
[
52,
53
],
[
52,
54
],
[
43,
55
],
[
43,
56
],
[
6,
57
],
[
57,
58
],
[
0,
59
],
[
59,
60
],
[
59,
61
]
] |
[
"import java.util.*;\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 N100 = N / 100;\n\t\tint N1 = N % 10;\n\t\tint N10 =( N - (N100 * 100 + N1) )/ 10;\n\t\tSystem.out.println(N100 == 7 || N10 == 7 || N1 == 7 ? \"Yes\" : \"No\");\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"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 N100 = N / 100;\n\t\tint N1 = N % 10;\n\t\tint N10 =( N - (N100 * 100 + N1) )/ 10;\n\t\tSystem.out.println(N100 == 7 || N10 == 7 || N1 == 7 ? \"Yes\" : \"No\");\n\t}\n\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 N100 = N / 100;\n\t\tint N1 = N % 10;\n\t\tint N10 =( N - (N100 * 100 + N1) )/ 10;\n\t\tSystem.out.println(N100 == 7 || N10 == 7 || N1 == 7 ? \"Yes\" : \"No\");\n\t}",
"main",
"{\n\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint N100 = N / 100;\n\t\tint N1 = N % 10;\n\t\tint N10 =( N - (N100 * 100 + N1) )/ 10;\n\t\tSystem.out.println(N100 == 7 || N10 == 7 || N1 == 7 ? \"Yes\" : \"No\");\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int N100 = N / 100;",
"N100",
"N / 100",
"N",
"100",
"int N1 = N % 10;",
"N1",
"N % 10",
"N",
"10",
"int N10 =( N - (N100 * 100 + N1) )/ 10;",
"N10",
"( N - (N100 * 100 + N1) )/ 10",
"( N - (N100 * 100 + N1) )",
"N",
"(N100 * 100 + N1)",
"N100 * 100",
"N100",
"100",
"N1",
"10",
"System.out.println(N100 == 7 || N10 == 7 || N1 == 7 ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"N100 == 7 || N10 == 7 || N1 == 7 ? \"Yes\" : \"No\"",
"N100 == 7 || N10 == 7 || N1 == 7",
"N100 == 7 || N10 == 7 || N1 == 7",
"N100 == 7",
"N100",
"7",
"N10 == 7",
"N10",
"7",
"N1 == 7",
"N1",
"7",
"\"Yes\"",
"\"No\"",
"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 N100 = N / 100;\n\t\tint N1 = N % 10;\n\t\tint N10 =( N - (N100 * 100 + N1) )/ 10;\n\t\tSystem.out.println(N100 == 7 || N10 == 7 || N1 == 7 ? \"Yes\" : \"No\");\n\t}\n\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 N100 = N / 100;\n\t\tint N1 = N % 10;\n\t\tint N10 =( N - (N100 * 100 + N1) )/ 10;\n\t\tSystem.out.println(N100 == 7 || N10 == 7 || N1 == 7 ? \"Yes\" : \"No\");\n\t}\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 N100 = N / 100;
int N1 = N % 10;
int N10 =( N - (N100 * 100 + N1) )/ 10;
System.out.println(N100 == 7 || N10 == 7 || N1 == 7 ? "Yes" : "No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
4,
18,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
41,
5
],
[
41,
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
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
18,
23
],
[
17,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
17,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
6,
38
],
[
38,
39
],
[
0,
40
],
[
40,
41
],
[
40,
42
]
] |
[
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n String n = scan.next();\n if (n.contains(\"7\") == true){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\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 String n = scan.next();\n if (n.contains(\"7\") == true){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n String n = scan.next();\n if (n.contains(\"7\") == true){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n String n = scan.next();\n if (n.contains(\"7\") == true){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String n = scan.next();",
"n",
"scan.next()",
"scan.next",
"scan",
"if (n.contains(\"7\") == true){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"n.contains(\"7\") == true",
"n.contains(\"7\")",
"n.contains",
"n",
"\"7\"",
"true",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n String n = scan.next();\n if (n.contains(\"7\") == true){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n String n = scan.next();\n if (n.contains(\"7\") == true){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String n = scan.next();
if (n.contains("7") == true){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
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,
18,
13,
13,
8,
4,
18,
13,
17,
17,
17,
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
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
28,
33
],
[
28,
34
],
[
14,
35
],
[
35,
36
],
[
36,
37
],
[
12,
38
],
[
38,
39
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\nclass Main{\n public static void main(String[] arigs) throws IOException{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String N = reader.readLine();\n System.out.println(N.contains(\"7\")?\"Yes\":\"No\");\n reader.close();\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"class Main{\n public static void main(String[] arigs) throws IOException{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String N = reader.readLine();\n System.out.println(N.contains(\"7\")?\"Yes\":\"No\");\n reader.close();\n }\n}",
"Main",
"public static void main(String[] arigs) throws IOException{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String N = reader.readLine();\n System.out.println(N.contains(\"7\")?\"Yes\":\"No\");\n reader.close();\n }",
"main",
"{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String N = reader.readLine();\n System.out.println(N.contains(\"7\")?\"Yes\":\"No\");\n reader.close();\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String N = reader.readLine();",
"N",
"reader.readLine()",
"reader.readLine",
"reader",
"System.out.println(N.contains(\"7\")?\"Yes\":\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"N.contains(\"7\")?\"Yes\":\"No\"",
"N.contains(\"7\")",
"N.contains",
"N",
"\"7\"",
"\"Yes\"",
"\"No\"",
"reader.close()",
"reader.close",
"reader",
"String[] arigs",
"arigs"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
class Main{
public static void main(String[] arigs) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String N = reader.readLine();
System.out.println(N.contains("7")?"Yes":"No");
reader.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
17,
30,
41,
13,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
17,
3,
0,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
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
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
24,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
34,
44
],
[
30,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
6,
58
],
[
58,
59
]
] |
[
"import java.util.*;\nclass Main\n{\n public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int k=0;\n while(n>0)\n {\n int d=n%10;\n if(d==7){\n k=1;\n System.out.println(\"Yes\");\n break;\n }\n else\n n/=10;\n }\n if(k==0)\n System.out.println(\"No\");\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 int n=sc.nextInt();\n int k=0;\n while(n>0)\n {\n int d=n%10;\n if(d==7){\n k=1;\n System.out.println(\"Yes\");\n break;\n }\n else\n n/=10;\n }\n if(k==0)\n System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int k=0;\n while(n>0)\n {\n int d=n%10;\n if(d==7){\n k=1;\n System.out.println(\"Yes\");\n break;\n }\n else\n n/=10;\n }\n if(k==0)\n System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int k=0;\n while(n>0)\n {\n int d=n%10;\n if(d==7){\n k=1;\n System.out.println(\"Yes\");\n break;\n }\n else\n n/=10;\n }\n if(k==0)\n System.out.println(\"No\");\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k=0;",
"k",
"0",
"while(n>0)\n {\n int d=n%10;\n if(d==7){\n k=1;\n System.out.println(\"Yes\");\n break;\n }\n else\n n/=10;\n }",
"n>0",
"n",
"0",
"{\n int d=n%10;\n if(d==7){\n k=1;\n System.out.println(\"Yes\");\n break;\n }\n else\n n/=10;\n }",
"int d=n%10;",
"d",
"n%10",
"n",
"10",
"if(d==7){\n k=1;\n System.out.println(\"Yes\");\n break;\n }\n else\n n/=10;",
"d==7",
"d",
"7",
"{\n k=1;\n System.out.println(\"Yes\");\n break;\n }",
"k=1",
"k",
"1",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"break;",
"n/=10",
"n",
"10",
"if(k==0)\n System.out.println(\"No\");",
"k==0",
"k",
"0",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"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=0;
while(n>0)
{
int d=n%10;
if(d==7){
k=1;
System.out.println("Yes");
break;
}
else
n/=10;
}
if(k==0)
System.out.println("No");
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.