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, 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, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 61, 5 ], [ 61, 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 ], [ 47, 49 ], [ 47, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 6, 58 ], [ 58, 59 ], [ 0, 60 ], [ 60, 61 ], [ 60, 62 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int[] ls = new int[N];\n for (int i = 0; i < N-1; i++) {\n int boss = scan.nextInt();\n ls[boss-1] ++;\n }\n for (int i:ls) {\n System.out.println(i);\n }\n }\n}\n", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int[] ls = new int[N];\n for (int i = 0; i < N-1; i++) {\n int boss = scan.nextInt();\n ls[boss-1] ++;\n }\n for (int i:ls) {\n System.out.println(i);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int[] ls = new int[N];\n for (int i = 0; i < N-1; i++) {\n int boss = scan.nextInt();\n ls[boss-1] ++;\n }\n for (int i:ls) {\n System.out.println(i);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int[] ls = new int[N];\n for (int i = 0; i < N-1; i++) {\n int boss = scan.nextInt();\n ls[boss-1] ++;\n }\n for (int i:ls) {\n System.out.println(i);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int[] ls = new int[N];", "ls", "new int[N]", "N", "for (int i = 0; i < N-1; i++) {\n int boss = scan.nextInt();\n ls[boss-1] ++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n int boss = scan.nextInt();\n ls[boss-1] ++;\n }", "{\n int boss = scan.nextInt();\n ls[boss-1] ++;\n }", "int boss = scan.nextInt();", "boss", "scan.nextInt()", "scan.nextInt", "scan", "ls[boss-1] ++", "ls[boss-1]", "ls", "boss-1", "boss", "1", "for (int i:ls) {\n System.out.println(i);\n }", "int i", "ls", "{\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 public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int[] ls = new int[N];\n for (int i = 0; i < N-1; i++) {\n int boss = scan.nextInt();\n ls[boss-1] ++;\n }\n for (int i:ls) {\n System.out.println(i);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n int[] ls = new int[N];\n for (int i = 0; i < N-1; i++) {\n int boss = scan.nextInt();\n ls[boss-1] ++;\n }\n for (int i:ls) {\n System.out.println(i);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int[] ls = new int[N]; for (int i = 0; i < N-1; i++) { int boss = scan.nextInt(); ls[boss-1] ++; } for (int i:ls) { System.out.println(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, 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, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 17, 28, 13, 13, 30, 30, 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 ], [ 98, 5 ], [ 98, 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 ], [ 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 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 48, 49 ], [ 49, 50 ], [ 8, 51 ], [ 51, 52 ], [ 51, 53 ], [ 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 ], [ 69, 71 ], [ 68, 72 ], [ 8, 73 ], [ 73, 74 ], [ 73, 75 ], [ 73, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 81, 83 ], [ 8, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 6, 95 ], [ 95, 96 ], [ 0, 97 ], [ 97, 98 ], [ 97, 99 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n int[] a = new int[n-1];\n for (int i = 0; i < n-1; i++) {\n a[i] = Integer.parseInt(scanner.next());\n }\n int[] count = new int[n];\n for (int i = 0; i < n; i++) {\n count[i] = 0;\n }\n for (int ai: a) {\n count[ai-1] ++;\n }\n for (int ci: count) {\n System.out.println(ci);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n int[] a = new int[n-1];\n for (int i = 0; i < n-1; i++) {\n a[i] = Integer.parseInt(scanner.next());\n }\n int[] count = new int[n];\n for (int i = 0; i < n; i++) {\n count[i] = 0;\n }\n for (int ai: a) {\n count[ai-1] ++;\n }\n for (int ci: count) {\n System.out.println(ci);\n }\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n int[] a = new int[n-1];\n for (int i = 0; i < n-1; i++) {\n a[i] = Integer.parseInt(scanner.next());\n }\n int[] count = new int[n];\n for (int i = 0; i < n; i++) {\n count[i] = 0;\n }\n for (int ai: a) {\n count[ai-1] ++;\n }\n for (int ci: count) {\n System.out.println(ci);\n }\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n int[] a = new int[n-1];\n for (int i = 0; i < n-1; i++) {\n a[i] = Integer.parseInt(scanner.next());\n }\n int[] count = new int[n];\n for (int i = 0; i < n; i++) {\n count[i] = 0;\n }\n for (int ai: a) {\n count[ai-1] ++;\n }\n for (int ci: count) {\n System.out.println(ci);\n }\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int n = Integer.parseInt(scanner.next());", "n", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "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[i] = Integer.parseInt(scanner.next());\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n a[i] = Integer.parseInt(scanner.next());\n }", "{\n a[i] = Integer.parseInt(scanner.next());\n }", "a[i] = Integer.parseInt(scanner.next())", "a[i]", "a", "i", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "int[] count = new int[n];", "count", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n count[i] = 0;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n count[i] = 0;\n }", "{\n count[i] = 0;\n }", "count[i] = 0", "count[i]", "count", "i", "0", "for (int ai: a) {\n count[ai-1] ++;\n }", "int ai", "a", "{\n count[ai-1] ++;\n }", "{\n count[ai-1] ++;\n }", "count[ai-1] ++", "count[ai-1]", "count", "ai-1", "ai", "1", "for (int ci: count) {\n System.out.println(ci);\n }", "int ci", "count", "{\n System.out.println(ci);\n }", "{\n System.out.println(ci);\n }", "System.out.println(ci)", "System.out.println", "System.out", "System", "System.out", "ci", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n int[] a = new int[n-1];\n for (int i = 0; i < n-1; i++) {\n a[i] = Integer.parseInt(scanner.next());\n }\n int[] count = new int[n];\n for (int i = 0; i < n; i++) {\n count[i] = 0;\n }\n for (int ai: a) {\n count[ai-1] ++;\n }\n for (int ci: count) {\n System.out.println(ci);\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = Integer.parseInt(scanner.next());\n int[] a = new int[n-1];\n for (int i = 0; i < n-1; i++) {\n a[i] = Integer.parseInt(scanner.next());\n }\n int[] count = new int[n];\n for (int i = 0; i < n; i++) {\n count[i] = 0;\n }\n for (int ai: a) {\n count[ai-1] ++;\n }\n for (int ci: count) {\n System.out.println(ci);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.next()); int[] a = new int[n-1]; for (int i = 0; i < n-1; i++) { a[i] = Integer.parseInt(scanner.next()); } int[] count = new int[n]; for (int i = 0; i < n; i++) { count[i] = 0; } for (int ai: a) { count[ai-1] ++; } for (int ci: count) { System.out.println(ci); } } }
[ 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, 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 ], [ 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 ], [ 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 ], [ 36, 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.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] list = new int[n];\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist[scan.nextInt() - 1] += 1;\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list[i]);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] list = new int[n];\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist[scan.nextInt() - 1] += 1;\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list[i]);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] list = new int[n];\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist[scan.nextInt() - 1] += 1;\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] list = new int[n];\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist[scan.nextInt() - 1] += 1;\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list[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[] list = new int[n];", "list", "new int[n]", "n", "for(int i =0;i < n - 1;i++) {\n\t\t\tlist[scan.nextInt() - 1] += 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\tlist[scan.nextInt() - 1] += 1;\n\t\t}", "{\n\t\t\tlist[scan.nextInt() - 1] += 1;\n\t\t}", "list[scan.nextInt() - 1] += 1", "list[scan.nextInt() - 1]", "list", "scan.nextInt() - 1", "scan.nextInt()", "scan.nextInt", "scan", "1", "1", "for(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list[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(list[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(list[i]);\n\t\t}", "System.out.println(list[i])", "System.out.println", "System.out", "System", "System.out", "list[i]", "list", "i", "String[] rags", "rags", "public class Main {\n\tpublic static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] list = new int[n];\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist[scan.nextInt() - 1] += 1;\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list[i]);\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint[] list = new int[n];\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist[scan.nextInt() - 1] += 1;\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] rags) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] list = new int[n]; for(int i =0;i < n - 1;i++) { list[scan.nextInt() - 1] += 1; } for(int i = 0;i < n;i++) { System.out.println(list[i]); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 67, 5 ], [ 67, 6 ], [ 6, 7 ], [ 6, 8 ], [ 67, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 9, 15 ], [ 15, 16 ], [ 67, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 19, 25 ], [ 25, 26 ], [ 25, 27 ], [ 19, 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 ], [ 49, 50 ], [ 47, 51 ], [ 19, 52 ], [ 52, 53 ], [ 52, 54 ], [ 52, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 19, 63 ], [ 63, 64 ], [ 64, 65 ], [ 0, 66 ], [ 66, 67 ], [ 66, 68 ] ]
[ "import java.util.*;\n\npublic class Main {\n Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n new Main().run();\n }\n\n private void run(){\n int N = sc.nextInt();\n int[] A = new int[N];\n\n\n\n for(int i = 0; i < N-1; i++){\n A[sc.nextInt() - 1]++;\n }\n\n for(int a: A){\n System.out.println(a);\n }\n sc.close();\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n new Main().run();\n }\n\n private void run(){\n int N = sc.nextInt();\n int[] A = new int[N];\n\n\n\n for(int i = 0; i < N-1; i++){\n A[sc.nextInt() - 1]++;\n }\n\n for(int a: A){\n System.out.println(a);\n }\n sc.close();\n }\n}", "Main", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args){\n new Main().run();\n }", "main", "{\n new Main().run();\n }", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "private void run(){\n int N = sc.nextInt();\n int[] A = new int[N];\n\n\n\n for(int i = 0; i < N-1; i++){\n A[sc.nextInt() - 1]++;\n }\n\n for(int a: A){\n System.out.println(a);\n }\n sc.close();\n }", "run", "{\n int N = sc.nextInt();\n int[] A = new int[N];\n\n\n\n for(int i = 0; i < N-1; i++){\n A[sc.nextInt() - 1]++;\n }\n\n for(int a: A){\n System.out.println(a);\n }\n sc.close();\n }", "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 A[sc.nextInt() - 1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n A[sc.nextInt() - 1]++;\n }", "{\n A[sc.nextInt() - 1]++;\n }", "A[sc.nextInt() - 1]++", "A[sc.nextInt() - 1]", "A", "sc.nextInt() - 1", "sc.nextInt()", "sc.nextInt", "sc", "1", "for(int a: A){\n System.out.println(a);\n }", "int a", "A", "{\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", "sc.close()", "sc.close", "sc", "public class Main {\n Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n new Main().run();\n }\n\n private void run(){\n int N = sc.nextInt();\n int[] A = new int[N];\n\n\n\n for(int i = 0; i < N-1; i++){\n A[sc.nextInt() - 1]++;\n }\n\n for(int a: A){\n System.out.println(a);\n }\n sc.close();\n }\n}", "public class Main {\n Scanner sc = new Scanner(System.in);\n public static void main(String[] args){\n new Main().run();\n }\n\n private void run(){\n int N = sc.nextInt();\n int[] A = new int[N];\n\n\n\n for(int i = 0; i < N-1; i++){\n A[sc.nextInt() - 1]++;\n }\n\n for(int a: A){\n System.out.println(a);\n }\n sc.close();\n }\n}", "Main" ]
import java.util.*; public class Main { Scanner sc = new Scanner(System.in); public static void main(String[] args){ new Main().run(); } private void run(){ int N = sc.nextInt(); int[] A = new int[N]; for(int i = 0; i < N-1; i++){ A[sc.nextInt() - 1]++; } for(int a: A){ System.out.println(a); } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 0, 13, 20, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 28, 13, 13, 30, 40, 18, 13, 13, 41, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 106, 11 ], [ 106, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 23, 26 ], [ 26, 27 ], [ 27, 28 ], [ 14, 29 ], [ 29, 30 ], [ 29, 31 ], [ 32, 33 ], [ 32, 34 ], [ 14, 35 ], [ 35, 36 ], [ 35, 37 ], [ 14, 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 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 60, 61 ], [ 14, 62 ], [ 62, 63 ], [ 62, 64 ], [ 65, 66 ], [ 65, 67 ], [ 14, 68 ], [ 68, 69 ], [ 68, 70 ], [ 68, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 14, 76 ], [ 76, 77 ], [ 76, 78 ], [ 14, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 84, 85 ], [ 84, 86 ], [ 79, 87 ], [ 87, 88 ], [ 88, 89 ], [ 79, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 91, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 12, 103 ], [ 103, 104 ], [ 0, 105 ], [ 105, 106 ], [ 105, 107 ] ]
[ "/*\nIf you want to aim high, aim high\nDon't let that studying and grades consume you\nJust live life young\n******************************\nIf I'm the sun, you're the moon\nBecause when I go up, you go down\n*******************************\nI'm working for the day I will surpass you\nhttps://www.a2oj.com/Ladder16.html\n*/\nimport java.util.*;\nimport java.io.*;\nimport java.math.*;\n\n public class Main\n {\n public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int[] arr = new int[N-1];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < N-1; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n int[] cnt = new int[N+5];\n for(int x: arr)\n cnt[x]++;\n int ans = N;\n for(int i=1; i <= N; i++)\n {\n ans = cnt[i];\n System.out.println(ans);\n }\n }\n }", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "import java.math.*;", "math.*", "java", "public class Main\n {\n public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int[] arr = new int[N-1];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < N-1; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n int[] cnt = new int[N+5];\n for(int x: arr)\n cnt[x]++;\n int ans = N;\n for(int i=1; i <= N; i++)\n {\n ans = cnt[i];\n System.out.println(ans);\n }\n }\n }", "Main", "public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int[] arr = new int[N-1];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < N-1; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n int[] cnt = new int[N+5];\n for(int x: arr)\n cnt[x]++;\n int ans = N;\n for(int i=1; i <= N; i++)\n {\n ans = cnt[i];\n System.out.println(ans);\n }\n }", "main", "{\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int[] arr = new int[N-1];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < N-1; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n int[] cnt = new int[N+5];\n for(int x: arr)\n cnt[x]++;\n int ans = N;\n for(int i=1; i <= N; i++)\n {\n ans = cnt[i];\n System.out.println(ans);\n }\n }", "BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));", "infile", "new BufferedReader(new InputStreamReader(System.in))", "StringTokenizer st = new StringTokenizer(infile.readLine());", "st", "new StringTokenizer(infile.readLine())", "int N = Integer.parseInt(st.nextToken());", "N", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "int[] arr = new int[N-1];", "arr", "new int[N-1]", "N-1", "N", "1", "st = new StringTokenizer(infile.readLine())", "st", "new StringTokenizer(infile.readLine())", "for(int i=0; i < N-1; i++)\n arr[i] = Integer.parseInt(st.nextToken());", "int i=0;", "int i=0;", "i", "0", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "arr[i] = Integer.parseInt(st.nextToken());", "arr[i] = Integer.parseInt(st.nextToken())", "arr[i]", "arr", "i", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "int[] cnt = new int[N+5];", "cnt", "new int[N+5]", "N+5", "N", "5", "for(int x: arr)\n cnt[x]++;", "int x", "arr", "cnt[x]++;", "cnt[x]++", "cnt[x]", "cnt", "x", "int ans = N;", "ans", "N", "for(int i=1; i <= N; i++)\n {\n ans = cnt[i];\n System.out.println(ans);\n }", "int i=1;", "int i=1;", "i", "1", "i <= N", "i", "N", "i++", "i++", "i", "{\n ans = cnt[i];\n System.out.println(ans);\n }", "{\n ans = cnt[i];\n System.out.println(ans);\n }", "ans = cnt[i]", "ans", "cnt[i]", "cnt", "i", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String omkar[]", "omkar", "public class Main\n {\n public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int[] arr = new int[N-1];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < N-1; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n int[] cnt = new int[N+5];\n for(int x: arr)\n cnt[x]++;\n int ans = N;\n for(int i=1; i <= N; i++)\n {\n ans = cnt[i];\n System.out.println(ans);\n }\n }\n }", "public class Main\n {\n public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int[] arr = new int[N-1];\n st = new StringTokenizer(infile.readLine());\n for(int i=0; i < N-1; i++)\n arr[i] = Integer.parseInt(st.nextToken());\n int[] cnt = new int[N+5];\n for(int x: arr)\n cnt[x]++;\n int ans = N;\n for(int i=1; i <= N; i++)\n {\n ans = cnt[i];\n System.out.println(ans);\n }\n }\n }", "Main" ]
/* If you want to aim high, aim high Don't let that studying and grades consume you Just live life young ****************************** If I'm the sun, you're the moon Because when I go up, you go down ******************************* I'm working for the day I will surpass you https://www.a2oj.com/Ladder16.html */ import java.util.*; import java.io.*; import java.math.*; public class Main { public static void main(String omkar[]) throws Exception { BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(infile.readLine()); int N = Integer.parseInt(st.nextToken()); int[] arr = new int[N-1]; st = new StringTokenizer(infile.readLine()); for(int i=0; i < N-1; i++) arr[i] = Integer.parseInt(st.nextToken()); int[] cnt = new int[N+5]; for(int x: arr) cnt[x]++; int ans = N; for(int i=1; i <= N; i++) { ans = cnt[i]; System.out.println(ans); } } }
[ 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, 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, 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 ], [ 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 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 69, 79 ], [ 79, 80 ], [ 80, 81 ], [ 69, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 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 ], [ 109, 111 ], [ 107, 112 ], [ 112, 113 ], [ 112, 114 ], [ 8, 115 ], [ 115, 116 ], [ 116, 117 ], [ 6, 118 ], [ 118, 119 ] ]
[ "import java.util.*;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] list = new int[n - 1];\n int[] results = new int[n];\n\n for (int i = 0; i < list.length; i++) {\n list[i] = sc.nextInt();\n }\n for (int i = 1; i < results.length; i++) {\n results[i] = 0;\n }\n\n for (int i = 0; i < list.length; i++) {\n results[(list[i]) - 1]++;\n }\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n sc.close();\n }\n}", "import java.util.*;", "util.*", "java", "class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] list = new int[n - 1];\n int[] results = new int[n];\n\n for (int i = 0; i < list.length; i++) {\n list[i] = sc.nextInt();\n }\n for (int i = 1; i < results.length; i++) {\n results[i] = 0;\n }\n\n for (int i = 0; i < list.length; i++) {\n results[(list[i]) - 1]++;\n }\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[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[] list = new int[n - 1];\n int[] results = new int[n];\n\n for (int i = 0; i < list.length; i++) {\n list[i] = sc.nextInt();\n }\n for (int i = 1; i < results.length; i++) {\n results[i] = 0;\n }\n\n for (int i = 0; i < list.length; i++) {\n results[(list[i]) - 1]++;\n }\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] list = new int[n - 1];\n int[] results = new int[n];\n\n for (int i = 0; i < list.length; i++) {\n list[i] = sc.nextInt();\n }\n for (int i = 1; i < results.length; i++) {\n results[i] = 0;\n }\n\n for (int i = 0; i < list.length; i++) {\n results[(list[i]) - 1]++;\n }\n for (int i = 0; i < results.length; i++) {\n System.out.println(results[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[] list = new int[n - 1];", "list", "new int[n - 1]", "n - 1", "n", "1", "int[] results = new int[n];", "results", "new int[n]", "n", "for (int i = 0; i < list.length; i++) {\n list[i] = sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < list.length", "i", "list.length", "list", "list.length", "i++", "i++", "i", "{\n list[i] = sc.nextInt();\n }", "{\n list[i] = sc.nextInt();\n }", "list[i] = sc.nextInt()", "list[i]", "list", "i", "sc.nextInt()", "sc.nextInt", "sc", "for (int i = 1; i < results.length; i++) {\n results[i] = 0;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < results.length", "i", "results.length", "results", "results.length", "i++", "i++", "i", "{\n results[i] = 0;\n }", "{\n results[i] = 0;\n }", "results[i] = 0", "results[i]", "results", "i", "0", "for (int i = 0; i < list.length; i++) {\n results[(list[i]) - 1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < list.length", "i", "list.length", "list", "list.length", "i++", "i++", "i", "{\n results[(list[i]) - 1]++;\n }", "{\n results[(list[i]) - 1]++;\n }", "results[(list[i]) - 1]++", "results[(list[i]) - 1]", "results", "(list[i]) - 1", "(list[i])", "list", "i", "1", "for (int i = 0; i < results.length; i++) {\n System.out.println(results[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < results.length", "i", "results.length", "results", "results.length", "i++", "i++", "i", "{\n System.out.println(results[i]);\n }", "{\n System.out.println(results[i]);\n }", "System.out.println(results[i])", "System.out.println", "System.out", "System", "System.out", "results[i]", "results", "i", "sc.close()", "sc.close", "sc", "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[] list = new int[n - 1]; int[] results = new int[n]; for (int i = 0; i < list.length; i++) { list[i] = sc.nextInt(); } for (int i = 1; i < results.length; i++) { results[i] = 0; } for (int i = 0; i < list.length; i++) { results[(list[i]) - 1]++; } for (int i = 0; i < results.length; i++) { System.out.println(results[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, 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, 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 ], [ 76, 11 ], [ 76, 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 ], [ 14, 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 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 41, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 14, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 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 ] ]
[ "import java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\npublic final class Main\n{\n public static void main (String[] args) throws java.lang.Exception {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] arr = new int[n];\n for(int i =0; i<n-1; i++){\n int v = in.nextInt();\n arr[v-1]++;\n }\n \n for(int i =0; i< n; i++)\n System.out.println(arr[i]);\n\n\n }\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "import java.io.*;", "io.*", "java", "public final class Main\n{\n public static void main (String[] args) throws java.lang.Exception {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] arr = new int[n];\n for(int i =0; i<n-1; i++){\n int v = in.nextInt();\n arr[v-1]++;\n }\n \n for(int i =0; i< n; i++)\n System.out.println(arr[i]);\n\n\n }\n}", "Main", "public static void main (String[] args) throws java.lang.Exception {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] arr = new int[n];\n for(int i =0; i<n-1; i++){\n int v = in.nextInt();\n arr[v-1]++;\n }\n \n for(int i =0; i< n; i++)\n System.out.println(arr[i]);\n\n\n }", "main", "{\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] arr = new int[n];\n for(int i =0; i<n-1; i++){\n int v = in.nextInt();\n arr[v-1]++;\n }\n \n for(int i =0; i< n; i++)\n System.out.println(arr[i]);\n\n\n }", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] arr = new int[n];", "arr", "new int[n]", "n", "for(int i =0; i<n-1; i++){\n int v = in.nextInt();\n arr[v-1]++;\n }", "int i =0;", "int i =0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n int v = in.nextInt();\n arr[v-1]++;\n }", "{\n int v = in.nextInt();\n arr[v-1]++;\n }", "int v = in.nextInt();", "v", "in.nextInt()", "in.nextInt", "in", "arr[v-1]++", "arr[v-1]", "arr", "v-1", "v", "1", "for(int i =0; i< n; i++)\n System.out.println(arr[i]);", "int i =0;", "int i =0;", "i", "0", "i< n", "i", "n", "i++", "i++", "i", "System.out.println(arr[i]);", "System.out.println(arr[i])", "System.out.println", "System.out", "System", "System.out", "arr[i]", "arr", "i", "String[] args", "args", "public final class Main\n{\n public static void main (String[] args) throws java.lang.Exception {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] arr = new int[n];\n for(int i =0; i<n-1; i++){\n int v = in.nextInt();\n arr[v-1]++;\n }\n \n for(int i =0; i< n; i++)\n System.out.println(arr[i]);\n\n\n }\n}", "public final class Main\n{\n public static void main (String[] args) throws java.lang.Exception {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int[] arr = new int[n];\n for(int i =0; i<n-1; i++){\n int v = in.nextInt();\n arr[v-1]++;\n }\n \n for(int i =0; i< n; i++)\n System.out.println(arr[i]);\n\n\n }\n}", "Main" ]
import java.util.*; import java.lang.*; import java.io.*; public final class Main { public static void main (String[] args) throws java.lang.Exception { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] arr = new int[n]; for(int i =0; i<n-1; i++){ int v = in.nextInt(); arr[v-1]++; } for(int i =0; i< n; i++) System.out.println(arr[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, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 20, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 13, 0, 18, 13, 13, 2, 18, 13, 2, 13, 17, 17, 0, 18, 13, 18, 13, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 2, 18, 13, 13, 17, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 13, 0, 13, 20, 13, 0, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 13, 0, 18, 13, 13, 17, 23, 13, 12, 13, 30, 29, 13, 12, 13, 30, 29, 2, 4, 13, 13, 4, 13, 13, 23, 13, 23, 13, 12, 13, 30, 42, 2, 13, 18, 13, 13, 30, 0, 18, 13, 13, 18, 13, 18, 13, 13, 0, 13, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 13, 41, 13, 4, 13, 13, 14, 2, 13, 13, 29, 14, 2, 18, 13, 13, 18, 13, 13, 30, 0, 18, 13, 13, 13, 0, 18, 13, 13, 18, 13, 13, 30, 0, 18, 13, 13, 13, 0, 18, 13, 13, 18, 13, 13, 40, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 0, 13, 13, 23, 13, 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 ], [ 563, 8 ], [ 563, 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 ], [ 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 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 11, 48 ], [ 9, 49 ], [ 49, 50 ], [ 0, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 51, 55 ], [ 55, 56 ], [ 51, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 59, 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 ], [ 82, 84 ], [ 81, 85 ], [ 80, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 86, 90 ], [ 59, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 96, 97 ], [ 96, 98 ], [ 91, 99 ], [ 99, 100 ], [ 100, 101 ], [ 91, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 111, 117 ], [ 103, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 121, 123 ], [ 118, 124 ], [ 124, 125 ], [ 124, 126 ], [ 59, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 132, 134 ], [ 127, 135 ], [ 135, 136 ], [ 136, 137 ], [ 127, 138 ], [ 139, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 140, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 145, 149 ], [ 57, 150 ], [ 150, 151 ], [ 57, 152 ], [ 152, 153 ], [ 0, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 154, 158 ], [ 158, 159 ], [ 154, 160 ], [ 160, 161 ], [ 154, 162 ], [ 162, 163 ], [ 162, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 164, 169 ], [ 169, 170 ], [ 169, 171 ], [ 164, 173 ], [ 173, 174 ], [ 173, 175 ], [ 164, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 176, 181 ], [ 181, 182 ], [ 181, 183 ], [ 176, 184 ], [ 184, 185 ], [ 185, 186 ], [ 176, 187 ], [ 188, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 189, 193 ], [ 188, 194 ], [ 194, 195 ], [ 195, 196 ], [ 195, 197 ], [ 194, 198 ], [ 162, 199 ], [ 199, 200 ], [ 154, 201 ], [ 201, 202 ], [ 201, 203 ], [ 203, 204 ], [ 204, 205 ], [ 154, 206 ], [ 206, 207 ], [ 206, 208 ], [ 208, 209 ], [ 209, 210 ], [ 210, 211 ], [ 211, 212 ], [ 211, 213 ], [ 210, 214 ], [ 214, 215 ], [ 214, 216 ], [ 206, 217 ], [ 217, 218 ], [ 206, 219 ], [ 219, 220 ], [ 154, 221 ], [ 221, 222 ], [ 221, 223 ], [ 223, 224 ], [ 224, 225 ], [ 225, 226 ], [ 225, 227 ], [ 227, 228 ], [ 227, 229 ], [ 224, 230 ], [ 230, 231 ], [ 231, 232 ], [ 232, 233 ], [ 232, 234 ], [ 231, 235 ], [ 235, 236 ], [ 235, 237 ], [ 237, 238 ], [ 237, 239 ], [ 230, 240 ], [ 240, 241 ], [ 240, 242 ], [ 242, 243 ], [ 242, 244 ], [ 223, 245 ], [ 245, 246 ], [ 221, 247 ], [ 247, 248 ], [ 154, 249 ], [ 249, 250 ], [ 249, 251 ], [ 251, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 254, 256 ], [ 251, 257 ], [ 257, 258 ], [ 257, 259 ], [ 259, 260 ], [ 259, 261 ], [ 251, 262 ], [ 262, 263 ], [ 263, 264 ], [ 263, 265 ], [ 262, 266 ], [ 251, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 269, 271 ], [ 268, 272 ], [ 272, 273 ], [ 272, 274 ], [ 267, 275 ], [ 275, 276 ], [ 276, 277 ], [ 277, 278 ], [ 277, 279 ], [ 276, 280 ], [ 275, 281 ], [ 281, 282 ], [ 282, 283 ], [ 282, 284 ], [ 281, 285 ], [ 285, 286 ], [ 285, 287 ], [ 267, 288 ], [ 288, 289 ], [ 289, 290 ], [ 290, 291 ], [ 290, 292 ], [ 289, 293 ], [ 288, 294 ], [ 294, 295 ], [ 295, 296 ], [ 295, 297 ], [ 294, 298 ], [ 298, 299 ], [ 298, 300 ], [ 251, 301 ], [ 301, 302 ], [ 249, 303 ], [ 303, 304 ], [ 249, 305 ], [ 305, 306 ], [ 0, 307 ], [ 307, 308 ], [ 307, 309 ], [ 309, 310 ], [ 307, 311 ], [ 311, 312 ], [ 311, 313 ], [ 307, 315 ], [ 315, 316 ], [ 315, 317 ], [ 307, 318 ], [ 318, 319 ], [ 318, 320 ], [ 307, 321 ], [ 321, 322 ], [ 321, 323 ], [ 323, 324 ], [ 324, 325 ], [ 324, 326 ], [ 321, 327 ], [ 327, 328 ], [ 307, 329 ], [ 329, 330 ], [ 329, 331 ], [ 331, 332 ], [ 332, 333 ], [ 333, 334 ], [ 333, 335 ], [ 332, 336 ], [ 336, 337 ], [ 337, 338 ], [ 332, 339 ], [ 339, 340 ], [ 340, 341 ], [ 340, 342 ], [ 339, 343 ], [ 343, 344 ], [ 344, 345 ], [ 344, 346 ], [ 346, 347 ], [ 347, 348 ], [ 348, 349 ], [ 343, 350 ], [ 350, 351 ], [ 351, 352 ], [ 351, 353 ], [ 353, 354 ], [ 354, 355 ], [ 353, 356 ], [ 339, 357 ], [ 357, 358 ], [ 358, 359 ], [ 358, 360 ], [ 357, 361 ], [ 361, 362 ], [ 362, 363 ], [ 331, 364 ], [ 364, 365 ], [ 307, 366 ], [ 366, 367 ], [ 366, 368 ], [ 368, 369 ], [ 369, 370 ], [ 370, 371 ], [ 369, 372 ], [ 372, 373 ], [ 373, 374 ], [ 373, 375 ], [ 375, 376 ], [ 369, 377 ], [ 377, 378 ], [ 378, 379 ], [ 307, 380 ], [ 380, 381 ], [ 380, 382 ], [ 382, 383 ], [ 383, 384 ], [ 384, 385 ], [ 385, 386 ], [ 385, 387 ], [ 384, 388 ], [ 388, 389 ], [ 388, 390 ], [ 380, 391 ], [ 391, 392 ], [ 307, 393 ], [ 393, 394 ], [ 393, 395 ], [ 395, 396 ], [ 396, 397 ], [ 397, 398 ], [ 398, 399 ], [ 397, 400 ], [ 400, 401 ], [ 401, 402 ], [ 401, 403 ], [ 403, 404 ], [ 403, 405 ], [ 396, 406 ], [ 406, 407 ], [ 395, 408 ], [ 408, 409 ], [ 409, 410 ], [ 307, 411 ], [ 411, 412 ], [ 411, 413 ], [ 413, 414 ], [ 414, 415 ], [ 415, 416 ], [ 416, 417 ], [ 414, 418 ], [ 418, 419 ], [ 413, 420 ], [ 420, 421 ], [ 420, 422 ], [ 413, 423 ], [ 423, 424 ], [ 423, 425 ], [ 425, 426 ], [ 413, 427 ], [ 427, 428 ], [ 428, 429 ], [ 428, 430 ], [ 427, 431 ], [ 431, 432 ], [ 432, 433 ], [ 433, 434 ], [ 432, 435 ], [ 431, 436 ], [ 436, 437 ], [ 436, 438 ], [ 438, 439 ], [ 413, 440 ], [ 440, 441 ], [ 441, 442 ], [ 442, 443 ], [ 307, 444 ], [ 444, 445 ], [ 444, 446 ], [ 446, 447 ], [ 447, 448 ], [ 448, 449 ], [ 449, 450 ], [ 447, 451 ], [ 451, 452 ], [ 446, 453 ], [ 453, 454 ], [ 453, 455 ], [ 446, 456 ], [ 456, 457 ], [ 456, 458 ], [ 446, 459 ], [ 459, 460 ], [ 459, 461 ], [ 461, 462 ], [ 446, 463 ], [ 463, 464 ], [ 464, 465 ], [ 464, 466 ], [ 463, 467 ], [ 467, 468 ], [ 468, 469 ], [ 468, 470 ], [ 467, 471 ], [ 471, 472 ], [ 471, 473 ], [ 473, 474 ], [ 446, 475 ], [ 475, 476 ], [ 476, 477 ], [ 477, 478 ], [ 477, 479 ], [ 476, 480 ], [ 480, 481 ], [ 480, 482 ], [ 475, 483 ], [ 483, 484 ], [ 484, 485 ], [ 446, 486 ], [ 486, 487 ], [ 486, 488 ], [ 488, 489 ], [ 489, 490 ], [ 490, 491 ], [ 491, 492 ], [ 491, 493 ], [ 490, 494 ], [ 494, 495 ], [ 494, 496 ], [ 489, 497 ], [ 497, 498 ], [ 498, 499 ], [ 498, 500 ], [ 497, 501 ], [ 501, 502 ], [ 501, 503 ], [ 503, 504 ], [ 503, 505 ], [ 489, 506 ], [ 506, 507 ], [ 507, 508 ], [ 508, 509 ], [ 508, 510 ], [ 510, 511 ], [ 507, 512 ], [ 512, 513 ], [ 513, 514 ], [ 513, 515 ], [ 506, 516 ], [ 516, 517 ], [ 517, 518 ], [ 518, 519 ], [ 518, 520 ], [ 520, 521 ], [ 518, 522 ], [ 506, 523 ], [ 523, 524 ], [ 524, 525 ], [ 488, 526 ], [ 526, 527 ], [ 526, 528 ], [ 528, 529 ], [ 307, 530 ], [ 530, 531 ], [ 530, 532 ], [ 532, 533 ], [ 533, 534 ], [ 533, 535 ], [ 535, 536 ], [ 532, 537 ], [ 537, 538 ], [ 538, 539 ], [ 539, 540 ], [ 539, 541 ], [ 541, 542 ], [ 541, 543 ], [ 538, 544 ], [ 544, 545 ], [ 544, 546 ], [ 546, 547 ], [ 546, 548 ], [ 537, 549 ], [ 549, 550 ], [ 532, 551 ], [ 551, 552 ], [ 307, 553 ], [ 553, 554 ], [ 553, 555 ], [ 555, 556 ], [ 556, 557 ], [ 557, 558 ], [ 558, 559 ], [ 557, 560 ], [ 560, 561 ], [ 0, 562 ], [ 562, 563 ], [ 562, 564 ] ]
[ "import java.util.*;\nimport java.io.*;\n \npublic class Main {\n public static void main(String[] args) throws Exception{\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[] num = new int[n - 1];\n for(int i = 0; i < n - 1; ++i) {\n num[i] = sc.nextInt();\n }\n new Solution(n, num);\n }\n}\n\nclass Solution {\n private int[] size;\n private int[] id;\n public Solution(int n, int[] num) {\n size = new int[n];\n id = new int[n];\n for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }\n for(int i = 1; i < n; ++i) {\n int p = i;\n id[p] = num[i - 1] - 1;\n size[id[p]] += size[p];\n }\n for(int i = 0; i<n; ++i) {\n System.out.println(size[i] - 1);\n }\n // System.out.println(res);\n }\n}\nclass UF {\n private int[] id;\n private int[] size;\n private int count;\n public UF(int n) {\n id = new int[n];\n size = new int[n];\n count = n;\n for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }\n }\n public int countNum() {\n return count;\n }\n\n public boolean connected(int p, int q) {\n return find(p) == find(q);\n }\n \n public int find(int p) {\n while(p != id[p]) {\n id[p] = id[id[p]];\n p = id[p];\n }\n return p;\n }\n \n public void union(int p, int q) {\n int pRoot = find(p);\n int qRoot = find(q);\n if(pRoot == qRoot) return;\n if(size[qRoot] > size[pRoot]) {\n id[pRoot] = qRoot; \n size[qRoot] += size[pRoot];\n } else {\n id[qRoot] = pRoot;\n size[pRoot] += size[qRoot];\n }\n --count;\n }\n}\nclass FastScanner {\n private final InputStream in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n public FastScanner(InputStream source) {\n in = source;\n }\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() {\n if (hasNextByte()) return buffer[ptr++];\n else return -1;\n }\n\n private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }\n\n public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n return hasNextByte();\n }\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)\n throw new NumberFormatException();\n return (int) nl;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n public static void main(String[] args) throws Exception{\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[] num = new int[n - 1];\n for(int i = 0; i < n - 1; ++i) {\n num[i] = sc.nextInt();\n }\n new Solution(n, num);\n }\n}", "Main", "public static void main(String[] args) throws Exception{\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[] num = new int[n - 1];\n for(int i = 0; i < n - 1; ++i) {\n num[i] = sc.nextInt();\n }\n new Solution(n, num);\n }", "main", "{\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[] num = new int[n - 1];\n for(int i = 0; i < n - 1; ++i) {\n num[i] = sc.nextInt();\n }\n new Solution(n, num);\n }", "FastScanner sc = new FastScanner(System.in);", "sc", "new FastScanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] num = new int[n - 1];", "num", "new int[n - 1]", "n - 1", "n", "1", "for(int i = 0; i < n - 1; ++i) {\n num[i] = sc.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n - 1", "i", "n - 1", "n", "1", "++i", "++i", "i", "{\n num[i] = sc.nextInt();\n }", "{\n num[i] = sc.nextInt();\n }", "num[i] = sc.nextInt()", "num[i]", "num", "i", "sc.nextInt()", "sc.nextInt", "sc", "new Solution(n, num)", "String[] args", "args", "class Solution {\n private int[] size;\n private int[] id;\n public Solution(int n, int[] num) {\n size = new int[n];\n id = new int[n];\n for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }\n for(int i = 1; i < n; ++i) {\n int p = i;\n id[p] = num[i - 1] - 1;\n size[id[p]] += size[p];\n }\n for(int i = 0; i<n; ++i) {\n System.out.println(size[i] - 1);\n }\n // System.out.println(res);\n }\n}", "Solution", "private int[] size;", "size", "private int[] id;", "id", "public Solution(int n, int[] num) {\n size = new int[n];\n id = new int[n];\n for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }\n for(int i = 1; i < n; ++i) {\n int p = i;\n id[p] = num[i - 1] - 1;\n size[id[p]] += size[p];\n }\n for(int i = 0; i<n; ++i) {\n System.out.println(size[i] - 1);\n }\n // System.out.println(res);\n }", "Solution", "{\n size = new int[n];\n id = new int[n];\n for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }\n for(int i = 1; i < n; ++i) {\n int p = i;\n id[p] = num[i - 1] - 1;\n size[id[p]] += size[p];\n }\n for(int i = 0; i<n; ++i) {\n System.out.println(size[i] - 1);\n }\n // System.out.println(res);\n }", "size = new int[n]", "size", "new int[n]", "n", "id = new int[n]", "id", "new int[n]", "n", "for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i<n", "i", "n", "++i", "++i", "i", "{\n id[i] = i;\n size[i] = 1;\n }", "{\n id[i] = i;\n size[i] = 1;\n }", "id[i] = i", "id[i]", "id", "i", "i", "size[i] = 1", "size[i]", "size", "i", "1", "for(int i = 1; i < n; ++i) {\n int p = i;\n id[p] = num[i - 1] - 1;\n size[id[p]] += size[p];\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "++i", "++i", "i", "{\n int p = i;\n id[p] = num[i - 1] - 1;\n size[id[p]] += size[p];\n }", "{\n int p = i;\n id[p] = num[i - 1] - 1;\n size[id[p]] += size[p];\n }", "int p = i;", "p", "i", "id[p] = num[i - 1] - 1", "id[p]", "id", "p", "num[i - 1] - 1", "num[i - 1]", "num", "i - 1", "i", "1", "1", "size[id[p]] += size[p]", "size[id[p]]", "size", "id[p]", "id", "p", "size[p]", "size", "p", "for(int i = 0; i<n; ++i) {\n System.out.println(size[i] - 1);\n }", "int i = 0;", "int i = 0;", "i", "0", "i<n", "i", "n", "++i", "++i", "i", "{\n System.out.println(size[i] - 1);\n }", "{\n System.out.println(size[i] - 1);\n }", "System.out.println(size[i] - 1)", "System.out.println", "System.out", "System", "System.out", "size[i] - 1", "size[i]", "size", "i", "1", "int n", "n", "int[] num", "num", "class UF {\n private int[] id;\n private int[] size;\n private int count;\n public UF(int n) {\n id = new int[n];\n size = new int[n];\n count = n;\n for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }\n }\n public int countNum() {\n return count;\n }\n\n public boolean connected(int p, int q) {\n return find(p) == find(q);\n }\n \n public int find(int p) {\n while(p != id[p]) {\n id[p] = id[id[p]];\n p = id[p];\n }\n return p;\n }\n \n public void union(int p, int q) {\n int pRoot = find(p);\n int qRoot = find(q);\n if(pRoot == qRoot) return;\n if(size[qRoot] > size[pRoot]) {\n id[pRoot] = qRoot; \n size[qRoot] += size[pRoot];\n } else {\n id[qRoot] = pRoot;\n size[pRoot] += size[qRoot];\n }\n --count;\n }\n}", "UF", "private int[] id;", "id", "private int[] size;", "size", "private int count;", "count", "public UF(int n) {\n id = new int[n];\n size = new int[n];\n count = n;\n for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }\n }", "UF", "{\n id = new int[n];\n size = new int[n];\n count = n;\n for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }\n }", "id = new int[n]", "id", "new int[n]", "n", "size = new int[n]", "size", "new int[n]", "n", "count = n", "count", "n", "for(int i = 0; i<n; ++i) {\n id[i] = i;\n size[i] = 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i<n", "i", "n", "++i", "++i", "i", "{\n id[i] = i;\n size[i] = 1;\n }", "{\n id[i] = i;\n size[i] = 1;\n }", "id[i] = i", "id[i]", "id", "i", "i", "size[i] = 1", "size[i]", "size", "i", "1", "int n", "n", "public int countNum() {\n return count;\n }", "countNum", "{\n return count;\n }", "return count;", "count", "public boolean connected(int p, int q) {\n return find(p) == find(q);\n }", "connected", "{\n return find(p) == find(q);\n }", "return find(p) == find(q);", "find(p) == find(q)", "find(p)", "find", "p", "find(q)", "find", "q", "int p", "p", "int q", "q", "public int find(int p) {\n while(p != id[p]) {\n id[p] = id[id[p]];\n p = id[p];\n }\n return p;\n }", "find", "{\n while(p != id[p]) {\n id[p] = id[id[p]];\n p = id[p];\n }\n return p;\n }", "while(p != id[p]) {\n id[p] = id[id[p]];\n p = id[p];\n }", "p != id[p]", "p", "id[p]", "id", "p", "{\n id[p] = id[id[p]];\n p = id[p];\n }", "id[p] = id[id[p]]", "id[p]", "id", "p", "id[id[p]]", "id", "id[p]", "id", "p", "p = id[p]", "p", "id[p]", "id", "p", "return p;", "p", "int p", "p", "public void union(int p, int q) {\n int pRoot = find(p);\n int qRoot = find(q);\n if(pRoot == qRoot) return;\n if(size[qRoot] > size[pRoot]) {\n id[pRoot] = qRoot; \n size[qRoot] += size[pRoot];\n } else {\n id[qRoot] = pRoot;\n size[pRoot] += size[qRoot];\n }\n --count;\n }", "union", "{\n int pRoot = find(p);\n int qRoot = find(q);\n if(pRoot == qRoot) return;\n if(size[qRoot] > size[pRoot]) {\n id[pRoot] = qRoot; \n size[qRoot] += size[pRoot];\n } else {\n id[qRoot] = pRoot;\n size[pRoot] += size[qRoot];\n }\n --count;\n }", "int pRoot = find(p);", "pRoot", "find(p)", "find", "p", "int qRoot = find(q);", "qRoot", "find(q)", "find", "q", "if(pRoot == qRoot) return;", "pRoot == qRoot", "pRoot", "qRoot", "return;", "if(size[qRoot] > size[pRoot]) {\n id[pRoot] = qRoot; \n size[qRoot] += size[pRoot];\n } else {\n id[qRoot] = pRoot;\n size[pRoot] += size[qRoot];\n }", "size[qRoot] > size[pRoot]", "size[qRoot]", "size", "qRoot", "size[pRoot]", "size", "pRoot", "{\n id[pRoot] = qRoot; \n size[qRoot] += size[pRoot];\n }", "id[pRoot] = qRoot", "id[pRoot]", "id", "pRoot", "qRoot", "size[qRoot] += size[pRoot]", "size[qRoot]", "size", "qRoot", "size[pRoot]", "size", "pRoot", "{\n id[qRoot] = pRoot;\n size[pRoot] += size[qRoot];\n }", "id[qRoot] = pRoot", "id[qRoot]", "id", "qRoot", "pRoot", "size[pRoot] += size[qRoot]", "size[pRoot]", "size", "pRoot", "size[qRoot]", "size", "qRoot", "--count", "count", "int p", "p", "int q", "q", "class FastScanner {\n private final InputStream in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n public FastScanner(InputStream source) {\n in = source;\n }\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() {\n if (hasNextByte()) return buffer[ptr++];\n else return -1;\n }\n\n private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }\n\n public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n return hasNextByte();\n }\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)\n throw new NumberFormatException();\n return (int) nl;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n}", "FastScanner", "private final InputStream in;", "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", "public FastScanner(InputStream source) {\n in = source;\n }", "FastScanner", "{\n in = source;\n }", "in = source", "in", "source", "InputStream source", "source", "private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }", "hasNextByte", "{\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }", "if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }", "ptr < buflen", "ptr", "buflen", "{\n return true;\n }", "return true;", "true", "{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }", "ptr = 0", "ptr", "0", "try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n buflen = in.read(buffer);\n }", "buflen = in.read(buffer)", "buflen", "in.read(buffer)", "in.read", "in", "buffer", "if (buflen <= 0) {\n return false;\n }", "buflen <= 0", "buflen", "0", "{\n return false;\n }", "return false;", "false", "return true;", "true", "private int readByte() {\n if (hasNextByte()) return buffer[ptr++];\n else return -1;\n }", "readByte", "{\n if (hasNextByte()) return buffer[ptr++];\n else return -1;\n }", "if (hasNextByte()) return buffer[ptr++];\n else return -1;", "hasNextByte()", "hasNextByte", "return buffer[ptr++];", "buffer[ptr++]", "buffer", "ptr++", "ptr", "return -1;", "-1", "1", "private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }", "isPrintableChar", "{\n return 33 <= c && c <= 126;\n }", "return 33 <= c && c <= 126;", "33 <= c && c <= 126", "33 <= c", "33", "c", "c <= 126", "c", "126", "int c", "c", "public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n return hasNextByte();\n }", "hasNext", "{\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n return hasNextByte();\n }", "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)\n throw new NumberFormatException();\n return (int) nl;\n }", "nextInt", "{\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n throw new NumberFormatException();\n return (int) nl;\n }", "long nl = nextLong();", "nl", "nextLong()", "nextLong", "if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n throw new NumberFormatException();", "nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE", "nl < Integer.MIN_VALUE", "nl", "Integer.MIN_VALUE", "Integer", "Integer.MIN_VALUE", "nl > Integer.MAX_VALUE", "nl", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "throw new NumberFormatException();", "new NumberFormatException()", "return (int) nl;", "(int) nl", "public double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public class Main {\n public static void main(String[] args) throws Exception{\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[] num = new int[n - 1];\n for(int i = 0; i < n - 1; ++i) {\n num[i] = sc.nextInt();\n }\n new Solution(n, num);\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception{\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[] num = new int[n - 1];\n for(int i = 0; i < n - 1; ++i) {\n num[i] = sc.nextInt();\n }\n new Solution(n, num);\n }\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception{ FastScanner sc = new FastScanner(System.in); int n = sc.nextInt(); int[] num = new int[n - 1]; for(int i = 0; i < n - 1; ++i) { num[i] = sc.nextInt(); } new Solution(n, num); } } class Solution { private int[] size; private int[] id; public Solution(int n, int[] num) { size = new int[n]; id = new int[n]; for(int i = 0; i<n; ++i) { id[i] = i; size[i] = 1; } for(int i = 1; i < n; ++i) { int p = i; id[p] = num[i - 1] - 1; size[id[p]] += size[p]; } for(int i = 0; i<n; ++i) { System.out.println(size[i] - 1); } // System.out.println(res); } } class UF { private int[] id; private int[] size; private int count; public UF(int n) { id = new int[n]; size = new int[n]; count = n; for(int i = 0; i<n; ++i) { id[i] = i; size[i] = 1; } } public int countNum() { return count; } public boolean connected(int p, int q) { return find(p) == find(q); } public int find(int p) { while(p != id[p]) { id[p] = id[id[p]]; p = id[p]; } return p; } public void union(int p, int q) { int pRoot = find(p); int qRoot = find(q); if(pRoot == qRoot) return; if(size[qRoot] > size[pRoot]) { id[pRoot] = qRoot; size[qRoot] += size[pRoot]; } else { id[qRoot] = pRoot; size[pRoot] += size[qRoot]; } --count; } } class FastScanner { private final InputStream in; private final byte[] buffer = new byte[1024]; private int ptr = 0; private int buflen = 0; public FastScanner(InputStream source) { in = source; } private boolean hasNextByte() { if (ptr < buflen) { return true; } else { ptr = 0; try { buflen = in.read(buffer); } catch (IOException e) { e.printStackTrace(); } if (buflen <= 0) { return false; } } return true; } private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1; } private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126; } public boolean hasNext() { while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte(); } public String next() { if (!hasNext()) throw new NoSuchElementException(); StringBuilder sb = new StringBuilder(); int b = readByte(); while (isPrintableChar(b)) { sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } public long nextLong() { if (!hasNext()) throw new NoSuchElementException(); long n = 0; boolean minus = false; int b = readByte(); if (b == '-') { minus = true; b = readByte(); } if (b < '0' || '9' < b) { throw new NumberFormatException(); } while (true) { if ('0' <= b && b <= '9') { n *= 10; n += b - '0'; } else if (b == -1 || !isPrintableChar(b)) { return minus ? -n : n; } else { throw new NumberFormatException(); } b = readByte(); } } public int nextInt() { long nl = nextLong(); if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 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, 4, 18, 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 ], [ 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 ], [ 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 ], [ 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;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint employee = sc.nextInt();\n\t\tint[] results = new int[employee];\n\t\tfor (int i = 0; i < employee - 1; i++) {\n\t\t\tint boss = sc.nextInt();\n\t\t\tresults[boss - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor (int result : results) {\n\t\t\tSystem.out.println(result);\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 employee = sc.nextInt();\n\t\tint[] results = new int[employee];\n\t\tfor (int i = 0; i < employee - 1; i++) {\n\t\t\tint boss = sc.nextInt();\n\t\t\tresults[boss - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor (int result : results) {\n\t\t\tSystem.out.println(result);\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 employee = sc.nextInt();\n\t\tint[] results = new int[employee];\n\t\tfor (int i = 0; i < employee - 1; i++) {\n\t\t\tint boss = sc.nextInt();\n\t\t\tresults[boss - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor (int result : results) {\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint employee = sc.nextInt();\n\t\tint[] results = new int[employee];\n\t\tfor (int i = 0; i < employee - 1; i++) {\n\t\t\tint boss = sc.nextInt();\n\t\t\tresults[boss - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor (int result : results) {\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int employee = sc.nextInt();", "employee", "sc.nextInt()", "sc.nextInt", "sc", "int[] results = new int[employee];", "results", "new int[employee]", "employee", "for (int i = 0; i < employee - 1; i++) {\n\t\t\tint boss = sc.nextInt();\n\t\t\tresults[boss - 1]++;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < employee - 1", "i", "employee - 1", "employee", "1", "i++", "i++", "i", "{\n\t\t\tint boss = sc.nextInt();\n\t\t\tresults[boss - 1]++;\n\t\t}", "{\n\t\t\tint boss = sc.nextInt();\n\t\t\tresults[boss - 1]++;\n\t\t}", "int boss = sc.nextInt();", "boss", "sc.nextInt()", "sc.nextInt", "sc", "results[boss - 1]++", "results[boss - 1]", "results", "boss - 1", "boss", "1", "sc.close()", "sc.close", "sc", "for (int result : results) {\n\t\t\tSystem.out.println(result);\n\t\t}", "int result", "results", "{\n\t\t\tSystem.out.println(result);\n\t\t}", "{\n\t\t\tSystem.out.println(result);\n\t\t}", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "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 employee = sc.nextInt();\n\t\tint[] results = new int[employee];\n\t\tfor (int i = 0; i < employee - 1; i++) {\n\t\t\tint boss = sc.nextInt();\n\t\t\tresults[boss - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor (int result : results) {\n\t\t\tSystem.out.println(result);\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 employee = sc.nextInt();\n\t\tint[] results = new int[employee];\n\t\tfor (int i = 0; i < employee - 1; i++) {\n\t\t\tint boss = sc.nextInt();\n\t\t\tresults[boss - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor (int result : results) {\n\t\t\tSystem.out.println(result);\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 employee = sc.nextInt(); int[] results = new int[employee]; for (int i = 0; i < employee - 1; i++) { int boss = sc.nextInt(); results[boss - 1]++; } sc.close(); for (int result : results) { System.out.println(result); } } }
[ 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, 13, 28, 13, 13, 30, 30, 40, 18, 13, 2, 4, 18, 13, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 66, 11 ], [ 66, 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 ], [ 14, 38 ], [ 38, 39 ], [ 38, 40 ], [ 38, 41 ], [ 42, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 46, 51 ], [ 14, 52 ], [ 52, 53 ], [ 52, 54 ], [ 52, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 12, 63 ], [ 63, 64 ], [ 0, 65 ], [ 65, 66 ], [ 65, 67 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] str = br.readLine().split(\" \");\n int[] s = new int[n];\n\n for (String i : str) {\n s[Integer.parseInt(i) - 1]++;\n }\n for (int j : s) {\n System.out.println(j);\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", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] str = br.readLine().split(\" \");\n int[] s = new int[n];\n\n for (String i : str) {\n s[Integer.parseInt(i) - 1]++;\n }\n for (int j : s) {\n System.out.println(j);\n }\n\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] str = br.readLine().split(\" \");\n int[] s = new int[n];\n\n for (String i : str) {\n s[Integer.parseInt(i) - 1]++;\n }\n for (int j : s) {\n System.out.println(j);\n }\n\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] str = br.readLine().split(\" \");\n int[] s = new int[n];\n\n for (String i : str) {\n s[Integer.parseInt(i) - 1]++;\n }\n for (int j : s) {\n System.out.println(j);\n }\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[] str = br.readLine().split(\" \");", "str", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int[] s = new int[n];", "s", "new int[n]", "n", "for (String i : str) {\n s[Integer.parseInt(i) - 1]++;\n }", "String i", "str", "{\n s[Integer.parseInt(i) - 1]++;\n }", "{\n s[Integer.parseInt(i) - 1]++;\n }", "s[Integer.parseInt(i) - 1]++", "s[Integer.parseInt(i) - 1]", "s", "Integer.parseInt(i) - 1", "Integer.parseInt(i)", "Integer.parseInt", "Integer", "i", "1", "for (int j : s) {\n System.out.println(j);\n }", "int j", "s", "{\n System.out.println(j);\n }", "{\n System.out.println(j);\n }", "System.out.println(j)", "System.out.println", "System.out", "System", "System.out", "j", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] str = br.readLine().split(\" \");\n int[] s = new int[n];\n\n for (String i : str) {\n s[Integer.parseInt(i) - 1]++;\n }\n for (int j : s) {\n System.out.println(j);\n }\n\n }\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n String[] str = br.readLine().split(\" \");\n int[] s = new int[n];\n\n for (String i : str) {\n s[Integer.parseInt(i) - 1]++;\n }\n for (int j : s) {\n System.out.println(j);\n }\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[] str = br.readLine().split(" "); int[] s = new int[n]; for (String i : str) { s[Integer.parseInt(i) - 1]++; } for (int j : s) { System.out.println(j); } } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 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, 4, 18, 13, 2, 13, 17, 2, 4, 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 ], [ 91, 11 ], [ 91, 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 ], [ 14, 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 ], [ 39, 42 ], [ 14, 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 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 57, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 66, 68 ], [ 63, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 69, 76 ], [ 14, 77 ], [ 77, 78 ], [ 77, 79 ], [ 77, 80 ], [ 81, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 12, 88 ], [ 88, 89 ], [ 0, 90 ], [ 90, 91 ], [ 90, 92 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n\n ArrayList<Integer> result = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n result.add(0);\n }\n for (int i = 0; i < N - 1; i++) {\n int tmp = scan.nextInt();\n result.set(tmp - 1, result.get(tmp - 1) + 1);\n }\n\n for (Integer r : result) {\n System.out.println(r);\n }\n\n }\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n\n ArrayList<Integer> result = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n result.add(0);\n }\n for (int i = 0; i < N - 1; i++) {\n int tmp = scan.nextInt();\n result.set(tmp - 1, result.get(tmp - 1) + 1);\n }\n\n for (Integer r : result) {\n System.out.println(r);\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n\n ArrayList<Integer> result = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n result.add(0);\n }\n for (int i = 0; i < N - 1; i++) {\n int tmp = scan.nextInt();\n result.set(tmp - 1, result.get(tmp - 1) + 1);\n }\n\n for (Integer r : result) {\n System.out.println(r);\n }\n\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n\n ArrayList<Integer> result = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n result.add(0);\n }\n for (int i = 0; i < N - 1; i++) {\n int tmp = scan.nextInt();\n result.set(tmp - 1, result.get(tmp - 1) + 1);\n }\n\n for (Integer r : result) {\n System.out.println(r);\n }\n\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "ArrayList<Integer> result = new ArrayList<>();", "result", "new ArrayList<>()", "for (int i = 0; i < N; i++) {\n result.add(0);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n result.add(0);\n }", "{\n result.add(0);\n }", "result.add(0)", "result.add", "result", "0", "for (int i = 0; i < N - 1; i++) {\n int tmp = scan.nextInt();\n result.set(tmp - 1, result.get(tmp - 1) + 1);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N - 1", "i", "N - 1", "N", "1", "i++", "i++", "i", "{\n int tmp = scan.nextInt();\n result.set(tmp - 1, result.get(tmp - 1) + 1);\n }", "{\n int tmp = scan.nextInt();\n result.set(tmp - 1, result.get(tmp - 1) + 1);\n }", "int tmp = scan.nextInt();", "tmp", "scan.nextInt()", "scan.nextInt", "scan", "result.set(tmp - 1, result.get(tmp - 1) + 1)", "result.set", "result", "tmp - 1", "tmp", "1", "result.get(tmp - 1) + 1", "result.get(tmp - 1)", "result.get", "result", "tmp - 1", "tmp", "1", "1", "for (Integer r : result) {\n System.out.println(r);\n }", "Integer r", "result", "{\n System.out.println(r);\n }", "{\n System.out.println(r);\n }", "System.out.println(r)", "System.out.println", "System.out", "System", "System.out", "r", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n\n ArrayList<Integer> result = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n result.add(0);\n }\n for (int i = 0; i < N - 1; i++) {\n int tmp = scan.nextInt();\n result.set(tmp - 1, result.get(tmp - 1) + 1);\n }\n\n for (Integer r : result) {\n System.out.println(r);\n }\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n int N = scan.nextInt();\n\n ArrayList<Integer> result = new ArrayList<>();\n for (int i = 0; i < N; i++) {\n result.add(0);\n }\n for (int i = 0; i < N - 1; i++) {\n int tmp = scan.nextInt();\n result.set(tmp - 1, result.get(tmp - 1) + 1);\n }\n\n for (Integer r : result) {\n System.out.println(r);\n }\n\n }\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); ArrayList<Integer> result = new ArrayList<>(); for (int i = 0; i < N; i++) { result.add(0); } for (int i = 0; i < N - 1; i++) { int tmp = scan.nextInt(); result.set(tmp - 1, result.get(tmp - 1) + 1); } for (Integer r : result) { System.out.println(r); } } }
[ 7, 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, 2, 4, 18, 13, 18, 13, 13, 17, 0, 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 ], [ 86, 5 ], [ 86, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 22, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 32, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 53, 55 ], [ 49, 56 ], [ 46, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 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 ], [ 0, 85 ], [ 85, 86 ], [ 85, 87 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] main) {\n Scanner input = new Scanner(System.in);\n int n = Integer.parseInt(input.nextLine());\n String[] ss = input.nextLine().split(\" \");\n int[] xs = new int[n];\n for (int i = 0; i < n-1; i++) {\n int x = Integer.parseInt(ss[i]) - 1;\n xs[x] += 1;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(xs[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] main) {\n Scanner input = new Scanner(System.in);\n int n = Integer.parseInt(input.nextLine());\n String[] ss = input.nextLine().split(\" \");\n int[] xs = new int[n];\n for (int i = 0; i < n-1; i++) {\n int x = Integer.parseInt(ss[i]) - 1;\n xs[x] += 1;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(xs[i]);\n }\n }\n}", "Main", "public static void main(String[] main) {\n Scanner input = new Scanner(System.in);\n int n = Integer.parseInt(input.nextLine());\n String[] ss = input.nextLine().split(\" \");\n int[] xs = new int[n];\n for (int i = 0; i < n-1; i++) {\n int x = Integer.parseInt(ss[i]) - 1;\n xs[x] += 1;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(xs[i]);\n }\n }", "main", "{\n Scanner input = new Scanner(System.in);\n int n = Integer.parseInt(input.nextLine());\n String[] ss = input.nextLine().split(\" \");\n int[] xs = new int[n];\n for (int i = 0; i < n-1; i++) {\n int x = Integer.parseInt(ss[i]) - 1;\n xs[x] += 1;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(xs[i]);\n }\n }", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "int n = Integer.parseInt(input.nextLine());", "n", "Integer.parseInt(input.nextLine())", "Integer.parseInt", "Integer", "input.nextLine()", "input.nextLine", "input", "String[] ss = input.nextLine().split(\" \");", "ss", "input.nextLine().split(\" \")", "input.nextLine().split", "input.nextLine()", "input.nextLine", "input", "\" \"", "int[] xs = new int[n];", "xs", "new int[n]", "n", "for (int i = 0; i < n-1; i++) {\n int x = Integer.parseInt(ss[i]) - 1;\n xs[x] += 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n int x = Integer.parseInt(ss[i]) - 1;\n xs[x] += 1;\n }", "{\n int x = Integer.parseInt(ss[i]) - 1;\n xs[x] += 1;\n }", "int x = Integer.parseInt(ss[i]) - 1;", "x", "Integer.parseInt(ss[i]) - 1", "Integer.parseInt(ss[i])", "Integer.parseInt", "Integer", "ss[i]", "ss", "i", "1", "xs[x] += 1", "xs[x]", "xs", "x", "1", "for (int i = 0; i < n; i++) {\n System.out.println(xs[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n System.out.println(xs[i]);\n }", "{\n System.out.println(xs[i]);\n }", "System.out.println(xs[i])", "System.out.println", "System.out", "System", "System.out", "xs[i]", "xs", "i", "String[] main", "main", "public class Main {\n public static void main(String[] main) {\n Scanner input = new Scanner(System.in);\n int n = Integer.parseInt(input.nextLine());\n String[] ss = input.nextLine().split(\" \");\n int[] xs = new int[n];\n for (int i = 0; i < n-1; i++) {\n int x = Integer.parseInt(ss[i]) - 1;\n xs[x] += 1;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(xs[i]);\n }\n }\n}", "public class Main {\n public static void main(String[] main) {\n Scanner input = new Scanner(System.in);\n int n = Integer.parseInt(input.nextLine());\n String[] ss = input.nextLine().split(\" \");\n int[] xs = new int[n];\n for (int i = 0; i < n-1; i++) {\n int x = Integer.parseInt(ss[i]) - 1;\n xs[x] += 1;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(xs[i]);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] main) { Scanner input = new Scanner(System.in); int n = Integer.parseInt(input.nextLine()); String[] ss = input.nextLine().split(" "); int[] xs = new int[n]; for (int i = 0; i < n-1; i++) { int x = Integer.parseInt(ss[i]) - 1; xs[x] += 1; } for (int i = 0; i < n; i++) { System.out.println(xs[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, 13, 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, 4, 18, 13, 2, 13, 17, 2, 4, 18, 13, 2, 13, 17, 17, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 99, 5 ], [ 99, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 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 ], [ 33, 36 ], [ 8, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 37, 47 ], [ 47, 48 ], [ 48, 49 ], [ 37, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 51, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 60, 62 ], [ 57, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 67, 68 ], [ 67, 69 ], [ 63, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 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 ], [ 93, 94 ], [ 92, 95 ], [ 6, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "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 List<Integer> ls = new ArrayList<Integer>(n);\n for (int i = 0; i < n; i++) {\n ls.add(0);\n }\n for (int i = 0; i < n - 1; i++) {\n int boss = sc.nextInt();\n ls.set(boss - 1, ls.get(boss - 1) + 1);\n }\n sc.close();\n for (int i = 0; i < n; i++) {\n System.out.println(ls.get(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 List<Integer> ls = new ArrayList<Integer>(n);\n for (int i = 0; i < n; i++) {\n ls.add(0);\n }\n for (int i = 0; i < n - 1; i++) {\n int boss = sc.nextInt();\n ls.set(boss - 1, ls.get(boss - 1) + 1);\n }\n sc.close();\n for (int i = 0; i < n; i++) {\n System.out.println(ls.get(i));\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n List<Integer> ls = new ArrayList<Integer>(n);\n for (int i = 0; i < n; i++) {\n ls.add(0);\n }\n for (int i = 0; i < n - 1; i++) {\n int boss = sc.nextInt();\n ls.set(boss - 1, ls.get(boss - 1) + 1);\n }\n sc.close();\n for (int i = 0; i < n; i++) {\n System.out.println(ls.get(i));\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n List<Integer> ls = new ArrayList<Integer>(n);\n for (int i = 0; i < n; i++) {\n ls.add(0);\n }\n for (int i = 0; i < n - 1; i++) {\n int boss = sc.nextInt();\n ls.set(boss - 1, ls.get(boss - 1) + 1);\n }\n sc.close();\n for (int i = 0; i < n; i++) {\n System.out.println(ls.get(i));\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "List<Integer> ls = new ArrayList<Integer>(n);", "ls", "new ArrayList<Integer>(n)", "for (int i = 0; i < n; i++) {\n ls.add(0);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n ls.add(0);\n }", "{\n ls.add(0);\n }", "ls.add(0)", "ls.add", "ls", "0", "for (int i = 0; i < n - 1; i++) {\n int boss = sc.nextInt();\n ls.set(boss - 1, ls.get(boss - 1) + 1);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "{\n int boss = sc.nextInt();\n ls.set(boss - 1, ls.get(boss - 1) + 1);\n }", "{\n int boss = sc.nextInt();\n ls.set(boss - 1, ls.get(boss - 1) + 1);\n }", "int boss = sc.nextInt();", "boss", "sc.nextInt()", "sc.nextInt", "sc", "ls.set(boss - 1, ls.get(boss - 1) + 1)", "ls.set", "ls", "boss - 1", "boss", "1", "ls.get(boss - 1) + 1", "ls.get(boss - 1)", "ls.get", "ls", "boss - 1", "boss", "1", "1", "sc.close()", "sc.close", "sc", "for (int i = 0; i < n; i++) {\n System.out.println(ls.get(i));\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n System.out.println(ls.get(i));\n }", "{\n System.out.println(ls.get(i));\n }", "System.out.println(ls.get(i))", "System.out.println", "System.out", "System", "System.out", "ls.get(i)", "ls.get", "ls", "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 List<Integer> ls = new ArrayList<Integer>(n);\n for (int i = 0; i < n; i++) {\n ls.add(0);\n }\n for (int i = 0; i < n - 1; i++) {\n int boss = sc.nextInt();\n ls.set(boss - 1, ls.get(boss - 1) + 1);\n }\n sc.close();\n for (int i = 0; i < n; i++) {\n System.out.println(ls.get(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 List<Integer> ls = new ArrayList<Integer>(n);\n for (int i = 0; i < n; i++) {\n ls.add(0);\n }\n for (int i = 0; i < n - 1; i++) {\n int boss = sc.nextInt();\n ls.set(boss - 1, ls.get(boss - 1) + 1);\n }\n sc.close();\n for (int i = 0; i < n; i++) {\n System.out.println(ls.get(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(); List<Integer> ls = new ArrayList<Integer>(n); for (int i = 0; i < n; i++) { ls.add(0); } for (int i = 0; i < n - 1; i++) { int boss = sc.nextInt(); ls.set(boss - 1, ls.get(boss - 1) + 1); } sc.close(); for (int i = 0; i < n; i++) { System.out.println(ls.get(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, 41, 13, 4, 18, 13, 13, 14, 2, 13, 17, 30, 0, 13, 17, 30, 40, 13, 4, 18, 13, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 13, 17, 30, 0, 13, 17, 30, 0, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 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 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 35, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 35, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 58, 62 ], [ 11, 63 ], [ 63, 64 ], [ 63, 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 ], [ 87, 89 ], [ 79, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 78, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 9, 103 ], [ 103, 104 ] ]
[ "import java.util.Scanner;\nimport java.util.HashMap;\n \nclass Main {\n\tpublic static void main(String[] args) {\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t HashMap<Integer, Integer> map = new HashMap<>();\n\t for (int i = 1; i < N; i++) {\n\t int temp = sc.nextInt();\n\t Integer count = map.get(temp);\n\t if (count == null) { count = 1;} else { count++;}\n\t \n\t map.put(temp, count);\n\t }\n\t \n\t int ans = 0;\n\t for (int j = 1; j <= N; j++) {\n\t if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}\n\t System.out.println(ans);\n\t }\n\t }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.HashMap;", "HashMap", "java.util", "class Main {\n\tpublic static void main(String[] args) {\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t HashMap<Integer, Integer> map = new HashMap<>();\n\t for (int i = 1; i < N; i++) {\n\t int temp = sc.nextInt();\n\t Integer count = map.get(temp);\n\t if (count == null) { count = 1;} else { count++;}\n\t \n\t map.put(temp, count);\n\t }\n\t \n\t int ans = 0;\n\t for (int j = 1; j <= N; j++) {\n\t if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}\n\t System.out.println(ans);\n\t }\n\t }\n}", "Main", "public static void main(String[] args) {\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t HashMap<Integer, Integer> map = new HashMap<>();\n\t for (int i = 1; i < N; i++) {\n\t int temp = sc.nextInt();\n\t Integer count = map.get(temp);\n\t if (count == null) { count = 1;} else { count++;}\n\t \n\t map.put(temp, count);\n\t }\n\t \n\t int ans = 0;\n\t for (int j = 1; j <= N; j++) {\n\t if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}\n\t System.out.println(ans);\n\t }\n\t }", "main", "{\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t HashMap<Integer, Integer> map = new HashMap<>();\n\t for (int i = 1; i < N; i++) {\n\t int temp = sc.nextInt();\n\t Integer count = map.get(temp);\n\t if (count == null) { count = 1;} else { count++;}\n\t \n\t map.put(temp, count);\n\t }\n\t \n\t int ans = 0;\n\t for (int j = 1; j <= N; j++) {\n\t if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}\n\t System.out.println(ans);\n\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 int temp = sc.nextInt();\n\t Integer count = map.get(temp);\n\t if (count == null) { count = 1;} else { count++;}\n\t \n\t map.put(temp, count);\n\t }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n\t int temp = sc.nextInt();\n\t Integer count = map.get(temp);\n\t if (count == null) { count = 1;} else { count++;}\n\t \n\t map.put(temp, count);\n\t }", "{\n\t int temp = sc.nextInt();\n\t Integer count = map.get(temp);\n\t if (count == null) { count = 1;} else { count++;}\n\t \n\t map.put(temp, count);\n\t }", "int temp = sc.nextInt();", "temp", "sc.nextInt()", "sc.nextInt", "sc", "Integer count = map.get(temp);", "count", "map.get(temp)", "map.get", "map", "temp", "if (count == null) { count = 1;} else { count++;}", "count == null", "count", "null", "{ count = 1;}", "count = 1", "count", "1", "{ count++;}", "count++", "count", "map.put(temp, count)", "map.put", "map", "temp", "count", "int ans = 0;", "ans", "0", "for (int j = 1; j <= N; j++) {\n\t if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}\n\t System.out.println(ans);\n\t }", "int j = 1;", "int j = 1;", "j", "1", "j <= N", "j", "N", "j++", "j++", "j", "{\n\t if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}\n\t System.out.println(ans);\n\t }", "{\n\t if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}\n\t System.out.println(ans);\n\t }", "if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);}", "map.get(j) == null", "map.get(j)", "map.get", "map", "j", "null", "{ ans = 0;}", "ans = 0", "ans", "0", "{ ans = map.get(j);}", "ans = map.get(j)", "ans", "map.get(j)", "map.get", "map", "j", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args" ]
import java.util.Scanner; import java.util.HashMap; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); HashMap<Integer, Integer> map = new HashMap<>(); for (int i = 1; i < N; i++) { int temp = sc.nextInt(); Integer count = map.get(temp); if (count == null) { count = 1;} else { count++;} map.put(temp, count); } int ans = 0; for (int j = 1; j <= N; j++) { if (map.get(j) == null) { ans = 0;} else { ans = map.get(j);} System.out.println(ans); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 13, 13, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 100, 8 ], [ 100, 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 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 76, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 76, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 9, 97 ], [ 97, 98 ], [ 0, 99 ], [ 99, 100 ], [ 99, 101 ] ]
[ "import java.util.HashMap;\nimport java.util.Scanner;\n\n\npublic class Main{\n\t\n\n\t\n\t\n\tpublic static void main(String[] args) {\n\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\t\n\t\tHashMap<Integer,Integer> h = new HashMap<>();\n\t\tfor(int i=1;i<n;i++) {\n\t\t\tint c = s.nextInt();\n\t\t\tif(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 1);\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\t\n\n\t\n\t\n\tpublic static void main(String[] args) {\n\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\t\n\t\tHashMap<Integer,Integer> h = new HashMap<>();\n\t\tfor(int i=1;i<n;i++) {\n\t\t\tint c = s.nextInt();\n\t\t\tif(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 1);\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\t\n\t\tHashMap<Integer,Integer> h = new HashMap<>();\n\t\tfor(int i=1;i<n;i++) {\n\t\t\tint c = s.nextInt();\n\t\t\tif(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 1);\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "main", "{\n\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\t\n\t\tHashMap<Integer,Integer> h = new HashMap<>();\n\t\tfor(int i=1;i<n;i++) {\n\t\t\tint c = s.nextInt();\n\t\t\tif(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 1);\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "int n = s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "HashMap<Integer,Integer> h = new HashMap<>();", "h", "new HashMap<>()", "for(int i=1;i<n;i++) {\n\t\t\tint c = s.nextInt();\n\t\t\tif(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 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 c = s.nextInt();\n\t\t\tif(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 1);\n\t\t\t}\n\t\t}", "{\n\t\t\tint c = s.nextInt();\n\t\t\tif(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 1);\n\t\t\t}\n\t\t}", "int c = s.nextInt();", "c", "s.nextInt()", "s.nextInt", "s", "if(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 1);\n\t\t\t}", "h.containsKey(c)", "h.containsKey", "h", "c", "{\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}", "h.put(c, h.get(c)+1)", "h.put", "h", "c", "h.get(c)+1", "h.get(c)", "h.get", "h", "c", "1", "{\n\t\t\t\th.put(c, 1);\n\t\t\t}", "h.put(c, 1)", "h.put", "h", "c", "1", "for(int i=1;i<=n;i++) {\n\t\t\tif(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\tif(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}\n\t\t}", "{\n\t\t\tif(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}\n\t\t}", "if(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}", "h.containsKey(i)", "h.containsKey", "h", "i", "System.out.println(h.get(i))", "System.out.println", "System.out", "System", "System.out", "h.get(i)", "h.get", "h", "i", "{\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", "String[] args", "args", "public class Main{\n\t\n\n\t\n\t\n\tpublic static void main(String[] args) {\n\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\t\n\t\tHashMap<Integer,Integer> h = new HashMap<>();\n\t\tfor(int i=1;i<n;i++) {\n\t\t\tint c = s.nextInt();\n\t\t\tif(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 1);\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}", "public class Main{\n\t\n\n\t\n\t\n\tpublic static void main(String[] args) {\n\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\t\n\t\tHashMap<Integer,Integer> h = new HashMap<>();\n\t\tfor(int i=1;i<n;i++) {\n\t\t\tint c = s.nextInt();\n\t\t\tif(h.containsKey(c)) {\n\t\t\t\th.put(c, h.get(c)+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\th.put(c, 1);\n\t\t\t}\n\t\t}\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tif(h.containsKey(i))\n\t\t\t\tSystem.out.println(h.get(i));\n\t\t\telse {\n\t\t\t\tSystem.out.println(0);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}", "Main" ]
import java.util.HashMap; import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner s = new Scanner(System.in); int n = s.nextInt(); HashMap<Integer,Integer> h = new HashMap<>(); for(int i=1;i<n;i++) { int c = s.nextInt(); if(h.containsKey(c)) { h.put(c, h.get(c)+1); } else { h.put(c, 1); } } for(int i=1;i<=n;i++) { if(h.containsKey(i)) System.out.println(h.get(i)); else { System.out.println(0); } } } }
[ 7, 15, 13, 17, 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, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 110, 8 ], [ 110, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 11, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 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 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 11, 49 ], [ 49, 50 ], [ 49, 51 ], [ 11, 52 ], [ 52, 53 ], [ 52, 54 ], [ 11, 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 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 69, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 77, 85 ], [ 11, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 91, 92 ], [ 91, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 86, 97 ], [ 98, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 104, 105 ], [ 104, 106 ], [ 9, 107 ], [ 107, 108 ], [ 0, 109 ], [ 109, 110 ], [ 109, 111 ] ]
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int total = sc.nextInt();\n int arr[] = new int[total];\n arr[0]= 0 ;\n\n for(int i=1;i<total;i++)\n {\n arr[i] = sc.nextInt();\n }\n int temp =0;\n //Arrays.sort(arr);\n int arrNew[] = new int[total];\n for(int i =1;i<total;i++)\n {\n arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;\n }\n\n for(int i=0;i<total;i++)\n {\n System.out.println(arrNew[i]);\n }\n\n\n\n\n }\n}", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int total = sc.nextInt();\n int arr[] = new int[total];\n arr[0]= 0 ;\n\n for(int i=1;i<total;i++)\n {\n arr[i] = sc.nextInt();\n }\n int temp =0;\n //Arrays.sort(arr);\n int arrNew[] = new int[total];\n for(int i =1;i<total;i++)\n {\n arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;\n }\n\n for(int i=0;i<total;i++)\n {\n System.out.println(arrNew[i]);\n }\n\n\n\n\n }\n}", "Main", "public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int total = sc.nextInt();\n int arr[] = new int[total];\n arr[0]= 0 ;\n\n for(int i=1;i<total;i++)\n {\n arr[i] = sc.nextInt();\n }\n int temp =0;\n //Arrays.sort(arr);\n int arrNew[] = new int[total];\n for(int i =1;i<total;i++)\n {\n arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;\n }\n\n for(int i=0;i<total;i++)\n {\n System.out.println(arrNew[i]);\n }\n\n\n\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int total = sc.nextInt();\n int arr[] = new int[total];\n arr[0]= 0 ;\n\n for(int i=1;i<total;i++)\n {\n arr[i] = sc.nextInt();\n }\n int temp =0;\n //Arrays.sort(arr);\n int arrNew[] = new int[total];\n for(int i =1;i<total;i++)\n {\n arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;\n }\n\n for(int i=0;i<total;i++)\n {\n System.out.println(arrNew[i]);\n }\n\n\n\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int total = sc.nextInt();", "total", "sc.nextInt()", "sc.nextInt", "sc", "int arr[] = new int[total];", "arr", "new int[total]", "total", "arr[0]= 0", "arr[0]", "arr", "0", "0", "for(int i=1;i<total;i++)\n {\n arr[i] = sc.nextInt();\n }", "int i=1;", "int i=1;", "i", "1", "i<total", "i", "total", "i++", "i++", "i", "{\n arr[i] = sc.nextInt();\n }", "{\n arr[i] = sc.nextInt();\n }", "arr[i] = sc.nextInt()", "arr[i]", "arr", "i", "sc.nextInt()", "sc.nextInt", "sc", "int temp =0;", "temp", "0", "int arrNew[] = new int[total];", "arrNew", "new int[total]", "total", "for(int i =1;i<total;i++)\n {\n arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;\n }", "int i =1;", "int i =1;", "i", "1", "i<total", "i", "total", "i++", "i++", "i", "{\n arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;\n }", "{\n arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;\n }", "arrNew[arr[i]-1] = arrNew[arr[i]-1]+1", "arrNew[arr[i]-1]", "arrNew", "arr[i]-1", "arr[i]", "arr", "i", "1", "arrNew[arr[i]-1]+1", "arrNew[arr[i]-1]", "arrNew", "arr[i]-1", "arr[i]", "arr", "i", "1", "1", "for(int i=0;i<total;i++)\n {\n System.out.println(arrNew[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<total", "i", "total", "i++", "i++", "i", "{\n System.out.println(arrNew[i]);\n }", "{\n System.out.println(arrNew[i]);\n }", "System.out.println(arrNew[i])", "System.out.println", "System.out", "System", "System.out", "arrNew[i]", "arrNew", "i", "String[] args", "args", "public class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int total = sc.nextInt();\n int arr[] = new int[total];\n arr[0]= 0 ;\n\n for(int i=1;i<total;i++)\n {\n arr[i] = sc.nextInt();\n }\n int temp =0;\n //Arrays.sort(arr);\n int arrNew[] = new int[total];\n for(int i =1;i<total;i++)\n {\n arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;\n }\n\n for(int i=0;i<total;i++)\n {\n System.out.println(arrNew[i]);\n }\n\n\n\n\n }\n}", "public class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int total = sc.nextInt();\n int arr[] = new int[total];\n arr[0]= 0 ;\n\n for(int i=1;i<total;i++)\n {\n arr[i] = sc.nextInt();\n }\n int temp =0;\n //Arrays.sort(arr);\n int arrNew[] = new int[total];\n for(int i =1;i<total;i++)\n {\n arrNew[arr[i]-1] = arrNew[arr[i]-1]+1;\n }\n\n for(int i=0;i<total;i++)\n {\n System.out.println(arrNew[i]);\n }\n\n\n\n\n }\n}", "Main" ]
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int total = sc.nextInt(); int arr[] = new int[total]; arr[0]= 0 ; for(int i=1;i<total;i++) { arr[i] = sc.nextInt(); } int temp =0; //Arrays.sort(arr); int arrNew[] = new int[total]; for(int i =1;i<total;i++) { arrNew[arr[i]-1] = arrNew[arr[i]-1]+1; } for(int i=0;i<total;i++) { System.out.println(arrNew[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, 2, 13, 17, 1, 40, 13, 30, 30, 41, 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 ]
[ [ 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 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 63, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 8, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 75, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 88, 93 ], [ 93, 94 ], [ 93, 95 ], [ 6, 96 ], [ 96, 97 ] ]
[ "import java.util.Scanner;\nclass Main{\n public static void main (String[] args){\n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int A[] = new int[N-1];\n int Count[] = new int[N];\n \n for(int i=0;i<N-1;i++){\n A[i] = sc.nextInt();\n }\n \n for(int i=0;i<N-1;i++){\n int x = A[i];\n Count[x-1]++;\n }\n \n for(int i=0;i<N;i++){\n System.out.println(Count[i]);\n }\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 \n int N = sc.nextInt();\n int A[] = new int[N-1];\n int Count[] = new int[N];\n \n for(int i=0;i<N-1;i++){\n A[i] = sc.nextInt();\n }\n \n for(int i=0;i<N-1;i++){\n int x = A[i];\n Count[x-1]++;\n }\n \n for(int i=0;i<N;i++){\n System.out.println(Count[i]);\n }\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 A[] = new int[N-1];\n int Count[] = new int[N];\n \n for(int i=0;i<N-1;i++){\n A[i] = sc.nextInt();\n }\n \n for(int i=0;i<N-1;i++){\n int x = A[i];\n Count[x-1]++;\n }\n \n for(int i=0;i<N;i++){\n System.out.println(Count[i]);\n }\n \n }", "main", "{\n Scanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n int A[] = new int[N-1];\n int Count[] = new int[N];\n \n for(int i=0;i<N-1;i++){\n A[i] = sc.nextInt();\n }\n \n for(int i=0;i<N-1;i++){\n int x = A[i];\n Count[x-1]++;\n }\n \n for(int i=0;i<N;i++){\n System.out.println(Count[i]);\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 A[] = new int[N-1];", "A", "new int[N-1]", "N-1", "N", "1", "int Count[] = new int[N];", "Count", "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", "for(int i=0;i<N-1;i++){\n int x = A[i];\n Count[x-1]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n int x = A[i];\n Count[x-1]++;\n }", "{\n int x = A[i];\n Count[x-1]++;\n }", "int x = A[i];", "x", "A[i]", "A", "i", "Count[x-1]++", "Count[x-1]", "Count", "x-1", "x", "1", "for(int i=0;i<N;i++){\n System.out.println(Count[i]);\n }", "int i=0;", "int i=0;", "i", "0", "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" ]
import java.util.Scanner; 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 Count[] = new int[N]; for(int i=0;i<N-1;i++){ A[i] = sc.nextInt(); } for(int i=0;i<N-1;i++){ int x = A[i]; Count[x-1]++; } for(int i=0;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, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 18, 13, 2, 13, 17, 2, 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 ], [ 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 ], [ 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 ], [ 44, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 50, 56 ], [ 8, 57 ], [ 57, 58 ], [ 57, 59 ], [ 57, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 6, 68 ], [ 68, 69 ], [ 0, 70 ], [ 70, 71 ], [ 70, 72 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint array[] = new int[n];\n\n\t\tint val = 0;\n\n\t\tfor (int l = 0; l < n-1; l++) {\n\t\t\tval = sc.nextInt();\n\t\t\tarray[val-1] = array[val-1]+1;\n\t\t}\n\n\t\tfor(int l:array) {\n\t\t\tSystem.out.println(l);\n\t\t}\n\n\t}\n\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint array[] = new int[n];\n\n\t\tint val = 0;\n\n\t\tfor (int l = 0; l < n-1; l++) {\n\t\t\tval = sc.nextInt();\n\t\t\tarray[val-1] = array[val-1]+1;\n\t\t}\n\n\t\tfor(int l:array) {\n\t\t\tSystem.out.println(l);\n\t\t}\n\n\t}\n\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint array[] = new int[n];\n\n\t\tint val = 0;\n\n\t\tfor (int l = 0; l < n-1; l++) {\n\t\t\tval = sc.nextInt();\n\t\t\tarray[val-1] = array[val-1]+1;\n\t\t}\n\n\t\tfor(int l:array) {\n\t\t\tSystem.out.println(l);\n\t\t}\n\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint array[] = new int[n];\n\n\t\tint val = 0;\n\n\t\tfor (int l = 0; l < n-1; l++) {\n\t\t\tval = sc.nextInt();\n\t\t\tarray[val-1] = array[val-1]+1;\n\t\t}\n\n\t\tfor(int l:array) {\n\t\t\tSystem.out.println(l);\n\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int array[] = new int[n];", "array", "new int[n]", "n", "int val = 0;", "val", "0", "for (int l = 0; l < n-1; l++) {\n\t\t\tval = sc.nextInt();\n\t\t\tarray[val-1] = array[val-1]+1;\n\t\t}", "int l = 0;", "int l = 0;", "l", "0", "l < n-1", "l", "n-1", "n", "1", "l++", "l++", "l", "{\n\t\t\tval = sc.nextInt();\n\t\t\tarray[val-1] = array[val-1]+1;\n\t\t}", "{\n\t\t\tval = sc.nextInt();\n\t\t\tarray[val-1] = array[val-1]+1;\n\t\t}", "val = sc.nextInt()", "val", "sc.nextInt()", "sc.nextInt", "sc", "array[val-1] = array[val-1]+1", "array[val-1]", "array", "val-1", "val", "1", "array[val-1]+1", "array[val-1]", "array", "val-1", "val", "1", "1", "for(int l:array) {\n\t\t\tSystem.out.println(l);\n\t\t}", "int l", "array", "{\n\t\t\tSystem.out.println(l);\n\t\t}", "{\n\t\t\tSystem.out.println(l);\n\t\t}", "System.out.println(l)", "System.out.println", "System.out", "System", "System.out", "l", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint array[] = new int[n];\n\n\t\tint val = 0;\n\n\t\tfor (int l = 0; l < n-1; l++) {\n\t\t\tval = sc.nextInt();\n\t\t\tarray[val-1] = array[val-1]+1;\n\t\t}\n\n\t\tfor(int l:array) {\n\t\t\tSystem.out.println(l);\n\t\t}\n\n\t}\n\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint array[] = new int[n];\n\n\t\tint val = 0;\n\n\t\tfor (int l = 0; l < n-1; l++) {\n\t\t\tval = sc.nextInt();\n\t\t\tarray[val-1] = array[val-1]+1;\n\t\t}\n\n\t\tfor(int l:array) {\n\t\t\tSystem.out.println(l);\n\t\t}\n\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 array[] = new int[n]; int val = 0; for (int l = 0; l < n-1; l++) { val = sc.nextInt(); array[val-1] = array[val-1]+1; } for(int l:array) { System.out.println(l); } } }
[ 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, 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 ], [ 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 ], [ 6, 85 ], [ 85, 86 ], [ 0, 87 ], [ 87, 88 ], [ 87, 89 ] ]
[ "import java.util.*;\n \npublic class Main {\n \n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n int n=s.nextInt();\n int []a=new int[200010];\n int []ar=new int[200010];\n for(int i=2;i<=n;i++)\n {\n a[i]=s.nextInt();\n }\n for(int i=2;i<=n;i++)\n {\n ar[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n System.out.println(ar[i]);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n \n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n int n=s.nextInt();\n int []a=new int[200010];\n int []ar=new int[200010];\n for(int i=2;i<=n;i++)\n {\n a[i]=s.nextInt();\n }\n for(int i=2;i<=n;i++)\n {\n ar[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n System.out.println(ar[i]);\n }\n }\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n int n=s.nextInt();\n int []a=new int[200010];\n int []ar=new int[200010];\n for(int i=2;i<=n;i++)\n {\n a[i]=s.nextInt();\n }\n for(int i=2;i<=n;i++)\n {\n ar[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n System.out.println(ar[i]);\n }\n }", "main", "{\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n int n=s.nextInt();\n int []a=new int[200010];\n int []ar=new int[200010];\n for(int i=2;i<=n;i++)\n {\n a[i]=s.nextInt();\n }\n for(int i=2;i<=n;i++)\n {\n ar[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n System.out.println(ar[i]);\n }\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[200010];", "a", "new int[200010]", "200010", "int []ar=new int[200010];", "ar", "new int[200010]", "200010", "for(int i=2;i<=n;i++)\n {\n a[i]=s.nextInt();\n }", "int i=2;", "int i=2;", "i", "2", "i<=n", "i", "n", "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", "for(int i=2;i<=n;i++)\n {\n ar[a[i]]++;\n }", "int i=2;", "int i=2;", "i", "2", "i<=n", "i", "n", "i++", "i++", "i", "{\n ar[a[i]]++;\n }", "{\n ar[a[i]]++;\n }", "ar[a[i]]++", "ar[a[i]]", "ar", "a[i]", "a", "i", "for(int i=1;i<=n;i++)\n {\n System.out.println(ar[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n System.out.println(ar[i]);\n }", "{\n System.out.println(ar[i]);\n }", "System.out.println(ar[i])", "System.out.println", "System.out", "System", "System.out", "ar[i]", "ar", "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 s = new Scanner(System.in);\n int n=s.nextInt();\n int []a=new int[200010];\n int []ar=new int[200010];\n for(int i=2;i<=n;i++)\n {\n a[i]=s.nextInt();\n }\n for(int i=2;i<=n;i++)\n {\n ar[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n System.out.println(ar[i]);\n }\n }\n}", "public class Main {\n \n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner s = new Scanner(System.in);\n int n=s.nextInt();\n int []a=new int[200010];\n int []ar=new int[200010];\n for(int i=2;i<=n;i++)\n {\n a[i]=s.nextInt();\n }\n for(int i=2;i<=n;i++)\n {\n ar[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n System.out.println(ar[i]);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner s = new Scanner(System.in); int n=s.nextInt(); int []a=new int[200010]; int []ar=new int[200010]; for(int i=2;i<=n;i++) { a[i]=s.nextInt(); } for(int i=2;i<=n;i++) { ar[a[i]]++; } for(int i=1;i<=n;i++) { System.out.println(ar[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 2, 4, 18, 13, 17, 40, 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 ], [ 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, 21 ], [ 21, 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 ], [ 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 ], [ 6, 60 ], [ 60, 61 ], [ 0, 62 ], [ 62, 63 ], [ 62, 64 ] ]
[ "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[] emp = new int[N];\n\t\tint A;\n\t\tfor(int i = 2 ; i < N + 1; i++) {\n\t\t\tA = sc.nextInt() -1;\n\t\t\temp[A]++; \n\t\t} \n\t\tfor(int res : emp) {\n\t\t\tSystem.out.println(res);\n\t\t}\n\t}\n\t\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[] emp = new int[N];\n\t\tint A;\n\t\tfor(int i = 2 ; i < N + 1; i++) {\n\t\t\tA = sc.nextInt() -1;\n\t\t\temp[A]++; \n\t\t} \n\t\tfor(int res : emp) {\n\t\t\tSystem.out.println(res);\n\t\t}\n\t}\n\t\n}", "Main", "public static void main(String[] args) {\n\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] emp = new int[N];\n\t\tint A;\n\t\tfor(int i = 2 ; i < N + 1; i++) {\n\t\t\tA = sc.nextInt() -1;\n\t\t\temp[A]++; \n\t\t} \n\t\tfor(int res : emp) {\n\t\t\tSystem.out.println(res);\n\t\t}\n\t}", "main", "{\n\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] emp = new int[N];\n\t\tint A;\n\t\tfor(int i = 2 ; i < N + 1; i++) {\n\t\t\tA = sc.nextInt() -1;\n\t\t\temp[A]++; \n\t\t} \n\t\tfor(int res : emp) {\n\t\t\tSystem.out.println(res);\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[] emp = new int[N];", "emp", "new int[N]", "N", "int A;", "A", "for(int i = 2 ; i < N + 1; i++) {\n\t\t\tA = sc.nextInt() -1;\n\t\t\temp[A]++; \n\t\t}", "int i = 2 ;", "int i = 2 ;", "i", "2", "i < N + 1", "i", "N + 1", "N", "1", "i++", "i++", "i", "{\n\t\t\tA = sc.nextInt() -1;\n\t\t\temp[A]++; \n\t\t}", "{\n\t\t\tA = sc.nextInt() -1;\n\t\t\temp[A]++; \n\t\t}", "A = sc.nextInt() -1", "A", "sc.nextInt() -1", "sc.nextInt()", "sc.nextInt", "sc", "1", "emp[A]++", "emp[A]", "emp", "A", "for(int res : emp) {\n\t\t\tSystem.out.println(res);\n\t\t}", "int res", "emp", "{\n\t\t\tSystem.out.println(res);\n\t\t}", "{\n\t\t\tSystem.out.println(res);\n\t\t}", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "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[] emp = new int[N];\n\t\tint A;\n\t\tfor(int i = 2 ; i < N + 1; i++) {\n\t\t\tA = sc.nextInt() -1;\n\t\t\temp[A]++; \n\t\t} \n\t\tfor(int res : emp) {\n\t\t\tSystem.out.println(res);\n\t\t}\n\t}\n\t\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] emp = new int[N];\n\t\tint A;\n\t\tfor(int i = 2 ; i < N + 1; i++) {\n\t\t\tA = sc.nextInt() -1;\n\t\t\temp[A]++; \n\t\t} \n\t\tfor(int res : emp) {\n\t\t\tSystem.out.println(res);\n\t\t}\n\t}\n\t\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] emp = new int[N]; int A; for(int i = 2 ; i < N + 1; i++) { A = sc.nextInt() -1; emp[A]++; } for(int res : emp) { System.out.println(res); } } }
[ 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, 2, 4, 18, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 2, 13, 17, 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, 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 ], [ 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 ], [ 38, 42 ], [ 8, 43 ], [ 43, 44 ], [ 43, 45 ], [ 8, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 47, 54 ], [ 54, 55 ], [ 54, 56 ], [ 47, 57 ], [ 57, 58 ], [ 58, 59 ], [ 47, 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.*;\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 = 1; i < N; i++) {\n\t\t\tA[i] = sc.nextInt() - 1;\n\t\t}\n\t\tint ans[] = new int[N];\n\t\tfor(int i = N - 1; i > 0; i--) {\n\t\t\tans[A[i]]++;\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}", "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];\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = sc.nextInt() - 1;\n\t\t}\n\t\tint ans[] = new int[N];\n\t\tfor(int i = N - 1; i > 0; i--) {\n\t\t\tans[A[i]]++;\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}", "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 = 1; i < N; i++) {\n\t\t\tA[i] = sc.nextInt() - 1;\n\t\t}\n\t\tint ans[] = new int[N];\n\t\tfor(int i = N - 1; i > 0; i--) {\n\t\t\tans[A[i]]++;\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\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int[N];\n\t\tfor(int i = 1; i < N; i++) {\n\t\t\tA[i] = sc.nextInt() - 1;\n\t\t}\n\t\tint ans[] = new int[N];\n\t\tfor(int i = N - 1; i > 0; i--) {\n\t\t\tans[A[i]]++;\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 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 = 1; i < N; i++) {\n\t\t\tA[i] = sc.nextInt() - 1;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tA[i] = sc.nextInt() - 1;\n\t\t}", "{\n\t\t\tA[i] = sc.nextInt() - 1;\n\t\t}", "A[i] = sc.nextInt() - 1", "A[i]", "A", "i", "sc.nextInt() - 1", "sc.nextInt()", "sc.nextInt", "sc", "1", "int ans[] = new int[N];", "ans", "new int[N]", "N", "for(int i = N - 1; i > 0; i--) {\n\t\t\tans[A[i]]++;\n\t\t}", "int i = N - 1;", "int i = N - 1;", "i", "N - 1", "N", "1", "i > 0", "i", "0", "i--", "i--", "i", "{\n\t\t\tans[A[i]]++;\n\t\t}", "{\n\t\t\tans[A[i]]++;\n\t\t}", "ans[A[i]]++", "ans[A[i]]", "ans", "A[i]", "A", "i", "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\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 = 1; i < N; i++) {\n\t\t\tA[i] = sc.nextInt() - 1;\n\t\t}\n\t\tint ans[] = new int[N];\n\t\tfor(int i = N - 1; i > 0; i--) {\n\t\t\tans[A[i]]++;\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}", "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 = 1; i < N; i++) {\n\t\t\tA[i] = sc.nextInt() - 1;\n\t\t}\n\t\tint ans[] = new int[N];\n\t\tfor(int i = N - 1; i > 0; i--) {\n\t\t\tans[A[i]]++;\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}", "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]; for(int i = 1; i < N; i++) { A[i] = sc.nextInt() - 1; } int ans[] = new int[N]; for(int i = N - 1; i > 0; i--) { ans[A[i]]++; } for(int i = 0; i < N; i++) { System.out.println(ans[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 17, 12, 13, 30, 41, 13, 20, 17, 41, 13, 20, 17, 41, 13, 4, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 11, 1, 41, 13, 17, 2, 13, 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, 13, 2, 18, 13, 13, 17, 12, 13, 30, 0, 13, 20, 0, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 17, 42, 2, 40, 13, 17, 4, 13, 4, 18, 13, 4, 18, 18, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 13, 4, 18, 18, 13, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 8, 2, 13, 17, 13, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 17, 13, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 17, 17, 2, 17, 4, 13, 2, 13, 2, 13, 17, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 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 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 13, 17 ], [ 17, 18 ], [ 13, 19 ], [ 19, 20 ], [ 19, 21 ], [ 13, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 24, 29 ], [ 29, 30 ], [ 29, 31 ], [ 24, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 24, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 37, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 24, 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 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 24, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 75, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 13, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 101, 103 ], [ 97, 104 ], [ 104, 105 ], [ 104, 106 ], [ 97, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 97, 112 ], [ 112, 113 ], [ 112, 114 ], [ 97, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 115, 120 ], [ 120, 121 ], [ 97, 122 ], [ 122, 123 ], [ 123, 124 ], [ 97, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 95, 130 ], [ 130, 131 ], [ 13, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 132, 139 ], [ 139, 140 ], [ 13, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 144, 147 ], [ 141, 148 ], [ 148, 149 ], [ 13, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 153, 156 ], [ 152, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 150, 162 ], [ 162, 163 ], [ 13, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 13, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 13, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 13, 185 ], [ 185, 186 ], [ 185, 187 ], [ 187, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 13, 192 ], [ 192, 193 ], [ 192, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 196, 200 ], [ 196, 201 ], [ 201, 202 ], [ 201, 203 ], [ 201, 204 ], [ 204, 205 ], [ 204, 206 ], [ 192, 207 ], [ 207, 208 ], [ 192, 209 ], [ 209, 210 ], [ 13, 211 ], [ 211, 212 ], [ 211, 213 ], [ 213, 214 ], [ 214, 215 ], [ 215, 216 ], [ 216, 217 ], [ 216, 218 ], [ 215, 219 ], [ 215, 220 ], [ 220, 221 ], [ 220, 222 ], [ 220, 223 ], [ 223, 224 ], [ 223, 225 ], [ 211, 226 ], [ 226, 227 ], [ 211, 228 ], [ 228, 229 ], [ 13, 230 ], [ 230, 231 ], [ 230, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 234, 238 ], [ 234, 239 ], [ 239, 240 ], [ 239, 241 ], [ 241, 242 ], [ 241, 243 ], [ 243, 244 ], [ 243, 245 ], [ 245, 246 ], [ 245, 247 ], [ 230, 248 ], [ 248, 249 ], [ 13, 250 ], [ 250, 251 ], [ 250, 252 ], [ 252, 253 ], [ 250, 254 ], [ 254, 255 ], [ 250, 256 ], [ 256, 257 ], [ 256, 258 ], [ 258, 259 ], [ 259, 260 ], [ 259, 261 ], [ 250, 262 ], [ 262, 263 ], [ 262, 264 ], [ 264, 265 ], [ 265, 266 ], [ 265, 267 ], [ 262, 268 ], [ 268, 269 ], [ 250, 270 ], [ 270, 271 ], [ 270, 272 ], [ 272, 273 ], [ 273, 274 ], [ 274, 275 ], [ 275, 276 ], [ 275, 277 ], [ 274, 278 ], [ 278, 279 ], [ 279, 280 ], [ 280, 281 ], [ 273, 282 ], [ 282, 283 ], [ 283, 284 ], [ 284, 285 ], [ 284, 286 ], [ 286, 287 ], [ 287, 288 ], [ 288, 289 ], [ 283, 290 ], [ 290, 291 ], [ 291, 292 ], [ 291, 293 ], [ 272, 294 ], [ 294, 295 ], [ 295, 296 ], [ 296, 297 ], [ 250, 298 ], [ 298, 299 ], [ 298, 300 ], [ 300, 301 ], [ 301, 302 ], [ 302, 303 ], [ 303, 304 ], [ 302, 305 ], [ 305, 306 ], [ 250, 307 ], [ 307, 308 ], [ 307, 309 ], [ 309, 310 ], [ 310, 311 ], [ 311, 312 ], [ 312, 313 ], [ 311, 314 ], [ 314, 315 ], [ 250, 316 ], [ 316, 317 ], [ 316, 318 ], [ 318, 319 ], [ 319, 320 ], [ 320, 321 ], [ 321, 322 ], [ 320, 323 ], [ 323, 324 ], [ 250, 325 ], [ 325, 326 ], [ 325, 327 ], [ 327, 328 ], [ 328, 329 ], [ 328, 330 ], [ 327, 331 ], [ 331, 332 ], [ 332, 333 ], [ 332, 334 ], [ 334, 335 ], [ 335, 336 ], [ 336, 337 ], [ 331, 338 ], [ 338, 339 ], [ 339, 340 ], [ 339, 341 ], [ 341, 342 ], [ 342, 343 ], [ 327, 344 ], [ 344, 345 ] ]
[ " \nimport java.util.*;import java.io.*;import java.math.*;import java.lang.*;\n\n\n\n\nclass Main\n{\n\n \n public static void process()throws IOException\n {\n\n int a[] = new int[200010];\n int ans[] = new int[200010];\n int n = ni();\n for(int i=2;i<=n;i++)\n {\n a[i]=ni();\n }\n for(int i=2;i<=n;i++)\n {\n ans[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n pn(ans[i]+\" \");\n }\n \n\n\n \n\n \n\n\n } \n\n \n \n \n\n\n\n\n static AnotherReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n\n // oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n // if(!oj) sc=new AnotherReader(100);\n\n long s = System.currentTimeMillis();\n int t=1;//test cases\n while(t-->0)\n process();\n out.flush();\n // if(!oj)\n // System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }\n\n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static void pni(Object o){out.println(o);System.out.flush();}\n static int ni()throws IOException{return sc.nextInt();}\n static long nl()throws IOException{return sc.nextLong();}\n static double nd()throws IOException{return sc.nextDouble();}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n static boolean multipleTC=false;\n\n\n\n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n static class AnotherReader\n {\n BufferedReader br; StringTokenizer st;\n AnotherReader()throws FileNotFoundException\n {\n br=new BufferedReader(new InputStreamReader(System.in));\n }\n AnotherReader(int a)throws FileNotFoundException\n {\n br = new BufferedReader(new FileReader(\"input.txt\"));\n }\n String next()throws IOException\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 int nextInt() throws IOException\n {\n return Integer.parseInt(next());\n }\n long nextLong() throws IOException\n { \n return Long.parseLong(next());\n }\n double nextDouble()throws IOException \n { \n return Double.parseDouble(next()); \n }\n String nextLine() throws IOException\n { \n String str = \"\"; \n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n } return str;\n }\n }\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}\n \n \n \n ", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "import java.math.*;", "math.*", "java", "import java.lang.*;", "lang.*", "java", "class Main\n{\n\n \n public static void process()throws IOException\n {\n\n int a[] = new int[200010];\n int ans[] = new int[200010];\n int n = ni();\n for(int i=2;i<=n;i++)\n {\n a[i]=ni();\n }\n for(int i=2;i<=n;i++)\n {\n ans[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n pn(ans[i]+\" \");\n }\n \n\n\n \n\n \n\n\n } \n\n \n \n \n\n\n\n\n static AnotherReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n\n // oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n // if(!oj) sc=new AnotherReader(100);\n\n long s = System.currentTimeMillis();\n int t=1;//test cases\n while(t-->0)\n process();\n out.flush();\n // if(!oj)\n // System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }\n\n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static void pni(Object o){out.println(o);System.out.flush();}\n static int ni()throws IOException{return sc.nextInt();}\n static long nl()throws IOException{return sc.nextLong();}\n static double nd()throws IOException{return sc.nextDouble();}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n static boolean multipleTC=false;\n\n\n\n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n static class AnotherReader\n {\n BufferedReader br; StringTokenizer st;\n AnotherReader()throws FileNotFoundException\n {\n br=new BufferedReader(new InputStreamReader(System.in));\n }\n AnotherReader(int a)throws FileNotFoundException\n {\n br = new BufferedReader(new FileReader(\"input.txt\"));\n }\n String next()throws IOException\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 int nextInt() throws IOException\n {\n return Integer.parseInt(next());\n }\n long nextLong() throws IOException\n { \n return Long.parseLong(next());\n }\n double nextDouble()throws IOException \n { \n return Double.parseDouble(next()); \n }\n String nextLine() throws IOException\n { \n String str = \"\"; \n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n } return str;\n }\n }\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}", "Main", "static AnotherReader sc;", "sc", "static PrintWriter out;", "out", "static boolean multipleTC=false;", "multipleTC", "false", "public static void process()throws IOException\n {\n\n int a[] = new int[200010];\n int ans[] = new int[200010];\n int n = ni();\n for(int i=2;i<=n;i++)\n {\n a[i]=ni();\n }\n for(int i=2;i<=n;i++)\n {\n ans[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n pn(ans[i]+\" \");\n }\n \n\n\n \n\n \n\n\n }", "process", "{\n\n int a[] = new int[200010];\n int ans[] = new int[200010];\n int n = ni();\n for(int i=2;i<=n;i++)\n {\n a[i]=ni();\n }\n for(int i=2;i<=n;i++)\n {\n ans[a[i]]++;\n }\n for(int i=1;i<=n;i++)\n {\n pn(ans[i]+\" \");\n }\n \n\n\n \n\n \n\n\n }", "int a[] = new int[200010];", "a", "new int[200010]", "200010", "int ans[] = new int[200010];", "ans", "new int[200010]", "200010", "int n = ni();", "n", "ni()", "ni", "for(int i=2;i<=n;i++)\n {\n a[i]=ni();\n }", "int i=2;", "int i=2;", "i", "2", "i<=n", "i", "n", "i++", "i++", "i", "{\n a[i]=ni();\n }", "{\n a[i]=ni();\n }", "a[i]=ni()", "a[i]", "a", "i", "ni()", "ni", "for(int i=2;i<=n;i++)\n {\n ans[a[i]]++;\n }", "int i=2;", "int i=2;", "i", "2", "i<=n", "i", "n", "i++", "i++", "i", "{\n ans[a[i]]++;\n }", "{\n ans[a[i]]++;\n }", "ans[a[i]]++", "ans[a[i]]", "ans", "a[i]", "a", "i", "for(int i=1;i<=n;i++)\n {\n pn(ans[i]+\" \");\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n pn(ans[i]+\" \");\n }", "{\n pn(ans[i]+\" \");\n }", "pn(ans[i]+\" \")", "pn", "ans[i]+\" \"", "ans[i]", "ans", "i", "\" \"", "public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n\n // oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n // if(!oj) sc=new AnotherReader(100);\n\n long s = System.currentTimeMillis();\n int t=1;//test cases\n while(t-->0)\n process();\n out.flush();\n // if(!oj)\n // System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }", "main", "{\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n\n // oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n // if(!oj) sc=new AnotherReader(100);\n\n long s = System.currentTimeMillis();\n int t=1;//test cases\n while(t-->0)\n process();\n out.flush();\n // if(!oj)\n // System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "sc=new AnotherReader()", "sc", "new AnotherReader()", "boolean oj = true;", "oj", "true", "long s = System.currentTimeMillis();", "s", "System.currentTimeMillis()", "System.currentTimeMillis", "System", "int t=1;", "t", "1", "while(t-->0)\n process();", "t-->0", "t--", "t", "0", "process()", "process", "out.flush()", "out.flush", "out", "System.out.close()", "System.out.close", "System.out", "System", "System.out", "String[]args", "args", "static void pn(Object o){out.println(o);}", "pn", "{out.println(o);}", "out.println(o)", "out.println", "out", "o", "Object o", "o", "static void p(Object o){out.print(o);}", "p", "{out.print(o);}", "out.print(o)", "out.print", "out", "o", "Object o", "o", "static void pni(Object o){out.println(o);System.out.flush();}", "pni", "{out.println(o);System.out.flush();}", "out.println(o)", "out.println", "out", "o", "System.out.flush()", "System.out.flush", "System.out", "System", "System.out", "Object o", "o", "static int ni()throws IOException{return sc.nextInt();}", "ni", "{return sc.nextInt();}", "return sc.nextInt();", "sc.nextInt()", "sc.nextInt", "sc", "static long nl()throws IOException{return sc.nextLong();}", "nl", "{return sc.nextLong();}", "return sc.nextLong();", "sc.nextLong()", "sc.nextLong", "sc", "static double nd()throws IOException{return sc.nextDouble();}", "nd", "{return sc.nextDouble();}", "return sc.nextDouble();", "sc.nextDouble()", "sc.nextDouble", "sc", "static String nln()throws IOException{return sc.nextLine();}", "nln", "{return sc.nextLine();}", "return sc.nextLine();", "sc.nextLine()", "sc.nextLine", "sc", "static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}", "gcd", "{return (b==0)?a:gcd(b,a%b);}", "return (b==0)?a:gcd(b,a%b);", "(b==0)?a:gcd(b,a%b)", "(b==0)", "b", "0", "a", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "long a", "a", "long b", "b", "static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}", "gcd", "{return (b==0)?a:gcd(b,a%b);}", "return (b==0)?a:gcd(b,a%b);", "(b==0)?a:gcd(b,a%b)", "(b==0)", "b", "0", "a", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}", "bit", "{return (n==0)?0:(1+bit(n&(n-1)));}", "return (n==0)?0:(1+bit(n&(n-1)));", "(n==0)?0:(1+bit(n&(n-1)))", "(n==0)", "n", "0", "0", "(1+bit(n&(n-1)))", "1", "bit(n&(n-1))", "bit", "n&(n-1)", "n", "(n-1)", "n", "1", "long n", "n", "static class AnotherReader\n {\n BufferedReader br; StringTokenizer st;\n AnotherReader()throws FileNotFoundException\n {\n br=new BufferedReader(new InputStreamReader(System.in));\n }\n AnotherReader(int a)throws FileNotFoundException\n {\n br = new BufferedReader(new FileReader(\"input.txt\"));\n }\n String next()throws IOException\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 int nextInt() throws IOException\n {\n return Integer.parseInt(next());\n }\n long nextLong() throws IOException\n { \n return Long.parseLong(next());\n }\n double nextDouble()throws IOException \n { \n return Double.parseDouble(next()); \n }\n String nextLine() throws IOException\n { \n String str = \"\"; \n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n } return str;\n }\n }", "AnotherReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "AnotherReader()throws FileNotFoundException\n {\n br=new BufferedReader(new InputStreamReader(System.in));\n }", "AnotherReader", "{\n br=new BufferedReader(new InputStreamReader(System.in));\n }", "br=new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "AnotherReader(int a)throws FileNotFoundException\n {\n br = new BufferedReader(new FileReader(\"input.txt\"));\n }", "AnotherReader", "{\n br = new BufferedReader(new FileReader(\"input.txt\"));\n }", "br = new BufferedReader(new FileReader(\"input.txt\"))", "br", "new BufferedReader(new FileReader(\"input.txt\"))", "int a", "a", "String next()throws IOException\n {\n while (st == null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace(); \n }\n }\n return st.nextToken(); \n }", "next", "{\n while (st == null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace(); \n }\n }\n return st.nextToken(); \n }", "while (st == null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace(); \n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace(); \n }\n }", "try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace(); \n }", "catch (IOException e)\n {\n e.printStackTrace(); \n }", "IOException e", "{\n e.printStackTrace(); \n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() throws IOException\n {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() throws IOException\n { \n return Long.parseLong(next());\n }", "nextLong", "{ \n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble()throws IOException \n { \n return Double.parseDouble(next()); \n }", "nextDouble", "{ \n return Double.parseDouble(next()); \n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() throws IOException\n { \n String str = \"\"; \n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\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 } 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" ]
import java.util.*;import java.io.*;import java.math.*;import java.lang.*; class Main { public static void process()throws IOException { int a[] = new int[200010]; int ans[] = new int[200010]; int n = ni(); for(int i=2;i<=n;i++) { a[i]=ni(); } for(int i=2;i<=n;i++) { ans[a[i]]++; } for(int i=1;i<=n;i++) { pn(ans[i]+" "); } } static AnotherReader sc; static PrintWriter out; public static void main(String[]args)throws IOException { out = new PrintWriter(System.out); sc=new AnotherReader(); boolean oj = true; // oj = System.getProperty("ONLINE_JUDGE") != null; // if(!oj) sc=new AnotherReader(100); long s = System.currentTimeMillis(); int t=1;//test cases while(t-->0) process(); out.flush(); // if(!oj) // System.out.println(System.currentTimeMillis()-s+"ms"); System.out.close(); } static void pn(Object o){out.println(o);} static void p(Object o){out.print(o);} static void pni(Object o){out.println(o);System.out.flush();} static int ni()throws IOException{return sc.nextInt();} static long nl()throws IOException{return sc.nextLong();} static double nd()throws IOException{return sc.nextDouble();} static String nln()throws IOException{return sc.nextLine();} static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);} static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);} static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));} static boolean multipleTC=false; ///////////////////////////////////////////////////////////////////////////////////////////////////////// static class AnotherReader { BufferedReader br; StringTokenizer st; AnotherReader()throws FileNotFoundException { br=new BufferedReader(new InputStreamReader(System.in)); } AnotherReader(int a)throws FileNotFoundException { br = new BufferedReader(new FileReader("input.txt")); } String next()throws IOException { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() throws IOException { return Integer.parseInt(next()); } long nextLong() throws IOException { return Long.parseLong(next()); } double nextDouble()throws IOException { return Double.parseDouble(next()); } String nextLine() throws IOException { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// }
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 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, 13, 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 133, 5 ], [ 133, 6 ], [ 6, 7 ], [ 133, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 10, 18 ], [ 18, 19 ], [ 18, 20 ], [ 21, 22 ], [ 21, 23 ], [ 10, 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 ], [ 39, 43 ], [ 43, 44 ], [ 10, 45 ], [ 45, 46 ], [ 45, 47 ], [ 10, 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 ], [ 68, 70 ], [ 67, 71 ], [ 10, 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 ], [ 133, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 133, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 110, 111 ], [ 133, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 119, 120 ], [ 120, 121 ], [ 133, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 129, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner scanner;\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int n=gi();\n\t int[] a= new int[n-1];\n\t \n\t for (int i=0; i<n-1; i++) {\n\t \ta[i]=gi();\n\t }\n\t \n\t int[] b=new int[n];\n\t for (int i=0; i<n-1; i++) {\n\t \tb[a[i] - 1]++;\n\t }\n\n\t for (int i=0; i<n; i++) {\n\t \tSystem.out.println(b[i]);\n\t }\n //System.out.println(Math.pow(l/3, 3));\n// if (a<b) {\n// \tSystem.out.print(Math.max(b-a-w, 0));\n// }else {\n// \tSystem.out.print(Math.max(a-b-w, 0));\n// }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tstatic Scanner scanner;\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int n=gi();\n\t int[] a= new int[n-1];\n\t \n\t for (int i=0; i<n-1; i++) {\n\t \ta[i]=gi();\n\t }\n\t \n\t int[] b=new int[n];\n\t for (int i=0; i<n-1; i++) {\n\t \tb[a[i] - 1]++;\n\t }\n\n\t for (int i=0; i<n; i++) {\n\t \tSystem.out.println(b[i]);\n\t }\n //System.out.println(Math.pow(l/3, 3));\n// if (a<b) {\n// \tSystem.out.print(Math.max(b-a-w, 0));\n// }else {\n// \tSystem.out.print(Math.max(a-b-w, 0));\n// }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "Main", "static Scanner scanner;", "scanner", "public static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int n=gi();\n\t int[] a= new int[n-1];\n\t \n\t for (int i=0; i<n-1; i++) {\n\t \ta[i]=gi();\n\t }\n\t \n\t int[] b=new int[n];\n\t for (int i=0; i<n-1; i++) {\n\t \tb[a[i] - 1]++;\n\t }\n\n\t for (int i=0; i<n; i++) {\n\t \tSystem.out.println(b[i]);\n\t }\n //System.out.println(Math.pow(l/3, 3));\n// if (a<b) {\n// \tSystem.out.print(Math.max(b-a-w, 0));\n// }else {\n// \tSystem.out.print(Math.max(a-b-w, 0));\n// }\n\n\n\t}", "main", "{\n\t scanner = new Scanner(System.in);\n\n\t int n=gi();\n\t int[] a= new int[n-1];\n\t \n\t for (int i=0; i<n-1; i++) {\n\t \ta[i]=gi();\n\t }\n\t \n\t int[] b=new int[n];\n\t for (int i=0; i<n-1; i++) {\n\t \tb[a[i] - 1]++;\n\t }\n\n\t for (int i=0; i<n; i++) {\n\t \tSystem.out.println(b[i]);\n\t }\n //System.out.println(Math.pow(l/3, 3));\n// if (a<b) {\n// \tSystem.out.print(Math.max(b-a-w, 0));\n// }else {\n// \tSystem.out.print(Math.max(a-b-w, 0));\n// }\n\n\n\t}", "scanner = new Scanner(System.in)", "scanner", "new Scanner(System.in)", "int n=gi();", "n", "gi()", "gi", "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 \ta[i]=gi();\n\t }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n\t \ta[i]=gi();\n\t }", "{\n\t \ta[i]=gi();\n\t }", "a[i]=gi()", "a[i]", "a", "i", "gi()", "gi", "int[] b=new int[n];", "b", "new int[n]", "n", "for (int i=0; i<n-1; i++) {\n\t \tb[a[i] - 1]++;\n\t }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n\t \tb[a[i] - 1]++;\n\t }", "{\n\t \tb[a[i] - 1]++;\n\t }", "b[a[i] - 1]++", "b[a[i] - 1]", "b", "a[i] - 1", "a[i]", "a", "i", "1", "for (int i=0; i<n; i++) {\n\t \tSystem.out.println(b[i]);\n\t }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t \tSystem.out.println(b[i]);\n\t }", "{\n\t \tSystem.out.println(b[i]);\n\t }", "System.out.println(b[i])", "System.out.println", "System.out", "System", "System.out", "b[i]", "b", "i", "String[] args", "args", "// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}", "gs", "{\n\t\treturn scanner.next();\n\t}", "return scanner.next();", "scanner.next()", "scanner.next", "scanner", "// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}", "gi", "{\n\t\treturn Integer.parseInt(scanner.next());\n\t}", "return Integer.parseInt(scanner.next());", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}", "gl", "{\n\t\treturn Long.parseLong(scanner.next());\n\t}", "return Long.parseLong(scanner.next());", "Long.parseLong(scanner.next())", "Long.parseLong", "Long", "scanner.next()", "scanner.next", "scanner", "// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}", "gd", "{\n\t\treturn Double.parseDouble(scanner.next());\n\t}", "return Double.parseDouble(scanner.next());", "Double.parseDouble(scanner.next())", "Double.parseDouble", "Double", "scanner.next()", "scanner.next", "scanner", "public class Main {\n\n\tstatic Scanner scanner;\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int n=gi();\n\t int[] a= new int[n-1];\n\t \n\t for (int i=0; i<n-1; i++) {\n\t \ta[i]=gi();\n\t }\n\t \n\t int[] b=new int[n];\n\t for (int i=0; i<n-1; i++) {\n\t \tb[a[i] - 1]++;\n\t }\n\n\t for (int i=0; i<n; i++) {\n\t \tSystem.out.println(b[i]);\n\t }\n //System.out.println(Math.pow(l/3, 3));\n// if (a<b) {\n// \tSystem.out.print(Math.max(b-a-w, 0));\n// }else {\n// \tSystem.out.print(Math.max(a-b-w, 0));\n// }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "public class Main {\n\n\tstatic Scanner scanner;\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t int n=gi();\n\t int[] a= new int[n-1];\n\t \n\t for (int i=0; i<n-1; i++) {\n\t \ta[i]=gi();\n\t }\n\t \n\t int[] b=new int[n];\n\t for (int i=0; i<n-1; i++) {\n\t \tb[a[i] - 1]++;\n\t }\n\n\t for (int i=0; i<n; i++) {\n\t \tSystem.out.println(b[i]);\n\t }\n //System.out.println(Math.pow(l/3, 3));\n// if (a<b) {\n// \tSystem.out.print(Math.max(b-a-w, 0));\n// }else {\n// \tSystem.out.print(Math.max(a-b-w, 0));\n// }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { static Scanner scanner; public static void main(String[] args) { scanner = new Scanner(System.in); int n=gi(); int[] a= new int[n-1]; for (int i=0; i<n-1; i++) { a[i]=gi(); } int[] b=new int[n]; for (int i=0; i<n-1; i++) { b[a[i] - 1]++; } for (int i=0; i<n; i++) { System.out.println(b[i]); } //System.out.println(Math.pow(l/3, 3)); // if (a<b) { // System.out.print(Math.max(b-a-w, 0)); // }else { // System.out.print(Math.max(a-b-w, 0)); // } } // 文字列として入力を取得 public static String gs() { return scanner.next(); } // intとして入力を取得 public static int gi() { return Integer.parseInt(scanner.next()); } // longとして入力を取得 public static long gl() { return Long.parseLong(scanner.next()); } // doubleとして入力を取得 public static double gd() { return Double.parseDouble(scanner.next()); } }
[ 7, 15, 13, 17, 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, 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, 2, 18, 13, 13, 17, 2, 17, 4, 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, 4, 18, 13, 13, 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 ], [ 108, 11 ], [ 108, 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 ], [ 14, 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 ], [ 14, 47 ], [ 47, 48 ], [ 47, 49 ], [ 14, 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 ], [ 63, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 63, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 73, 81 ], [ 14, 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 ], [ 101, 102 ], [ 100, 103 ], [ 100, 104 ], [ 12, 105 ], [ 105, 106 ], [ 0, 107 ], [ 107, 108 ], [ 107, 109 ] ]
[ "import java.util.*;\nimport java.math.*;\nimport java.io.*;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] arr= new int[n];\n\t\tfor(int qq=1; qq<n; qq++){\n\t\t\tarr[qq] = in.nextInt();\n\t\t}\n\t\tHashMap<Integer, Integer> mp = new HashMap<>();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tmp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tSystem.out.println(mp.getOrDefault(i, 0));\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.math.*;", "math.*", "java", "import java.io.*;", "io.*", "java", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] arr= new int[n];\n\t\tfor(int qq=1; qq<n; qq++){\n\t\t\tarr[qq] = in.nextInt();\n\t\t}\n\t\tHashMap<Integer, Integer> mp = new HashMap<>();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tmp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tSystem.out.println(mp.getOrDefault(i, 0));\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] arr= new int[n];\n\t\tfor(int qq=1; qq<n; qq++){\n\t\t\tarr[qq] = in.nextInt();\n\t\t}\n\t\tHashMap<Integer, Integer> mp = new HashMap<>();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tmp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tSystem.out.println(mp.getOrDefault(i, 0));\n\t\t}\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] arr= new int[n];\n\t\tfor(int qq=1; qq<n; qq++){\n\t\t\tarr[qq] = in.nextInt();\n\t\t}\n\t\tHashMap<Integer, Integer> mp = new HashMap<>();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tmp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tSystem.out.println(mp.getOrDefault(i, 0));\n\t\t}\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] arr= new int[n];", "arr", "new int[n]", "n", "for(int qq=1; qq<n; qq++){\n\t\t\tarr[qq] = in.nextInt();\n\t\t}", "int qq=1;", "int qq=1;", "qq", "1", "qq<n", "qq", "n", "qq++", "qq++", "qq", "{\n\t\t\tarr[qq] = in.nextInt();\n\t\t}", "{\n\t\t\tarr[qq] = in.nextInt();\n\t\t}", "arr[qq] = in.nextInt()", "arr[qq]", "arr", "qq", "in.nextInt()", "in.nextInt", "in", "HashMap<Integer, Integer> mp = new HashMap<>();", "mp", "new HashMap<>()", "for(int i=0; i<n; i++){\n\t\t\tmp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tmp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));\n\t\t}", "{\n\t\t\tmp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));\n\t\t}", "mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0))", "mp.put", "mp", "arr[i]-1", "arr[i]", "arr", "i", "1", "1+mp.getOrDefault(arr[i]-1, 0)", "1", "mp.getOrDefault(arr[i]-1, 0)", "mp.getOrDefault", "mp", "arr[i]-1", "arr[i]", "arr", "i", "1", "0", "for(int i=0; i<n; i++){\n\t\t\tSystem.out.println(mp.getOrDefault(i, 0));\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(mp.getOrDefault(i, 0));\n\t\t}", "{\n\t\t\tSystem.out.println(mp.getOrDefault(i, 0));\n\t\t}", "System.out.println(mp.getOrDefault(i, 0))", "System.out.println", "System.out", "System", "System.out", "mp.getOrDefault(i, 0)", "mp.getOrDefault", "mp", "i", "0", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] arr= new int[n];\n\t\tfor(int qq=1; qq<n; qq++){\n\t\t\tarr[qq] = in.nextInt();\n\t\t}\n\t\tHashMap<Integer, Integer> mp = new HashMap<>();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tmp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tSystem.out.println(mp.getOrDefault(i, 0));\n\t\t}\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] arr= new int[n];\n\t\tfor(int qq=1; qq<n; qq++){\n\t\t\tarr[qq] = in.nextInt();\n\t\t}\n\t\tHashMap<Integer, Integer> mp = new HashMap<>();\n\t\tfor(int i=0; i<n; i++){\n\t\t\tmp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0));\n\t\t}\n\t\tfor(int i=0; i<n; i++){\n\t\t\tSystem.out.println(mp.getOrDefault(i, 0));\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; import java.math.*; import java.io.*; public class Main{ public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] arr= new int[n]; for(int qq=1; qq<n; qq++){ arr[qq] = in.nextInt(); } HashMap<Integer, Integer> mp = new HashMap<>(); for(int i=0; i<n; i++){ mp.put(arr[i]-1, 1+mp.getOrDefault(arr[i]-1, 0)); } for(int i=0; i<n; i++){ System.out.println(mp.getOrDefault(i, 0)); } } }
[ 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, 2, 17, 17, 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, 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 ], [ 79, 11 ], [ 79, 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 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 14, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 38, 40 ], [ 31, 41 ], [ 41, 42 ], [ 42, 43 ], [ 31, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 45, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 14, 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 ], [ 73, 75 ], [ 12, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.io.*;\nimport java.math.*;\nimport java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint N = input.nextInt();\n\t\tint[] freq = new int[(int)(2*(1e5)+1)];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint x = input.nextInt();\n\t\t\tfreq[x]++;\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(freq[i]);\n\t\t}\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.math.*;", "math.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint N = input.nextInt();\n\t\tint[] freq = new int[(int)(2*(1e5)+1)];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint x = input.nextInt();\n\t\t\tfreq[x]++;\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(freq[i]);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint N = input.nextInt();\n\t\tint[] freq = new int[(int)(2*(1e5)+1)];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint x = input.nextInt();\n\t\t\tfreq[x]++;\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(freq[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner input = new Scanner(System.in);\n\t\tint N = input.nextInt();\n\t\tint[] freq = new int[(int)(2*(1e5)+1)];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint x = input.nextInt();\n\t\t\tfreq[x]++;\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(freq[i]);\n\t\t}\n\t}", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "int N = input.nextInt();", "N", "input.nextInt()", "input.nextInt", "input", "int[] freq = new int[(int)(2*(1e5)+1)];", "freq", "new int[(int)(2*(1e5)+1)]", "(int)(2*(1e5)+1)", "2*(1e5)", "2", "(1e5)", "1", "for (int i = 0; i < N-1; i++) {\n\t\t\tint x = input.nextInt();\n\t\t\tfreq[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 = input.nextInt();\n\t\t\tfreq[x]++;\n\t\t}", "{\n\t\t\tint x = input.nextInt();\n\t\t\tfreq[x]++;\n\t\t}", "int x = input.nextInt();", "x", "input.nextInt()", "input.nextInt", "input", "freq[x]++", "freq[x]", "freq", "x", "for (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(freq[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(freq[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(freq[i]);\n\t\t}", "System.out.println(freq[i])", "System.out.println", "System.out", "System", "System.out", "freq[i]", "freq", "i", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint N = input.nextInt();\n\t\tint[] freq = new int[(int)(2*(1e5)+1)];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint x = input.nextInt();\n\t\t\tfreq[x]++;\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(freq[i]);\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint N = input.nextInt();\n\t\tint[] freq = new int[(int)(2*(1e5)+1)];\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint x = input.nextInt();\n\t\t\tfreq[x]++;\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(freq[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.io.*; import java.math.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N = input.nextInt(); int[] freq = new int[(int)(2*(1e5)+1)]; for (int i = 0; i < N-1; i++) { int x = input.nextInt(); freq[x]++; } for (int i = 1; i <= N; i++) { System.out.println(freq[i]); } } }
[ 7, 15, 13, 17, 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, 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, 2, 13, 17, 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 13, 2, 13, 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 ], [ 133, 11 ], [ 133, 12 ], [ 12, 13 ], [ 12, 14 ], [ 133, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 17, 26 ], [ 26, 27 ], [ 26, 28 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 32, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 52, 53 ], [ 17, 54 ], [ 54, 55 ], [ 54, 56 ], [ 17, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 70, 76 ], [ 17, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 77, 87 ], [ 87, 88 ], [ 88, 89 ], [ 77, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 98, 105 ], [ 17, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 106, 111 ], [ 111, 112 ], [ 111, 113 ], [ 106, 114 ], [ 114, 115 ], [ 115, 116 ], [ 106, 117 ], [ 118, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 127, 128 ], [ 127, 129 ], [ 15, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ] ]
[ "import java.util.Scanner;\nimport java.util.SortedMap;\nimport java.util.TreeMap;\n\npublic class Main {\n\n\tstatic Main instance = new Main();\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N - 1];\n\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\n\t\t//WK変数\n\t\tSortedMap<Integer, Integer> map = new TreeMap<>();\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tmap.put(i + 1, 0);\n\t\t}\n\n\t\t//演算\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tmap.put(A[i], map.get(A[i]) + 1);\n\t\t}\n\n\t\t//結果出力\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(map.get(i + 1));\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.SortedMap;", "SortedMap", "java.util", "import java.util.TreeMap;", "TreeMap", "java.util", "public class Main {\n\n\tstatic Main instance = new Main();\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N - 1];\n\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\n\t\t//WK変数\n\t\tSortedMap<Integer, Integer> map = new TreeMap<>();\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tmap.put(i + 1, 0);\n\t\t}\n\n\t\t//演算\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tmap.put(A[i], map.get(A[i]) + 1);\n\t\t}\n\n\t\t//結果出力\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(map.get(i + 1));\n\t\t}\n\t}\n}", "Main", "static Main instance = new Main();", "instance", "new Main()", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N - 1];\n\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\n\t\t//WK変数\n\t\tSortedMap<Integer, Integer> map = new TreeMap<>();\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tmap.put(i + 1, 0);\n\t\t}\n\n\t\t//演算\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tmap.put(A[i], map.get(A[i]) + 1);\n\t\t}\n\n\t\t//結果出力\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(map.get(i + 1));\n\t\t}\n\t}", "main", "{\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N - 1];\n\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\n\t\t//WK変数\n\t\tSortedMap<Integer, Integer> map = new TreeMap<>();\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tmap.put(i + 1, 0);\n\t\t}\n\n\t\t//演算\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tmap.put(A[i], map.get(A[i]) + 1);\n\t\t}\n\n\t\t//結果出力\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(map.get(i + 1));\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 - 1];", "A", "new int[N - 1]", "N - 1", "N", "1", "for (int i = 0; i < N - 1; i++) {\n\t\t\tA[i] = scan.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] = 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", "SortedMap<Integer, Integer> map = new TreeMap<>();", "map", "new TreeMap<>()", "for (int i = 0; i < N; i++) {\n\t\t\tmap.put(i + 1, 0);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tmap.put(i + 1, 0);\n\t\t}", "{\n\t\t\tmap.put(i + 1, 0);\n\t\t}", "map.put(i + 1, 0)", "map.put", "map", "i + 1", "i", "1", "0", "for (int i = 0; i < N - 1; i++) {\n\t\t\tmap.put(A[i], map.get(A[i]) + 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\tmap.put(A[i], map.get(A[i]) + 1);\n\t\t}", "{\n\t\t\tmap.put(A[i], map.get(A[i]) + 1);\n\t\t}", "map.put(A[i], map.get(A[i]) + 1)", "map.put", "map", "A[i]", "A", "i", "map.get(A[i]) + 1", "map.get(A[i])", "map.get", "map", "A[i]", "A", "i", "1", "for (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(map.get(i + 1));\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(map.get(i + 1));\n\t\t}", "{\n\t\t\tSystem.out.println(map.get(i + 1));\n\t\t}", "System.out.println(map.get(i + 1))", "System.out.println", "System.out", "System", "System.out", "map.get(i + 1)", "map.get", "map", "i + 1", "i", "1", "String[] args", "args", "public class Main {\n\n\tstatic Main instance = new Main();\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N - 1];\n\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\n\t\t//WK変数\n\t\tSortedMap<Integer, Integer> map = new TreeMap<>();\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tmap.put(i + 1, 0);\n\t\t}\n\n\t\t//演算\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tmap.put(A[i], map.get(A[i]) + 1);\n\t\t}\n\n\t\t//結果出力\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(map.get(i + 1));\n\t\t}\n\t}\n}", "public class Main {\n\n\tstatic Main instance = new Main();\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値\n\t\tint N = scan.nextInt();\n\t\tint[] A = new int[N - 1];\n\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tA[i] = scan.nextInt();\n\t\t}\n\n\t\t//WK変数\n\t\tSortedMap<Integer, Integer> map = new TreeMap<>();\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tmap.put(i + 1, 0);\n\t\t}\n\n\t\t//演算\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tmap.put(A[i], map.get(A[i]) + 1);\n\t\t}\n\n\t\t//結果出力\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(map.get(i + 1));\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; import java.util.SortedMap; import java.util.TreeMap; public class Main { static Main instance = new Main(); public static void main(String[] args) { Scanner scan = new Scanner(System.in); //入力値 int N = scan.nextInt(); int[] A = new int[N - 1]; for (int i = 0; i < N - 1; i++) { A[i] = scan.nextInt(); } //WK変数 SortedMap<Integer, Integer> map = new TreeMap<>(); for (int i = 0; i < N; i++) { map.put(i + 1, 0); } //演算 for (int i = 0; i < N - 1; i++) { map.put(A[i], map.get(A[i]) + 1); } //結果出力 for (int i = 0; i < N; i++) { System.out.println(map.get(i + 1)); } } }
[ 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, 2, 13, 17, 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 ], [ 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 ], [ 52, 53 ], [ 52, 54 ], [ 45, 55 ], [ 55, 56 ], [ 56, 57 ], [ 45, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 65, 67 ], [ 6, 68 ], [ 68, 69 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n\n int[] a = new int[n + 1];\n for (int i = 1; i < n; i++) {\n int j = scan.nextInt();\n a[j]++;\n }\n\n for (int i = 1; i < n + 1; i++) {\n System.out.println(a[i]);\n }\n\n }\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n\n int[] a = new int[n + 1];\n for (int i = 1; i < n; i++) {\n int j = scan.nextInt();\n a[j]++;\n }\n\n for (int i = 1; i < n + 1; i++) {\n System.out.println(a[i]);\n }\n\n }\n\n}", "Main", "public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n\n int[] a = new int[n + 1];\n for (int i = 1; i < n; i++) {\n int j = scan.nextInt();\n a[j]++;\n }\n\n for (int i = 1; i < n + 1; i++) {\n System.out.println(a[i]);\n }\n\n }", "main", "{\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n\n int[] a = new int[n + 1];\n for (int i = 1; i < n; i++) {\n int j = scan.nextInt();\n a[j]++;\n }\n\n for (int i = 1; i < n + 1; i++) {\n System.out.println(a[i]);\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 + 1];", "a", "new int[n + 1]", "n + 1", "n", "1", "for (int i = 1; i < n; i++) {\n int j = scan.nextInt();\n a[j]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n int j = scan.nextInt();\n a[j]++;\n }", "{\n int j = scan.nextInt();\n a[j]++;\n }", "int j = scan.nextInt();", "j", "scan.nextInt()", "scan.nextInt", "scan", "a[j]++", "a[j]", "a", "j", "for (int i = 1; i < n + 1; i++) {\n System.out.println(a[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(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" ]
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] a = new int[n + 1]; for (int i = 1; i < n; i++) { int j = scan.nextInt(); a[j]++; } for (int i = 1; i < n + 1; 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, 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, 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, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 95, 5 ], [ 95, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 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 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 60, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 8, 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 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 89, 90 ], [ 89, 91 ], [ 6, 92 ], [ 92, 93 ], [ 0, 94 ], [ 94, 95 ], [ 94, 96 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] shine = new int[n];\n \n for (int i = 0; i < shine.length; i++) {\n shine[i] = 0;\n }\n \n for (int i = 0; i < shine.length - 1; i++) {\n int j = sc.nextInt() - 1;\n shine[j]++;\n }\n \n for (int i = 0; i < shine.length; i++) {\n System.out.println(shine[i]);\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 int n = sc.nextInt();\n int[] shine = new int[n];\n \n for (int i = 0; i < shine.length; i++) {\n shine[i] = 0;\n }\n \n for (int i = 0; i < shine.length - 1; i++) {\n int j = sc.nextInt() - 1;\n shine[j]++;\n }\n \n for (int i = 0; i < shine.length; i++) {\n System.out.println(shine[i]);\n }\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] shine = new int[n];\n \n for (int i = 0; i < shine.length; i++) {\n shine[i] = 0;\n }\n \n for (int i = 0; i < shine.length - 1; i++) {\n int j = sc.nextInt() - 1;\n shine[j]++;\n }\n \n for (int i = 0; i < shine.length; i++) {\n System.out.println(shine[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] shine = new int[n];\n \n for (int i = 0; i < shine.length; i++) {\n shine[i] = 0;\n }\n \n for (int i = 0; i < shine.length - 1; i++) {\n int j = sc.nextInt() - 1;\n shine[j]++;\n }\n \n for (int i = 0; i < shine.length; i++) {\n System.out.println(shine[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[] shine = new int[n];", "shine", "new int[n]", "n", "for (int i = 0; i < shine.length; i++) {\n shine[i] = 0;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < shine.length", "i", "shine.length", "shine", "shine.length", "i++", "i++", "i", "{\n shine[i] = 0;\n }", "{\n shine[i] = 0;\n }", "shine[i] = 0", "shine[i]", "shine", "i", "0", "for (int i = 0; i < shine.length - 1; i++) {\n int j = sc.nextInt() - 1;\n shine[j]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < shine.length - 1", "i", "shine.length - 1", "shine.length", "shine", "shine.length", "1", "i++", "i++", "i", "{\n int j = sc.nextInt() - 1;\n shine[j]++;\n }", "{\n int j = sc.nextInt() - 1;\n shine[j]++;\n }", "int j = sc.nextInt() - 1;", "j", "sc.nextInt() - 1", "sc.nextInt()", "sc.nextInt", "sc", "1", "shine[j]++", "shine[j]", "shine", "j", "for (int i = 0; i < shine.length; i++) {\n System.out.println(shine[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < shine.length", "i", "shine.length", "shine", "shine.length", "i++", "i++", "i", "{\n System.out.println(shine[i]);\n }", "{\n System.out.println(shine[i]);\n }", "System.out.println(shine[i])", "System.out.println", "System.out", "System", "System.out", "shine[i]", "shine", "i", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] shine = new int[n];\n \n for (int i = 0; i < shine.length; i++) {\n shine[i] = 0;\n }\n \n for (int i = 0; i < shine.length - 1; i++) {\n int j = sc.nextInt() - 1;\n shine[j]++;\n }\n \n for (int i = 0; i < shine.length; i++) {\n System.out.println(shine[i]);\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] shine = new int[n];\n \n for (int i = 0; i < shine.length; i++) {\n shine[i] = 0;\n }\n \n for (int i = 0; i < shine.length - 1; i++) {\n int j = sc.nextInt() - 1;\n shine[j]++;\n }\n \n for (int i = 0; i < shine.length; i++) {\n System.out.println(shine[i]);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] shine = new int[n]; for (int i = 0; i < shine.length; i++) { shine[i] = 0; } for (int i = 0; i < shine.length - 1; i++) { int j = sc.nextInt() - 1; shine[j]++; } for (int i = 0; i < shine.length; i++) { System.out.println(shine[i]); } } }
[ 7, 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 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 19, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 26, 28 ], [ 19, 29 ], [ 29, 30 ], [ 30, 31 ], [ 19, 32 ], [ 33, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 34, 38 ], [ 38, 39 ], [ 39, 40 ], [ 11, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 46, 47 ], [ 46, 48 ], [ 11, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 11, 57 ], [ 57, 58 ], [ 57, 59 ], [ 60, 61 ], [ 60, 62 ], [ 11, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 63, 73 ], [ 73, 74 ], [ 74, 75 ], [ 63, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 85, 87 ], [ 11, 88 ], [ 88, 89 ], [ 88, 90 ], [ 11, 92 ], [ 92, 93 ], [ 92, 94 ], [ 92, 95 ], [ 96, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 11, 103 ], [ 103, 104 ], [ 103, 105 ], [ 103, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 11, 114 ], [ 114, 115 ], [ 115, 116 ], [ 9, 117 ], [ 117, 118 ] ]
[ "import java.util.Arrays;\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.Arrays;", "Arrays", "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.Arrays; 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, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 41, 13, 20, 2, 13, 17, 41, 13, 11, 1, 0, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 18, 13, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 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 ], [ 4, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 11, 17 ], [ 17, 18 ], [ 17, 19 ], [ 20, 21 ], [ 20, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 26, 27 ], [ 26, 28 ], [ 11, 29 ], [ 29, 30 ], [ 11, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 38, 40 ], [ 31, 41 ], [ 41, 42 ], [ 42, 43 ], [ 31, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 11, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 11, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 72, 80 ], [ 80, 81 ], [ 81, 82 ], [ 72, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 89, 90 ], [ 89, 91 ], [ 9, 92 ], [ 92, 93 ] ]
[ "import java.util.*;\nclass Main{\n static Scanner sc=new Scanner(System.in);\n public static void main(String[] args){\n int N = sc.nextInt();\n int Boss[]=new int[N+1];\n int Count[]=new int[N+1];\n int i ;\n for(i=1;i<=(N-1);i++){\n Boss[i]= sc.nextInt();\n }\n for(i=1;i<N;i++){\n Count[Boss[i]]++;\n }\n for(i=1;i<=N;i++)\n System.out.println(Count[i]);\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n static Scanner sc=new Scanner(System.in);\n public static void main(String[] args){\n int N = sc.nextInt();\n int Boss[]=new int[N+1];\n int Count[]=new int[N+1];\n int i ;\n for(i=1;i<=(N-1);i++){\n Boss[i]= sc.nextInt();\n }\n for(i=1;i<N;i++){\n Count[Boss[i]]++;\n }\n for(i=1;i<=N;i++)\n System.out.println(Count[i]);\n }\n}", "Main", "static Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args){\n int N = sc.nextInt();\n int Boss[]=new int[N+1];\n int Count[]=new int[N+1];\n int i ;\n for(i=1;i<=(N-1);i++){\n Boss[i]= sc.nextInt();\n }\n for(i=1;i<N;i++){\n Count[Boss[i]]++;\n }\n for(i=1;i<=N;i++)\n System.out.println(Count[i]);\n }", "main", "{\n int N = sc.nextInt();\n int Boss[]=new int[N+1];\n int Count[]=new int[N+1];\n int i ;\n for(i=1;i<=(N-1);i++){\n Boss[i]= sc.nextInt();\n }\n for(i=1;i<N;i++){\n Count[Boss[i]]++;\n }\n for(i=1;i<=N;i++)\n System.out.println(Count[i]);\n }", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int Boss[]=new int[N+1];", "Boss", "new int[N+1]", "N+1", "N", "1", "int Count[]=new int[N+1];", "Count", "new int[N+1]", "N+1", "N", "1", "int i ;", "i", "for(i=1;i<=(N-1);i++){\n Boss[i]= sc.nextInt();\n }", "i=1;", "i=1", "i", "1", "i<=(N-1)", "i", "(N-1)", "N", "1", "i++", "i++", "i", "{\n Boss[i]= sc.nextInt();\n }", "{\n Boss[i]= sc.nextInt();\n }", "Boss[i]= sc.nextInt()", "Boss[i]", "Boss", "i", "sc.nextInt()", "sc.nextInt", "sc", "for(i=1;i<N;i++){\n Count[Boss[i]]++;\n }", "i=1;", "i=1", "i", "1", "i<N", "i", "N", "i++", "i++", "i", "{\n Count[Boss[i]]++;\n }", "{\n Count[Boss[i]]++;\n }", "Count[Boss[i]]++", "Count[Boss[i]]", "Count", "Boss[i]", "Boss", "i", "for(i=1;i<=N;i++)\n System.out.println(Count[i]);", "i=1;", "i=1", "i", "1", "i<=N", "i", "N", "i++", "i++", "i", "System.out.println(Count[i]);", "System.out.println(Count[i])", "System.out.println", "System.out", "System", "System.out", "Count[i]", "Count", "i", "String[] args", "args" ]
import java.util.*; class Main{ static Scanner sc=new Scanner(System.in); public static void main(String[] args){ int N = sc.nextInt(); int Boss[]=new int[N+1]; int Count[]=new int[N+1]; int i ; for(i=1;i<=(N-1);i++){ Boss[i]= sc.nextInt(); } for(i=1;i<N;i++){ Count[Boss[i]]++; } for(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, 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 ] ]
[ "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 = sc.nextInt();\n int[] a = new int[n + 1];\n for (int i = 0; i < n - 1; i++) {\n int tmp = sc.nextInt();\n a[tmp]++;\n }\n for (int i = 1; i < a.length; i++) {\n System.out.println(a[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] a = new int[n + 1];\n for (int i = 0; i < n - 1; i++) {\n int tmp = sc.nextInt();\n a[tmp]++;\n }\n for (int i = 1; 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 int n = sc.nextInt();\n int[] a = new int[n + 1];\n for (int i = 0; i < n - 1; i++) {\n int tmp = sc.nextInt();\n a[tmp]++;\n }\n for (int i = 1; i < a.length; i++) {\n System.out.println(a[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] a = new int[n + 1];\n for (int i = 0; i < n - 1; i++) {\n int tmp = sc.nextInt();\n a[tmp]++;\n }\n for (int i = 1; i < a.length; i++) {\n System.out.println(a[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[] a = new int[n + 1];", "a", "new int[n + 1]", "n + 1", "n", "1", "for (int i = 0; i < n - 1; i++) {\n int tmp = sc.nextInt();\n a[tmp]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "{\n int tmp = sc.nextInt();\n a[tmp]++;\n }", "{\n int tmp = sc.nextInt();\n a[tmp]++;\n }", "int tmp = sc.nextInt();", "tmp", "sc.nextInt()", "sc.nextInt", "sc", "a[tmp]++", "a[tmp]", "a", "tmp", "for (int i = 1; i < a.length; i++) {\n System.out.println(a[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "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 int n = sc.nextInt();\n int[] a = new int[n + 1];\n for (int i = 0; i < n - 1; i++) {\n int tmp = sc.nextInt();\n a[tmp]++;\n }\n for (int i = 1; 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 int n = sc.nextInt();\n int[] a = new int[n + 1];\n for (int i = 0; i < n - 1; i++) {\n int tmp = sc.nextInt();\n a[tmp]++;\n }\n for (int i = 1; i < a.length; i++) {\n System.out.println(a[i]);\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 + 1]; for (int i = 0; i < n - 1; i++) { int tmp = sc.nextInt(); a[tmp]++; } for (int i = 1; i < a.length; i++) { System.out.println(a[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 2, 17, 17, 41, 13, 2, 18, 13, 13, 17, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 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, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 0, 13, 20, 0, 13, 20, 4, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 6, 13, 41, 13, 12, 13, 30, 4, 13, 18, 13, 13, 12, 13, 30, 0, 18, 36, 13, 20, 23, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 4, 18, 18, 36, 13, 12, 13, 30, 29, 4, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 29, 40, 17, 30, 41, 13, 17, 41, 13, 4, 18, 13, 42, 2, 2, 2, 2, 13, 17, 2, 17, 13, 2, 13, 17, 2, 13, 17, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 4, 18, 13, 41, 13, 2, 13, 17, 42, 17, 30, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 17, 13, 29, 2, 13, 13, 0, 13, 17, 0, 13, 2, 13, 17, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 29, 18, 13, 13, 30, 41, 13, 17, 41, 13, 4, 18, 13, 42, 2, 2, 2, 2, 13, 17, 2, 17, 13, 2, 13, 17, 2, 13, 17, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 4, 18, 13, 41, 13, 2, 13, 17, 42, 17, 30, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 17, 13, 3, 0, 13, 17, 0, 13, 2, 13, 17, 14, 2, 13, 17, 29, 2, 13, 13, 41, 13, 17, 0, 13, 4, 18, 13, 42, 2, 2, 17, 13, 2, 13, 17, 30, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 17, 0, 13, 4, 18, 13, 29, 2, 2, 13, 13, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 29, 17, 30, 41, 13, 4, 18, 13, 42, 4, 18, 13, 13, 30, 0, 13, 4, 18, 13, 29, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 29, 17, 30, 41, 13, 20, 41, 13, 4, 18, 13, 42, 4, 18, 13, 13, 30, 0, 13, 4, 18, 13, 42, 2, 2, 13, 40, 17, 40, 4, 18, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 18, 13, 29, 4, 18, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 29, 17, 30, 41, 13, 20, 41, 13, 4, 18, 13, 42, 2, 2, 13, 40, 17, 2, 13, 17, 30, 4, 18, 13, 13, 0, 13, 4, 18, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 4, 13, 17, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 2, 13, 17, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 4, 13, 17, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 2, 13, 17, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 749, 8 ], [ 749, 9 ], [ 9, 10 ], [ 749, 11 ], [ 11, 12 ], [ 749, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 15, 17 ], [ 749, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 749, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 27, 33 ], [ 33, 34 ], [ 33, 35 ], [ 36, 37 ], [ 36, 38 ], [ 27, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 39, 47 ], [ 47, 48 ], [ 48, 49 ], [ 39, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 27, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 72, 73 ], [ 72, 74 ], [ 749, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 75, 81 ], [ 81, 82 ], [ 749, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 89, 91 ], [ 85, 92 ], [ 92, 93 ], [ 85, 94 ], [ 94, 95 ], [ 95, 96 ], [ 85, 97 ], [ 97, 98 ], [ 98, 99 ], [ 85, 100 ], [ 100, 101 ], [ 101, 102 ], [ 749, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 103, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 103, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 115, 123 ], [ 123, 124 ], [ 103, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 128, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 103, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 103, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 153, 157 ], [ 157, 158 ], [ 158, 159 ], [ 150, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 167, 168 ], [ 160, 169 ], [ 169, 170 ], [ 171, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 172, 176 ], [ 176, 177 ], [ 176, 178 ], [ 171, 179 ], [ 179, 180 ], [ 179, 181 ], [ 171, 182 ], [ 182, 183 ], [ 182, 184 ], [ 169, 185 ], [ 185, 186 ], [ 186, 187 ], [ 186, 188 ], [ 188, 189 ], [ 189, 190 ], [ 160, 191 ], [ 191, 192 ], [ 192, 193 ], [ 192, 194 ], [ 191, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 198, 199 ], [ 195, 200 ], [ 200, 201 ], [ 200, 202 ], [ 202, 203 ], [ 203, 204 ], [ 191, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 205, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 213, 214 ], [ 160, 215 ], [ 215, 216 ], [ 215, 217 ], [ 217, 218 ], [ 217, 219 ], [ 160, 220 ], [ 220, 221 ], [ 220, 222 ], [ 222, 223 ], [ 223, 224 ], [ 223, 225 ], [ 225, 226 ], [ 226, 227 ], [ 222, 228 ], [ 228, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 229, 233 ], [ 233, 234 ], [ 233, 235 ], [ 228, 236 ], [ 236, 237 ], [ 237, 238 ], [ 237, 239 ], [ 222, 240 ], [ 240, 241 ], [ 240, 242 ], [ 222, 243 ], [ 243, 244 ], [ 243, 245 ], [ 245, 246 ], [ 245, 247 ], [ 103, 248 ], [ 248, 249 ], [ 248, 250 ], [ 250, 251 ], [ 251, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 255, 256 ], [ 256, 257 ], [ 254, 258 ], [ 258, 259 ], [ 259, 260 ], [ 259, 261 ], [ 251, 262 ], [ 262, 263 ], [ 263, 264 ], [ 263, 265 ], [ 262, 266 ], [ 266, 267 ], [ 266, 268 ], [ 268, 269 ], [ 269, 270 ], [ 262, 271 ], [ 271, 272 ], [ 273, 273 ], [ 273, 274 ], [ 274, 275 ], [ 275, 276 ], [ 275, 277 ], [ 274, 278 ], [ 278, 279 ], [ 278, 280 ], [ 273, 281 ], [ 281, 282 ], [ 281, 283 ], [ 273, 284 ], [ 284, 285 ], [ 284, 286 ], [ 271, 287 ], [ 287, 288 ], [ 288, 289 ], [ 288, 290 ], [ 290, 291 ], [ 291, 292 ], [ 262, 293 ], [ 293, 294 ], [ 294, 295 ], [ 294, 296 ], [ 293, 297 ], [ 297, 298 ], [ 298, 299 ], [ 298, 300 ], [ 300, 301 ], [ 297, 302 ], [ 302, 303 ], [ 302, 304 ], [ 304, 305 ], [ 305, 306 ], [ 293, 307 ], [ 307, 308 ], [ 308, 309 ], [ 308, 310 ], [ 307, 311 ], [ 311, 312 ], [ 312, 313 ], [ 312, 314 ], [ 314, 315 ], [ 315, 316 ], [ 262, 317 ], [ 317, 318 ], [ 317, 319 ], [ 319, 320 ], [ 319, 321 ], [ 262, 322 ], [ 322, 323 ], [ 322, 324 ], [ 324, 325 ], [ 325, 326 ], [ 325, 327 ], [ 327, 328 ], [ 328, 329 ], [ 324, 330 ], [ 330, 331 ], [ 331, 332 ], [ 332, 333 ], [ 332, 334 ], [ 331, 335 ], [ 335, 336 ], [ 335, 337 ], [ 330, 338 ], [ 324, 339 ], [ 339, 340 ], [ 339, 341 ], [ 324, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 344, 346 ], [ 262, 347 ], [ 347, 348 ], [ 348, 349 ], [ 348, 350 ], [ 347, 351 ], [ 351, 352 ], [ 352, 353 ], [ 352, 354 ], [ 262, 355 ], [ 355, 356 ], [ 355, 357 ], [ 262, 358 ], [ 358, 359 ], [ 358, 360 ], [ 360, 361 ], [ 361, 362 ], [ 262, 363 ], [ 363, 364 ], [ 364, 365 ], [ 365, 366 ], [ 365, 367 ], [ 364, 368 ], [ 368, 369 ], [ 368, 370 ], [ 363, 371 ], [ 371, 372 ], [ 372, 373 ], [ 372, 374 ], [ 371, 375 ], [ 375, 376 ], [ 375, 377 ], [ 377, 378 ], [ 377, 379 ], [ 371, 380 ], [ 380, 381 ], [ 380, 382 ], [ 371, 383 ], [ 383, 384 ], [ 383, 385 ], [ 385, 386 ], [ 386, 387 ], [ 262, 388 ], [ 388, 389 ], [ 389, 390 ], [ 390, 391 ], [ 390, 392 ], [ 389, 393 ], [ 103, 394 ], [ 394, 395 ], [ 394, 396 ], [ 396, 397 ], [ 397, 398 ], [ 398, 399 ], [ 398, 400 ], [ 400, 401 ], [ 401, 402 ], [ 402, 403 ], [ 400, 404 ], [ 404, 405 ], [ 397, 406 ], [ 406, 407 ], [ 407, 408 ], [ 407, 409 ], [ 409, 410 ], [ 410, 411 ], [ 406, 412 ], [ 412, 413 ], [ 413, 414 ], [ 414, 415 ], [ 413, 416 ], [ 412, 417 ], [ 417, 418 ], [ 418, 419 ], [ 418, 420 ], [ 420, 421 ], [ 421, 422 ], [ 406, 423 ], [ 423, 424 ], [ 103, 425 ], [ 425, 426 ], [ 425, 427 ], [ 427, 428 ], [ 428, 429 ], [ 429, 430 ], [ 429, 431 ], [ 431, 432 ], [ 432, 433 ], [ 433, 434 ], [ 431, 435 ], [ 435, 436 ], [ 428, 437 ], [ 437, 438 ], [ 438, 439 ], [ 438, 440 ], [ 437, 441 ], [ 441, 442 ], [ 441, 443 ], [ 443, 444 ], [ 444, 445 ], [ 437, 446 ], [ 446, 447 ], [ 447, 448 ], [ 448, 449 ], [ 447, 450 ], [ 446, 451 ], [ 451, 452 ], [ 452, 453 ], [ 452, 454 ], [ 454, 455 ], [ 455, 456 ], [ 437, 457 ], [ 457, 458 ], [ 458, 459 ], [ 459, 460 ], [ 459, 461 ], [ 461, 462 ], [ 458, 463 ], [ 463, 464 ], [ 464, 465 ], [ 465, 466 ], [ 464, 467 ], [ 457, 468 ], [ 468, 469 ], [ 469, 470 ], [ 470, 471 ], [ 469, 472 ], [ 468, 473 ], [ 473, 474 ], [ 473, 475 ], [ 475, 476 ], [ 476, 477 ], [ 437, 478 ], [ 478, 479 ], [ 479, 480 ], [ 480, 481 ], [ 103, 482 ], [ 482, 483 ], [ 482, 484 ], [ 484, 485 ], [ 485, 486 ], [ 486, 487 ], [ 486, 488 ], [ 488, 489 ], [ 489, 490 ], [ 490, 491 ], [ 488, 492 ], [ 492, 493 ], [ 485, 494 ], [ 494, 495 ], [ 495, 496 ], [ 495, 497 ], [ 494, 498 ], [ 498, 499 ], [ 498, 500 ], [ 500, 501 ], [ 501, 502 ], [ 494, 503 ], [ 503, 504 ], [ 504, 505 ], [ 505, 506 ], [ 505, 507 ], [ 507, 508 ], [ 504, 509 ], [ 509, 510 ], [ 509, 511 ], [ 503, 512 ], [ 512, 513 ], [ 513, 514 ], [ 514, 515 ], [ 513, 516 ], [ 512, 517 ], [ 517, 518 ], [ 517, 519 ], [ 519, 520 ], [ 520, 521 ], [ 494, 522 ], [ 522, 523 ], [ 523, 524 ], [ 524, 525 ], [ 103, 526 ], [ 526, 527 ], [ 526, 528 ], [ 528, 529 ], [ 529, 530 ], [ 529, 531 ], [ 528, 533 ], [ 533, 534 ], [ 534, 535 ], [ 535, 536 ], [ 535, 537 ], [ 533, 538 ], [ 538, 539 ], [ 538, 540 ], [ 533, 541 ], [ 541, 542 ], [ 542, 543 ], [ 533, 544 ], [ 545, 545 ], [ 545, 546 ], [ 546, 547 ], [ 547, 548 ], [ 547, 549 ], [ 546, 550 ], [ 550, 551 ], [ 528, 552 ], [ 552, 553 ], [ 526, 554 ], [ 554, 555 ], [ 103, 556 ], [ 556, 557 ], [ 556, 558 ], [ 558, 559 ], [ 559, 560 ], [ 559, 561 ], [ 558, 563 ], [ 563, 564 ], [ 564, 565 ], [ 565, 566 ], [ 565, 567 ], [ 563, 568 ], [ 568, 569 ], [ 568, 570 ], [ 563, 571 ], [ 571, 572 ], [ 572, 573 ], [ 563, 574 ], [ 575, 575 ], [ 575, 576 ], [ 576, 577 ], [ 577, 578 ], [ 577, 579 ], [ 576, 580 ], [ 580, 581 ], [ 581, 582 ], [ 580, 583 ], [ 558, 584 ], [ 584, 585 ], [ 556, 586 ], [ 586, 587 ], [ 103, 588 ], [ 588, 589 ], [ 588, 590 ], [ 590, 591 ], [ 591, 592 ], [ 591, 593 ], [ 594, 595 ], [ 594, 596 ], [ 590, 597 ], [ 597, 598 ], [ 598, 599 ], [ 599, 600 ], [ 599, 601 ], [ 597, 602 ], [ 602, 603 ], [ 602, 604 ], [ 597, 605 ], [ 605, 606 ], [ 606, 607 ], [ 597, 608 ], [ 609, 609 ], [ 609, 610 ], [ 610, 611 ], [ 611, 612 ], [ 611, 613 ], [ 613, 614 ], [ 613, 615 ], [ 610, 616 ], [ 616, 617 ], [ 590, 618 ], [ 618, 619 ], [ 588, 620 ], [ 620, 621 ], [ 103, 622 ], [ 622, 623 ], [ 622, 624 ], [ 624, 625 ], [ 625, 626 ], [ 625, 627 ], [ 624, 629 ], [ 629, 630 ], [ 630, 631 ], [ 631, 632 ], [ 631, 633 ], [ 629, 634 ], [ 634, 635 ], [ 634, 636 ], [ 629, 637 ], [ 637, 638 ], [ 638, 639 ], [ 629, 640 ], [ 641, 641 ], [ 641, 642 ], [ 642, 643 ], [ 643, 644 ], [ 643, 645 ], [ 642, 646 ], [ 646, 647 ], [ 624, 648 ], [ 648, 649 ], [ 622, 650 ], [ 650, 651 ], [ 103, 652 ], [ 652, 653 ], [ 652, 654 ], [ 654, 655 ], [ 655, 656 ], [ 655, 657 ], [ 654, 659 ], [ 659, 660 ], [ 660, 661 ], [ 661, 662 ], [ 661, 663 ], [ 659, 664 ], [ 664, 665 ], [ 664, 666 ], [ 659, 667 ], [ 667, 668 ], [ 668, 669 ], [ 659, 670 ], [ 671, 671 ], [ 671, 672 ], [ 672, 673 ], [ 673, 674 ], [ 673, 675 ], [ 672, 676 ], [ 676, 677 ], [ 677, 678 ], [ 676, 679 ], [ 654, 680 ], [ 680, 681 ], [ 652, 682 ], [ 682, 683 ], [ 103, 684 ], [ 684, 685 ], [ 684, 686 ], [ 686, 687 ], [ 687, 688 ], [ 687, 689 ], [ 690, 691 ], [ 690, 692 ], [ 686, 693 ], [ 693, 694 ], [ 694, 695 ], [ 695, 696 ], [ 695, 697 ], [ 693, 698 ], [ 698, 699 ], [ 698, 700 ], [ 693, 701 ], [ 701, 702 ], [ 702, 703 ], [ 693, 704 ], [ 705, 705 ], [ 705, 706 ], [ 706, 707 ], [ 707, 708 ], [ 707, 709 ], [ 709, 710 ], [ 709, 711 ], [ 706, 712 ], [ 712, 713 ], [ 686, 714 ], [ 714, 715 ], [ 684, 716 ], [ 716, 717 ], [ 103, 718 ], [ 718, 719 ], [ 718, 720 ], [ 720, 721 ], [ 721, 722 ], [ 721, 723 ], [ 720, 725 ], [ 725, 726 ], [ 726, 727 ], [ 727, 728 ], [ 727, 729 ], [ 725, 730 ], [ 730, 731 ], [ 730, 732 ], [ 725, 733 ], [ 733, 734 ], [ 734, 735 ], [ 725, 736 ], [ 737, 737 ], [ 737, 738 ], [ 738, 739 ], [ 739, 740 ], [ 739, 741 ], [ 738, 742 ], [ 742, 743 ], [ 720, 744 ], [ 744, 745 ], [ 718, 746 ], [ 746, 747 ], [ 0, 748 ], [ 748, 749 ], [ 748, 750 ] ]
[ "import java.io.*;\nimport java.util.*;\n\n@SuppressWarnings(\"unused\")\npublic class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n final static long INF = Long.MAX_VALUE / 2;\n \n void solve(){\n int N = in.nextInt();\n int[] num = new int[N+1];\n for(int i = 2; i <= N; i++) num[in.nextInt()]++;\n for(int i = 1; i <= N; i++) out.println(num[i]);\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n final static long INF = Long.MAX_VALUE / 2;\n \n void solve(){\n int N = in.nextInt();\n int[] num = new int[N+1];\n for(int i = 2; i <= N; i++) num[in.nextInt()]++;\n for(int i = 1; i <= N; i++) out.println(num[i]);\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}", "Main", "FastScanner in;", "in", "PrintWriter out;", "out", "final static int MOD = (int)1e9+7;", "MOD", "(int)1e9+7", "(int)1e9", "7", "final static long INF = Long.MAX_VALUE / 2;", "INF", "Long.MAX_VALUE / 2", "Long.MAX_VALUE", "Long", "Long.MAX_VALUE", "2", "void solve(){\n int N = in.nextInt();\n int[] num = new int[N+1];\n for(int i = 2; i <= N; i++) num[in.nextInt()]++;\n for(int i = 1; i <= N; i++) out.println(num[i]);\n }", "solve", "{\n int N = in.nextInt();\n int[] num = new int[N+1];\n for(int i = 2; i <= N; i++) num[in.nextInt()]++;\n for(int i = 1; i <= N; i++) out.println(num[i]);\n }", "int N = in.nextInt();", "N", "in.nextInt()", "in.nextInt", "in", "int[] num = new int[N+1];", "num", "new int[N+1]", "N+1", "N", "1", "for(int i = 2; i <= N; i++) num[in.nextInt()]++;", "int i = 2;", "int i = 2;", "i", "2", "i <= N", "i", "N", "i++", "i++", "i", "num[in.nextInt()]++;", "num[in.nextInt()]++", "num[in.nextInt()]", "num", "in.nextInt()", "in.nextInt", "in", "for(int i = 1; i <= N; i++) out.println(num[i]);", "int i = 1;", "int i = 1;", "i", "1", "i <= N", "i", "N", "i++", "i++", "i", "out.println(num[i]);", "out.println(num[i])", "out.println", "out", "num[i]", "num", "i", "public static void main(String[] args) {\n new Main().m();\n }", "main", "{\n new Main().m();\n }", "new Main().m()", "new Main().m", "new Main()", "String[] args", "args", "private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }", "m", "{\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }", "in = new FastScanner(System.in)", "in", "new FastScanner(System.in)", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "solve()", "solve", "out.flush()", "out.flush", "out", "in.close()", "in.close", "in", "out.close()", "out.close", "out", "static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }", "FastScanner", "private Reader input;", "input", "public FastScanner() {this(System.in);}", "FastScanner", "{this(System.in);}", "this(System.in)", "this", "System.in", "System", "System.in", "public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}", "FastScanner", "{this.input = new BufferedReader(new InputStreamReader(stream));}", "this.input = new BufferedReader(new InputStreamReader(stream))", "this.input", "this", "this.input", "new BufferedReader(new InputStreamReader(stream))", "InputStream stream", "stream", "public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "close", "{\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n this.input.close();\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 this.input.close();\n }", "this.input.close()", "this.input.close", "this.input", "this", "this.input", "public int nextInt() {return (int) nextLong();}", "nextInt", "{return (int) nextLong();}", "return (int) nextLong();", "(int) nextLong()", "nextLong", "public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }", "nextLong", "{\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }", "try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }", "catch (IOException e) {\n e.printStackTrace();\n return -1;\n }", "IOException e", "{\n e.printStackTrace();\n return -1;\n }", "e.printStackTrace()", "e.printStackTrace", "e", "return -1;", "-1", "1", "{\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n }", "int sign = 1;", "sign", "1", "int b = input.read();", "b", "input.read()", "input.read", "input", "while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }", "(b < '0' || '9' < b) && b != '-' && b != '+'", "(b < '0' || '9' < b) && b != '-' && b != '+'", "(b < '0' || '9' < b)", "b < '0'", "b", "'0'", "'9' < b", "'9'", "b", "b != '-'", "b", "'-'", "b != '+'", "b", "'+'", "{\n b = input.read();\n }", "b = input.read()", "b", "input.read()", "input.read", "input", "if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }", "b == '-'", "b", "'-'", "{\n sign = -1;\n b = input.read();\n }", "sign = -1", "sign", "-1", "1", "b = input.read()", "b", "input.read()", "input.read", "input", "if (b == '+') {\n b = input.read();\n }", "b == '+'", "b", "'+'", "{\n b = input.read();\n }", "b = input.read()", "b", "input.read()", "input.read", "input", "long ret = b - '0';", "ret", "b - '0'", "b", "'0'", "while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }", "true", "{\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }", "b = input.read()", "b", "input.read()", "input.read", "input", "if (b < '0' || '9' < b) return ret * sign;", "b < '0' || '9' < b", "b < '0'", "b", "'0'", "'9' < b", "'9'", "b", "return ret * sign;", "ret * sign", "ret", "sign", "ret *= 10", "ret", "10", "ret += b - '0'", "ret", "b - '0'", "b", "'0'", "public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }", "nextDouble", "{\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }", "try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }", "catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }", "IOException e", "{\n e.printStackTrace();\n return Double.NaN;\n }", "e.printStackTrace()", "e.printStackTrace", "e", "return Double.NaN;", "Double.NaN", "Double", "Double.NaN", "{\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n }", "double sign = 1;", "sign", "1", "int b = input.read();", "b", "input.read()", "input.read", "input", "while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }", "(b < '0' || '9' < b) && b != '-' && b != '+'", "(b < '0' || '9' < b) && b != '-' && b != '+'", "(b < '0' || '9' < b)", "b < '0'", "b", "'0'", "'9' < b", "'9'", "b", "b != '-'", "b", "'-'", "b != '+'", "b", "'+'", "{\n b = input.read();\n }", "b = input.read()", "b", "input.read()", "input.read", "input", "if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }", "b == '-'", "b", "'-'", "{\n sign = -1;\n b = input.read();\n }", "sign = -1", "sign", "-1", "1", "b = input.read()", "b", "input.read()", "input.read", "input", "if (b == '+') {\n b = input.read();\n }", "b == '+'", "b", "'+'", "{\n b = input.read();\n }", "b = input.read()", "b", "input.read()", "input.read", "input", "double ret = b - '0';", "ret", "b - '0'", "b", "'0'", "while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }", "true", "{\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }", "b = input.read()", "b", "input.read()", "input.read", "input", "if (b < '0' || '9' < b) break;", "b < '0' || '9' < b", "b < '0'", "b", "'0'", "'9' < b", "'9'", "b", "break;", "ret *= 10", "ret", "10", "ret += b - '0'", "ret", "b - '0'", "b", "'0'", "if (b != '.') return sign * ret;", "b != '.'", "b", "'.'", "return sign * ret;", "sign * ret", "sign", "ret", "double div = 1;", "div", "1", "b = input.read()", "b", "input.read()", "input.read", "input", "while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }", "'0' <= b && b <= '9'", "'0' <= b", "'0'", "b", "b <= '9'", "b", "'9'", "{\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }", "ret *= 10", "ret", "10", "ret += b - '0'", "ret", "b - '0'", "b", "'0'", "div *= 10", "div", "10", "b = input.read()", "b", "input.read()", "input.read", "input", "return sign * ret / div;", "sign * ret / div", "sign * ret", "sign", "ret", "div", "public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }", "nextChar", "{\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }", "try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }", "catch (IOException e) {\n e.printStackTrace();\n return 0;\n }", "IOException e", "{\n e.printStackTrace();\n return 0;\n }", "e.printStackTrace()", "e.printStackTrace", "e", "return 0;", "0", "{\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n }", "int b = input.read();", "b", "input.read()", "input.read", "input", "while (Character.isWhitespace(b)) {\n b = input.read();\n }", "Character.isWhitespace(b)", "Character.isWhitespace", "Character", "b", "{\n b = input.read();\n }", "b = input.read()", "b", "input.read()", "input.read", "input", "return (char) b;", "(char) b", "public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }", "nextStr", "{\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }", "try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }", "catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }", "IOException e", "{\n e.printStackTrace();\n return \"\";\n }", "e.printStackTrace()", "e.printStackTrace", "e", "return \"\";", "\"\"", "{\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n }", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "int b = input.read();", "b", "input.read()", "input.read", "input", "while (Character.isWhitespace(b)) {\n b = input.read();\n }", "Character.isWhitespace(b)", "Character.isWhitespace", "Character", "b", "{\n b = input.read();\n }", "b = input.read()", "b", "input.read()", "input.read", "input", "while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }", "b != -1 && !Character.isWhitespace(b)", "b != -1", "b", "-1", "1", "!Character.isWhitespace(b)", "Character.isWhitespace(b)", "Character.isWhitespace", "Character", "b", "{\n sb.append((char) b);\n b = input.read();\n }", "sb.append((char) b)", "sb.append", "sb", "(char) b", "b = input.read()", "b", "input.read()", "input.read", "input", "return sb.toString();", "sb.toString()", "sb.toString", "sb", "public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }", "nextLine", "{\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }", "try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }", "catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }", "IOException e", "{\n e.printStackTrace();\n return \"\";\n }", "e.printStackTrace()", "e.printStackTrace", "e", "return \"\";", "\"\"", "{\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n }", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "int b = input.read();", "b", "input.read()", "input.read", "input", "while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }", "b != -1 && b != '\\n'", "b != -1", "b", "-1", "1", "b != '\\n'", "b", "'\\n'", "{\n sb.append((char) b);\n b = input.read();\n }", "sb.append((char) b)", "sb.append", "sb", "(char) b", "b = input.read()", "b", "input.read()", "input.read", "input", "return sb.toString();", "sb.toString()", "sb.toString", "sb", "public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }", "nextIntArray", "{\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }", "int[] res = new int[n];", "res", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n res[i] = nextInt();\n }", "{\n res[i] = nextInt();\n }", "res[i] = nextInt()", "res[i]", "res", "i", "nextInt()", "nextInt", "return res;", "res", "int n", "n", "public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }", "nextIntArrayDec", "{\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }", "int[] res = new int[n];", "res", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n res[i] = nextInt() - 1;\n }", "{\n res[i] = nextInt() - 1;\n }", "res[i] = nextInt() - 1", "res[i]", "res", "i", "nextInt() - 1", "nextInt()", "nextInt", "1", "return res;", "res", "int n", "n", "public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }", "nextIntArray1Index", "{\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }", "int[] res = new int[n + 1];", "res", "new int[n + 1]", "n + 1", "n", "1", "for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n res[i + 1] = nextInt();\n }", "{\n res[i + 1] = nextInt();\n }", "res[i + 1] = nextInt()", "res[i + 1]", "res", "i + 1", "i", "1", "nextInt()", "nextInt", "return res;", "res", "int n", "n", "public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }", "nextLongArray", "{\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }", "long[] res = new long[n];", "res", "new long[n]", "n", "for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n res[i] = nextLong();\n }", "{\n res[i] = nextLong();\n }", "res[i] = nextLong()", "res[i]", "res", "i", "nextLong()", "nextLong", "return res;", "res", "int n", "n", "public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }", "nextLongArrayDec", "{\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }", "long[] res = new long[n];", "res", "new long[n]", "n", "for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n res[i] = nextLong() - 1;\n }", "{\n res[i] = nextLong() - 1;\n }", "res[i] = nextLong() - 1", "res[i]", "res", "i", "nextLong() - 1", "nextLong()", "nextLong", "1", "return res;", "res", "int n", "n", "public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }", "nextLongArray1Index", "{\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }", "long[] res = new long[n + 1];", "res", "new long[n + 1]", "n + 1", "n", "1", "for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n res[i + 1] = nextLong();\n }", "{\n res[i + 1] = nextLong();\n }", "res[i + 1] = nextLong()", "res[i + 1]", "res", "i + 1", "i", "1", "nextLong()", "nextLong", "return res;", "res", "int n", "n", "public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }", "nextDoubleArray", "{\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }", "double[] res = new double[n];", "res", "new double[n]", "n", "for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n res[i] = nextDouble();\n }", "{\n res[i] = nextDouble();\n }", "res[i] = nextDouble()", "res[i]", "res", "i", "nextDouble()", "nextDouble", "return res;", "res", "int n", "n", "public class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n final static long INF = Long.MAX_VALUE / 2;\n \n void solve(){\n int N = in.nextInt();\n int[] num = new int[N+1];\n for(int i = 2; i <= N; i++) num[in.nextInt()]++;\n for(int i = 1; i <= N; i++) out.println(num[i]);\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}", "public class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n final static long INF = Long.MAX_VALUE / 2;\n \n void solve(){\n int N = in.nextInt();\n int[] num = new int[N+1];\n for(int i = 2; i <= N; i++) num[in.nextInt()]++;\n for(int i = 1; i <= N; i++) out.println(num[i]);\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}", "Main" ]
import java.io.*; import java.util.*; @SuppressWarnings("unused") public class Main { FastScanner in; PrintWriter out; final static int MOD = (int)1e9+7; final static long INF = Long.MAX_VALUE / 2; void solve(){ int N = in.nextInt(); int[] num = new int[N+1]; for(int i = 2; i <= N; i++) num[in.nextInt()]++; for(int i = 1; i <= N; i++) out.println(num[i]); } public static void main(String[] args) { new Main().m(); } private void m() { in = new FastScanner(System.in); out = new PrintWriter(System.out); /* try { String path = "input.txt"; out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path)))); }catch (IOException e){ e.printStackTrace(); } */ solve(); out.flush(); in.close(); out.close(); } static class FastScanner { private Reader input; public FastScanner() {this(System.in);} public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));} public void close() { try { this.input.close(); } catch (IOException e) { e.printStackTrace(); } } public int nextInt() {return (int) nextLong();} public long nextLong() { try { int sign = 1; int b = input.read(); while ((b < '0' || '9' < b) && b != '-' && b != '+') { b = input.read(); } if (b == '-') { sign = -1; b = input.read(); } else if (b == '+') { b = input.read(); } long ret = b - '0'; while (true) { b = input.read(); if (b < '0' || '9' < b) return ret * sign; ret *= 10; ret += b - '0'; } } catch (IOException e) { e.printStackTrace(); return -1; } } public double nextDouble() { try { double sign = 1; int b = input.read(); while ((b < '0' || '9' < b) && b != '-' && b != '+') { b = input.read(); } if (b == '-') { sign = -1; b = input.read(); } else if (b == '+') { b = input.read(); } double ret = b - '0'; while (true) { b = input.read(); if (b < '0' || '9' < b) break; ret *= 10; ret += b - '0'; } if (b != '.') return sign * ret; double div = 1; b = input.read(); while ('0' <= b && b <= '9') { ret *= 10; ret += b - '0'; div *= 10; b = input.read(); } return sign * ret / div; } catch (IOException e) { e.printStackTrace(); return Double.NaN; } } public char nextChar() { try { int b = input.read(); while (Character.isWhitespace(b)) { b = input.read(); } return (char) b; } catch (IOException e) { e.printStackTrace(); return 0; } } public String nextStr() { try { StringBuilder sb = new StringBuilder(); int b = input.read(); while (Character.isWhitespace(b)) { b = input.read(); } while (b != -1 && !Character.isWhitespace(b)) { sb.append((char) b); b = input.read(); } return sb.toString(); } catch (IOException e) { e.printStackTrace(); return ""; } } public String nextLine() { try { StringBuilder sb = new StringBuilder(); int b = input.read(); while (b != -1 && b != '\n') { sb.append((char) b); b = input.read(); } return sb.toString(); } catch (IOException e) { e.printStackTrace(); return ""; } } public int[] nextIntArray(int n) { int[] res = new int[n]; for (int i = 0; i < n; i++) { res[i] = nextInt(); } return res; } public int[] nextIntArrayDec(int n) { int[] res = new int[n]; for (int i = 0; i < n; i++) { res[i] = nextInt() - 1; } return res; } public int[] nextIntArray1Index(int n) { int[] res = new int[n + 1]; for (int i = 0; i < n; i++) { res[i + 1] = nextInt(); } return res; } public long[] nextLongArray(int n) { long[] res = new long[n]; for (int i = 0; i < n; i++) { res[i] = nextLong(); } return res; } public long[] nextLongArrayDec(int n) { long[] res = new long[n]; for (int i = 0; i < n; i++) { res[i] = nextLong() - 1; } return res; } public long[] nextLongArray1Index(int n) { long[] res = new long[n + 1]; for (int i = 0; i < n; i++) { res[i + 1] = nextLong(); } return res; } public double[] nextDoubleArray(int n) { double[] res = new double[n]; for (int i = 0; i < n; i++) { res[i] = nextDouble(); } return res; } } }
[ 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, 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, 4, 18, 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 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 33, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 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 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 6, 69 ], [ 69, 70 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import 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\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint[] members = new int[N];\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tint idx = sc.nextInt();\n\t\t\tmembers[idx-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(members[i]);\n\t\t}\n\n\t\tsc.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint[] members = new int[N];\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tint idx = sc.nextInt();\n\t\t\tmembers[idx-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(members[i]);\n\t\t}\n\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint[] members = new int[N];\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tint idx = sc.nextInt();\n\t\t\tmembers[idx-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(members[i]);\n\t\t}\n\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint[] members = new int[N];\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tint idx = sc.nextInt();\n\t\t\tmembers[idx-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(members[i]);\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[] members = new int[N];", "members", "new int[N]", "N", "for (int i = 1; i < N; i++) {\n\t\t\tint idx = sc.nextInt();\n\t\t\tmembers[idx-1]++;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tint idx = sc.nextInt();\n\t\t\tmembers[idx-1]++;\n\t\t}", "{\n\t\t\tint idx = sc.nextInt();\n\t\t\tmembers[idx-1]++;\n\t\t}", "int idx = sc.nextInt();", "idx", "sc.nextInt()", "sc.nextInt", "sc", "members[idx-1]++", "members[idx-1]", "members", "idx-1", "idx", "1", "for (int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(members[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(members[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(members[i]);\n\t\t}", "System.out.println(members[i])", "System.out.println", "System.out", "System", "System.out", "members[i]", "members", "i", "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\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint[] members = new int[N];\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tint idx = sc.nextInt();\n\t\t\tmembers[idx-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(members[i]);\n\t\t}\n\n\t\tsc.close();\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint N = sc.nextInt();\n\t\tint[] members = new int[N];\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tint idx = sc.nextInt();\n\t\t\tmembers[idx-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(members[i]);\n\t\t}\n\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // 入力値の取得 int N = sc.nextInt(); int[] members = new int[N]; for (int i = 1; i < N; i++) { int idx = sc.nextInt(); members[idx-1]++; } // 結果の出力 for (int i = 0; i < N; i++) { System.out.println(members[i]); } sc.close(); } }
[ 7, 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, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 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, 4, 18, 13, 2, 4, 18, 13, 2, 13, 17, 17, 2, 4, 18, 13, 2, 4, 18, 13, 2, 13, 17, 17, 17, 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 ], [ 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 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 40, 41 ], [ 8, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 42, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 8, 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 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 79, 81 ], [ 75, 82 ], [ 72, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 91, 93 ], [ 87, 94 ], [ 83, 95 ], [ 8, 96 ], [ 96, 97 ], [ 96, 98 ], [ 96, 99 ], [ 100, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 101, 106 ], [ 6, 107 ], [ 107, 108 ] ]
[ "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 List<Integer> list = new ArrayList<Integer>();\n List<Integer> listAns = new ArrayList<Integer>();\n for(int i=1; i<N; i++){\n list.add(sc.nextInt());\n }\n for(int i=0; i<N; i++){\n listAns.add(0);\n }\n for(int i=1; i<N; i++){\n listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1);\n }\n for(Integer ans : listAns){\n System.out.println(ans); \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 List<Integer> list = new ArrayList<Integer>();\n List<Integer> listAns = new ArrayList<Integer>();\n for(int i=1; i<N; i++){\n list.add(sc.nextInt());\n }\n for(int i=0; i<N; i++){\n listAns.add(0);\n }\n for(int i=1; i<N; i++){\n listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1);\n }\n for(Integer ans : listAns){\n System.out.println(ans); \n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n List<Integer> list = new ArrayList<Integer>();\n List<Integer> listAns = new ArrayList<Integer>();\n for(int i=1; i<N; i++){\n list.add(sc.nextInt());\n }\n for(int i=0; i<N; i++){\n listAns.add(0);\n }\n for(int i=1; i<N; i++){\n listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1);\n }\n for(Integer ans : listAns){\n System.out.println(ans); \n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n List<Integer> list = new ArrayList<Integer>();\n List<Integer> listAns = new ArrayList<Integer>();\n for(int i=1; i<N; i++){\n list.add(sc.nextInt());\n }\n for(int i=0; i<N; i++){\n listAns.add(0);\n }\n for(int i=1; i<N; i++){\n listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1);\n }\n for(Integer ans : listAns){\n System.out.println(ans); \n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "List<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "List<Integer> listAns = new ArrayList<Integer>();", "listAns", "new ArrayList<Integer>()", "for(int i=1; i<N; i++){\n list.add(sc.nextInt());\n }", "int i=1;", "int i=1;", "i", "1", "i<N", "i", "N", "i++", "i++", "i", "{\n list.add(sc.nextInt());\n }", "{\n list.add(sc.nextInt());\n }", "list.add(sc.nextInt())", "list.add", "list", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=0; i<N; i++){\n listAns.add(0);\n }", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n listAns.add(0);\n }", "{\n listAns.add(0);\n }", "listAns.add(0)", "listAns.add", "listAns", "0", "for(int i=1; i<N; i++){\n listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1);\n }", "int i=1;", "int i=1;", "i", "1", "i<N", "i", "N", "i++", "i++", "i", "{\n listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1);\n }", "{\n listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1);\n }", "listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1)", "listAns.set", "listAns", "list.get(i-1) - 1", "list.get(i-1)", "list.get", "list", "i-1", "i", "1", "1", "listAns.get(list.get(i-1) - 1) + 1", "listAns.get(list.get(i-1) - 1)", "listAns.get", "listAns", "list.get(i-1) - 1", "list.get(i-1)", "list.get", "list", "i-1", "i", "1", "1", "1", "for(Integer ans : listAns){\n System.out.println(ans); \n }", "Integer ans", "listAns", "{\n System.out.println(ans); \n }", "{\n System.out.println(ans); \n }", "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 sc = new Scanner(System.in); int N = sc.nextInt(); List<Integer> list = new ArrayList<Integer>(); List<Integer> listAns = new ArrayList<Integer>(); for(int i=1; i<N; i++){ list.add(sc.nextInt()); } for(int i=0; i<N; i++){ listAns.add(0); } for(int i=1; i<N; i++){ listAns.set(list.get(i-1) - 1, listAns.get(list.get(i-1) - 1) + 1); } for(Integer ans : listAns){ System.out.println(ans); } } }
[ 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, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 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 ], [ 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 ], [ 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 ], [ 41, 42 ], [ 42, 43 ], [ 38, 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 ], [ 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.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int [] arr = new int[n+1];\n for(int i=0; i<n-1; i++){\n arr[scanner.nextInt()]+=1;\n }\n for(int i=1; i<=n; i++)\n System.out.println(arr[i]);\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 int n = scanner.nextInt();\n int [] arr = new int[n+1];\n for(int i=0; i<n-1; i++){\n arr[scanner.nextInt()]+=1;\n }\n for(int i=1; i<=n; i++)\n System.out.println(arr[i]);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int [] arr = new int[n+1];\n for(int i=0; i<n-1; i++){\n arr[scanner.nextInt()]+=1;\n }\n for(int i=1; i<=n; i++)\n System.out.println(arr[i]);\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int [] arr = new int[n+1];\n for(int i=0; i<n-1; i++){\n arr[scanner.nextInt()]+=1;\n }\n for(int i=1; i<=n; i++)\n System.out.println(arr[i]);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "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[scanner.nextInt()]+=1;\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n arr[scanner.nextInt()]+=1;\n }", "{\n arr[scanner.nextInt()]+=1;\n }", "arr[scanner.nextInt()]+=1", "arr[scanner.nextInt()]", "arr", "scanner.nextInt()", "scanner.nextInt", "scanner", "1", "for(int i=1; i<=n; i++)\n System.out.println(arr[i]);", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "System.out.println(arr[i]);", "System.out.println(arr[i])", "System.out.println", "System.out", "System", "System.out", "arr[i]", "arr", "i", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int [] arr = new int[n+1];\n for(int i=0; i<n-1; i++){\n arr[scanner.nextInt()]+=1;\n }\n for(int i=1; i<=n; i++)\n System.out.println(arr[i]);\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int [] arr = new int[n+1];\n for(int i=0; i<n-1; i++){\n arr[scanner.nextInt()]+=1;\n }\n for(int i=1; i<=n; i++)\n System.out.println(arr[i]);\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 [] arr = new int[n+1]; for(int i=0; i<n-1; i++){ arr[scanner.nextInt()]+=1; } for(int i=1; i<=n; i++) System.out.println(arr[i]); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 4, 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, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 13, 18, 13, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 4, 18, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 150, 23 ], [ 150, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 150, 30 ], [ 30, 31 ], [ 30, 32 ], [ 150, 33 ], [ 33, 34 ], [ 33, 35 ], [ 150, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 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 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 62, 69 ], [ 38, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 70, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 36, 88 ], [ 88, 89 ], [ 150, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 150, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 150, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 150, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 150, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 125, 128 ], [ 124, 129 ], [ 129, 130 ], [ 130, 131 ], [ 122, 132 ], [ 132, 133 ], [ 150, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 136, 144 ], [ 144, 145 ], [ 145, 146 ], [ 134, 147 ], [ 147, 148 ], [ 0, 149 ], [ 149, 150 ], [ 149, 151 ] ]
[ "import javax.print.DocFlavor;\nimport java.awt.*;\nimport java.io.PrintWriter;\nimport java.lang.reflect.Array;\nimport java.math.BigInteger;\nimport java.util.*;\nimport java.util.List;\n\npublic class Main {\n\n static String br = System.getProperty(\"line.separator\");\n static Scanner sc = new Scanner(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int N = nextInt();\n int[] num = new int[N];\n for(int i=0; i<N-1; i++){\n num[nextInt()-1] += 1;\n }\n for(int i=0; i<N; i++){\n println(num[i]);\n }\n }\n\n static int nextInt() {\n return Integer.parseInt(next());\n }\n\n static Long nextLong() {\n return Long.parseLong(next());\n }\n\n static String next() {\n return sc.next();\n }\n\n static String nextLine(){\n return sc.nextLine();\n }\n\n static void println(Object o) {\n out.println(o);\n out.flush();\n }\n\n static void print(Object o) {\n PrintWriter out = new PrintWriter(System.out);\n out.print(o);\n out.flush();\n }\n}", "import javax.print.DocFlavor;", "DocFlavor", "javax.print", "import java.awt.*;", "awt.*", "java", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.lang.reflect.Array;", "Array", "java.lang.reflect", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.*;", "util.*", "java", "import java.util.List;", "List", "java.util", "public class Main {\n\n static String br = System.getProperty(\"line.separator\");\n static Scanner sc = new Scanner(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int N = nextInt();\n int[] num = new int[N];\n for(int i=0; i<N-1; i++){\n num[nextInt()-1] += 1;\n }\n for(int i=0; i<N; i++){\n println(num[i]);\n }\n }\n\n static int nextInt() {\n return Integer.parseInt(next());\n }\n\n static Long nextLong() {\n return Long.parseLong(next());\n }\n\n static String next() {\n return sc.next();\n }\n\n static String nextLine(){\n return sc.nextLine();\n }\n\n static void println(Object o) {\n out.println(o);\n out.flush();\n }\n\n static void print(Object o) {\n PrintWriter out = new PrintWriter(System.out);\n out.print(o);\n out.flush();\n }\n}", "Main", "static String br = System.getProperty(\"line.separator\");", "br", "System.getProperty(\"line.separator\")", "System.getProperty", "System", "\"line.separator\"", "static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "static PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "public static void main(String[] args) {\n int N = nextInt();\n int[] num = new int[N];\n for(int i=0; i<N-1; i++){\n num[nextInt()-1] += 1;\n }\n for(int i=0; i<N; i++){\n println(num[i]);\n }\n }", "main", "{\n int N = nextInt();\n int[] num = new int[N];\n for(int i=0; i<N-1; i++){\n num[nextInt()-1] += 1;\n }\n for(int i=0; i<N; i++){\n println(num[i]);\n }\n }", "int N = nextInt();", "N", "nextInt()", "nextInt", "int[] num = new int[N];", "num", "new int[N]", "N", "for(int i=0; i<N-1; i++){\n num[nextInt()-1] += 1;\n }", "int i=0;", "int i=0;", "i", "0", "i<N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n num[nextInt()-1] += 1;\n }", "{\n num[nextInt()-1] += 1;\n }", "num[nextInt()-1] += 1", "num[nextInt()-1]", "num", "nextInt()-1", "nextInt()", "nextInt", "1", "1", "for(int i=0; i<N; i++){\n println(num[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n println(num[i]);\n }", "{\n println(num[i]);\n }", "println(num[i])", "println", "num[i]", "num", "i", "String[] args", "args", "static 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", "static 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", "static String next() {\n return sc.next();\n }", "next", "{\n return sc.next();\n }", "return sc.next();", "sc.next()", "sc.next", "sc", "static String nextLine(){\n return sc.nextLine();\n }", "nextLine", "{\n return sc.nextLine();\n }", "return sc.nextLine();", "sc.nextLine()", "sc.nextLine", "sc", "static void println(Object o) {\n out.println(o);\n out.flush();\n }", "println", "{\n out.println(o);\n out.flush();\n }", "out.println(o)", "out.println", "out", "o", "out.flush()", "out.flush", "out", "Object o", "o", "static void print(Object o) {\n PrintWriter out = new PrintWriter(System.out);\n out.print(o);\n out.flush();\n }", "print", "{\n PrintWriter out = new PrintWriter(System.out);\n out.print(o);\n out.flush();\n }", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "out.print(o)", "out.print", "out", "o", "out.flush()", "out.flush", "out", "Object o", "o", "public class Main {\n\n static String br = System.getProperty(\"line.separator\");\n static Scanner sc = new Scanner(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int N = nextInt();\n int[] num = new int[N];\n for(int i=0; i<N-1; i++){\n num[nextInt()-1] += 1;\n }\n for(int i=0; i<N; i++){\n println(num[i]);\n }\n }\n\n static int nextInt() {\n return Integer.parseInt(next());\n }\n\n static Long nextLong() {\n return Long.parseLong(next());\n }\n\n static String next() {\n return sc.next();\n }\n\n static String nextLine(){\n return sc.nextLine();\n }\n\n static void println(Object o) {\n out.println(o);\n out.flush();\n }\n\n static void print(Object o) {\n PrintWriter out = new PrintWriter(System.out);\n out.print(o);\n out.flush();\n }\n}", "public class Main {\n\n static String br = System.getProperty(\"line.separator\");\n static Scanner sc = new Scanner(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int N = nextInt();\n int[] num = new int[N];\n for(int i=0; i<N-1; i++){\n num[nextInt()-1] += 1;\n }\n for(int i=0; i<N; i++){\n println(num[i]);\n }\n }\n\n static int nextInt() {\n return Integer.parseInt(next());\n }\n\n static Long nextLong() {\n return Long.parseLong(next());\n }\n\n static String next() {\n return sc.next();\n }\n\n static String nextLine(){\n return sc.nextLine();\n }\n\n static void println(Object o) {\n out.println(o);\n out.flush();\n }\n\n static void print(Object o) {\n PrintWriter out = new PrintWriter(System.out);\n out.print(o);\n out.flush();\n }\n}", "Main" ]
import javax.print.DocFlavor; import java.awt.*; import java.io.PrintWriter; import java.lang.reflect.Array; import java.math.BigInteger; import java.util.*; import java.util.List; public class Main { static String br = System.getProperty("line.separator"); static Scanner sc = new Scanner(System.in); static PrintWriter out = new PrintWriter(System.out); public static void main(String[] args) { int N = nextInt(); int[] num = new int[N]; for(int i=0; i<N-1; i++){ num[nextInt()-1] += 1; } for(int i=0; i<N; i++){ println(num[i]); } } static int nextInt() { return Integer.parseInt(next()); } static Long nextLong() { return Long.parseLong(next()); } static String next() { return sc.next(); } static String nextLine(){ return sc.nextLine(); } static void println(Object o) { out.println(o); out.flush(); } static void print(Object o) { PrintWriter out = new PrintWriter(System.out); out.print(o); out.flush(); } }
[ 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, 17, 11, 1, 41, 13, 17, 2, 13, 13, 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, 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 ], [ 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 ], [ 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 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 8, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 58, 66 ], [ 66, 67 ], [ 67, 68 ], [ 58, 69 ], [ 70, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 76, 77 ], [ 76, 78 ], [ 6, 79 ], [ 79, 80 ], [ 0, 81 ], [ 81, 82 ], [ 81, 83 ] ]
[ "import java.util.*;\n \npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint[] nums=new int[n];\n \tint[] fnums=new int[n];\n \tnums[0]=0;\n \tfor(int i=1;i<n;i++){\n \t\tnums[i]=sc.nextInt();\n \t\tfnums[nums[i]-1]++;\n \t}\n \tfor(int i=0;i<n;i++){\n \t\tSystem.out.println(fnums[i]);\n \t}\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 \tint n=sc.nextInt();\n \tint[] nums=new int[n];\n \tint[] fnums=new int[n];\n \tnums[0]=0;\n \tfor(int i=1;i<n;i++){\n \t\tnums[i]=sc.nextInt();\n \t\tfnums[nums[i]-1]++;\n \t}\n \tfor(int i=0;i<n;i++){\n \t\tSystem.out.println(fnums[i]);\n \t}\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint[] nums=new int[n];\n \tint[] fnums=new int[n];\n \tnums[0]=0;\n \tfor(int i=1;i<n;i++){\n \t\tnums[i]=sc.nextInt();\n \t\tfnums[nums[i]-1]++;\n \t}\n \tfor(int i=0;i<n;i++){\n \t\tSystem.out.println(fnums[i]);\n \t}\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint[] nums=new int[n];\n \tint[] fnums=new int[n];\n \tnums[0]=0;\n \tfor(int i=1;i<n;i++){\n \t\tnums[i]=sc.nextInt();\n \t\tfnums[nums[i]-1]++;\n \t}\n \tfor(int i=0;i<n;i++){\n \t\tSystem.out.println(fnums[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[] nums=new int[n];", "nums", "new int[n]", "n", "int[] fnums=new int[n];", "fnums", "new int[n]", "n", "nums[0]=0", "nums[0]", "nums", "0", "0", "for(int i=1;i<n;i++){\n \t\tnums[i]=sc.nextInt();\n \t\tfnums[nums[i]-1]++;\n \t}", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n \t\tnums[i]=sc.nextInt();\n \t\tfnums[nums[i]-1]++;\n \t}", "{\n \t\tnums[i]=sc.nextInt();\n \t\tfnums[nums[i]-1]++;\n \t}", "nums[i]=sc.nextInt()", "nums[i]", "nums", "i", "sc.nextInt()", "sc.nextInt", "sc", "fnums[nums[i]-1]++", "fnums[nums[i]-1]", "fnums", "nums[i]-1", "nums[i]", "nums", "i", "1", "for(int i=0;i<n;i++){\n \t\tSystem.out.println(fnums[i]);\n \t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n \t\tSystem.out.println(fnums[i]);\n \t}", "{\n \t\tSystem.out.println(fnums[i]);\n \t}", "System.out.println(fnums[i])", "System.out.println", "System.out", "System", "System.out", "fnums[i]", "fnums", "i", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint[] nums=new int[n];\n \tint[] fnums=new int[n];\n \tnums[0]=0;\n \tfor(int i=1;i<n;i++){\n \t\tnums[i]=sc.nextInt();\n \t\tfnums[nums[i]-1]++;\n \t}\n \tfor(int i=0;i<n;i++){\n \t\tSystem.out.println(fnums[i]);\n \t}\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \tint n=sc.nextInt();\n \tint[] nums=new int[n];\n \tint[] fnums=new int[n];\n \tnums[0]=0;\n \tfor(int i=1;i<n;i++){\n \t\tnums[i]=sc.nextInt();\n \t\tfnums[nums[i]-1]++;\n \t}\n \tfor(int i=0;i<n;i++){\n \t\tSystem.out.println(fnums[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[] nums=new int[n]; int[] fnums=new int[n]; nums[0]=0; for(int i=1;i<n;i++){ nums[i]=sc.nextInt(); fnums[nums[i]-1]++; } for(int i=0;i<n;i++){ System.out.println(fnums[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, 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, 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 ], [ 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, 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 ], [ 68, 70 ], [ 67, 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\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint list[] = new int[X-1];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tlist[i] = sc.nextInt();\n\t\t}\n\t\tint ans[] = new int[X];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tans[list[i]-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < X; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint list[] = new int[X-1];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tlist[i] = sc.nextInt();\n\t\t}\n\t\tint ans[] = new int[X];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tans[list[i]-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < X; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint list[] = new int[X-1];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tlist[i] = sc.nextInt();\n\t\t}\n\t\tint ans[] = new int[X];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tans[list[i]-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < X; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint list[] = new int[X-1];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tlist[i] = sc.nextInt();\n\t\t}\n\t\tint ans[] = new int[X];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tans[list[i]-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < X; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int X = sc.nextInt();", "X", "sc.nextInt()", "sc.nextInt", "sc", "int list[] = new int[X-1];", "list", "new int[X-1]", "X-1", "X", "1", "for (int i = 0; i < X-1; i++) {\n\t\t\tlist[i] = sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < X-1", "i", "X-1", "X", "1", "i++", "i++", "i", "{\n\t\t\tlist[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tlist[i] = sc.nextInt();\n\t\t}", "list[i] = sc.nextInt()", "list[i]", "list", "i", "sc.nextInt()", "sc.nextInt", "sc", "int ans[] = new int[X];", "ans", "new int[X]", "X", "for (int i = 0; i < X-1; i++) {\n\t\t\tans[list[i]-1]++;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < X-1", "i", "X-1", "X", "1", "i++", "i++", "i", "{\n\t\t\tans[list[i]-1]++;\n\t\t}", "{\n\t\t\tans[list[i]-1]++;\n\t\t}", "ans[list[i]-1]++", "ans[list[i]-1]", "ans", "list[i]-1", "list[i]", "list", "i", "1", "for (int i = 0; i < X; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < X", "i", "X", "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\t\tint X = sc.nextInt();\n\t\tint list[] = new int[X-1];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tlist[i] = sc.nextInt();\n\t\t}\n\t\tint ans[] = new int[X];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tans[list[i]-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < X; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint X = sc.nextInt();\n\t\tint list[] = new int[X-1];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tlist[i] = sc.nextInt();\n\t\t}\n\t\tint ans[] = new int[X];\n\t\tfor (int i = 0; i < X-1; i++) {\n\t\t\tans[list[i]-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < X; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\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 X = sc.nextInt(); int list[] = new int[X-1]; for (int i = 0; i < X-1; i++) { list[i] = sc.nextInt(); } int ans[] = new int[X]; for (int i = 0; i < X-1; i++) { ans[list[i]-1]++; } for (int i = 0; i < X; 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, 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, 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, 18, 13, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 101, 5 ], [ 101, 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 ], [ 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 ], [ 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 ], [ 8, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 8, 95 ], [ 95, 96 ], [ 96, 97 ], [ 6, 98 ], [ 98, 99 ], [ 0, 100 ], [ 100, 101 ], [ 100, 102 ] ]
[ "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 empNum = sc.nextInt();\n\t\tint[] rel = new int[empNum - 1];\n\n\t\tfor (int i=0;i<rel.length;i++) {\n\t\t\trel[i] = 0;\n\t\t}\n\n\t\tfor(int i=0;i<rel.length;i++) {\n\t\t\trel[sc.nextInt()-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < rel.length; i++) {\n\t\t\tSystem.out.println(rel[i]);\n\t\t}\n\t\tSystem.out.println(\"0\");\n\n\n\t\tsc.close();\n\t}\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 empNum = sc.nextInt();\n\t\tint[] rel = new int[empNum - 1];\n\n\t\tfor (int i=0;i<rel.length;i++) {\n\t\t\trel[i] = 0;\n\t\t}\n\n\t\tfor(int i=0;i<rel.length;i++) {\n\t\t\trel[sc.nextInt()-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < rel.length; i++) {\n\t\t\tSystem.out.println(rel[i]);\n\t\t}\n\t\tSystem.out.println(\"0\");\n\n\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint empNum = sc.nextInt();\n\t\tint[] rel = new int[empNum - 1];\n\n\t\tfor (int i=0;i<rel.length;i++) {\n\t\t\trel[i] = 0;\n\t\t}\n\n\t\tfor(int i=0;i<rel.length;i++) {\n\t\t\trel[sc.nextInt()-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < rel.length; i++) {\n\t\t\tSystem.out.println(rel[i]);\n\t\t}\n\t\tSystem.out.println(\"0\");\n\n\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint empNum = sc.nextInt();\n\t\tint[] rel = new int[empNum - 1];\n\n\t\tfor (int i=0;i<rel.length;i++) {\n\t\t\trel[i] = 0;\n\t\t}\n\n\t\tfor(int i=0;i<rel.length;i++) {\n\t\t\trel[sc.nextInt()-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < rel.length; i++) {\n\t\t\tSystem.out.println(rel[i]);\n\t\t}\n\t\tSystem.out.println(\"0\");\n\n\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int empNum = sc.nextInt();", "empNum", "sc.nextInt()", "sc.nextInt", "sc", "int[] rel = new int[empNum - 1];", "rel", "new int[empNum - 1]", "empNum - 1", "empNum", "1", "for (int i=0;i<rel.length;i++) {\n\t\t\trel[i] = 0;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<rel.length", "i", "rel.length", "rel", "rel.length", "i++", "i++", "i", "{\n\t\t\trel[i] = 0;\n\t\t}", "{\n\t\t\trel[i] = 0;\n\t\t}", "rel[i] = 0", "rel[i]", "rel", "i", "0", "for(int i=0;i<rel.length;i++) {\n\t\t\trel[sc.nextInt()-1]++;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<rel.length", "i", "rel.length", "rel", "rel.length", "i++", "i++", "i", "{\n\t\t\trel[sc.nextInt()-1]++;\n\t\t}", "{\n\t\t\trel[sc.nextInt()-1]++;\n\t\t}", "rel[sc.nextInt()-1]++", "rel[sc.nextInt()-1]", "rel", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "for (int i = 0; i < rel.length; i++) {\n\t\t\tSystem.out.println(rel[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < rel.length", "i", "rel.length", "rel", "rel.length", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(rel[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(rel[i]);\n\t\t}", "System.out.println(rel[i])", "System.out.println", "System.out", "System", "System.out", "rel[i]", "rel", "i", "System.out.println(\"0\")", "System.out.println", "System.out", "System", "System.out", "\"0\"", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint empNum = sc.nextInt();\n\t\tint[] rel = new int[empNum - 1];\n\n\t\tfor (int i=0;i<rel.length;i++) {\n\t\t\trel[i] = 0;\n\t\t}\n\n\t\tfor(int i=0;i<rel.length;i++) {\n\t\t\trel[sc.nextInt()-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < rel.length; i++) {\n\t\t\tSystem.out.println(rel[i]);\n\t\t}\n\t\tSystem.out.println(\"0\");\n\n\n\t\tsc.close();\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint empNum = sc.nextInt();\n\t\tint[] rel = new int[empNum - 1];\n\n\t\tfor (int i=0;i<rel.length;i++) {\n\t\t\trel[i] = 0;\n\t\t}\n\n\t\tfor(int i=0;i<rel.length;i++) {\n\t\t\trel[sc.nextInt()-1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < rel.length; i++) {\n\t\t\tSystem.out.println(rel[i]);\n\t\t}\n\t\tSystem.out.println(\"0\");\n\n\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int empNum = sc.nextInt(); int[] rel = new int[empNum - 1]; for (int i=0;i<rel.length;i++) { rel[i] = 0; } for(int i=0;i<rel.length;i++) { rel[sc.nextInt()-1]++; } for (int i = 0; i < rel.length; i++) { System.out.println(rel[i]); } System.out.println("0"); sc.close(); } }
[ 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, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 40, 18, 13, 2, 4, 18, 13, 17, 28, 13, 13, 30, 4, 18, 13, 13, 23, 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 ], [ 102, 17 ], [ 102, 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 ], [ 102, 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, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 65, 75 ], [ 75, 76 ], [ 76, 77 ], [ 65, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 82, 86 ], [ 55, 87 ], [ 87, 88 ], [ 87, 89 ], [ 87, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 53, 95 ], [ 95, 96 ], [ 53, 97 ], [ 97, 98 ], [ 53, 99 ], [ 99, 100 ], [ 0, 101 ], [ 101, 102 ], [ 101, 103 ] ]
[ "import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author silviase\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(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, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int[] sub = new int[n];\n for (int i = 0; i < n - 1; i++) sub[in.nextInt() - 1]++;\n for (int s : sub) out.println(s);\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.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(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, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int[] sub = new int[n];\n for (int i = 0; i < n - 1; i++) sub[in.nextInt() - 1]++;\n for (int s : sub) out.println(s);\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(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 Scanner in = new Scanner(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", "Scanner in = new Scanner(inputStream);", "in", "new Scanner(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, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int[] sub = new int[n];\n for (int i = 0; i < n - 1; i++) sub[in.nextInt() - 1]++;\n for (int s : sub) out.println(s);\n }\n\n }", "CManagement", "public void solve(int testNumber, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int[] sub = new int[n];\n for (int i = 0; i < n - 1; i++) sub[in.nextInt() - 1]++;\n for (int s : sub) out.println(s);\n }", "solve", "{\n int n = in.nextInt();\n int[] sub = new int[n];\n for (int i = 0; i < n - 1; i++) sub[in.nextInt() - 1]++;\n for (int s : sub) out.println(s);\n }", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] sub = new int[n];", "sub", "new int[n]", "n", "for (int i = 0; i < n - 1; i++) sub[in.nextInt() - 1]++;", "int i = 0;", "int i = 0;", "i", "0", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "sub[in.nextInt() - 1]++;", "sub[in.nextInt() - 1]++", "sub[in.nextInt() - 1]", "sub", "in.nextInt() - 1", "in.nextInt()", "in.nextInt", "in", "1", "for (int s : sub) out.println(s);", "int s", "sub", "out.println(s);", "out.println(s)", "out.println", "out", "s", "int testNumber", "testNumber", "Scanner in", "in", "PrintWriter out", "out", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(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, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int[] sub = new int[n];\n for (int i = 0; i < n - 1; i++) sub[in.nextInt() - 1]++;\n for (int s : sub) out.println(s);\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 Scanner in = new Scanner(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, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int[] sub = new int[n];\n for (int i = 0; i < n - 1; i++) sub[in.nextInt() - 1]++;\n for (int s : sub) out.println(s);\n }\n\n }\n}", "Main" ]
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Scanner; /** * Built using CHelper plug-in * Actual solution is at the top * * @author silviase */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; Scanner in = new Scanner(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, Scanner in, PrintWriter out) { int n = in.nextInt(); int[] sub = new int[n]; for (int i = 0; i < n - 1; i++) sub[in.nextInt() - 1]++; for (int s : sub) out.println(s); } } }
[ 7, 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, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 13, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 18, 13, 13, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 18, 13, 13, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 6, 13, 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, 4, 18, 13, 18, 13, 13, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 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, 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 ], [ 306, 14 ], [ 306, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 17, 24 ], [ 24, 25 ], [ 24, 26 ], [ 17, 27 ], [ 27, 28 ], [ 27, 29 ], [ 17, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 30, 35 ], [ 35, 36 ], [ 35, 37 ], [ 30, 38 ], [ 38, 39 ], [ 39, 40 ], [ 30, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 42, 46 ], [ 42, 47 ], [ 17, 48 ], [ 48, 49 ], [ 49, 50 ], [ 15, 51 ], [ 51, 52 ], [ 306, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 59, 69 ], [ 69, 70 ], [ 70, 71 ], [ 59, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 79, 81 ], [ 73, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 73, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 91, 93 ], [ 73, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 53, 99 ], [ 99, 100 ], [ 306, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 107, 117 ], [ 117, 118 ], [ 118, 119 ], [ 107, 120 ], [ 121, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 127, 128 ], [ 127, 129 ], [ 121, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 132, 134 ], [ 121, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 139, 140 ], [ 139, 141 ], [ 121, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 142, 146 ], [ 101, 147 ], [ 147, 148 ], [ 306, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 153, 159 ], [ 159, 160 ], [ 159, 161 ], [ 162, 163 ], [ 162, 164 ], [ 153, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 165, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 172, 174 ], [ 165, 175 ], [ 175, 176 ], [ 176, 177 ], [ 165, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 182, 183 ], [ 183, 184 ], [ 153, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 187, 189 ], [ 185, 190 ], [ 190, 191 ], [ 190, 192 ], [ 185, 193 ], [ 193, 194 ], [ 194, 195 ], [ 185, 196 ], [ 196, 197 ], [ 197, 198 ], [ 198, 199 ], [ 197, 200 ], [ 200, 201 ], [ 200, 202 ], [ 151, 203 ], [ 203, 204 ], [ 151, 205 ], [ 205, 206 ], [ 151, 207 ], [ 207, 208 ], [ 306, 209 ], [ 209, 210 ], [ 209, 211 ], [ 211, 212 ], [ 209, 213 ], [ 213, 214 ], [ 209, 215 ], [ 215, 216 ], [ 215, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 209, 221 ], [ 221, 222 ], [ 221, 223 ], [ 223, 224 ], [ 224, 225 ], [ 224, 226 ], [ 221, 227 ], [ 227, 228 ], [ 209, 229 ], [ 229, 230 ], [ 229, 231 ], [ 231, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 234, 236 ], [ 233, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 232, 241 ], [ 241, 242 ], [ 242, 243 ], [ 243, 244 ], [ 243, 245 ], [ 245, 246 ], [ 246, 247 ], [ 247, 248 ], [ 242, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 231, 253 ], [ 253, 254 ], [ 254, 255 ], [ 255, 256 ], [ 209, 257 ], [ 257, 258 ], [ 257, 259 ], [ 259, 260 ], [ 260, 261 ], [ 261, 262 ], [ 262, 263 ], [ 261, 264 ], [ 264, 265 ], [ 209, 266 ], [ 266, 267 ], [ 266, 268 ], [ 268, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 270, 273 ], [ 273, 274 ], [ 209, 275 ], [ 275, 276 ], [ 275, 277 ], [ 277, 278 ], [ 278, 279 ], [ 279, 280 ], [ 280, 281 ], [ 279, 282 ], [ 282, 283 ], [ 209, 284 ], [ 284, 285 ], [ 284, 286 ], [ 286, 287 ], [ 287, 288 ], [ 287, 289 ], [ 286, 290 ], [ 290, 291 ], [ 291, 292 ], [ 291, 293 ], [ 293, 294 ], [ 294, 295 ], [ 295, 296 ], [ 290, 297 ], [ 297, 298 ], [ 298, 299 ], [ 298, 300 ], [ 300, 301 ], [ 301, 302 ], [ 286, 303 ], [ 303, 304 ], [ 0, 305 ], [ 305, 306 ], [ 305, 307 ] ]
[ "\nimport java.io.*;\nimport java.util.Random;\nimport java.util.StringTokenizer;\nimport java.util.TreeSet;\n\npublic class Main {\n //Solution by Sathvik Kuthuru\n public static void main(String[] args) {\n FastReader scan = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n Task solver = new Task();\n int t = 1;\n for(int tt = 1; tt <= t; tt++) solver.solve(tt, scan, out);\n out.close();\n }\n\n static class Task {\n\n public void solve(int testNumber, FastReader scan, PrintWriter out) {\n int n = scan.nextInt();\n int[] a = new int[n + 1];\n for(int i = 0; i < n - 1; i++) a[scan.nextInt()]++;\n for(int i = 1; i <= n; i++) out.println(a[i]);\n }\n }\n\n static void shuffle(int[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }\n\n static void shuffle(long[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n long temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }\n\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 public FastReader(String s) throws FileNotFoundException {\n br = new BufferedReader(new FileReader(new File(s)));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n}", "import java.io.*;", "io.*", "java", "import java.util.Random;", "Random", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.util.TreeSet;", "TreeSet", "java.util", "public class Main {\n //Solution by Sathvik Kuthuru\n public static void main(String[] args) {\n FastReader scan = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n Task solver = new Task();\n int t = 1;\n for(int tt = 1; tt <= t; tt++) solver.solve(tt, scan, out);\n out.close();\n }\n\n static class Task {\n\n public void solve(int testNumber, FastReader scan, PrintWriter out) {\n int n = scan.nextInt();\n int[] a = new int[n + 1];\n for(int i = 0; i < n - 1; i++) a[scan.nextInt()]++;\n for(int i = 1; i <= n; i++) out.println(a[i]);\n }\n }\n\n static void shuffle(int[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }\n\n static void shuffle(long[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n long temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }\n\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 public FastReader(String s) throws FileNotFoundException {\n br = new BufferedReader(new FileReader(new File(s)));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n}", "Main", "//Solution by Sathvik Kuthuru\n public static void main(String[] args) {\n FastReader scan = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n Task solver = new Task();\n int t = 1;\n for(int tt = 1; tt <= t; tt++) solver.solve(tt, scan, out);\n out.close();\n }", "main", "{\n FastReader scan = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n Task solver = new Task();\n int t = 1;\n for(int tt = 1; tt <= t; tt++) solver.solve(tt, scan, out);\n out.close();\n }", "FastReader scan = new FastReader();", "scan", "new FastReader()", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "Task solver = new Task();", "solver", "new Task()", "int t = 1;", "t", "1", "for(int tt = 1; tt <= t; tt++) solver.solve(tt, scan, out);", "int tt = 1;", "int tt = 1;", "tt", "1", "tt <= t", "tt", "t", "tt++", "tt++", "tt", "solver.solve(tt, scan, out);", "solver.solve(tt, scan, out)", "solver.solve", "solver", "tt", "scan", "out", "out.close()", "out.close", "out", "String[] args", "args", "static void shuffle(int[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "shuffle", "{\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "Random get = new Random();", "get", "new Random()", "for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < a.length", "i", "a.length", "a", "a.length", "i++", "i++", "i", "{\n int r = get.nextInt(a.length);\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }", "{\n int r = get.nextInt(a.length);\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }", "int r = get.nextInt(a.length);", "r", "get.nextInt(a.length)", "get.nextInt", "get", "a.length", "a", "a.length", "int temp = a[i];", "temp", "a[i]", "a", "i", "a[i] = a[r]", "a[i]", "a", "i", "a[r]", "a", "r", "a[r] = temp", "a[r]", "a", "r", "temp", "int[] a", "a", "static void shuffle(long[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n long temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "shuffle", "{\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n long temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "Random get = new Random();", "get", "new Random()", "for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n long temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < a.length", "i", "a.length", "a", "a.length", "i++", "i++", "i", "{\n int r = get.nextInt(a.length);\n long temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }", "{\n int r = get.nextInt(a.length);\n long temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }", "int r = get.nextInt(a.length);", "r", "get.nextInt(a.length)", "get.nextInt", "get", "a.length", "a", "a.length", "long temp = a[i];", "temp", "a[i]", "a", "i", "a[i] = a[r]", "a[i]", "a", "i", "a[r]", "a", "r", "a[r] = temp", "a[r]", "a", "r", "temp", "long[] a", "a", "static class Task {\n\n public void solve(int testNumber, FastReader scan, PrintWriter out) {\n int n = scan.nextInt();\n int[] a = new int[n + 1];\n for(int i = 0; i < n - 1; i++) a[scan.nextInt()]++;\n for(int i = 1; i <= n; i++) out.println(a[i]);\n }\n }", "Task", "public void solve(int testNumber, FastReader scan, PrintWriter out) {\n int n = scan.nextInt();\n int[] a = new int[n + 1];\n for(int i = 0; i < n - 1; i++) a[scan.nextInt()]++;\n for(int i = 1; i <= n; i++) out.println(a[i]);\n }", "solve", "{\n int n = scan.nextInt();\n int[] a = new int[n + 1];\n for(int i = 0; i < n - 1; i++) a[scan.nextInt()]++;\n for(int i = 1; i <= n; i++) out.println(a[i]);\n }", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int[] a = new int[n + 1];", "a", "new int[n + 1]", "n + 1", "n", "1", "for(int i = 0; i < n - 1; i++) a[scan.nextInt()]++;", "int i = 0;", "int i = 0;", "i", "0", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "a[scan.nextInt()]++;", "a[scan.nextInt()]++", "a[scan.nextInt()]", "a", "scan.nextInt()", "scan.nextInt", "scan", "for(int i = 1; i <= n; i++) out.println(a[i]);", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "out.println(a[i]);", "out.println(a[i])", "out.println", "out", "a[i]", "a", "i", "int testNumber", "testNumber", "FastReader scan", "scan", "PrintWriter out", "out", "static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n public FastReader(String s) throws FileNotFoundException {\n br = new BufferedReader(new FileReader(new File(s)));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "FastReader", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "public FastReader(String s) throws FileNotFoundException {\n br = new BufferedReader(new FileReader(new File(s)));\n }", "FastReader", "{\n br = new BufferedReader(new FileReader(new File(s)));\n }", "br = new BufferedReader(new FileReader(new File(s)))", "br", "new BufferedReader(new FileReader(new File(s)))", "String s", "s", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n //Solution by Sathvik Kuthuru\n public static void main(String[] args) {\n FastReader scan = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n Task solver = new Task();\n int t = 1;\n for(int tt = 1; tt <= t; tt++) solver.solve(tt, scan, out);\n out.close();\n }\n\n static class Task {\n\n public void solve(int testNumber, FastReader scan, PrintWriter out) {\n int n = scan.nextInt();\n int[] a = new int[n + 1];\n for(int i = 0; i < n - 1; i++) a[scan.nextInt()]++;\n for(int i = 1; i <= n; i++) out.println(a[i]);\n }\n }\n\n static void shuffle(int[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }\n\n static void shuffle(long[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n long temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }\n\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 public FastReader(String s) throws FileNotFoundException {\n br = new BufferedReader(new FileReader(new File(s)));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n}", "public class Main {\n //Solution by Sathvik Kuthuru\n public static void main(String[] args) {\n FastReader scan = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n Task solver = new Task();\n int t = 1;\n for(int tt = 1; tt <= t; tt++) solver.solve(tt, scan, out);\n out.close();\n }\n\n static class Task {\n\n public void solve(int testNumber, FastReader scan, PrintWriter out) {\n int n = scan.nextInt();\n int[] a = new int[n + 1];\n for(int i = 0; i < n - 1; i++) a[scan.nextInt()]++;\n for(int i = 1; i <= n; i++) out.println(a[i]);\n }\n }\n\n static void shuffle(int[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }\n\n static void shuffle(long[] a) {\n Random get = new Random();\n for (int i = 0; i < a.length; i++) {\n int r = get.nextInt(a.length);\n long temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }\n\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 public FastReader(String s) throws FileNotFoundException {\n br = new BufferedReader(new FileReader(new File(s)));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n}", "Main" ]
import java.io.*; import java.util.Random; import java.util.StringTokenizer; import java.util.TreeSet; public class Main { //Solution by Sathvik Kuthuru public static void main(String[] args) { FastReader scan = new FastReader(); PrintWriter out = new PrintWriter(System.out); Task solver = new Task(); int t = 1; for(int tt = 1; tt <= t; tt++) solver.solve(tt, scan, out); out.close(); } static class Task { public void solve(int testNumber, FastReader scan, PrintWriter out) { int n = scan.nextInt(); int[] a = new int[n + 1]; for(int i = 0; i < n - 1; i++) a[scan.nextInt()]++; for(int i = 1; i <= n; i++) out.println(a[i]); } } static void shuffle(int[] a) { Random get = new Random(); for (int i = 0; i < a.length; i++) { int r = get.nextInt(a.length); int temp = a[i]; a[i] = a[r]; a[r] = temp; } } static void shuffle(long[] a) { Random get = new Random(); for (int i = 0; i < a.length; i++) { int r = get.nextInt(a.length); long temp = a[i]; a[i] = a[r]; a[r] = temp; } } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } public FastReader(String s) throws FileNotFoundException { br = new BufferedReader(new FileReader(new File(s))); } 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, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 20, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 4, 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, 4, 18, 4, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 93, 8 ], [ 93, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 11, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 11, 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 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 60, 64 ], [ 55, 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 ], [ 81, 83 ], [ 79, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 9, 90 ], [ 90, 91 ], [ 0, 92 ], [ 92, 93 ], [ 92, 94 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>(n);\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist.get(scan.nextInt() - 1).add(1);\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list.get(i).size());\n\t\t}\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>(n);\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist.get(scan.nextInt() - 1).add(1);\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list.get(i).size());\n\t\t}\n\t}\n}", "Main", "public static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>(n);\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist.get(scan.nextInt() - 1).add(1);\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list.get(i).size());\n\t\t}\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>(n);\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist.get(scan.nextInt() - 1).add(1);\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list.get(i).size());\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", "ArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>(n);", "list", "new ArrayList<ArrayList<Integer>>(n)", "for(int i = 0;i < n;i++) {\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}", "{\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}", "list.add(new ArrayList<Integer>())", "list.add", "list", "new ArrayList<Integer>()", "for(int i =0;i < n - 1;i++) {\n\t\t\tlist.get(scan.nextInt() - 1).add(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\tlist.get(scan.nextInt() - 1).add(1);\n\t\t}", "{\n\t\t\tlist.get(scan.nextInt() - 1).add(1);\n\t\t}", "list.get(scan.nextInt() - 1).add(1)", "list.get(scan.nextInt() - 1).add", "list.get(scan.nextInt() - 1)", "list.get", "list", "scan.nextInt() - 1", "scan.nextInt()", "scan.nextInt", "scan", "1", "1", "for(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list.get(i).size());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(list.get(i).size());\n\t\t}", "{\n\t\t\tSystem.out.println(list.get(i).size());\n\t\t}", "System.out.println(list.get(i).size())", "System.out.println", "System.out", "System", "System.out", "list.get(i).size()", "list.get(i).size", "list.get(i)", "list.get", "list", "i", "String[] rags", "rags", "public class Main {\n\tpublic static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>(n);\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist.get(scan.nextInt() - 1).add(1);\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list.get(i).size());\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] rags) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>(n);\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tlist.add(new ArrayList<Integer>());\n\t\t}\n\n\t\tfor(int i =0;i < n - 1;i++) {\n\t\t\tlist.get(scan.nextInt() - 1).add(1);\n\t\t}\n\n\t\tfor(int i = 0;i < n;i++) {\n\t\t\tSystem.out.println(list.get(i).size());\n\t\t}\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] rags) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); ArrayList<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>(n); for(int i = 0;i < n;i++) { list.add(new ArrayList<Integer>()); } for(int i =0;i < n - 1;i++) { list.get(scan.nextInt() - 1).add(1); } for(int i = 0;i < n;i++) { System.out.println(list.get(i).size()); } } }
[ 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, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 70, 5 ], [ 70, 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 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 6, 67 ], [ 67, 68 ], [ 0, 69 ], [ 69, 70 ], [ 69, 71 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] B = new int[N];\n for (int i = 0; i < N - 1; i++) {\n int A = scanner.nextInt();\n B[A - 1]++;\n }\n\n for (int i = 0; i < N; i++)\n System.out.println(B[i]);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] B = new int[N];\n for (int i = 0; i < N - 1; i++) {\n int A = scanner.nextInt();\n B[A - 1]++;\n }\n\n for (int i = 0; i < N; i++)\n System.out.println(B[i]);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] B = new int[N];\n for (int i = 0; i < N - 1; i++) {\n int A = scanner.nextInt();\n B[A - 1]++;\n }\n\n for (int i = 0; i < N; i++)\n System.out.println(B[i]);\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] B = new int[N];\n for (int i = 0; i < N - 1; i++) {\n int A = scanner.nextInt();\n B[A - 1]++;\n }\n\n for (int i = 0; i < N; i++)\n System.out.println(B[i]);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] B = new int[N];", "B", "new int[N]", "N", "for (int i = 0; i < N - 1; i++) {\n int A = scanner.nextInt();\n B[A - 1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N - 1", "i", "N - 1", "N", "1", "i++", "i++", "i", "{\n int A = scanner.nextInt();\n B[A - 1]++;\n }", "{\n int A = scanner.nextInt();\n B[A - 1]++;\n }", "int A = scanner.nextInt();", "A", "scanner.nextInt()", "scanner.nextInt", "scanner", "B[A - 1]++", "B[A - 1]", "B", "A - 1", "A", "1", "for (int i = 0; i < N; i++)\n System.out.println(B[i]);", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "System.out.println(B[i]);", "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 scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] B = new int[N];\n for (int i = 0; i < N - 1; i++) {\n int A = scanner.nextInt();\n B[A - 1]++;\n }\n\n for (int i = 0; i < N; i++)\n System.out.println(B[i]);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] B = new int[N];\n for (int i = 0; i < N - 1; i++) {\n int A = scanner.nextInt();\n B[A - 1]++;\n }\n\n for (int i = 0; i < N; i++)\n System.out.println(B[i]);\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[] B = new int[N]; for (int i = 0; i < N - 1; i++) { int A = scanner.nextInt(); B[A - 1]++; } for (int i = 0; i < N; i++) System.out.println(B[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.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = sc.nextInt();\n\t\tint [] ans = new int[num+1];\n\t\tfor(int i = 1 ; i < num ;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tans[a]++;\n\t\t}\n\t\tfor(int i = 1 ; i <= num ;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\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = sc.nextInt();\n\t\tint [] ans = new int[num+1];\n\t\tfor(int i = 1 ; i < num ;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tans[a]++;\n\t\t}\n\t\tfor(int i = 1 ; i <= num ;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\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = sc.nextInt();\n\t\tint [] ans = new int[num+1];\n\t\tfor(int i = 1 ; i < num ;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tans[a]++;\n\t\t}\n\t\tfor(int i = 1 ; i <= num ;i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = sc.nextInt();\n\t\tint [] ans = new int[num+1];\n\t\tfor(int i = 1 ; i < num ;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tans[a]++;\n\t\t}\n\t\tfor(int i = 1 ; i <= num ;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 num = sc.nextInt();", "num", "sc.nextInt()", "sc.nextInt", "sc", "int [] ans = new int[num+1];", "ans", "new int[num+1]", "num+1", "num", "1", "for(int i = 1 ; i < num ;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tans[a]++;\n\t\t}", "int i = 1 ;", "int i = 1 ;", "i", "1", "i < num", "i", "num", "i++", "i++", "i", "{\n\t\t\tint a = sc.nextInt();\n\t\t\tans[a]++;\n\t\t}", "{\n\t\t\tint a = sc.nextInt();\n\t\t\tans[a]++;\n\t\t}", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "ans[a]++", "ans[a]", "ans", "a", "for(int i = 1 ; i <= num ;i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "int i = 1 ;", "int i = 1 ;", "i", "1", "i <= num", "i", "num", "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\t// TODO Auto-generated method stub\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = sc.nextInt();\n\t\tint [] ans = new int[num+1];\n\t\tfor(int i = 1 ; i < num ;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tans[a]++;\n\t\t}\n\t\tfor(int i = 1 ; i <= num ;i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = sc.nextInt();\n\t\tint [] ans = new int[num+1];\n\t\tfor(int i = 1 ; i < num ;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tans[a]++;\n\t\t}\n\t\tfor(int i = 1 ; i <= num ;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 sc = new Scanner(System.in); int num = sc.nextInt(); int [] ans = new int[num+1]; for(int i = 1 ; i < num ;i++) { int a = sc.nextInt(); ans[a]++; } for(int i = 1 ; i <= num ;i++) { System.out.println(ans[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, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 0, 18, 13, 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, 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 ]
[ [ 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 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 26, 36 ], [ 36, 37 ], [ 37, 38 ], [ 26, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 47, 49 ], [ 11, 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 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 74, 82 ], [ 11, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 83, 91 ], [ 91, 92 ], [ 92, 93 ], [ 83, 94 ], [ 95, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 101, 102 ], [ 101, 103 ], [ 9, 104 ], [ 104, 105 ] ]
[ "import java.util.HashMap;\nimport java.util.Scanner;\n\nclass Main{\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n-1];\n\t\tfor(int i=0;i<n-1;i++)\n\t\t\ta[i] = sc.nextInt();\n\t\tint res[] = new int[n];\n\t\tfor(int i=0;i<a.length;i++) {\n\t\t\tres[a[i]-1]=res[a[i]-1]+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tSystem.out.println(res[i]);\n\t\t}\n\t}\n}", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint a[] = new int[n-1];\n\t\tfor(int i=0;i<n-1;i++)\n\t\t\ta[i] = sc.nextInt();\n\t\tint res[] = new int[n];\n\t\tfor(int i=0;i<a.length;i++) {\n\t\t\tres[a[i]-1]=res[a[i]-1]+1;\n\t\t}\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tSystem.out.println(res[i]);\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\tint res[] = new int[n];\n\t\tfor(int i=0;i<a.length;i++) {\n\t\t\tres[a[i]-1]=res[a[i]-1]+1;\n\t\t}\n\t\tfor(int i=0;i<n;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 a[] = new int[n-1];\n\t\tfor(int i=0;i<n-1;i++)\n\t\t\ta[i] = sc.nextInt();\n\t\tint res[] = new int[n];\n\t\tfor(int i=0;i<a.length;i++) {\n\t\t\tres[a[i]-1]=res[a[i]-1]+1;\n\t\t}\n\t\tfor(int i=0;i<n;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 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();", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "a[i] = sc.nextInt();", "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=0;i<a.length;i++) {\n\t\t\tres[a[i]-1]=res[a[i]-1]+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\tres[a[i]-1]=res[a[i]-1]+1;\n\t\t}", "{\n\t\t\tres[a[i]-1]=res[a[i]-1]+1;\n\t\t}", "res[a[i]-1]=res[a[i]-1]+1", "res[a[i]-1]", "res", "a[i]-1", "a[i]", "a", "i", "1", "res[a[i]-1]+1", "res[a[i]-1]", "res", "a[i]-1", "a[i]", "a", "i", "1", "1", "for(int i=0;i<n;i++) {\n\t\t\tSystem.out.println(res[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(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" ]
import java.util.HashMap; import java.util.Scanner; 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(); int res[] = new int[n]; for(int i=0;i<a.length;i++) { res[a[i]-1]=res[a[i]-1]+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, 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, 4, 18, 13, 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, 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 ], [ 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 ], [ 34, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 45, 49 ], [ 44, 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 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 71, 75 ], [ 6, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int l = sc.nextInt();\n HashMap<Integer,Integer> map = new HashMap<>();\n for (int i = 0; i < l - 1; i++) {\n int item = sc.nextInt();\n map.put(item,map.getOrDefault(item,0) + 1);\n }\n for(int i = 1;i < l + 1;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 sc = new Scanner(System.in);\n int l = sc.nextInt();\n HashMap<Integer,Integer> map = new HashMap<>();\n for (int i = 0; i < l - 1; i++) {\n int item = sc.nextInt();\n map.put(item,map.getOrDefault(item,0) + 1);\n }\n for(int i = 1;i < l + 1;i++){\n System.out.println(map.getOrDefault(i,0));\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int l = sc.nextInt();\n HashMap<Integer,Integer> map = new HashMap<>();\n for (int i = 0; i < l - 1; i++) {\n int item = sc.nextInt();\n map.put(item,map.getOrDefault(item,0) + 1);\n }\n for(int i = 1;i < l + 1;i++){\n System.out.println(map.getOrDefault(i,0));\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int l = sc.nextInt();\n HashMap<Integer,Integer> map = new HashMap<>();\n for (int i = 0; i < l - 1; i++) {\n int item = sc.nextInt();\n map.put(item,map.getOrDefault(item,0) + 1);\n }\n for(int i = 1;i < l + 1;i++){\n System.out.println(map.getOrDefault(i,0));\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int l = sc.nextInt();", "l", "sc.nextInt()", "sc.nextInt", "sc", "HashMap<Integer,Integer> map = new HashMap<>();", "map", "new HashMap<>()", "for (int i = 0; i < l - 1; i++) {\n int item = sc.nextInt();\n map.put(item,map.getOrDefault(item,0) + 1);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < l - 1", "i", "l - 1", "l", "1", "i++", "i++", "i", "{\n int item = sc.nextInt();\n map.put(item,map.getOrDefault(item,0) + 1);\n }", "{\n int item = sc.nextInt();\n map.put(item,map.getOrDefault(item,0) + 1);\n }", "int item = sc.nextInt();", "item", "sc.nextInt()", "sc.nextInt", "sc", "map.put(item,map.getOrDefault(item,0) + 1)", "map.put", "map", "item", "map.getOrDefault(item,0) + 1", "map.getOrDefault(item,0)", "map.getOrDefault", "map", "item", "0", "1", "for(int i = 1;i < l + 1;i++){\n System.out.println(map.getOrDefault(i,0));\n }", "int i = 1;", "int i = 1;", "i", "1", "i < l + 1", "i", "l + 1", "l", "1", "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 sc = new Scanner(System.in);\n int l = sc.nextInt();\n HashMap<Integer,Integer> map = new HashMap<>();\n for (int i = 0; i < l - 1; i++) {\n int item = sc.nextInt();\n map.put(item,map.getOrDefault(item,0) + 1);\n }\n for(int i = 1;i < l + 1;i++){\n System.out.println(map.getOrDefault(i,0));\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int l = sc.nextInt();\n HashMap<Integer,Integer> map = new HashMap<>();\n for (int i = 0; i < l - 1; i++) {\n int item = sc.nextInt();\n map.put(item,map.getOrDefault(item,0) + 1);\n }\n for(int i = 1;i < l + 1;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 sc = new Scanner(System.in); int l = sc.nextInt(); HashMap<Integer,Integer> map = new HashMap<>(); for (int i = 0; i < l - 1; i++) { int item = sc.nextInt(); map.put(item,map.getOrDefault(item,0) + 1); } for(int i = 1;i < l + 1;i++){ System.out.println(map.getOrDefault(i,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, 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 ], [ 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 ], [ 6, 68 ], [ 68, 69 ], [ 0, 70 ], [ 70, 71 ], [ 70, 72 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n=scan.nextInt();\n int[] a=new int[n+1];\n for(int i=0;i<n-1;i++){\n int b=scan.nextInt();\n a[b]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(a[i]);\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 n=scan.nextInt();\n int[] a=new int[n+1];\n for(int i=0;i<n-1;i++){\n int b=scan.nextInt();\n a[b]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(a[i]);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n=scan.nextInt();\n int[] a=new int[n+1];\n for(int i=0;i<n-1;i++){\n int b=scan.nextInt();\n a[b]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(a[i]);\n }\n }", "main", "{\n Scanner scan=new Scanner(System.in);\n int n=scan.nextInt();\n int[] a=new int[n+1];\n for(int i=0;i<n-1;i++){\n int b=scan.nextInt();\n a[b]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(a[i]);\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+1];", "a", "new int[n+1]", "n+1", "n", "1", "for(int i=0;i<n-1;i++){\n int b=scan.nextInt();\n a[b]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n int b=scan.nextInt();\n a[b]++;\n }", "{\n int b=scan.nextInt();\n a[b]++;\n }", "int b=scan.nextInt();", "b", "scan.nextInt()", "scan.nextInt", "scan", "a[b]++", "a[b]", "a", "b", "for(int i=1;i<=n;i++){\n System.out.println(a[i]);\n }", "int i=1;", "int i=1;", "i", "1", "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", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n=scan.nextInt();\n int[] a=new int[n+1];\n for(int i=0;i<n-1;i++){\n int b=scan.nextInt();\n a[b]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(a[i]);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n int n=scan.nextInt();\n int[] a=new int[n+1];\n for(int i=0;i<n-1;i++){\n int b=scan.nextInt();\n a[b]++;\n }\n for(int i=1;i<=n;i++){\n System.out.println(a[i]);\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+1]; for(int i=0;i<n-1;i++){ int b=scan.nextInt(); a[b]++; } for(int i=1;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, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 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, 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 ], [ 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 ], [ 32, 33 ], [ 32, 34 ], [ 25, 35 ], [ 35, 36 ], [ 36, 37 ], [ 25, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 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 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 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 ], [ 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\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner cin = new Scanner(System.in);\n\t\tint N = cin.nextInt();\n\t\t\n\t\tint A[] = new int[200200];\n\t\t\n\t\tint B[] = new int[200200];\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) A[i] = cin.nextInt();\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) B[A[i]]++;\n\t\t\n\t\t\n\t\t//社員番号1~Nのそれぞれの社員について、直属の部下が何人いるか出力\n\t\tfor(int i = 1;i<N+1;i++) System.out.println(B[i]);\n\n\t}\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner cin = new Scanner(System.in);\n\t\tint N = cin.nextInt();\n\t\t\n\t\tint A[] = new int[200200];\n\t\t\n\t\tint B[] = new int[200200];\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) A[i] = cin.nextInt();\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) B[A[i]]++;\n\t\t\n\t\t\n\t\t//社員番号1~Nのそれぞれの社員について、直属の部下が何人いるか出力\n\t\tfor(int i = 1;i<N+1;i++) System.out.println(B[i]);\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner cin = new Scanner(System.in);\n\t\tint N = cin.nextInt();\n\t\t\n\t\tint A[] = new int[200200];\n\t\t\n\t\tint B[] = new int[200200];\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) A[i] = cin.nextInt();\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) B[A[i]]++;\n\t\t\n\t\t\n\t\t//社員番号1~Nのそれぞれの社員について、直属の部下が何人いるか出力\n\t\tfor(int i = 1;i<N+1;i++) System.out.println(B[i]);\n\n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner cin = new Scanner(System.in);\n\t\tint N = cin.nextInt();\n\t\t\n\t\tint A[] = new int[200200];\n\t\t\n\t\tint B[] = new int[200200];\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) A[i] = cin.nextInt();\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) B[A[i]]++;\n\t\t\n\t\t\n\t\t//社員番号1~Nのそれぞれの社員について、直属の部下が何人いるか出力\n\t\tfor(int i = 1;i<N+1;i++) System.out.println(B[i]);\n\n\t}", "Scanner cin = new Scanner(System.in);", "cin", "new Scanner(System.in)", "int N = cin.nextInt();", "N", "cin.nextInt()", "cin.nextInt", "cin", "int A[] = new int[200200];", "A", "new int[200200]", "200200", "int B[] = new int[200200];", "B", "new int[200200]", "200200", "for(int i = 2;i<N+1;i++) A[i] = cin.nextInt();", "int i = 2;", "int i = 2;", "i", "2", "i<N+1", "i", "N+1", "N", "1", "i++", "i++", "i", "A[i] = cin.nextInt();", "A[i] = cin.nextInt()", "A[i]", "A", "i", "cin.nextInt()", "cin.nextInt", "cin", "for(int i = 2;i<N+1;i++) B[A[i]]++;", "int i = 2;", "int i = 2;", "i", "2", "i<N+1", "i", "N+1", "N", "1", "i++", "i++", "i", "B[A[i]]++;", "B[A[i]]++", "B[A[i]]", "B", "A[i]", "A", "i", "for(int i = 1;i<N+1;i++) System.out.println(B[i]);", "int i = 1;", "int i = 1;", "i", "1", "i<N+1", "i", "N+1", "N", "1", "i++", "i++", "i", "System.out.println(B[i]);", "System.out.println(B[i])", "System.out.println", "System.out", "System", "System.out", "B[i]", "B", "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\t\n\t\tScanner cin = new Scanner(System.in);\n\t\tint N = cin.nextInt();\n\t\t\n\t\tint A[] = new int[200200];\n\t\t\n\t\tint B[] = new int[200200];\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) A[i] = cin.nextInt();\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) B[A[i]]++;\n\t\t\n\t\t\n\t\t//社員番号1~Nのそれぞれの社員について、直属の部下が何人いるか出力\n\t\tfor(int i = 1;i<N+1;i++) System.out.println(B[i]);\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner cin = new Scanner(System.in);\n\t\tint N = cin.nextInt();\n\t\t\n\t\tint A[] = new int[200200];\n\t\t\n\t\tint B[] = new int[200200];\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) A[i] = cin.nextInt();\n\t\t\n\t\tfor(int i = 2;i<N+1;i++) B[A[i]]++;\n\t\t\n\t\t\n\t\t//社員番号1~Nのそれぞれの社員について、直属の部下が何人いるか出力\n\t\tfor(int i = 1;i<N+1;i++) System.out.println(B[i]);\n\n\t}\n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner cin = new Scanner(System.in); int N = cin.nextInt(); int A[] = new int[200200]; int B[] = new int[200200]; for(int i = 2;i<N+1;i++) A[i] = cin.nextInt(); for(int i = 2;i<N+1;i++) B[A[i]]++; //社員番号1~Nのそれぞれの社員について、直属の部下が何人いるか出力 for(int i = 1;i<N+1;i++) System.out.println(B[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, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 17, 2, 4, 18, 13, 2, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 99, 11 ], [ 99, 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 ], [ 29, 32 ], [ 14, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 56, 57 ], [ 45, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 61, 62 ], [ 61, 63 ], [ 58, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 68, 69 ], [ 68, 70 ], [ 64, 71 ], [ 14, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 72, 82 ], [ 82, 83 ], [ 83, 84 ], [ 72, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 12, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport 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 num = Integer.parseInt(sc.next());\n\t\tList<Integer> empList = new ArrayList<>();\n\t\tempList.add(0);\n\t\tfor (int i = 1; i < num; i++) {\n\t\t\tempList.add(0);\n\t\t\tint bossNum = Integer.parseInt(sc.next());\n\t\t\tempList.set(bossNum - 1, empList.get(bossNum - 1) + 1);\n\n\t\t}\n\t\tfor (int i = 0; i < empList.size(); i++) {\n\t\t\tSystem.out.println(empList.get(i));\n\t\t}\n\t}\n\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = Integer.parseInt(sc.next());\n\t\tList<Integer> empList = new ArrayList<>();\n\t\tempList.add(0);\n\t\tfor (int i = 1; i < num; i++) {\n\t\t\tempList.add(0);\n\t\t\tint bossNum = Integer.parseInt(sc.next());\n\t\t\tempList.set(bossNum - 1, empList.get(bossNum - 1) + 1);\n\n\t\t}\n\t\tfor (int i = 0; i < empList.size(); i++) {\n\t\t\tSystem.out.println(empList.get(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 num = Integer.parseInt(sc.next());\n\t\tList<Integer> empList = new ArrayList<>();\n\t\tempList.add(0);\n\t\tfor (int i = 1; i < num; i++) {\n\t\t\tempList.add(0);\n\t\t\tint bossNum = Integer.parseInt(sc.next());\n\t\t\tempList.set(bossNum - 1, empList.get(bossNum - 1) + 1);\n\n\t\t}\n\t\tfor (int i = 0; i < empList.size(); i++) {\n\t\t\tSystem.out.println(empList.get(i));\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint num = Integer.parseInt(sc.next());\n\t\tList<Integer> empList = new ArrayList<>();\n\t\tempList.add(0);\n\t\tfor (int i = 1; i < num; i++) {\n\t\t\tempList.add(0);\n\t\t\tint bossNum = Integer.parseInt(sc.next());\n\t\t\tempList.set(bossNum - 1, empList.get(bossNum - 1) + 1);\n\n\t\t}\n\t\tfor (int i = 0; i < empList.size(); i++) {\n\t\t\tSystem.out.println(empList.get(i));\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int num = Integer.parseInt(sc.next());", "num", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "List<Integer> empList = new ArrayList<>();", "empList", "new ArrayList<>()", "empList.add(0)", "empList.add", "empList", "0", "for (int i = 1; i < num; i++) {\n\t\t\tempList.add(0);\n\t\t\tint bossNum = Integer.parseInt(sc.next());\n\t\t\tempList.set(bossNum - 1, empList.get(bossNum - 1) + 1);\n\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < num", "i", "num", "i++", "i++", "i", "{\n\t\t\tempList.add(0);\n\t\t\tint bossNum = Integer.parseInt(sc.next());\n\t\t\tempList.set(bossNum - 1, empList.get(bossNum - 1) + 1);\n\n\t\t}", "{\n\t\t\tempList.add(0);\n\t\t\tint bossNum = Integer.parseInt(sc.next());\n\t\t\tempList.set(bossNum - 1, empList.get(bossNum - 1) + 1);\n\n\t\t}", "empList.add(0)", "empList.add", "empList", "0", "int bossNum = Integer.parseInt(sc.next());", "bossNum", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "empList.set(bossNum - 1, empList.get(bossNum - 1) + 1)", "empList.set", "empList", "bossNum - 1", "bossNum", "1", "empList.get(bossNum - 1) + 1", "empList.get(bossNum - 1)", "empList.get", "empList", "bossNum - 1", "bossNum", "1", "1", "for (int i = 0; i < empList.size(); i++) {\n\t\t\tSystem.out.println(empList.get(i));\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < empList.size()", "i", "empList.size()", "empList.size", "empList", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(empList.get(i));\n\t\t}", "{\n\t\t\tSystem.out.println(empList.get(i));\n\t\t}", "System.out.println(empList.get(i))", "System.out.println", "System.out", "System", "System.out", "empList.get(i)", "empList.get", "empList", "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 num = Integer.parseInt(sc.next());\n\t\tList<Integer> empList = new ArrayList<>();\n\t\tempList.add(0);\n\t\tfor (int i = 1; i < num; i++) {\n\t\t\tempList.add(0);\n\t\t\tint bossNum = Integer.parseInt(sc.next());\n\t\t\tempList.set(bossNum - 1, empList.get(bossNum - 1) + 1);\n\n\t\t}\n\t\tfor (int i = 0; i < empList.size(); i++) {\n\t\t\tSystem.out.println(empList.get(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 num = Integer.parseInt(sc.next());\n\t\tList<Integer> empList = new ArrayList<>();\n\t\tempList.add(0);\n\t\tfor (int i = 1; i < num; i++) {\n\t\t\tempList.add(0);\n\t\t\tint bossNum = Integer.parseInt(sc.next());\n\t\t\tempList.set(bossNum - 1, empList.get(bossNum - 1) + 1);\n\n\t\t}\n\t\tfor (int i = 0; i < empList.size(); i++) {\n\t\t\tSystem.out.println(empList.get(i));\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = Integer.parseInt(sc.next()); List<Integer> empList = new ArrayList<>(); empList.add(0); for (int i = 1; i < num; i++) { empList.add(0); int bossNum = Integer.parseInt(sc.next()); empList.set(bossNum - 1, empList.get(bossNum - 1) + 1); } for (int i = 0; i < empList.size(); i++) { System.out.println(empList.get(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, 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 public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n\n int emp[] = new int[num];\n for (int i = 0; i < num - 1; i++) {\n int id = scanner.nextInt();\n emp[id - 1]++;\n }\n for (int i = 0; i < num; i++) {\n System.out.println(emp[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n\n int emp[] = new int[num];\n for (int i = 0; i < num - 1; i++) {\n int id = scanner.nextInt();\n emp[id - 1]++;\n }\n for (int i = 0; i < num; i++) {\n System.out.println(emp[i]);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n\n int emp[] = new int[num];\n for (int i = 0; i < num - 1; i++) {\n int id = scanner.nextInt();\n emp[id - 1]++;\n }\n for (int i = 0; i < num; i++) {\n System.out.println(emp[i]);\n }\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n\n int emp[] = new int[num];\n for (int i = 0; i < num - 1; i++) {\n int id = scanner.nextInt();\n emp[id - 1]++;\n }\n for (int i = 0; i < num; i++) {\n System.out.println(emp[i]);\n }\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int num = scanner.nextInt();", "num", "scanner.nextInt()", "scanner.nextInt", "scanner", "int emp[] = new int[num];", "emp", "new int[num]", "num", "for (int i = 0; i < num - 1; i++) {\n int id = scanner.nextInt();\n emp[id - 1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < num - 1", "i", "num - 1", "num", "1", "i++", "i++", "i", "{\n int id = scanner.nextInt();\n emp[id - 1]++;\n }", "{\n int id = scanner.nextInt();\n emp[id - 1]++;\n }", "int id = scanner.nextInt();", "id", "scanner.nextInt()", "scanner.nextInt", "scanner", "emp[id - 1]++", "emp[id - 1]", "emp", "id - 1", "id", "1", "for (int i = 0; i < num; i++) {\n System.out.println(emp[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < num", "i", "num", "i++", "i++", "i", "{\n System.out.println(emp[i]);\n }", "{\n System.out.println(emp[i]);\n }", "System.out.println(emp[i])", "System.out.println", "System.out", "System", "System.out", "emp[i]", "emp", "i", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n\n int emp[] = new int[num];\n for (int i = 0; i < num - 1; i++) {\n int id = scanner.nextInt();\n emp[id - 1]++;\n }\n for (int i = 0; i < num; i++) {\n System.out.println(emp[i]);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n\n int emp[] = new int[num];\n for (int i = 0; i < num - 1; i++) {\n int id = scanner.nextInt();\n emp[id - 1]++;\n }\n for (int i = 0; i < num; i++) {\n System.out.println(emp[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 num = scanner.nextInt(); int emp[] = new int[num]; for (int i = 0; i < num - 1; i++) { int id = scanner.nextInt(); emp[id - 1]++; } for (int i = 0; i < num; i++) { System.out.println(emp[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, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 17, 28, 13, 13, 30, 30, 4, 18, 13, 13, 2, 4, 18, 13, 13, 17, 28, 13, 4, 18, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 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 ], [ 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 ], [ 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 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 44, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 48, 49 ], [ 49, 50 ], [ 20, 51 ], [ 51, 52 ], [ 52, 53 ], [ 20, 54 ], [ 54, 55 ], [ 54, 56 ], [ 20, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 70, 74 ], [ 20, 75 ], [ 75, 76 ], [ 75, 77 ], [ 75, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 80, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 84, 89 ], [ 20, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 90, 95 ], [ 96, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 18, 106 ], [ 106, 107 ] ]
[ "import java.util.Scanner;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.util.TreeMap;\n \nclass Main{\n \n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n List<Integer> list = new ArrayList<>();\n for(int i=1; i<n; i++){\n list.add(scanner.nextInt());\n }\n scanner.close();\n Map<Integer,Integer> map = new TreeMap<>();\n for(int i=1; i<=n; i++){\n map.put(i,0);\n }\n for(int val: list){\n map.put(val,map.get(val)+1);\n }\n for(int key: map.keySet()){\n System.out.println(map.get(key));\n }\n }\n \n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.List;", "List", "java.util", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.TreeMap;", "TreeMap", "java.util", "class Main{\n \n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n List<Integer> list = new ArrayList<>();\n for(int i=1; i<n; i++){\n list.add(scanner.nextInt());\n }\n scanner.close();\n Map<Integer,Integer> map = new TreeMap<>();\n for(int i=1; i<=n; i++){\n map.put(i,0);\n }\n for(int val: list){\n map.put(val,map.get(val)+1);\n }\n for(int key: map.keySet()){\n System.out.println(map.get(key));\n }\n }\n \n}", "Main", "public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n List<Integer> list = new ArrayList<>();\n for(int i=1; i<n; i++){\n list.add(scanner.nextInt());\n }\n scanner.close();\n Map<Integer,Integer> map = new TreeMap<>();\n for(int i=1; i<=n; i++){\n map.put(i,0);\n }\n for(int val: list){\n map.put(val,map.get(val)+1);\n }\n for(int key: map.keySet()){\n System.out.println(map.get(key));\n }\n }", "main", "{\n \n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n List<Integer> list = new ArrayList<>();\n for(int i=1; i<n; i++){\n list.add(scanner.nextInt());\n }\n scanner.close();\n Map<Integer,Integer> map = new TreeMap<>();\n for(int i=1; i<=n; i++){\n map.put(i,0);\n }\n for(int val: list){\n map.put(val,map.get(val)+1);\n }\n for(int key: map.keySet()){\n System.out.println(map.get(key));\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> list = new ArrayList<>();", "list", "new ArrayList<>()", "for(int i=1; i<n; i++){\n list.add(scanner.nextInt());\n }", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n list.add(scanner.nextInt());\n }", "{\n list.add(scanner.nextInt());\n }", "list.add(scanner.nextInt())", "list.add", "list", "scanner.nextInt()", "scanner.nextInt", "scanner", "scanner.close()", "scanner.close", "scanner", "Map<Integer,Integer> map = new TreeMap<>();", "map", "new TreeMap<>()", "for(int i=1; i<=n; i++){\n map.put(i,0);\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n map.put(i,0);\n }", "{\n map.put(i,0);\n }", "map.put(i,0)", "map.put", "map", "i", "0", "for(int val: list){\n map.put(val,map.get(val)+1);\n }", "int val", "list", "{\n map.put(val,map.get(val)+1);\n }", "{\n map.put(val,map.get(val)+1);\n }", "map.put(val,map.get(val)+1)", "map.put", "map", "val", "map.get(val)+1", "map.get(val)", "map.get", "map", "val", "1", "for(int key: map.keySet()){\n System.out.println(map.get(key));\n }", "int key", "map.keySet()", "map.keySet", "map", "{\n System.out.println(map.get(key));\n }", "{\n System.out.println(map.get(key));\n }", "System.out.println(map.get(key))", "System.out.println", "System.out", "System", "System.out", "map.get(key)", "map.get", "map", "key", "String[] args", "args" ]
import java.util.Scanner; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.TreeMap; class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); List<Integer> list = new ArrayList<>(); for(int i=1; i<n; i++){ list.add(scanner.nextInt()); } scanner.close(); Map<Integer,Integer> map = new TreeMap<>(); for(int i=1; i<=n; i++){ map.put(i,0); } for(int val: list){ map.put(val,map.get(val)+1); } for(int key: map.keySet()){ System.out.println(map.get(key)); } } }
[ 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, 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 ], [ 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 ], [ 0, 71 ], [ 71, 72 ], [ 71, 73 ] ]
[ "import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int[] ans = new int[N];\n for (int i = 0; i < N-1; i++){\n int index = input.nextInt();\n ans[index-1] += 1;\n }\n for (int i = 0; i < N; i++){\n System.out.println(ans[i]);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int[] ans = new int[N];\n for (int i = 0; i < N-1; i++){\n int index = input.nextInt();\n ans[index-1] += 1;\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 Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int[] ans = new int[N];\n for (int i = 0; i < N-1; i++){\n int index = input.nextInt();\n ans[index-1] += 1;\n }\n for (int i = 0; i < N; i++){\n System.out.println(ans[i]);\n }\n }", "main", "{\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int[] ans = new int[N];\n for (int i = 0; i < N-1; i++){\n int index = input.nextInt();\n ans[index-1] += 1;\n }\n for (int i = 0; i < N; i++){\n System.out.println(ans[i]);\n }\n }", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "int N = input.nextInt();", "N", "input.nextInt()", "input.nextInt", "input", "int[] ans = new int[N];", "ans", "new int[N]", "N", "for (int i = 0; i < N-1; i++){\n int index = input.nextInt();\n ans[index-1] += 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n int index = input.nextInt();\n ans[index-1] += 1;\n }", "{\n int index = input.nextInt();\n ans[index-1] += 1;\n }", "int index = input.nextInt();", "index", "input.nextInt()", "input.nextInt", "input", "ans[index-1] += 1", "ans[index-1]", "ans", "index-1", "index", "1", "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", "public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int[] ans = new int[N];\n for (int i = 0; i < N-1; i++){\n int index = input.nextInt();\n ans[index-1] += 1;\n }\n for (int i = 0; i < N; i++){\n System.out.println(ans[i]);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int N = input.nextInt();\n int[] ans = new int[N];\n for (int i = 0; i < N-1; i++){\n int index = input.nextInt();\n ans[index-1] += 1;\n }\n for (int i = 0; i < N; i++){\n System.out.println(ans[i]);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int N = input.nextInt(); int[] ans = new int[N]; for (int i = 0; i < N-1; i++){ int index = input.nextInt(); ans[index-1] += 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, 20, 17, 41, 13, 20, 17, 41, 13, 4, 18, 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, 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 ], [ 88, 5 ], [ 88, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 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 ], [ 6, 85 ], [ 85, 86 ], [ 0, 87 ], [ 87, 88 ], [ 87, 89 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint a[] = new int[200010];\n\t\tint ans[] = new int[200010];\n\t\tint n =scan.nextInt();\n\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t}\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tans[a[i]]++;\n\t\t}\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint a[] = new int[200010];\n\t\tint ans[] = new int[200010];\n\t\tint n =scan.nextInt();\n\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t}\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tans[a[i]]++;\n\t\t}\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint a[] = new int[200010];\n\t\tint ans[] = new int[200010];\n\t\tint n =scan.nextInt();\n\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t}\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tans[a[i]]++;\n\t\t}\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\n\t}", "main", "{\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint a[] = new int[200010];\n\t\tint ans[] = new int[200010];\n\t\tint n =scan.nextInt();\n\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t}\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tans[a[i]]++;\n\t\t}\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int a[] = new int[200010];", "a", "new int[200010]", "200010", "int ans[] = new int[200010];", "ans", "new int[200010]", "200010", "int n =scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "for(int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t}", "int i = 2;", "int i = 2;", "i", "2", "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 = 2; i <= n; i++) {\n\t\t\tans[a[i]]++;\n\t\t}", "int i = 2;", "int i = 2;", "i", "2", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\tans[a[i]]++;\n\t\t}", "{\n\t\t\tans[a[i]]++;\n\t\t}", "ans[a[i]]++", "ans[a[i]]", "ans", "a[i]", "a", "i", "for(int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(ans[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(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\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint a[] = new int[200010];\n\t\tint ans[] = new int[200010];\n\t\tint n =scan.nextInt();\n\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t}\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tans[a[i]]++;\n\t\t}\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\n\t}\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 a[] = new int[200010];\n\t\tint ans[] = new int[200010];\n\t\tint n =scan.nextInt();\n\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t}\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tans[a[i]]++;\n\t\t}\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a[] = new int[200010]; int ans[] = new int[200010]; int n =scan.nextInt(); for(int i = 2; i <= n; i++) { a[i] = scan.nextInt(); } for(int i = 2; i <= n; i++) { ans[a[i]]++; } for(int i = 1; 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, 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, 2, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 97, 5 ], [ 97, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 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 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 6, 94 ], [ 94, 95 ], [ 0, 96 ], [ 96, 97 ], [ 96, 98 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int A[] = new int[N];\n A[0] = 0;\n for(int i = 1;i < N;i++){\n A[i] = scanner.nextInt();\n }\n int B[] = new int[N];\n for(int i = 1;i < N;i++){\n B[A[i] - 1]++;\n }\n for(int i = 0;i < N;i++){\n System.out.println(B[i] + \"\\n\");\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int A[] = new int[N];\n A[0] = 0;\n for(int i = 1;i < N;i++){\n A[i] = scanner.nextInt();\n }\n int B[] = new int[N];\n for(int i = 1;i < N;i++){\n B[A[i] - 1]++;\n }\n for(int i = 0;i < N;i++){\n System.out.println(B[i] + \"\\n\");\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int A[] = new int[N];\n A[0] = 0;\n for(int i = 1;i < N;i++){\n A[i] = scanner.nextInt();\n }\n int B[] = new int[N];\n for(int i = 1;i < N;i++){\n B[A[i] - 1]++;\n }\n for(int i = 0;i < N;i++){\n System.out.println(B[i] + \"\\n\");\n }\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int A[] = new int[N];\n A[0] = 0;\n for(int i = 1;i < N;i++){\n A[i] = scanner.nextInt();\n }\n int B[] = new int[N];\n for(int i = 1;i < N;i++){\n B[A[i] - 1]++;\n }\n for(int i = 0;i < N;i++){\n System.out.println(B[i] + \"\\n\");\n }\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int A[] = new int[N];", "A", "new int[N]", "N", "A[0] = 0", "A[0]", "A", "0", "0", "for(int i = 1;i < N;i++){\n A[i] = scanner.nextInt();\n }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n A[i] = scanner.nextInt();\n }", "{\n A[i] = scanner.nextInt();\n }", "A[i] = scanner.nextInt()", "A[i]", "A", "i", "scanner.nextInt()", "scanner.nextInt", "scanner", "int B[] = new int[N];", "B", "new int[N]", "N", "for(int i = 1;i < N;i++){\n B[A[i] - 1]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n B[A[i] - 1]++;\n }", "{\n B[A[i] - 1]++;\n }", "B[A[i] - 1]++", "B[A[i] - 1]", "B", "A[i] - 1", "A[i]", "A", "i", "1", "for(int i = 0;i < N;i++){\n System.out.println(B[i] + \"\\n\");\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n System.out.println(B[i] + \"\\n\");\n }", "{\n System.out.println(B[i] + \"\\n\");\n }", "System.out.println(B[i] + \"\\n\")", "System.out.println", "System.out", "System", "System.out", "B[i] + \"\\n\"", "B[i]", "B", "i", "\"\\n\"", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int A[] = new int[N];\n A[0] = 0;\n for(int i = 1;i < N;i++){\n A[i] = scanner.nextInt();\n }\n int B[] = new int[N];\n for(int i = 1;i < N;i++){\n B[A[i] - 1]++;\n }\n for(int i = 0;i < N;i++){\n System.out.println(B[i] + \"\\n\");\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 int A[] = new int[N];\n A[0] = 0;\n for(int i = 1;i < N;i++){\n A[i] = scanner.nextInt();\n }\n int B[] = new int[N];\n for(int i = 1;i < N;i++){\n B[A[i] - 1]++;\n }\n for(int i = 0;i < N;i++){\n System.out.println(B[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 A[] = new int[N]; A[0] = 0; for(int i = 1;i < N;i++){ A[i] = scanner.nextInt(); } int B[] = new int[N]; for(int i = 1;i < N;i++){ B[A[i] - 1]++; } for(int i = 0;i < N;i++){ System.out.println(B[i] + "\n"); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 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, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 84, 5 ], [ 84, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 23, 24 ], [ 23, 25 ], [ 8, 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 ], [ 47, 49 ], [ 49, 50 ], [ 49, 51 ], [ 8, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 52, 62 ], [ 62, 63 ], [ 63, 64 ], [ 52, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 8, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 6, 81 ], [ 81, 82 ], [ 0, 83 ], [ 83, 84 ], [ 83, 85 ] ]
[ "import java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a=sc.nextInt();\n\t\tint t=0;\n\t\tint b[]=new int[a-1];\n\t\tfor(int i=0;i<a-1;i++) {\n\t\t\tint k =sc.nextInt();\n\t\t\tb[k-1]++;\n\t\t}\n\t\tfor(int j=0;j<a-1;j++) {\t\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\t\tSystem.out.println(0);\n\n\n\t}\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a=sc.nextInt();\n\t\tint t=0;\n\t\tint b[]=new int[a-1];\n\t\tfor(int i=0;i<a-1;i++) {\n\t\t\tint k =sc.nextInt();\n\t\t\tb[k-1]++;\n\t\t}\n\t\tfor(int j=0;j<a-1;j++) {\t\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\t\tSystem.out.println(0);\n\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a=sc.nextInt();\n\t\tint t=0;\n\t\tint b[]=new int[a-1];\n\t\tfor(int i=0;i<a-1;i++) {\n\t\t\tint k =sc.nextInt();\n\t\t\tb[k-1]++;\n\t\t}\n\t\tfor(int j=0;j<a-1;j++) {\t\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\t\tSystem.out.println(0);\n\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a=sc.nextInt();\n\t\tint t=0;\n\t\tint b[]=new int[a-1];\n\t\tfor(int i=0;i<a-1;i++) {\n\t\t\tint k =sc.nextInt();\n\t\t\tb[k-1]++;\n\t\t}\n\t\tfor(int j=0;j<a-1;j++) {\t\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\t\tSystem.out.println(0);\n\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a=sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int t=0;", "t", "0", "int b[]=new int[a-1];", "b", "new int[a-1]", "a-1", "a", "1", "for(int i=0;i<a-1;i++) {\n\t\t\tint k =sc.nextInt();\n\t\t\tb[k-1]++;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<a-1", "i", "a-1", "a", "1", "i++", "i++", "i", "{\n\t\t\tint k =sc.nextInt();\n\t\t\tb[k-1]++;\n\t\t}", "{\n\t\t\tint k =sc.nextInt();\n\t\t\tb[k-1]++;\n\t\t}", "int k =sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "b[k-1]++", "b[k-1]", "b", "k-1", "k", "1", "for(int j=0;j<a-1;j++) {\t\n\t\t\tSystem.out.println(b[j]);\n\t\t}", "int j=0;", "int j=0;", "j", "0", "j<a-1", "j", "a-1", "a", "1", "j++", "j++", "j", "{\t\n\t\t\tSystem.out.println(b[j]);\n\t\t}", "{\t\n\t\t\tSystem.out.println(b[j]);\n\t\t}", "System.out.println(b[j])", "System.out.println", "System.out", "System", "System.out", "b[j]", "b", "j", "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\tScanner sc = new Scanner(System.in);\n\t\tint a=sc.nextInt();\n\t\tint t=0;\n\t\tint b[]=new int[a-1];\n\t\tfor(int i=0;i<a-1;i++) {\n\t\t\tint k =sc.nextInt();\n\t\t\tb[k-1]++;\n\t\t}\n\t\tfor(int j=0;j<a-1;j++) {\t\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\t\tSystem.out.println(0);\n\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a=sc.nextInt();\n\t\tint t=0;\n\t\tint b[]=new int[a-1];\n\t\tfor(int i=0;i<a-1;i++) {\n\t\t\tint k =sc.nextInt();\n\t\t\tb[k-1]++;\n\t\t}\n\t\tfor(int j=0;j<a-1;j++) {\t\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\t\tSystem.out.println(0);\n\n\n\t}\n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a=sc.nextInt(); int t=0; int b[]=new int[a-1]; for(int i=0;i<a-1;i++) { int k =sc.nextInt(); b[k-1]++; } for(int j=0;j<a-1;j++) { System.out.println(b[j]); } System.out.println(0); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 0, 13, 4, 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, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 13, 18, 13, 13, 4, 18, 13, 4, 18, 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, 18, 13, 29, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 13, 2, 13, 17, 4, 18, 13, 17, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 13, 2, 13, 17, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 13, 2, 13, 17, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 13, 2, 13, 17, 4, 18, 13, 17, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 20, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 4, 13, 17, 41, 13, 2, 4, 13, 17, 4, 18, 4, 18, 13, 13, 13, 4, 18, 4, 18, 13, 13, 13, 29, 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, 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, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 40, 17, 0, 13, 4, 13, 41, 13, 17, 42, 40, 4, 13, 13, 30, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 4, 13, 29, 2, 13, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 30, 0, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 0, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 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, 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 ], [ 628, 23 ], [ 628, 24 ], [ 24, 25 ], [ 628, 26 ], [ 26, 27 ], [ 628, 28 ], [ 28, 29 ], [ 628, 30 ], [ 30, 31 ], [ 628, 32 ], [ 32, 33 ], [ 628, 34 ], [ 34, 35 ], [ 628, 36 ], [ 36, 37 ], [ 628, 38 ], [ 38, 39 ], [ 38, 40 ], [ 628, 41 ], [ 41, 42 ], [ 41, 43 ], [ 628, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 54, 55 ], [ 54, 56 ], [ 46, 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 ], [ 73, 75 ], [ 75, 76 ], [ 46, 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 ], [ 90, 92 ], [ 92, 93 ], [ 92, 94 ], [ 46, 95 ], [ 95, 96 ], [ 96, 97 ], [ 46, 98 ], [ 98, 99 ], [ 99, 100 ], [ 44, 101 ], [ 101, 102 ], [ 628, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 115, 117 ], [ 110, 118 ], [ 118, 119 ], [ 119, 120 ], [ 110, 121 ], [ 122, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 127, 128 ], [ 128, 129 ], [ 105, 130 ], [ 130, 131 ], [ 103, 132 ], [ 132, 133 ], [ 628, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 628, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 628, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 151, 154 ], [ 148, 155 ], [ 155, 156 ], [ 628, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 160, 163 ], [ 164, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 165, 168 ], [ 168, 169 ], [ 168, 170 ], [ 159, 171 ], [ 171, 172 ], [ 172, 173 ], [ 171, 174 ], [ 157, 175 ], [ 175, 176 ], [ 628, 177 ], [ 177, 178 ], [ 177, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 180, 183 ], [ 184, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 185, 188 ], [ 188, 189 ], [ 188, 190 ], [ 177, 191 ], [ 191, 192 ], [ 628, 193 ], [ 193, 194 ], [ 193, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 196, 199 ], [ 200, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 201, 204 ], [ 204, 205 ], [ 204, 206 ], [ 193, 207 ], [ 207, 208 ], [ 628, 209 ], [ 209, 210 ], [ 209, 211 ], [ 211, 212 ], [ 212, 213 ], [ 212, 214 ], [ 212, 215 ], [ 216, 216 ], [ 216, 217 ], [ 217, 218 ], [ 218, 219 ], [ 217, 220 ], [ 220, 221 ], [ 220, 222 ], [ 211, 223 ], [ 223, 224 ], [ 224, 225 ], [ 223, 226 ], [ 211, 227 ], [ 227, 228 ], [ 228, 229 ], [ 209, 230 ], [ 230, 231 ], [ 628, 232 ], [ 232, 233 ], [ 232, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 234, 238 ], [ 238, 239 ], [ 239, 240 ], [ 240, 241 ], [ 240, 242 ], [ 238, 243 ], [ 243, 244 ], [ 243, 245 ], [ 238, 246 ], [ 246, 247 ], [ 247, 248 ], [ 238, 249 ], [ 250, 250 ], [ 250, 251 ], [ 251, 252 ], [ 252, 253 ], [ 251, 254 ], [ 251, 255 ], [ 234, 256 ], [ 256, 257 ], [ 257, 258 ], [ 258, 259 ], [ 258, 260 ], [ 256, 261 ], [ 261, 262 ], [ 261, 263 ], [ 263, 264 ], [ 263, 265 ], [ 256, 266 ], [ 266, 267 ], [ 267, 268 ], [ 256, 269 ], [ 270, 270 ], [ 270, 271 ], [ 271, 272 ], [ 271, 273 ], [ 273, 274 ], [ 274, 275 ], [ 273, 276 ], [ 270, 277 ], [ 277, 278 ], [ 277, 279 ], [ 279, 280 ], [ 280, 281 ], [ 279, 282 ], [ 270, 283 ], [ 283, 284 ], [ 284, 285 ], [ 285, 286 ], [ 286, 287 ], [ 285, 288 ], [ 283, 289 ], [ 270, 290 ], [ 290, 291 ], [ 291, 292 ], [ 292, 293 ], [ 293, 294 ], [ 292, 295 ], [ 290, 296 ], [ 234, 297 ], [ 297, 298 ], [ 232, 299 ], [ 299, 300 ], [ 628, 301 ], [ 301, 302 ], [ 301, 303 ], [ 303, 304 ], [ 301, 305 ], [ 305, 306 ], [ 305, 307 ], [ 301, 309 ], [ 309, 310 ], [ 301, 311 ], [ 311, 312 ], [ 301, 313 ], [ 313, 314 ], [ 313, 315 ], [ 315, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 316, 320 ], [ 313, 321 ], [ 321, 322 ], [ 301, 323 ], [ 323, 324 ], [ 323, 325 ], [ 325, 326 ], [ 326, 327 ], [ 327, 328 ], [ 327, 329 ], [ 329, 330 ], [ 326, 331 ], [ 331, 332 ], [ 325, 333 ], [ 333, 334 ], [ 334, 335 ], [ 334, 336 ], [ 333, 337 ], [ 337, 338 ], [ 338, 339 ], [ 338, 340 ], [ 337, 341 ], [ 341, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 345, 346 ], [ 341, 347 ], [ 347, 348 ], [ 348, 349 ], [ 348, 350 ], [ 350, 351 ], [ 351, 352 ], [ 350, 353 ], [ 337, 354 ], [ 354, 355 ], [ 355, 356 ], [ 355, 357 ], [ 354, 358 ], [ 358, 359 ], [ 359, 360 ], [ 325, 361 ], [ 361, 362 ], [ 362, 363 ], [ 362, 364 ], [ 364, 365 ], [ 301, 366 ], [ 366, 367 ], [ 366, 368 ], [ 368, 369 ], [ 369, 370 ], [ 369, 371 ], [ 371, 372 ], [ 368, 373 ], [ 373, 374 ], [ 374, 375 ], [ 374, 376 ], [ 373, 377 ], [ 377, 378 ], [ 378, 379 ], [ 378, 380 ], [ 380, 381 ], [ 368, 382 ], [ 382, 383 ], [ 382, 384 ], [ 368, 385 ], [ 385, 386 ], [ 386, 387 ], [ 386, 388 ], [ 385, 389 ], [ 389, 390 ], [ 390, 391 ], [ 390, 392 ], [ 392, 393 ], [ 389, 394 ], [ 394, 395 ], [ 394, 396 ], [ 396, 397 ], [ 368, 398 ], [ 398, 399 ], [ 398, 400 ], [ 368, 401 ], [ 401, 402 ], [ 402, 403 ], [ 403, 404 ], [ 403, 405 ], [ 401, 406 ], [ 406, 407 ], [ 407, 408 ], [ 407, 409 ], [ 406, 410 ], [ 410, 411 ], [ 410, 412 ], [ 412, 413 ], [ 412, 414 ], [ 406, 415 ], [ 415, 416 ], [ 415, 417 ], [ 417, 418 ], [ 368, 419 ], [ 419, 420 ], [ 420, 421 ], [ 420, 422 ], [ 301, 423 ], [ 423, 424 ], [ 423, 425 ], [ 425, 426 ], [ 426, 427 ], [ 426, 428 ], [ 428, 429 ], [ 425, 430 ], [ 430, 431 ], [ 431, 432 ], [ 431, 433 ], [ 430, 434 ], [ 434, 435 ], [ 435, 436 ], [ 435, 437 ], [ 437, 438 ], [ 425, 439 ], [ 439, 440 ], [ 439, 441 ], [ 425, 442 ], [ 442, 443 ], [ 443, 444 ], [ 443, 445 ], [ 442, 446 ], [ 446, 447 ], [ 447, 448 ], [ 447, 449 ], [ 449, 450 ], [ 446, 451 ], [ 451, 452 ], [ 451, 453 ], [ 453, 454 ], [ 425, 455 ], [ 455, 456 ], [ 455, 457 ], [ 425, 458 ], [ 458, 459 ], [ 459, 460 ], [ 460, 461 ], [ 460, 462 ], [ 458, 463 ], [ 463, 464 ], [ 464, 465 ], [ 464, 466 ], [ 463, 467 ], [ 467, 468 ], [ 467, 469 ], [ 469, 470 ], [ 469, 471 ], [ 463, 472 ], [ 472, 473 ], [ 472, 474 ], [ 474, 475 ], [ 425, 476 ], [ 476, 477 ], [ 477, 478 ], [ 477, 479 ], [ 301, 480 ], [ 480, 481 ], [ 480, 482 ], [ 482, 483 ], [ 483, 484 ], [ 483, 485 ], [ 482, 487 ], [ 487, 488 ], [ 488, 489 ], [ 489, 490 ], [ 489, 491 ], [ 487, 492 ], [ 492, 493 ], [ 492, 494 ], [ 487, 495 ], [ 495, 496 ], [ 496, 497 ], [ 487, 498 ], [ 499, 499 ], [ 499, 500 ], [ 500, 501 ], [ 501, 502 ], [ 501, 503 ], [ 500, 504 ], [ 504, 505 ], [ 482, 506 ], [ 506, 507 ], [ 480, 508 ], [ 508, 509 ], [ 301, 510 ], [ 510, 511 ], [ 510, 512 ], [ 512, 513 ], [ 513, 514 ], [ 513, 515 ], [ 515, 516 ], [ 512, 517 ], [ 517, 518 ], [ 518, 519 ], [ 518, 520 ], [ 517, 521 ], [ 521, 522 ], [ 522, 523 ], [ 522, 524 ], [ 524, 525 ], [ 512, 526 ], [ 526, 527 ], [ 526, 528 ], [ 512, 529 ], [ 529, 530 ], [ 530, 531 ], [ 531, 532 ], [ 531, 533 ], [ 529, 534 ], [ 534, 535 ], [ 535, 536 ], [ 536, 537 ], [ 535, 538 ], [ 534, 539 ], [ 539, 540 ], [ 539, 541 ], [ 541, 542 ], [ 512, 543 ], [ 543, 544 ], [ 544, 545 ], [ 545, 546 ], [ 301, 547 ], [ 547, 548 ], [ 547, 549 ], [ 549, 550 ], [ 550, 551 ], [ 550, 552 ], [ 552, 553 ], [ 549, 554 ], [ 554, 555 ], [ 555, 556 ], [ 555, 557 ], [ 554, 558 ], [ 558, 559 ], [ 558, 560 ], [ 560, 561 ], [ 549, 562 ], [ 562, 563 ], [ 562, 564 ], [ 549, 565 ], [ 565, 566 ], [ 566, 567 ], [ 567, 568 ], [ 567, 569 ], [ 565, 570 ], [ 570, 571 ], [ 571, 572 ], [ 572, 573 ], [ 571, 574 ], [ 570, 575 ], [ 575, 576 ], [ 575, 577 ], [ 577, 578 ], [ 549, 579 ], [ 579, 580 ], [ 580, 581 ], [ 581, 582 ], [ 301, 583 ], [ 583, 584 ], [ 583, 585 ], [ 585, 586 ], [ 586, 587 ], [ 590, 588 ], [ 600, 589 ], [ 597, 590 ], [ 590, 591 ], [ 591, 592 ], [ 591, 593 ], [ 590, 594 ], [ 594, 595 ], [ 594, 596 ], [ 597, 597 ], [ 597, 598 ], [ 597, 599 ], [ 600, 600 ], [ 600, 601 ], [ 600, 602 ], [ 590, 603 ], [ 603, 604 ], [ 603, 605 ], [ 605, 606 ], [ 583, 607 ], [ 607, 608 ], [ 301, 609 ], [ 609, 610 ], [ 609, 611 ], [ 611, 612 ], [ 612, 613 ], [ 614, 614 ], [ 614, 615 ], [ 615, 616 ], [ 615, 617 ], [ 614, 618 ], [ 618, 619 ], [ 618, 620 ], [ 614, 621 ], [ 621, 622 ], [ 621, 623 ], [ 623, 624 ], [ 609, 625 ], [ 625, 626 ], [ 0, 627 ], [ 627, 628 ], [ 627, 629 ] ]
[ "\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.InputMismatchException;\n\npublic class Main {\n\tprivate static int n;\n\tprivate static int[] a;\n\tprivate static String s;\n\tprivate static HashMap<Integer, ArrayList<Integer>> g;\n\tprivate static long pp, qq, rr;\n\n\tpublic static void main(String[] args) {\n\t\tn = ini();\n\t\t\n\t\tint[] map = new int[n+1];\n\t\t\n\t\tfor(int i=0; i<n-1; i++) {\n\t\t\tmap[ini()]++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++) {\n\t\t\tprintln(map[i]);\n\t\t}\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}\n\n\t//NONPROBLEM CODE\n\n\tprivate static InputReader in = new InputReader(System.in);\n\tprivate static PrintWriter out = new PrintWriter(System.out);\n\n\tprivate static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.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 (snumChars <= 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 int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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 long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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[] 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\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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 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 boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}\n\n\t//INPUT SHORTCUTS\n\n\tprivate static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}\n\n\tprivate static int ini() {\n\t\treturn in.nextInt();\n\t}\n\n\tprivate static String ins() {\n\t\treturn in.readString();\n\t}\n\n\t//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}\n\n\t//PRINT SHORTCUTS\n\n\tprivate static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}\n\n\tprivate static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}\n\n\tprivate static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}\n\n\tprivate static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}\n\n\tprivate static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\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.util.ArrayList;", "ArrayList", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "public class Main {\n\tprivate static int n;\n\tprivate static int[] a;\n\tprivate static String s;\n\tprivate static HashMap<Integer, ArrayList<Integer>> g;\n\tprivate static long pp, qq, rr;\n\n\tpublic static void main(String[] args) {\n\t\tn = ini();\n\t\t\n\t\tint[] map = new int[n+1];\n\t\t\n\t\tfor(int i=0; i<n-1; i++) {\n\t\t\tmap[ini()]++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++) {\n\t\t\tprintln(map[i]);\n\t\t}\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}\n\n\t//NONPROBLEM CODE\n\n\tprivate static InputReader in = new InputReader(System.in);\n\tprivate static PrintWriter out = new PrintWriter(System.out);\n\n\tprivate static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.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 (snumChars <= 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 int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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 long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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[] 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\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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 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 boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}\n\n\t//INPUT SHORTCUTS\n\n\tprivate static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}\n\n\tprivate static int ini() {\n\t\treturn in.nextInt();\n\t}\n\n\tprivate static String ins() {\n\t\treturn in.readString();\n\t}\n\n\t//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}\n\n\t//PRINT SHORTCUTS\n\n\tprivate static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}\n\n\tprivate static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}\n\n\tprivate static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}\n\n\tprivate static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}\n\n\tprivate static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}\n}", "Main", "private static int n;", "n", "private static int[] a;", "a", "private static String s;", "s", "private static HashMap<Integer, ArrayList<Integer>> g;", "g", "private static long pp", "pp", "qq", "qq", "rr;", "rr", "private static InputReader in = new InputReader(System.in);", "in", "new InputReader(System.in)", "private static PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "public static void main(String[] args) {\n\t\tn = ini();\n\t\t\n\t\tint[] map = new int[n+1];\n\t\t\n\t\tfor(int i=0; i<n-1; i++) {\n\t\t\tmap[ini()]++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++) {\n\t\t\tprintln(map[i]);\n\t\t}\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}", "main", "{\n\t\tn = ini();\n\t\t\n\t\tint[] map = new int[n+1];\n\t\t\n\t\tfor(int i=0; i<n-1; i++) {\n\t\t\tmap[ini()]++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++) {\n\t\t\tprintln(map[i]);\n\t\t}\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}", "n = ini()", "n", "ini()", "ini", "int[] map = new int[n+1];", "map", "new int[n+1]", "n+1", "n", "1", "for(int i=0; i<n-1; i++) {\n\t\t\tmap[ini()]++;\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\tmap[ini()]++;\n\t\t}", "{\n\t\t\tmap[ini()]++;\n\t\t}", "map[ini()]++", "map[ini()]", "map", "ini()", "ini", "for(int i=1; i<=n; i++) {\n\t\t\tprintln(map[i]);\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\tprintln(map[i]);\n\t\t}", "{\n\t\t\tprintln(map[i]);\n\t\t}", "println(map[i])", "println", "map[i]", "map", "i", "out.flush()", "out.flush", "out", "out.close()", "out.close", "out", "String[] args", "args", "private static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}", "ina", "{\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}", "int[] temp = new int[n];", "temp", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\ttemp[i] = in.nextInt();\n\t\t}", "{\n\t\t\ttemp[i] = in.nextInt();\n\t\t}", "temp[i] = in.nextInt()", "temp[i]", "temp", "i", "in.nextInt()", "in.nextInt", "in", "return temp;", "temp", "int n", "n", "private static int ini() {\n\t\treturn in.nextInt();\n\t}", "ini", "{\n\t\treturn in.nextInt();\n\t}", "return in.nextInt();", "in.nextInt()", "in.nextInt", "in", "private static String ins() {\n\t\treturn in.readString();\n\t}", "ins", "{\n\t\treturn in.readString();\n\t}", "return in.readString();", "in.readString()", "in.readString", "in", "//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}", "sort", "{\n\t\tArrays.sort(a);\n\t}", "Arrays.sort(a)", "Arrays.sort", "Arrays", "a", "int[] a", "a", "private static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}", "println", "{\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}", "for (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}", "Object x", "o", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "out.write(x + \" \")", "out.write", "out", "x + \" \"", "x", "\" \"", "out.write(\"\\n\")", "out.write", "out", "\"\\n\"", "Object... o", "o", "private static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}", "print", "{\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}", "for (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}", "Object x", "o", "{\n\t\t\tout.write(x + \"\");\n\t\t}", "{\n\t\t\tout.write(x + \"\");\n\t\t}", "out.write(x + \"\")", "out.write", "out", "x + \"\"", "x", "\"\"", "Object... o", "o", "private static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}", "printAll", "{\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}", "for (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}", "Object x", "o", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "out.write(x + \" \")", "out.write", "out", "x + \" \"", "x", "\" \"", "Object... o", "o", "private static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}", "debug", "{\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}", "for (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}", "Object x", "o", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "{\n\t\t\tout.write(x + \" \");\n\t\t}", "out.write(x + \" \")", "out.write", "out", "x + \" \"", "x", "\" \"", "out.write(\"\\n\")", "out.write", "out", "\"\\n\"", "out.flush()", "out.flush", "out", "Object... o", "o", "private static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}", "intree", "{\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}", "HashMap<Integer, ArrayList<Integer>> g = new HashMap<>();", "g", "new HashMap<>()", "for (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}", "{\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}", "g.put(i, new ArrayList<>())", "g.put", "g", "i", "new ArrayList<>()", "for (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\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 u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}", "{\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}", "int u = ini() - 1;", "u", "ini() - 1", "ini()", "ini", "1", "int v = ini() - 1;", "v", "ini() - 1", "ini()", "ini", "1", "g.get(u).add(v)", "g.get(u).add", "g.get(u)", "g.get", "g", "u", "v", "g.get(v).add(u)", "g.get(v).add", "g.get(v)", "g.get", "g", "v", "u", "return g;", "g", "int n", "n", "private static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.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 (snumChars <= 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 int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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 long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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[] 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\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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 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 boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}", "InputReader", "private final InputStream stream;", "stream", "private final byte[] buf = new byte[8192];", "buf", "new byte[8192]", "8192", "private int curChar", "curChar", "snumChars;", "snumChars", "public InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}", "InputReader", "{\n\t\t\tthis.stream = st;\n\t\t}", "this.stream = st", "this.stream", "this", "this.stream", "st", "InputStream st", "st", "public int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.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 (snumChars <= 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 (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.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 (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}", "if (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();", "snumChars == -1", "snumChars", "-1", "1", "throw new InputMismatchException();", "new InputMismatchException()", "if (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.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 (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}", "curChar >= snumChars", "curChar", "snumChars", "{\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.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 (snumChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}", "curChar = 0", "curChar", "0", "try {\n\t\t\t\t\tsnumChars = stream.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\tsnumChars = stream.read(buf);\n\t\t\t\t}", "snumChars = stream.read(buf)", "snumChars", "stream.read(buf)", "stream.read", "stream", "buf", "if (snumChars <= 0)\n\t\t\t\t\treturn -1;", "snumChars <= 0", "snumChars", "0", "return -1;", "-1", "1", "return buf[curChar++];", "buf[curChar++]", "buf", "curChar++", "curChar", "public int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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\t}\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\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();\n\t\t\t}", "isSpaceChar(c)", "isSpaceChar", "c", "{\n\t\t\t\tc = read();\n\t\t\t}", "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\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\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t}", "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\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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\t}\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\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();\n\t\t\t}", "isSpaceChar(c)", "isSpaceChar", "c", "{\n\t\t\t\tc = read();\n\t\t\t}", "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\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\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t}", "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[] 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\t}\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\t}\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();\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\ta[i] = nextInt();\n\t\t\t}", "{\n\t\t\t\ta[i] = nextInt();\n\t\t\t}", "a[i] = nextInt()", "a[i]", "a", "i", "nextInt()", "nextInt", "return a;", "a", "int n", "n", "public String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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}", "readString", "{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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();\n\t\t\t}", "isSpaceChar(c)", "isSpaceChar", "c", "{\n\t\t\t\tc = read();\n\t\t\t}", "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 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 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", "private 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 class Main {\n\tprivate static int n;\n\tprivate static int[] a;\n\tprivate static String s;\n\tprivate static HashMap<Integer, ArrayList<Integer>> g;\n\tprivate static long pp, qq, rr;\n\n\tpublic static void main(String[] args) {\n\t\tn = ini();\n\t\t\n\t\tint[] map = new int[n+1];\n\t\t\n\t\tfor(int i=0; i<n-1; i++) {\n\t\t\tmap[ini()]++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++) {\n\t\t\tprintln(map[i]);\n\t\t}\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}\n\n\t//NONPROBLEM CODE\n\n\tprivate static InputReader in = new InputReader(System.in);\n\tprivate static PrintWriter out = new PrintWriter(System.out);\n\n\tprivate static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.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 (snumChars <= 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 int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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 long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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[] 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\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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 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 boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}\n\n\t//INPUT SHORTCUTS\n\n\tprivate static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}\n\n\tprivate static int ini() {\n\t\treturn in.nextInt();\n\t}\n\n\tprivate static String ins() {\n\t\treturn in.readString();\n\t}\n\n\t//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}\n\n\t//PRINT SHORTCUTS\n\n\tprivate static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}\n\n\tprivate static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}\n\n\tprivate static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}\n\n\tprivate static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}\n\n\tprivate static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}\n}", "public class Main {\n\tprivate static int n;\n\tprivate static int[] a;\n\tprivate static String s;\n\tprivate static HashMap<Integer, ArrayList<Integer>> g;\n\tprivate static long pp, qq, rr;\n\n\tpublic static void main(String[] args) {\n\t\tn = ini();\n\t\t\n\t\tint[] map = new int[n+1];\n\t\t\n\t\tfor(int i=0; i<n-1; i++) {\n\t\t\tmap[ini()]++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<=n; i++) {\n\t\t\tprintln(map[i]);\n\t\t}\n\n\t\tout.flush();\n\t\tout.close();\n\n\t}\n\n\t//NONPROBLEM CODE\n\n\tprivate static InputReader in = new InputReader(System.in);\n\tprivate static PrintWriter out = new PrintWriter(System.out);\n\n\tprivate static class InputReader {\n\n\t\tprivate final InputStream stream;\n\t\tprivate final byte[] buf = new byte[8192];\n\t\tprivate int curChar, snumChars;\n\n\t\tpublic InputReader(InputStream st) {\n\t\t\tthis.stream = st;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (snumChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= snumChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tsnumChars = stream.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 (snumChars <= 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 int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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 long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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\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[] 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\t}\n\t\t\treturn a;\n\t\t}\n\n\t\tpublic String readString() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c)) {\n\t\t\t\tc = read();\n\t\t\t}\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 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 boolean isSpaceChar(int c) {\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tprivate boolean isEndOfLine(int c) {\n\t\t\treturn c == '\\n' || c == '\\r' || c == -1;\n\t\t}\n\n\t}\n\n\t//INPUT SHORTCUTS\n\n\tprivate static int[] ina(int n) {\n\t\tint[] temp = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ttemp[i] = in.nextInt();\n\t\t}\n\t\treturn temp;\n\t}\n\n\tprivate static int ini() {\n\t\treturn in.nextInt();\n\t}\n\n\tprivate static String ins() {\n\t\treturn in.readString();\n\t}\n\n\t//OTHER SHORTCUTS\n\tpublic static void sort(int[] a) {\n\t\tArrays.sort(a);\n\t}\n\n\t//PRINT SHORTCUTS\n\n\tprivate static void println(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t}\n\n\tprivate static void print(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \"\");\n\t\t}\n\t}\n\n\tprivate static void printAll(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t}\n\n\tprivate static void debug(Object... o) {\n\t\tfor (Object x : o) {\n\t\t\tout.write(x + \" \");\n\t\t}\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}\n\n\tprivate static HashMap<Integer, ArrayList<Integer>> intree(int n) {\n\n\t\tHashMap<Integer, ArrayList<Integer>> g = new HashMap<>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tg.put(i, new ArrayList<>());\n\t\t}\n\n\t\tfor (int i = 0; i < n - 1; i++) {\n\t\t\tint u = ini() - 1;\n\t\t\tint v = ini() - 1;\n\t\t\tg.get(u).add(v);\n\t\t\tg.get(v).add(u);\n\t\t}\n\n\t\treturn g;\n\t}\n}", "Main" ]
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.InputMismatchException; public class Main { private static int n; private static int[] a; private static String s; private static HashMap<Integer, ArrayList<Integer>> g; private static long pp, qq, rr; public static void main(String[] args) { n = ini(); int[] map = new int[n+1]; for(int i=0; i<n-1; i++) { map[ini()]++; } for(int i=1; i<=n; i++) { println(map[i]); } out.flush(); out.close(); } //NONPROBLEM CODE private static InputReader in = new InputReader(System.in); private static PrintWriter out = new PrintWriter(System.out); private static class InputReader { private final InputStream stream; private final byte[] buf = new byte[8192]; private int curChar, snumChars; public InputReader(InputStream st) { this.stream = st; } public int read() { if (snumChars == -1) throw new InputMismatchException(); if (curChar >= snumChars) { curChar = 0; try { snumChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (snumChars <= 0) return -1; } return buf[curChar++]; } public int nextInt() { int c = 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 long nextLong() { int c = read(); while (isSpaceChar(c)) { c = read(); } int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public int[] nextIntArray(int n) { int a[] = new int[n]; for (int i = 0; i < n; i++) { a[i] = nextInt(); } return a; } public String readString() { int c = read(); while (isSpaceChar(c)) { c = read(); } StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } 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 boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } private boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; } } //INPUT SHORTCUTS private static int[] ina(int n) { int[] temp = new int[n]; for (int i = 0; i < n; i++) { temp[i] = in.nextInt(); } return temp; } private static int ini() { return in.nextInt(); } private static String ins() { return in.readString(); } //OTHER SHORTCUTS public static void sort(int[] a) { Arrays.sort(a); } //PRINT SHORTCUTS private static void println(Object... o) { for (Object x : o) { out.write(x + " "); } out.write("\n"); } private static void print(Object... o) { for (Object x : o) { out.write(x + ""); } } private static void printAll(Object... o) { for (Object x : o) { out.write(x + " "); } } private static void debug(Object... o) { for (Object x : o) { out.write(x + " "); } out.write("\n"); out.flush(); } private static HashMap<Integer, ArrayList<Integer>> intree(int n) { HashMap<Integer, ArrayList<Integer>> g = new HashMap<>(); for (int i = 0; i < n; i++) { g.put(i, new ArrayList<>()); } for (int i = 0; i < n - 1; i++) { int u = ini() - 1; int v = ini() - 1; g.get(u).add(v); g.get(v).add(u); } return g; } }
[ 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.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tint[] con_bra = new int[A + 1];\n\n\t\tfor (int i = 1; i < A; i++) {\n\t\t\tint let = sc.nextInt();\n\t\t\tcon_bra[let]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tSystem.out.println(con_bra[i]);\n\t\t}\n\n\t}\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\n\t\tint A = sc.nextInt();\n\n\t\tint[] con_bra = new int[A + 1];\n\n\t\tfor (int i = 1; i < A; i++) {\n\t\t\tint let = sc.nextInt();\n\t\t\tcon_bra[let]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tSystem.out.println(con_bra[i]);\n\t\t}\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tint[] con_bra = new int[A + 1];\n\n\t\tfor (int i = 1; i < A; i++) {\n\t\t\tint let = sc.nextInt();\n\t\t\tcon_bra[let]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tSystem.out.println(con_bra[i]);\n\t\t}\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tint[] con_bra = new int[A + 1];\n\n\t\tfor (int i = 1; i < A; i++) {\n\t\t\tint let = sc.nextInt();\n\t\t\tcon_bra[let]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tSystem.out.println(con_bra[i]);\n\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "int[] con_bra = new int[A + 1];", "con_bra", "new int[A + 1]", "A + 1", "A", "1", "for (int i = 1; i < A; i++) {\n\t\t\tint let = sc.nextInt();\n\t\t\tcon_bra[let]++;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < A", "i", "A", "i++", "i++", "i", "{\n\t\t\tint let = sc.nextInt();\n\t\t\tcon_bra[let]++;\n\t\t}", "{\n\t\t\tint let = sc.nextInt();\n\t\t\tcon_bra[let]++;\n\t\t}", "int let = sc.nextInt();", "let", "sc.nextInt()", "sc.nextInt", "sc", "con_bra[let]++", "con_bra[let]", "con_bra", "let", "for (int i = 1; i <= A; i++) {\n\t\t\tSystem.out.println(con_bra[i]);\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= A", "i", "A", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(con_bra[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(con_bra[i]);\n\t\t}", "System.out.println(con_bra[i])", "System.out.println", "System.out", "System", "System.out", "con_bra[i]", "con_bra", "i", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tint[] con_bra = new int[A + 1];\n\n\t\tfor (int i = 1; i < A; i++) {\n\t\t\tint let = sc.nextInt();\n\t\t\tcon_bra[let]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tSystem.out.println(con_bra[i]);\n\t\t}\n\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\n\t\tint[] con_bra = new int[A + 1];\n\n\t\tfor (int i = 1; i < A; i++) {\n\t\t\tint let = sc.nextInt();\n\t\t\tcon_bra[let]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tSystem.out.println(con_bra[i]);\n\t\t}\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(); int[] con_bra = new int[A + 1]; for (int i = 1; i < A; i++) { int let = sc.nextInt(); con_bra[let]++; } for (int i = 1; i <= A; i++) { System.out.println(con_bra[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, 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 ], [ 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 ], [ 6, 55 ], [ 55, 56 ], [ 0, 57 ], [ 57, 58 ], [ 57, 59 ] ]
[ "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 = sc.nextInt();\n int[] syain = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n syain[sc.nextInt()-1]++;\n }\n\n for (int a : syain) {\n System.out.println(a);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] syain = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n syain[sc.nextInt()-1]++;\n }\n\n for (int a : syain) {\n System.out.println(a);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] syain = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n syain[sc.nextInt()-1]++;\n }\n\n for (int a : syain) {\n System.out.println(a);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] syain = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n syain[sc.nextInt()-1]++;\n }\n\n for (int a : syain) {\n System.out.println(a);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] syain = new int[N];", "syain", "new int[N]", "N", "for (int i = 0; i < N - 1; i++) {\n syain[sc.nextInt()-1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N - 1", "i", "N - 1", "N", "1", "i++", "i++", "i", "{\n syain[sc.nextInt()-1]++;\n }", "{\n syain[sc.nextInt()-1]++;\n }", "syain[sc.nextInt()-1]++", "syain[sc.nextInt()-1]", "syain", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "for (int a : syain) {\n System.out.println(a);\n }", "int a", "syain", "{\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 public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] syain = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n syain[sc.nextInt()-1]++;\n }\n\n for (int a : syain) {\n System.out.println(a);\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[] syain = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n syain[sc.nextInt()-1]++;\n }\n\n for (int a : syain) {\n System.out.println(a);\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[] syain = new int[N]; for (int i = 0; i < N - 1; i++) { syain[sc.nextInt()-1]++; } for (int a : syain) { System.out.println(a); } } }
[ 7, 6, 12, 13, 30, 14, 2, 18, 13, 13, 18, 13, 13, 29, 17, 14, 2, 18, 13, 13, 18, 13, 13, 29, 17, 29, 40, 17, 23, 13, 23, 13, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 41, 13, 17, 12, 13, 30, 41, 13, 17, 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, 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, 13, 4, 18, 2, 18, 13, 13, 17, 4, 18, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 2, 13, 13, 14, 2, 13, 17, 30, 29, 17, 41, 13, 2, 4, 13, 13, 2, 13, 17, 13, 14, 2, 2, 13, 17, 17, 29, 2, 2, 13, 13, 13, 29, 2, 2, 2, 13, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 14, 2, 13, 13, 30, 40, 13, 14, 4, 18, 13, 2, 13, 13, 30, 0, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 13, 30, 4, 18, 13, 13, 2, 4, 18, 13, 13, 17, 30, 4, 18, 13, 13, 17, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 42, 2, 2, 13, 17, 17, 30, 4, 18, 13, 17, 0, 13, 17, 11, 1, 41, 13, 17, 2, 2, 13, 13, 13, 1, 0, 13, 17, 30, 30, 42, 2, 2, 13, 13, 17, 30, 4, 18, 13, 13, 0, 13, 13, 14, 2, 13, 17, 30, 4, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 13, 41, 13, 17, 41, 13, 17, 14, 2, 13, 17, 29, 17, 42, 2, 13, 17, 30, 41, 13, 2, 13, 13, 41, 13, 13, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 0, 13, 2, 13, 2, 13, 13, 0, 13, 13, 14, 2, 13, 17, 0, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 11, 1, 41, 13, 17, 2, 2, 13, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 14, 2, 2, 13, 13, 13, 30, 0, 13, 17, 4, 18, 13, 13, 30, 4, 18, 13, 13, 4, 18, 13, 2, 13, 13, 0, 13, 17, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 11, 1, 41, 13, 17, 2, 2, 13, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 14, 2, 2, 13, 13, 13, 30, 0, 13, 17, 30, 0, 13, 17, 29, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 17, 14, 2, 13, 13, 30, 3, 29, 13, 23, 13, 23, 13, 12, 13, 30, 4, 18, 13, 13, 20, 23, 13, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 2, 13, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 29, 17, 29, 17, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 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 ], [ 2, 3 ], [ 2, 4 ], [ 4, 5 ], [ 5, 6 ], [ 6, 7 ], [ 7, 8 ], [ 7, 9 ], [ 6, 10 ], [ 10, 11 ], [ 10, 12 ], [ 5, 13 ], [ 13, 14 ], [ 5, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 16, 20 ], [ 20, 21 ], [ 20, 22 ], [ 15, 23 ], [ 23, 24 ], [ 15, 25 ], [ 25, 26 ], [ 26, 27 ], [ 2, 28 ], [ 28, 29 ], [ 2, 30 ], [ 30, 31 ], [ 0, 32 ], [ 32, 33 ], [ 32, 34 ], [ 0, 35 ], [ 35, 36 ], [ 35, 37 ], [ 0, 38 ], [ 683, 39 ], [ 683, 40 ], [ 40, 41 ], [ 40, 42 ], [ 683, 43 ], [ 43, 44 ], [ 683, 45 ], [ 45, 46 ], [ 45, 47 ], [ 683, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 54, 56 ], [ 50, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 50, 65 ], [ 65, 66 ], [ 65, 67 ], [ 50, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 69, 77 ], [ 77, 78 ], [ 78, 79 ], [ 69, 80 ], [ 81, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 81, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 50, 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 ], [ 106, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 50, 116 ], [ 116, 117 ], [ 117, 118 ], [ 48, 119 ], [ 119, 120 ], [ 683, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 123, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 137, 138 ], [ 138, 139 ], [ 123, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 143, 146 ], [ 146, 147 ], [ 146, 148 ], [ 142, 149 ], [ 123, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 151, 155 ], [ 150, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 157, 161 ], [ 150, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 164, 168 ], [ 163, 169 ], [ 121, 170 ], [ 170, 171 ], [ 121, 172 ], [ 172, 173 ], [ 683, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 176, 180 ], [ 180, 181 ], [ 180, 182 ], [ 176, 183 ], [ 183, 184 ], [ 183, 185 ], [ 176, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 186, 191 ], [ 191, 192 ], [ 191, 193 ], [ 186, 194 ], [ 194, 195 ], [ 195, 196 ], [ 186, 197 ], [ 198, 198 ], [ 198, 199 ], [ 199, 200 ], [ 199, 201 ], [ 201, 202 ], [ 201, 203 ], [ 198, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 204, 208 ], [ 208, 209 ], [ 209, 210 ], [ 198, 211 ], [ 211, 212 ], [ 212, 213 ], [ 213, 214 ], [ 212, 215 ], [ 215, 216 ], [ 215, 217 ], [ 211, 218 ], [ 218, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 222, 223 ], [ 221, 224 ], [ 224, 225 ], [ 224, 226 ], [ 198, 227 ], [ 227, 228 ], [ 228, 229 ], [ 229, 230 ], [ 228, 231 ], [ 227, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 233, 236 ], [ 233, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 238, 241 ], [ 237, 242 ], [ 227, 243 ], [ 243, 244 ], [ 244, 245 ], [ 245, 246 ], [ 244, 247 ], [ 244, 248 ], [ 176, 249 ], [ 249, 250 ], [ 174, 251 ], [ 251, 252 ], [ 174, 253 ], [ 253, 254 ], [ 174, 255 ], [ 255, 256 ], [ 683, 257 ], [ 257, 258 ], [ 257, 259 ], [ 259, 260 ], [ 260, 261 ], [ 260, 262 ], [ 259, 263 ], [ 263, 264 ], [ 264, 265 ], [ 265, 266 ], [ 265, 267 ], [ 264, 268 ], [ 263, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 270, 273 ], [ 269, 274 ], [ 274, 275 ], [ 274, 276 ], [ 259, 277 ], [ 277, 278 ], [ 278, 279 ], [ 279, 280 ], [ 279, 281 ], [ 277, 282 ], [ 282, 283 ], [ 283, 284 ], [ 283, 285 ], [ 282, 286 ], [ 277, 287 ], [ 287, 288 ], [ 288, 289 ], [ 288, 290 ], [ 277, 291 ], [ 292, 292 ], [ 292, 293 ], [ 293, 294 ], [ 294, 295 ], [ 295, 296 ], [ 295, 297 ], [ 294, 298 ], [ 293, 299 ], [ 299, 300 ], [ 300, 301 ], [ 301, 302 ], [ 300, 303 ], [ 299, 304 ], [ 304, 305 ], [ 304, 306 ], [ 259, 307 ], [ 307, 308 ], [ 308, 309 ], [ 308, 310 ], [ 307, 311 ], [ 311, 312 ], [ 312, 313 ], [ 313, 314 ], [ 312, 315 ], [ 259, 316 ], [ 316, 317 ], [ 257, 318 ], [ 318, 319 ], [ 683, 320 ], [ 320, 321 ], [ 320, 322 ], [ 322, 323 ], [ 323, 324 ], [ 323, 325 ], [ 322, 326 ], [ 326, 327 ], [ 326, 328 ], [ 322, 329 ], [ 329, 330 ], [ 329, 331 ], [ 322, 332 ], [ 332, 333 ], [ 333, 334 ], [ 333, 335 ], [ 332, 336 ], [ 336, 337 ], [ 322, 338 ], [ 338, 339 ], [ 339, 340 ], [ 339, 341 ], [ 338, 342 ], [ 342, 343 ], [ 343, 344 ], [ 343, 345 ], [ 345, 346 ], [ 345, 347 ], [ 342, 348 ], [ 348, 349 ], [ 348, 350 ], [ 342, 351 ], [ 351, 352 ], [ 351, 353 ], [ 353, 354 ], [ 353, 355 ], [ 342, 356 ], [ 356, 357 ], [ 356, 358 ], [ 342, 359 ], [ 359, 360 ], [ 359, 361 ], [ 342, 362 ], [ 362, 363 ], [ 362, 364 ], [ 364, 365 ], [ 364, 366 ], [ 366, 367 ], [ 366, 368 ], [ 342, 369 ], [ 369, 370 ], [ 369, 371 ], [ 322, 372 ], [ 372, 373 ], [ 373, 374 ], [ 373, 375 ], [ 372, 376 ], [ 376, 377 ], [ 376, 378 ], [ 322, 379 ], [ 379, 380 ], [ 320, 381 ], [ 381, 382 ], [ 320, 383 ], [ 383, 384 ], [ 683, 385 ], [ 385, 386 ], [ 385, 387 ], [ 387, 388 ], [ 388, 389 ], [ 388, 390 ], [ 387, 391 ], [ 391, 392 ], [ 391, 393 ], [ 387, 394 ], [ 394, 395 ], [ 395, 396 ], [ 396, 397 ], [ 396, 398 ], [ 394, 399 ], [ 399, 400 ], [ 400, 401 ], [ 400, 402 ], [ 399, 403 ], [ 394, 404 ], [ 404, 405 ], [ 405, 406 ], [ 394, 407 ], [ 408, 408 ], [ 408, 409 ], [ 409, 410 ], [ 410, 411 ], [ 411, 412 ], [ 411, 413 ], [ 410, 414 ], [ 409, 415 ], [ 415, 416 ], [ 416, 417 ], [ 417, 418 ], [ 418, 419 ], [ 418, 420 ], [ 417, 421 ], [ 416, 422 ], [ 422, 423 ], [ 423, 424 ], [ 423, 425 ], [ 422, 426 ], [ 426, 427 ], [ 427, 428 ], [ 426, 429 ], [ 416, 430 ], [ 430, 431 ], [ 431, 432 ], [ 432, 433 ], [ 431, 434 ], [ 430, 435 ], [ 435, 436 ], [ 436, 437 ], [ 435, 438 ], [ 438, 439 ], [ 438, 440 ], [ 430, 441 ], [ 441, 442 ], [ 441, 443 ], [ 387, 444 ], [ 444, 445 ], [ 385, 446 ], [ 446, 447 ], [ 683, 448 ], [ 448, 449 ], [ 448, 450 ], [ 450, 451 ], [ 451, 452 ], [ 451, 453 ], [ 450, 454 ], [ 454, 455 ], [ 454, 456 ], [ 450, 457 ], [ 457, 458 ], [ 458, 459 ], [ 459, 460 ], [ 459, 461 ], [ 457, 462 ], [ 462, 463 ], [ 463, 464 ], [ 463, 465 ], [ 462, 466 ], [ 457, 467 ], [ 467, 468 ], [ 468, 469 ], [ 457, 470 ], [ 471, 471 ], [ 471, 472 ], [ 472, 473 ], [ 473, 474 ], [ 474, 475 ], [ 474, 476 ], [ 473, 477 ], [ 472, 478 ], [ 478, 479 ], [ 479, 480 ], [ 480, 481 ], [ 481, 482 ], [ 481, 483 ], [ 480, 484 ], [ 479, 485 ], [ 485, 486 ], [ 486, 487 ], [ 486, 488 ], [ 479, 489 ], [ 489, 490 ], [ 490, 491 ], [ 490, 492 ], [ 450, 493 ], [ 493, 494 ], [ 448, 495 ], [ 495, 496 ], [ 683, 497 ], [ 497, 498 ], [ 497, 499 ], [ 499, 500 ], [ 500, 501 ], [ 500, 502 ], [ 499, 503 ], [ 503, 504 ], [ 504, 505 ], [ 505, 506 ], [ 505, 507 ], [ 503, 508 ], [ 508, 509 ], [ 508, 510 ], [ 503, 511 ], [ 511, 512 ], [ 512, 513 ], [ 503, 514 ], [ 515, 515 ], [ 515, 516 ], [ 516, 517 ], [ 516, 518 ], [ 515, 519 ], [ 519, 520 ], [ 520, 521 ], [ 520, 522 ], [ 519, 523 ], [ 523, 524 ], [ 499, 525 ], [ 525, 526 ], [ 497, 527 ], [ 527, 528 ], [ 497, 529 ], [ 529, 530 ], [ 683, 531 ], [ 531, 532 ], [ 531, 533 ], [ 533, 534 ], [ 534, 535 ], [ 535, 536 ], [ 534, 537 ], [ 534, 538 ], [ 531, 539 ], [ 539, 540 ], [ 531, 541 ], [ 541, 542 ], [ 683, 543 ], [ 543, 544 ], [ 543, 545 ], [ 545, 546 ], [ 546, 547 ], [ 547, 548 ], [ 548, 549 ], [ 548, 550 ], [ 546, 551 ], [ 551, 552 ], [ 552, 553 ], [ 552, 554 ], [ 551, 555 ], [ 546, 556 ], [ 556, 557 ], [ 557, 558 ], [ 546, 559 ], [ 560, 560 ], [ 560, 561 ], [ 561, 562 ], [ 562, 563 ], [ 563, 564 ], [ 563, 565 ], [ 562, 566 ], [ 561, 567 ], [ 567, 568 ], [ 568, 569 ], [ 545, 570 ], [ 570, 571 ], [ 543, 572 ], [ 572, 573 ], [ 683, 574 ], [ 574, 575 ], [ 574, 576 ], [ 576, 577 ], [ 577, 578 ], [ 578, 579 ], [ 578, 580 ], [ 577, 581 ], [ 581, 582 ], [ 576, 583 ], [ 583, 584 ], [ 584, 585 ], [ 584, 586 ], [ 584, 587 ], [ 587, 588 ], [ 587, 589 ], [ 574, 590 ], [ 590, 591 ], [ 574, 592 ], [ 592, 593 ], [ 0, 594 ], [ 594, 595 ], [ 594, 596 ], [ 596, 597 ], [ 594, 598 ], [ 598, 599 ], [ 594, 600 ], [ 600, 601 ], [ 600, 602 ], [ 602, 603 ], [ 603, 604 ], [ 603, 605 ], [ 594, 606 ], [ 606, 607 ], [ 606, 608 ], [ 608, 609 ], [ 609, 610 ], [ 610, 611 ], [ 611, 612 ], [ 611, 613 ], [ 610, 614 ], [ 614, 615 ], [ 615, 616 ], [ 616, 617 ], [ 609, 618 ], [ 618, 619 ], [ 619, 620 ], [ 620, 621 ], [ 620, 622 ], [ 622, 623 ], [ 623, 624 ], [ 624, 625 ], [ 619, 626 ], [ 626, 627 ], [ 627, 628 ], [ 627, 629 ], [ 608, 630 ], [ 630, 631 ], [ 631, 632 ], [ 632, 633 ], [ 594, 634 ], [ 634, 635 ], [ 634, 636 ], [ 636, 637 ], [ 637, 638 ], [ 638, 639 ], [ 639, 640 ], [ 638, 641 ], [ 641, 642 ], [ 594, 643 ], [ 643, 644 ], [ 643, 645 ], [ 645, 646 ], [ 646, 647 ], [ 647, 648 ], [ 648, 649 ], [ 647, 650 ], [ 650, 651 ], [ 594, 652 ], [ 652, 653 ], [ 652, 654 ], [ 654, 655 ], [ 655, 656 ], [ 656, 657 ], [ 657, 658 ], [ 656, 659 ], [ 659, 660 ], [ 594, 661 ], [ 661, 662 ], [ 661, 663 ], [ 663, 664 ], [ 664, 665 ], [ 664, 666 ], [ 663, 667 ], [ 667, 668 ], [ 668, 669 ], [ 668, 670 ], [ 670, 671 ], [ 671, 672 ], [ 672, 673 ], [ 667, 674 ], [ 674, 675 ], [ 675, 676 ], [ 675, 677 ], [ 677, 678 ], [ 678, 679 ], [ 663, 680 ], [ 680, 681 ], [ 0, 682 ], [ 682, 683 ], [ 682, 684 ] ]
[ "import java.util.*;\nimport java.io.*;\n\n\n\npublic class Main{\n static long m=998244353l; //line 156 modInverse\n static boolean[] vis; //line 74 and 91 hasElement ans pth_fnd\n public static void main(String[] args) throws IOException{\n // long sttm=System.currentTimeMillis();\n int MAX=1000000007;\n FastReader sc=new FastReader();\n OutputStream out=new BufferedOutputStream(System.out);\n int n=sc.nextInt();\n int[] a=new int[n];\n for(int i=1;i<n;i++){\n int alpha=sc.nextInt();\n a[alpha-1]++;\n }\n for(int i=0;i<n;i++){\n out.write((a[i]+\"\\n\").getBytes());\n }\n out.flush();\n }\n\n static int MOD=1000000007;\n public static int pow(int n,int k){ //n-pow(k)\n if(k==1){\n return n%MOD;\n }\n if(k==0){\n return 1;\n }\n int val=pow(n,k/2)%MOD;\n if(k%2==0)return (val*val)%MOD;\n else return (val*val*n)%MOD;\n }\n\n\n public static long cnt_sum_k_subar(long[] a,int n,int k){\n HashMap<Long,Long> map=new HashMap<Long,Long>();\n long ret=0;\n long cur_sum=0;\n for(int i=0;i<n;i++){\n cur_sum+=a[i];\n if(cur_sum==k){\n ret++;\n }\n if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }\n if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }\n }\n return ret;\n }\n\n\n\n public static ArrayList<Integer> lcm(int num){\n ArrayList<Integer> arrl=new ArrayList<Integer>();\n while(num%2==0){\n arrl.add(2);\n num/=2;\n }\n for(int i=3;i*i<=num;i+=2){\n while(num%i==0){\n arrl.add(i);\n num/=i;\n }\n }\n if(num>2){\n arrl.add(num);\n }\n return arrl;\n }\n\n\n static long modInverse(long a,long m) \n { \n long m0 = m; \n long y = 0l, x = 1l; \n \n if (m == 1) \n return 0l; \n \n while (a > 1) \n { \n \n long q = a / m; \n \n long t = m; \n \n m = a % m; \n a = t; \n t = y; \n \n y = x - q * y; \n x = t; \n } \n if (x < 0) \n x += m0; \n \n return x; \n } \n\n\n public static TreeSet<Long> arr_fact(long num){\n TreeSet<Long> arr=new TreeSet<Long>();\n int cnt=0;\n for(long i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }\n }\n return arr;\n }\n\n\n\n public static int num_fact(int num){\n ArrayList<Integer> arr=new ArrayList<Integer>();\n int cnt=0;\n for(int i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }\n }\n return cnt;\n }\n\n\n public static long cal(int k,int x){\n long val=1;\n\n for(int i=0;i<k;i++){\n val*=2;\n if(val>x){\n break;\n }\n }\n return val;\n }\n\n public static void sort_inc(int[][] arr,int col){ //change dimention if req\n Arrays.sort(arr, new Comparator<int[]>() {\n public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }\n });\n }\n\n\n public static boolean prime(int n){\n for(int i=2;i*i<=n;i++){\n if(n%i==0){\n return false;\n }\n }\n return true;\n }\n\n\n static long gcd(long a, long b) \n\t{ \n\tif (b == 0) \n\t\treturn a; \n\treturn gcd(b, a % b); \n\t} \n}\n\n\nclass FastReader{ \n BufferedReader br; \n StringTokenizer st; \n\n public FastReader(){ \n br = new BufferedReader(new\n 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 \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}", "Comparator<int[]>() {\n public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }\n }", "public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }", "compare", "{ \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }", "if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1;", "entry1[col] > entry2[col]", "entry1[col]", "entry1", "col", "entry2[col]", "entry2", "col", "return 1;", "1", "if(entry1[col]==entry2[col])\n return 0;\n else\n return -1;", "entry1[col]==entry2[col]", "entry1[col]", "entry1", "col", "entry2[col]", "entry2", "col", "return 0;", "0", "return -1;", "-1", "1", "final int[] entry1", "entry1", "final int[] entry2", "entry2", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main{\n static long m=998244353l; //line 156 modInverse\n static boolean[] vis; //line 74 and 91 hasElement ans pth_fnd\n public static void main(String[] args) throws IOException{\n // long sttm=System.currentTimeMillis();\n int MAX=1000000007;\n FastReader sc=new FastReader();\n OutputStream out=new BufferedOutputStream(System.out);\n int n=sc.nextInt();\n int[] a=new int[n];\n for(int i=1;i<n;i++){\n int alpha=sc.nextInt();\n a[alpha-1]++;\n }\n for(int i=0;i<n;i++){\n out.write((a[i]+\"\\n\").getBytes());\n }\n out.flush();\n }\n\n static int MOD=1000000007;\n public static int pow(int n,int k){ //n-pow(k)\n if(k==1){\n return n%MOD;\n }\n if(k==0){\n return 1;\n }\n int val=pow(n,k/2)%MOD;\n if(k%2==0)return (val*val)%MOD;\n else return (val*val*n)%MOD;\n }\n\n\n public static long cnt_sum_k_subar(long[] a,int n,int k){\n HashMap<Long,Long> map=new HashMap<Long,Long>();\n long ret=0;\n long cur_sum=0;\n for(int i=0;i<n;i++){\n cur_sum+=a[i];\n if(cur_sum==k){\n ret++;\n }\n if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }\n if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }\n }\n return ret;\n }\n\n\n\n public static ArrayList<Integer> lcm(int num){\n ArrayList<Integer> arrl=new ArrayList<Integer>();\n while(num%2==0){\n arrl.add(2);\n num/=2;\n }\n for(int i=3;i*i<=num;i+=2){\n while(num%i==0){\n arrl.add(i);\n num/=i;\n }\n }\n if(num>2){\n arrl.add(num);\n }\n return arrl;\n }\n\n\n static long modInverse(long a,long m) \n { \n long m0 = m; \n long y = 0l, x = 1l; \n \n if (m == 1) \n return 0l; \n \n while (a > 1) \n { \n \n long q = a / m; \n \n long t = m; \n \n m = a % m; \n a = t; \n t = y; \n \n y = x - q * y; \n x = t; \n } \n if (x < 0) \n x += m0; \n \n return x; \n } \n\n\n public static TreeSet<Long> arr_fact(long num){\n TreeSet<Long> arr=new TreeSet<Long>();\n int cnt=0;\n for(long i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }\n }\n return arr;\n }\n\n\n\n public static int num_fact(int num){\n ArrayList<Integer> arr=new ArrayList<Integer>();\n int cnt=0;\n for(int i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }\n }\n return cnt;\n }\n\n\n public static long cal(int k,int x){\n long val=1;\n\n for(int i=0;i<k;i++){\n val*=2;\n if(val>x){\n break;\n }\n }\n return val;\n }\n\n public static void sort_inc(int[][] arr,int col){ //change dimention if req\n Arrays.sort(arr, new Comparator<int[]>() {\n public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }\n });\n }\n\n\n public static boolean prime(int n){\n for(int i=2;i*i<=n;i++){\n if(n%i==0){\n return false;\n }\n }\n return true;\n }\n\n\n static long gcd(long a, long b) \n\t{ \n\tif (b == 0) \n\t\treturn a; \n\treturn gcd(b, a % b); \n\t} \n}", "Main", "static long m=998244353l; //line 156 modInverse", "m", "998244353l", "static boolean[] vis; //line 74 and 91 hasElement ans pth_fnd", "vis", "static int MOD=1000000007;", "MOD", "1000000007", "public static void main(String[] args) throws IOException{\n // long sttm=System.currentTimeMillis();\n int MAX=1000000007;\n FastReader sc=new FastReader();\n OutputStream out=new BufferedOutputStream(System.out);\n int n=sc.nextInt();\n int[] a=new int[n];\n for(int i=1;i<n;i++){\n int alpha=sc.nextInt();\n a[alpha-1]++;\n }\n for(int i=0;i<n;i++){\n out.write((a[i]+\"\\n\").getBytes());\n }\n out.flush();\n }", "main", "{\n // long sttm=System.currentTimeMillis();\n int MAX=1000000007;\n FastReader sc=new FastReader();\n OutputStream out=new BufferedOutputStream(System.out);\n int n=sc.nextInt();\n int[] a=new int[n];\n for(int i=1;i<n;i++){\n int alpha=sc.nextInt();\n a[alpha-1]++;\n }\n for(int i=0;i<n;i++){\n out.write((a[i]+\"\\n\").getBytes());\n }\n out.flush();\n }", "int MAX=1000000007;", "MAX", "1000000007", "FastReader sc=new FastReader();", "sc", "new FastReader()", "OutputStream out=new BufferedOutputStream(System.out);", "out", "new BufferedOutputStream(System.out)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] a=new int[n];", "a", "new int[n]", "n", "for(int i=1;i<n;i++){\n int alpha=sc.nextInt();\n a[alpha-1]++;\n }", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n int alpha=sc.nextInt();\n a[alpha-1]++;\n }", "{\n int alpha=sc.nextInt();\n a[alpha-1]++;\n }", "int alpha=sc.nextInt();", "alpha", "sc.nextInt()", "sc.nextInt", "sc", "a[alpha-1]++", "a[alpha-1]", "a", "alpha-1", "alpha", "1", "for(int i=0;i<n;i++){\n out.write((a[i]+\"\\n\").getBytes());\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n out.write((a[i]+\"\\n\").getBytes());\n }", "{\n out.write((a[i]+\"\\n\").getBytes());\n }", "out.write((a[i]+\"\\n\").getBytes())", "out.write", "out", "(a[i]+\"\\n\").getBytes()", "(a[i]+\"\\n\").getBytes", "(a[i]+\"\\n\")", "a[i]", "a", "i", "\"\\n\"", "out.flush()", "out.flush", "out", "String[] args", "args", "public static int pow(int n,int k){ //n-pow(k)\n if(k==1){\n return n%MOD;\n }\n if(k==0){\n return 1;\n }\n int val=pow(n,k/2)%MOD;\n if(k%2==0)return (val*val)%MOD;\n else return (val*val*n)%MOD;\n }", "pow", "{ //n-pow(k)\n if(k==1){\n return n%MOD;\n }\n if(k==0){\n return 1;\n }\n int val=pow(n,k/2)%MOD;\n if(k%2==0)return (val*val)%MOD;\n else return (val*val*n)%MOD;\n }", "if(k==1){\n return n%MOD;\n }", "k==1", "k", "1", "{\n return n%MOD;\n }", "return n%MOD;", "n%MOD", "n", "MOD", "if(k==0){\n return 1;\n }", "k==0", "k", "0", "{\n return 1;\n }", "return 1;", "1", "int val=pow(n,k/2)%MOD;", "val", "pow(n,k/2)%MOD", "pow(n,k/2)", "pow", "n", "k/2", "k", "2", "MOD", "if(k%2==0)return (val*val)%MOD;\n else return (val*val*n)%MOD;", "k%2==0", "k%2", "k", "2", "0", "return (val*val)%MOD;", "(val*val)%MOD", "(val*val)", "val", "val", "MOD", "return (val*val*n)%MOD;", "(val*val*n)%MOD", "(val*val*n)", "val*val*n", "val", "val", "n", "MOD", "int n", "n", "int k", "k", "public static long cnt_sum_k_subar(long[] a,int n,int k){\n HashMap<Long,Long> map=new HashMap<Long,Long>();\n long ret=0;\n long cur_sum=0;\n for(int i=0;i<n;i++){\n cur_sum+=a[i];\n if(cur_sum==k){\n ret++;\n }\n if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }\n if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }\n }\n return ret;\n }", "cnt_sum_k_subar", "{\n HashMap<Long,Long> map=new HashMap<Long,Long>();\n long ret=0;\n long cur_sum=0;\n for(int i=0;i<n;i++){\n cur_sum+=a[i];\n if(cur_sum==k){\n ret++;\n }\n if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }\n if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }\n }\n return ret;\n }", "HashMap<Long,Long> map=new HashMap<Long,Long>();", "map", "new HashMap<Long,Long>()", "long ret=0;", "ret", "0", "long cur_sum=0;", "cur_sum", "0", "for(int i=0;i<n;i++){\n cur_sum+=a[i];\n if(cur_sum==k){\n ret++;\n }\n if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }\n if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n cur_sum+=a[i];\n if(cur_sum==k){\n ret++;\n }\n if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }\n if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }\n }", "{\n cur_sum+=a[i];\n if(cur_sum==k){\n ret++;\n }\n if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }\n if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }\n }", "cur_sum+=a[i]", "cur_sum", "a[i]", "a", "i", "if(cur_sum==k){\n ret++;\n }", "cur_sum==k", "cur_sum", "k", "{\n ret++;\n }", "ret++", "ret", "if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }", "map.containsKey(cur_sum-k)", "map.containsKey", "map", "cur_sum-k", "cur_sum", "k", "{\n ret+=map.get(cur_sum-k);\n }", "ret+=map.get(cur_sum-k)", "ret", "map.get(cur_sum-k)", "map.get", "map", "cur_sum-k", "cur_sum", "k", "if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }", "map.containsKey(cur_sum)", "map.containsKey", "map", "cur_sum", "{\n map.put(cur_sum, map.get(cur_sum)+1);\n }", "map.put(cur_sum, map.get(cur_sum)+1)", "map.put", "map", "cur_sum", "map.get(cur_sum)+1", "map.get(cur_sum)", "map.get", "map", "cur_sum", "1", "{\n map.put(cur_sum, (long)1);\n }", "map.put(cur_sum, (long)1)", "map.put", "map", "cur_sum", "(long)1", "return ret;", "ret", "long[] a", "a", "int n", "n", "int k", "k", "public static ArrayList<Integer> lcm(int num){\n ArrayList<Integer> arrl=new ArrayList<Integer>();\n while(num%2==0){\n arrl.add(2);\n num/=2;\n }\n for(int i=3;i*i<=num;i+=2){\n while(num%i==0){\n arrl.add(i);\n num/=i;\n }\n }\n if(num>2){\n arrl.add(num);\n }\n return arrl;\n }", "lcm", "{\n ArrayList<Integer> arrl=new ArrayList<Integer>();\n while(num%2==0){\n arrl.add(2);\n num/=2;\n }\n for(int i=3;i*i<=num;i+=2){\n while(num%i==0){\n arrl.add(i);\n num/=i;\n }\n }\n if(num>2){\n arrl.add(num);\n }\n return arrl;\n }", "ArrayList<Integer> arrl=new ArrayList<Integer>();", "arrl", "new ArrayList<Integer>()", "while(num%2==0){\n arrl.add(2);\n num/=2;\n }", "num%2==0", "num%2", "num", "2", "0", "{\n arrl.add(2);\n num/=2;\n }", "arrl.add(2)", "arrl.add", "arrl", "2", "num/=2", "num", "2", "for(int i=3;i*i<=num;i+=2){\n while(num%i==0){\n arrl.add(i);\n num/=i;\n }\n }", "int i=3;", "int i=3;", "i", "3", "i*i<=num", "i*i", "i", "i", "num", "i+=2", "i+=2", "i", "2", "{\n while(num%i==0){\n arrl.add(i);\n num/=i;\n }\n }", "{\n while(num%i==0){\n arrl.add(i);\n num/=i;\n }\n }", "while(num%i==0){\n arrl.add(i);\n num/=i;\n }", "num%i==0", "num%i", "num", "i", "0", "{\n arrl.add(i);\n num/=i;\n }", "arrl.add(i)", "arrl.add", "arrl", "i", "num/=i", "num", "i", "if(num>2){\n arrl.add(num);\n }", "num>2", "num", "2", "{\n arrl.add(num);\n }", "arrl.add(num)", "arrl.add", "arrl", "num", "return arrl;", "arrl", "int num", "num", "static long modInverse(long a,long m) \n { \n long m0 = m; \n long y = 0l, x = 1l; \n \n if (m == 1) \n return 0l; \n \n while (a > 1) \n { \n \n long q = a / m; \n \n long t = m; \n \n m = a % m; \n a = t; \n t = y; \n \n y = x - q * y; \n x = t; \n } \n if (x < 0) \n x += m0; \n \n return x; \n }", "modInverse", "{ \n long m0 = m; \n long y = 0l, x = 1l; \n \n if (m == 1) \n return 0l; \n \n while (a > 1) \n { \n \n long q = a / m; \n \n long t = m; \n \n m = a % m; \n a = t; \n t = y; \n \n y = x - q * y; \n x = t; \n } \n if (x < 0) \n x += m0; \n \n return x; \n }", "long m0 = m;", "m0", "m", "long y = 0l", "y", "0l", "x = 1l;", "x", "1l", "if (m == 1) \n return 0l;", "m == 1", "m", "1", "return 0l;", "0l", "while (a > 1) \n { \n \n long q = a / m; \n \n long t = m; \n \n m = a % m; \n a = t; \n t = y; \n \n y = x - q * y; \n x = t; \n }", "a > 1", "a", "1", "{ \n \n long q = a / m; \n \n long t = m; \n \n m = a % m; \n a = t; \n t = y; \n \n y = x - q * y; \n x = t; \n }", "long q = a / m;", "q", "a / m", "a", "m", "long t = m;", "t", "m", "m = a % m", "m", "a % m", "a", "m", "a = t", "a", "t", "t = y", "t", "y", "y = x - q * y", "y", "x - q * y", "x", "q * y", "q", "y", "x = t", "x", "t", "if (x < 0) \n x += m0;", "x < 0", "x", "0", "x += m0", "x", "m0", "return x;", "x", "long a", "a", "long m", "m", "public static TreeSet<Long> arr_fact(long num){\n TreeSet<Long> arr=new TreeSet<Long>();\n int cnt=0;\n for(long i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }\n }\n return arr;\n }", "arr_fact", "{\n TreeSet<Long> arr=new TreeSet<Long>();\n int cnt=0;\n for(long i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }\n }\n return arr;\n }", "TreeSet<Long> arr=new TreeSet<Long>();", "arr", "new TreeSet<Long>()", "int cnt=0;", "cnt", "0", "for(long i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }\n }", "long i=1;", "long i=1;", "i", "1", "i*i<=num", "i*i", "i", "i", "num", "i++", "i++", "i", "{\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }\n }", "{\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }\n }", "if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }", "num%i==0", "num%i", "num", "i", "0", "{\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }", "if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }", "i*i==num", "i*i", "i", "i", "num", "{\n cnt+=1;\n arr.add(i);\n }", "cnt+=1", "cnt", "1", "arr.add(i)", "arr.add", "arr", "i", "{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }", "arr.add(i)", "arr.add", "arr", "i", "arr.add(num/i)", "arr.add", "arr", "num/i", "num", "i", "cnt+=2", "cnt", "2", "return arr;", "arr", "long num", "num", "public static int num_fact(int num){\n ArrayList<Integer> arr=new ArrayList<Integer>();\n int cnt=0;\n for(int i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }\n }\n return cnt;\n }", "num_fact", "{\n ArrayList<Integer> arr=new ArrayList<Integer>();\n int cnt=0;\n for(int i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }\n }\n return cnt;\n }", "ArrayList<Integer> arr=new ArrayList<Integer>();", "arr", "new ArrayList<Integer>()", "int cnt=0;", "cnt", "0", "for(int i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i*i<=num", "i*i", "i", "i", "num", "i++", "i++", "i", "{\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }\n }", "{\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }\n }", "if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }", "num%i==0", "num%i", "num", "i", "0", "{\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }", "if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }", "i*i==num", "i*i", "i", "i", "num", "{\n cnt+=1;\n }", "cnt+=1", "cnt", "1", "{\n cnt+=2;\n }", "cnt+=2", "cnt", "2", "return cnt;", "cnt", "int num", "num", "public static long cal(int k,int x){\n long val=1;\n\n for(int i=0;i<k;i++){\n val*=2;\n if(val>x){\n break;\n }\n }\n return val;\n }", "cal", "{\n long val=1;\n\n for(int i=0;i<k;i++){\n val*=2;\n if(val>x){\n break;\n }\n }\n return val;\n }", "long val=1;", "val", "1", "for(int i=0;i<k;i++){\n val*=2;\n if(val>x){\n break;\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<k", "i", "k", "i++", "i++", "i", "{\n val*=2;\n if(val>x){\n break;\n }\n }", "{\n val*=2;\n if(val>x){\n break;\n }\n }", "val*=2", "val", "2", "if(val>x){\n break;\n }", "val>x", "val", "x", "{\n break;\n }", "break;", "return val;", "val", "int k", "k", "int x", "x", "public static void sort_inc(int[][] arr,int col){ //change dimention if req\n Arrays.sort(arr, new Comparator<int[]>() {\n public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }\n });\n }", "sort_inc", "{ //change dimention if req\n Arrays.sort(arr, new Comparator<int[]>() {\n public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }\n });\n }", "Arrays.sort(arr, new Comparator<int[]>() {\n public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }\n })", "Arrays.sort", "Arrays", "arr", "new Comparator<int[]>() {\n public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }\n }", "int[][] arr", "arr", "int col", "col", "public static boolean prime(int n){\n for(int i=2;i*i<=n;i++){\n if(n%i==0){\n return false;\n }\n }\n return true;\n }", "prime", "{\n for(int i=2;i*i<=n;i++){\n if(n%i==0){\n return false;\n }\n }\n return true;\n }", "for(int i=2;i*i<=n;i++){\n if(n%i==0){\n return false;\n }\n }", "int i=2;", "int i=2;", "i", "2", "i*i<=n", "i*i", "i", "i", "n", "i++", "i++", "i", "{\n if(n%i==0){\n return false;\n }\n }", "{\n if(n%i==0){\n return false;\n }\n }", "if(n%i==0){\n return false;\n }", "n%i==0", "n%i", "n", "i", "0", "{\n return false;\n }", "return false;", "false", "return true;", "true", "int n", "n", "static long gcd(long a, long b) \n\t{ \n\tif (b == 0) \n\t\treturn a; \n\treturn gcd(b, a % b); \n\t}", "gcd", "{ \n\tif (b == 0) \n\t\treturn a; \n\treturn gcd(b, a % b); \n\t}", "if (b == 0) \n\t\treturn a;", "b == 0", "b", "0", "return a;", "a", "return gcd(b, a % b);", "gcd(b, a % b)", "gcd", "b", "a % b", "a", "b", "long a", "a", "long b", "b", "class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n\n public FastReader(){ \n br = new BufferedReader(new\n 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 \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\n InputStreamReader(System.in)); \n }", "FastReader", "{ \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n }", "br = new BufferedReader(new\n InputStreamReader(System.in))", "br", "new BufferedReader(new\n InputStreamReader(System.in))", "String next(){ \n 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 long m=998244353l; //line 156 modInverse\n static boolean[] vis; //line 74 and 91 hasElement ans pth_fnd\n public static void main(String[] args) throws IOException{\n // long sttm=System.currentTimeMillis();\n int MAX=1000000007;\n FastReader sc=new FastReader();\n OutputStream out=new BufferedOutputStream(System.out);\n int n=sc.nextInt();\n int[] a=new int[n];\n for(int i=1;i<n;i++){\n int alpha=sc.nextInt();\n a[alpha-1]++;\n }\n for(int i=0;i<n;i++){\n out.write((a[i]+\"\\n\").getBytes());\n }\n out.flush();\n }\n\n static int MOD=1000000007;\n public static int pow(int n,int k){ //n-pow(k)\n if(k==1){\n return n%MOD;\n }\n if(k==0){\n return 1;\n }\n int val=pow(n,k/2)%MOD;\n if(k%2==0)return (val*val)%MOD;\n else return (val*val*n)%MOD;\n }\n\n\n public static long cnt_sum_k_subar(long[] a,int n,int k){\n HashMap<Long,Long> map=new HashMap<Long,Long>();\n long ret=0;\n long cur_sum=0;\n for(int i=0;i<n;i++){\n cur_sum+=a[i];\n if(cur_sum==k){\n ret++;\n }\n if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }\n if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }\n }\n return ret;\n }\n\n\n\n public static ArrayList<Integer> lcm(int num){\n ArrayList<Integer> arrl=new ArrayList<Integer>();\n while(num%2==0){\n arrl.add(2);\n num/=2;\n }\n for(int i=3;i*i<=num;i+=2){\n while(num%i==0){\n arrl.add(i);\n num/=i;\n }\n }\n if(num>2){\n arrl.add(num);\n }\n return arrl;\n }\n\n\n static long modInverse(long a,long m) \n { \n long m0 = m; \n long y = 0l, x = 1l; \n \n if (m == 1) \n return 0l; \n \n while (a > 1) \n { \n \n long q = a / m; \n \n long t = m; \n \n m = a % m; \n a = t; \n t = y; \n \n y = x - q * y; \n x = t; \n } \n if (x < 0) \n x += m0; \n \n return x; \n } \n\n\n public static TreeSet<Long> arr_fact(long num){\n TreeSet<Long> arr=new TreeSet<Long>();\n int cnt=0;\n for(long i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }\n }\n return arr;\n }\n\n\n\n public static int num_fact(int num){\n ArrayList<Integer> arr=new ArrayList<Integer>();\n int cnt=0;\n for(int i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }\n }\n return cnt;\n }\n\n\n public static long cal(int k,int x){\n long val=1;\n\n for(int i=0;i<k;i++){\n val*=2;\n if(val>x){\n break;\n }\n }\n return val;\n }\n\n public static void sort_inc(int[][] arr,int col){ //change dimention if req\n Arrays.sort(arr, new Comparator<int[]>() {\n public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }\n });\n }\n\n\n public static boolean prime(int n){\n for(int i=2;i*i<=n;i++){\n if(n%i==0){\n return false;\n }\n }\n return true;\n }\n\n\n static long gcd(long a, long b) \n\t{ \n\tif (b == 0) \n\t\treturn a; \n\treturn gcd(b, a % b); \n\t} \n}", "public class Main{\n static long m=998244353l; //line 156 modInverse\n static boolean[] vis; //line 74 and 91 hasElement ans pth_fnd\n public static void main(String[] args) throws IOException{\n // long sttm=System.currentTimeMillis();\n int MAX=1000000007;\n FastReader sc=new FastReader();\n OutputStream out=new BufferedOutputStream(System.out);\n int n=sc.nextInt();\n int[] a=new int[n];\n for(int i=1;i<n;i++){\n int alpha=sc.nextInt();\n a[alpha-1]++;\n }\n for(int i=0;i<n;i++){\n out.write((a[i]+\"\\n\").getBytes());\n }\n out.flush();\n }\n\n static int MOD=1000000007;\n public static int pow(int n,int k){ //n-pow(k)\n if(k==1){\n return n%MOD;\n }\n if(k==0){\n return 1;\n }\n int val=pow(n,k/2)%MOD;\n if(k%2==0)return (val*val)%MOD;\n else return (val*val*n)%MOD;\n }\n\n\n public static long cnt_sum_k_subar(long[] a,int n,int k){\n HashMap<Long,Long> map=new HashMap<Long,Long>();\n long ret=0;\n long cur_sum=0;\n for(int i=0;i<n;i++){\n cur_sum+=a[i];\n if(cur_sum==k){\n ret++;\n }\n if(map.containsKey(cur_sum-k)){\n ret+=map.get(cur_sum-k);\n }\n if(map.containsKey(cur_sum)){\n map.put(cur_sum, map.get(cur_sum)+1);\n }\n else{\n map.put(cur_sum, (long)1);\n }\n }\n return ret;\n }\n\n\n\n public static ArrayList<Integer> lcm(int num){\n ArrayList<Integer> arrl=new ArrayList<Integer>();\n while(num%2==0){\n arrl.add(2);\n num/=2;\n }\n for(int i=3;i*i<=num;i+=2){\n while(num%i==0){\n arrl.add(i);\n num/=i;\n }\n }\n if(num>2){\n arrl.add(num);\n }\n return arrl;\n }\n\n\n static long modInverse(long a,long m) \n { \n long m0 = m; \n long y = 0l, x = 1l; \n \n if (m == 1) \n return 0l; \n \n while (a > 1) \n { \n \n long q = a / m; \n \n long t = m; \n \n m = a % m; \n a = t; \n t = y; \n \n y = x - q * y; \n x = t; \n } \n if (x < 0) \n x += m0; \n \n return x; \n } \n\n\n public static TreeSet<Long> arr_fact(long num){\n TreeSet<Long> arr=new TreeSet<Long>();\n int cnt=0;\n for(long i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n arr.add(i);\n }\n else{\n arr.add(i);arr.add(num/i);\n cnt+=2;\n }\n }\n }\n return arr;\n }\n\n\n\n public static int num_fact(int num){\n ArrayList<Integer> arr=new ArrayList<Integer>();\n int cnt=0;\n for(int i=1;i*i<=num;i++){\n if(num%i==0){\n if(i*i==num){\n cnt+=1;\n }\n else{\n cnt+=2;\n }\n }\n }\n return cnt;\n }\n\n\n public static long cal(int k,int x){\n long val=1;\n\n for(int i=0;i<k;i++){\n val*=2;\n if(val>x){\n break;\n }\n }\n return val;\n }\n\n public static void sort_inc(int[][] arr,int col){ //change dimention if req\n Arrays.sort(arr, new Comparator<int[]>() {\n public int compare(final int[] entry1,final int[] entry2) { \n if (entry1[col] > entry2[col]) //this is for inc\n return 1; \n else if(entry1[col]==entry2[col])\n return 0;\n else\n return -1; \n }\n });\n }\n\n\n public static boolean prime(int n){\n for(int i=2;i*i<=n;i++){\n if(n%i==0){\n return false;\n }\n }\n return true;\n }\n\n\n static long gcd(long a, long b) \n\t{ \n\tif (b == 0) \n\t\treturn a; \n\treturn gcd(b, a % b); \n\t} \n}", "Main" ]
import java.util.*; import java.io.*; public class Main{ static long m=998244353l; //line 156 modInverse static boolean[] vis; //line 74 and 91 hasElement ans pth_fnd public static void main(String[] args) throws IOException{ // long sttm=System.currentTimeMillis(); int MAX=1000000007; FastReader sc=new FastReader(); OutputStream out=new BufferedOutputStream(System.out); int n=sc.nextInt(); int[] a=new int[n]; for(int i=1;i<n;i++){ int alpha=sc.nextInt(); a[alpha-1]++; } for(int i=0;i<n;i++){ out.write((a[i]+"\n").getBytes()); } out.flush(); } static int MOD=1000000007; public static int pow(int n,int k){ //n-pow(k) if(k==1){ return n%MOD; } if(k==0){ return 1; } int val=pow(n,k/2)%MOD; if(k%2==0)return (val*val)%MOD; else return (val*val*n)%MOD; } public static long cnt_sum_k_subar(long[] a,int n,int k){ HashMap<Long,Long> map=new HashMap<Long,Long>(); long ret=0; long cur_sum=0; for(int i=0;i<n;i++){ cur_sum+=a[i]; if(cur_sum==k){ ret++; } if(map.containsKey(cur_sum-k)){ ret+=map.get(cur_sum-k); } if(map.containsKey(cur_sum)){ map.put(cur_sum, map.get(cur_sum)+1); } else{ map.put(cur_sum, (long)1); } } return ret; } public static ArrayList<Integer> lcm(int num){ ArrayList<Integer> arrl=new ArrayList<Integer>(); while(num%2==0){ arrl.add(2); num/=2; } for(int i=3;i*i<=num;i+=2){ while(num%i==0){ arrl.add(i); num/=i; } } if(num>2){ arrl.add(num); } return arrl; } static long modInverse(long a,long m) { long m0 = m; long y = 0l, x = 1l; if (m == 1) return 0l; while (a > 1) { long q = a / m; long t = m; m = a % m; a = t; t = y; y = x - q * y; x = t; } if (x < 0) x += m0; return x; } public static TreeSet<Long> arr_fact(long num){ TreeSet<Long> arr=new TreeSet<Long>(); int cnt=0; for(long i=1;i*i<=num;i++){ if(num%i==0){ if(i*i==num){ cnt+=1; arr.add(i); } else{ arr.add(i);arr.add(num/i); cnt+=2; } } } return arr; } public static int num_fact(int num){ ArrayList<Integer> arr=new ArrayList<Integer>(); int cnt=0; for(int i=1;i*i<=num;i++){ if(num%i==0){ if(i*i==num){ cnt+=1; } else{ cnt+=2; } } } return cnt; } public static long cal(int k,int x){ long val=1; for(int i=0;i<k;i++){ val*=2; if(val>x){ break; } } return val; } public static void sort_inc(int[][] arr,int col){ //change dimention if req Arrays.sort(arr, new Comparator<int[]>() { public int compare(final int[] entry1,final int[] entry2) { if (entry1[col] > entry2[col]) //this is for inc return 1; else if(entry1[col]==entry2[col]) return 0; else return -1; } }); } public static boolean prime(int n){ for(int i=2;i*i<=n;i++){ if(n%i==0){ return false; } } return true; } static long gcd(long a, long b) { if (b == 0) return a; return gcd(b, a % b); } } class FastReader{ BufferedReader br; StringTokenizer st; public FastReader(){ br = new BufferedReader(new InputStreamReader(System.in)); } String next(){ while (st == null || !st.hasMoreElements()){ try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } } return st.nextToken(); } int nextInt(){ return Integer.parseInt(next()); } long nextLong(){ return Long.parseLong(next()); } double nextDouble(){ return Double.parseDouble(next()); } String nextLine(){ String str = ""; try{ str = br.readLine(); } catch (IOException e){ e.printStackTrace(); } return str; } }
[ 7, 15, 13, 17, 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, 40, 18, 13, 2, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 6, 13, 41, 13, 2, 17, 17, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 20, 13, 0, 13, 0, 13, 17, 12, 13, 30, 0, 13, 20, 0, 13, 20, 13, 0, 13, 0, 13, 17, 23, 13, 12, 13, 30, 41, 13, 20, 17, 41, 13, 17, 41, 13, 42, 2, 0, 13, 4, 13, 40, 17, 30, 14, 2, 13, 17, 3, 0, 18, 13, 40, 13, 13, 29, 20, 12, 13, 30, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 2, 13, 17, 30, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 0, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 0, 13, 4, 18, 13, 13, 0, 13, 17, 13, 14, 2, 13, 40, 17, 0, 18, 13, 17, 40, 17, 12, 13, 30, 14, 2, 13, 13, 4, 13, 29, 18, 13, 40, 13, 12, 13, 30, 14, 2, 13, 17, 29, 4, 18, 13 ]
[ [ 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, 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 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 41, 45 ], [ 11, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 9, 66 ], [ 66, 67 ], [ 0, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 68, 75 ], [ 75, 76 ], [ 68, 77 ], [ 77, 78 ], [ 68, 79 ], [ 79, 80 ], [ 68, 81 ], [ 81, 82 ], [ 68, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 89, 91 ], [ 85, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 68, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 104, 105 ], [ 104, 106 ], [ 100, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 98, 113 ], [ 113, 114 ], [ 68, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 117, 122 ], [ 122, 123 ], [ 122, 124 ], [ 117, 125 ], [ 125, 126 ], [ 117, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 128, 133 ], [ 133, 134 ], [ 127, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 135, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 141, 146 ], [ 117, 147 ], [ 147, 148 ], [ 68, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 151, 155 ], [ 155, 156 ], [ 155, 157 ], [ 157, 158 ], [ 151, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 159, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 151, 167 ], [ 167, 168 ], [ 167, 169 ], [ 169, 170 ], [ 169, 171 ], [ 151, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 151, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 180, 185 ], [ 179, 186 ], [ 186, 187 ], [ 186, 188 ], [ 178, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 194, 196 ], [ 193, 197 ], [ 192, 198 ], [ 151, 199 ], [ 199, 200 ], [ 199, 201 ], [ 201, 202 ], [ 202, 203 ], [ 151, 204 ], [ 204, 205 ], [ 68, 206 ], [ 206, 207 ], [ 206, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 208, 212 ], [ 212, 213 ], [ 212, 214 ], [ 214, 215 ], [ 208, 216 ], [ 216, 217 ], [ 217, 218 ], [ 217, 219 ], [ 216, 220 ], [ 220, 221 ], [ 220, 222 ], [ 222, 223 ], [ 208, 224 ], [ 224, 225 ], [ 224, 226 ], [ 226, 227 ], [ 226, 228 ], [ 208, 229 ], [ 229, 230 ], [ 229, 231 ], [ 231, 232 ], [ 231, 233 ], [ 233, 234 ], [ 208, 235 ], [ 235, 236 ], [ 236, 237 ], [ 237, 238 ], [ 238, 239 ], [ 238, 240 ], [ 240, 241 ], [ 237, 242 ], [ 236, 243 ], [ 243, 244 ], [ 243, 245 ], [ 235, 246 ], [ 246, 247 ], [ 247, 248 ], [ 247, 249 ], [ 249, 250 ], [ 250, 251 ], [ 251, 252 ], [ 251, 253 ], [ 250, 254 ], [ 249, 255 ], [ 208, 256 ], [ 256, 257 ], [ 256, 258 ], [ 258, 259 ], [ 259, 260 ], [ 208, 261 ], [ 261, 262 ], [ 68, 263 ], [ 263, 264 ], [ 263, 265 ], [ 265, 266 ], [ 266, 267 ], [ 266, 268 ], [ 265, 269 ], [ 269, 270 ], [ 269, 271 ], [ 265, 272 ], [ 272, 273 ], [ 272, 274 ], [ 274, 275 ], [ 265, 276 ], [ 276, 277 ], [ 277, 278 ], [ 277, 279 ], [ 276, 280 ], [ 280, 281 ], [ 280, 282 ], [ 282, 283 ], [ 265, 284 ], [ 284, 285 ], [ 284, 286 ], [ 286, 287 ], [ 286, 288 ], [ 265, 289 ], [ 289, 290 ], [ 289, 291 ], [ 291, 292 ], [ 291, 293 ], [ 293, 294 ], [ 265, 295 ], [ 295, 296 ], [ 296, 297 ], [ 297, 298 ], [ 298, 299 ], [ 298, 300 ], [ 300, 301 ], [ 297, 302 ], [ 296, 303 ], [ 303, 304 ], [ 303, 305 ], [ 295, 306 ], [ 306, 307 ], [ 307, 308 ], [ 307, 309 ], [ 309, 310 ], [ 310, 311 ], [ 311, 312 ], [ 311, 313 ], [ 310, 314 ], [ 309, 315 ], [ 265, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 316, 320 ], [ 320, 321 ], [ 321, 322 ], [ 322, 323 ], [ 323, 324 ], [ 324, 325 ], [ 324, 326 ], [ 326, 327 ], [ 323, 328 ], [ 322, 329 ], [ 329, 330 ], [ 329, 331 ], [ 321, 332 ], [ 332, 333 ], [ 333, 334 ], [ 333, 335 ], [ 335, 336 ], [ 336, 337 ], [ 336, 338 ], [ 335, 339 ], [ 339, 340 ], [ 339, 341 ], [ 265, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 345, 346 ], [ 265, 347 ], [ 347, 348 ], [ 68, 349 ], [ 349, 350 ], [ 349, 351 ], [ 351, 352 ], [ 352, 353 ], [ 352, 354 ], [ 354, 355 ], [ 355, 356 ], [ 354, 357 ], [ 354, 358 ], [ 358, 359 ], [ 358, 360 ], [ 354, 361 ], [ 351, 362 ], [ 362, 363 ], [ 363, 364 ], [ 363, 365 ], [ 365, 366 ], [ 362, 367 ], [ 367, 368 ], [ 368, 369 ], [ 368, 370 ], [ 367, 371 ], [ 371, 372 ], [ 68, 373 ], [ 373, 374 ], [ 373, 375 ], [ 375, 376 ], [ 376, 377 ], [ 377, 378 ], [ 377, 379 ], [ 376, 380 ], [ 380, 381 ], [ 375, 382 ], [ 382, 383 ], [ 383, 384 ], [ 383, 385 ], [ 385, 386 ], [ 68, 387 ], [ 387, 388 ], [ 387, 389 ], [ 389, 390 ], [ 390, 391 ], [ 391, 392 ], [ 391, 393 ], [ 390, 394 ], [ 389, 395 ], [ 395, 396 ], [ 396, 397 ] ]
[ "import java.util.*;\nimport java.io.*;\nclass Main\n{\n public static void main(String args[])throws IOException\n {\n Reader in = new Reader();\n int n = in.nextInt();\n int[] count = new int[n];\n for (int i=0;i<n - 1;i++)\n count[in.nextInt() - 1]++;\n for (int i=0;i<n;i++)\n System.out.println(count[i]);\n }\n}\nclass Reader\n{\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public Reader()\n {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public Reader(String file_name) throws IOException\n {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException\n {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException\n {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException\n {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException\n {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException\n {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException\n {\n if (din == null)\n return;\n din.close();\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "class Main\n{\n public static void main(String args[])throws IOException\n {\n Reader in = new Reader();\n int n = in.nextInt();\n int[] count = new int[n];\n for (int i=0;i<n - 1;i++)\n count[in.nextInt() - 1]++;\n for (int i=0;i<n;i++)\n System.out.println(count[i]);\n }\n}", "Main", "public static void main(String args[])throws IOException\n {\n Reader in = new Reader();\n int n = in.nextInt();\n int[] count = new int[n];\n for (int i=0;i<n - 1;i++)\n count[in.nextInt() - 1]++;\n for (int i=0;i<n;i++)\n System.out.println(count[i]);\n }", "main", "{\n Reader in = new Reader();\n int n = in.nextInt();\n int[] count = new int[n];\n for (int i=0;i<n - 1;i++)\n count[in.nextInt() - 1]++;\n for (int i=0;i<n;i++)\n System.out.println(count[i]);\n }", "Reader in = new Reader();", "in", "new Reader()", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] count = new int[n];", "count", "new int[n]", "n", "for (int i=0;i<n - 1;i++)\n count[in.nextInt() - 1]++;", "int i=0;", "int i=0;", "i", "0", "i<n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "count[in.nextInt() - 1]++;", "count[in.nextInt() - 1]++", "count[in.nextInt() - 1]", "count", "in.nextInt() - 1", "in.nextInt()", "in.nextInt", "in", "1", "for (int i=0;i<n;i++)\n System.out.println(count[i]);", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "System.out.println(count[i]);", "System.out.println(count[i])", "System.out.println", "System.out", "System", "System.out", "count[i]", "count", "i", "String args[]", "args", "class Reader\n{\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public Reader()\n {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public Reader(String file_name) throws IOException\n {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException\n {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException\n {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException\n {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException\n {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException\n {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException\n {\n if (din == null)\n return;\n din.close();\n }\n}", "Reader", "final private int BUFFER_SIZE = 1 << 16;", "BUFFER_SIZE", "1 << 16", "1", "16", "private DataInputStream din;", "din", "private byte[] buffer;", "buffer", "private int bufferPointer", "bufferPointer", "bytesRead;", "bytesRead", "public Reader()\n {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "Reader", "{\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "din = new DataInputStream(System.in)", "din", "new DataInputStream(System.in)", "buffer = new byte[BUFFER_SIZE]", "buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "bufferPointer = bytesRead = 0", "bufferPointer", "bytesRead = 0", "bytesRead", "0", "public Reader(String file_name) throws IOException\n {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "Reader", "{\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "din = new DataInputStream(new FileInputStream(file_name))", "din", "new DataInputStream(new FileInputStream(file_name))", "buffer = new byte[BUFFER_SIZE]", "buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "bufferPointer = bytesRead = 0", "bufferPointer", "bytesRead = 0", "bytesRead", "0", "String file_name", "file_name", "public String readLine() throws IOException\n {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }", "readLine", "{\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }", "byte[] buf = new byte[64];", "buf", "new byte[64]", "64", "int cnt = 0", "cnt", "0", "c;", "c", "while ((c = read()) != -1)\n {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }", "(c = read()) != -1", "(c = read())", "c", "read()", "read", "-1", "1", "{\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }", "if (c == '\\n')\n break;", "c == '\\n'", "c", "'\\n'", "break;", "buf[cnt++] = (byte) c", "buf[cnt++]", "buf", "cnt++", "cnt", "(byte) c", "return new String(buf, 0, cnt);", "new String(buf, 0, cnt)", "public int nextInt() throws IOException\n {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }", "nextInt", "{\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }", "int ret = 0;", "ret", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do\n {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "public long nextLong() throws IOException\n {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }", "nextLong", "{\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }", "long ret = 0;", "ret", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "public double nextDouble() throws IOException\n {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }", "nextDouble", "{\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }", "double ret = 0", "ret", "0", "div = 1;", "div", "1", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (c == '.')\n {\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }", "c == '.'", "c", "'.'", "{\n while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }\n }", "while ((c = read()) >= '0' && c <= '9')\n {\n ret += (c - '0') / (div *= 10);\n }", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret += (c - '0') / (div *= 10);\n }", "ret += (c - '0') / (div *= 10)", "ret", "(c - '0') / (div *= 10)", "(c - '0')", "c", "'0'", "(div *= 10)", "div", "10", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "private void fillBuffer() throws IOException\n {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }", "fillBuffer", "{\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }", "bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "bytesRead", "din.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "din.read", "din", "buffer", "bufferPointer = 0", "bufferPointer", "0", "BUFFER_SIZE", "if (bytesRead == -1)\n buffer[0] = -1;", "bytesRead == -1", "bytesRead", "-1", "1", "buffer[0] = -1", "buffer[0]", "buffer", "0", "-1", "1", "private byte read() throws IOException\n {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }", "read", "{\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }", "if (bufferPointer == bytesRead)\n fillBuffer();", "bufferPointer == bytesRead", "bufferPointer", "bytesRead", "fillBuffer()", "fillBuffer", "return buffer[bufferPointer++];", "buffer[bufferPointer++]", "buffer", "bufferPointer++", "bufferPointer", "public void close() throws IOException\n {\n if (din == null)\n return;\n din.close();\n }", "close", "{\n if (din == null)\n return;\n din.close();\n }", "if (din == null)\n return;", "din == null", "din", "null", "return;", "din.close()", "din.close", "din" ]
import java.util.*; import java.io.*; class Main { public static void main(String args[])throws IOException { Reader in = new Reader(); int n = in.nextInt(); int[] count = new int[n]; for (int i=0;i<n - 1;i++) count[in.nextInt() - 1]++; for (int i=0;i<n;i++) System.out.println(count[i]); } } class Reader { final private int BUFFER_SIZE = 1 << 16; private DataInputStream din; private byte[] buffer; private int bufferPointer, bytesRead; public Reader() { din = new DataInputStream(System.in); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public Reader(String file_name) throws IOException { din = new DataInputStream(new FileInputStream(file_name)); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public String readLine() throws IOException { byte[] buf = new byte[64]; // line length int cnt = 0, c; while ((c = read()) != -1) { if (c == '\n') break; buf[cnt++] = (byte) c; } return new String(buf, 0, cnt); } public int nextInt() throws IOException { int ret = 0; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (neg) return -ret; return ret; } public long nextLong() throws IOException { long ret = 0; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (neg) return -ret; return ret; } public double nextDouble() throws IOException { double ret = 0, div = 1; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (c == '.') { while ((c = read()) >= '0' && c <= '9') { ret += (c - '0') / (div *= 10); } } if (neg) return -ret; return ret; } private void fillBuffer() throws IOException { bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); if (bytesRead == -1) buffer[0] = -1; } private byte read() throws IOException { if (bufferPointer == bytesRead) fillBuffer(); return buffer[bufferPointer++]; } public void close() throws IOException { if (din == null) return; din.close(); } }
[ 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, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 14, 4, 18, 13, 13, 30, 0, 13, 17, 30, 0, 13, 17, 4, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 13, 14, 4, 18, 13, 13, 30, 4, 18, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 103, 5 ], [ 103, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 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 ], [ 32, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 32, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 44, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 44, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 32, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 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 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 74, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 81, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 81, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 6, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "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 Map<Integer, Integer> resultMap = new HashMap<>();\n for (int i = 1; i < N; i++) {\n int boss = sc.nextInt();\n Integer count = resultMap.get(boss);\n if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }\n resultMap.put(boss, count);\n }\n\n for (int i = 1; i <= N; i++) {\n Integer val = resultMap.get(i);\n if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }\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 Map<Integer, Integer> resultMap = new HashMap<>();\n for (int i = 1; i < N; i++) {\n int boss = sc.nextInt();\n Integer count = resultMap.get(boss);\n if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }\n resultMap.put(boss, count);\n }\n\n for (int i = 1; i <= N; i++) {\n Integer val = resultMap.get(i);\n if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n Map<Integer, Integer> resultMap = new HashMap<>();\n for (int i = 1; i < N; i++) {\n int boss = sc.nextInt();\n Integer count = resultMap.get(boss);\n if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }\n resultMap.put(boss, count);\n }\n\n for (int i = 1; i <= N; i++) {\n Integer val = resultMap.get(i);\n if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n Map<Integer, Integer> resultMap = new HashMap<>();\n for (int i = 1; i < N; i++) {\n int boss = sc.nextInt();\n Integer count = resultMap.get(boss);\n if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }\n resultMap.put(boss, count);\n }\n\n for (int i = 1; i <= N; i++) {\n Integer val = resultMap.get(i);\n if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "Map<Integer, Integer> resultMap = new HashMap<>();", "resultMap", "new HashMap<>()", "for (int i = 1; i < N; i++) {\n int boss = sc.nextInt();\n Integer count = resultMap.get(boss);\n if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }\n resultMap.put(boss, count);\n }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n int boss = sc.nextInt();\n Integer count = resultMap.get(boss);\n if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }\n resultMap.put(boss, count);\n }", "{\n int boss = sc.nextInt();\n Integer count = resultMap.get(boss);\n if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }\n resultMap.put(boss, count);\n }", "int boss = sc.nextInt();", "boss", "sc.nextInt()", "sc.nextInt", "sc", "Integer count = resultMap.get(boss);", "count", "resultMap.get(boss)", "resultMap.get", "resultMap", "boss", "if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }", "Objects.isNull(count)", "Objects.isNull", "Objects", "count", "{\n count = 1;\n }", "count = 1", "count", "1", "{\n count += 1;\n }", "count += 1", "count", "1", "resultMap.put(boss, count)", "resultMap.put", "resultMap", "boss", "count", "for (int i = 1; i <= N; i++) {\n Integer val = resultMap.get(i);\n if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= N", "i", "N", "i++", "i++", "i", "{\n Integer val = resultMap.get(i);\n if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }\n }", "{\n Integer val = resultMap.get(i);\n if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }\n }", "Integer val = resultMap.get(i);", "val", "resultMap.get(i)", "resultMap.get", "resultMap", "i", "if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }", "Objects.isNull(val)", "Objects.isNull", "Objects", "val", "{\n System.out.println(0);\n }", "System.out.println(0)", "System.out.println", "System.out", "System", "System.out", "0", "{\n System.out.println(val);\n }", "System.out.println(val)", "System.out.println", "System.out", "System", "System.out", "val", "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 Map<Integer, Integer> resultMap = new HashMap<>();\n for (int i = 1; i < N; i++) {\n int boss = sc.nextInt();\n Integer count = resultMap.get(boss);\n if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }\n resultMap.put(boss, count);\n }\n\n for (int i = 1; i <= N; i++) {\n Integer val = resultMap.get(i);\n if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }\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 Map<Integer, Integer> resultMap = new HashMap<>();\n for (int i = 1; i < N; i++) {\n int boss = sc.nextInt();\n Integer count = resultMap.get(boss);\n if (Objects.isNull(count)) {\n count = 1;\n } else {\n count += 1;\n }\n resultMap.put(boss, count);\n }\n\n for (int i = 1; i <= N; i++) {\n Integer val = resultMap.get(i);\n if (Objects.isNull(val)) {\n System.out.println(0);\n } else {\n System.out.println(val);\n }\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(); Map<Integer, Integer> resultMap = new HashMap<>(); for (int i = 1; i < N; i++) { int boss = sc.nextInt(); Integer count = resultMap.get(boss); if (Objects.isNull(count)) { count = 1; } else { count += 1; } resultMap.put(boss, count); } for (int i = 1; i <= N; i++) { Integer val = resultMap.get(i); if (Objects.isNull(val)) { System.out.println(0); } else { System.out.println(val); } } } }
[ 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, 41, 13, 17, 42, 2, 13, 2, 13, 17, 30, 0, 18, 13, 13, 4, 18, 13, 0, 18, 13, 13, 17, 40, 13, 0, 18, 13, 2, 13, 17, 17, 11, 1, 0, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 40, 18, 13, 2, 18, 13, 13, 17, 11, 1, 0, 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 ], [ 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 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 8, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 30, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 37, 41 ], [ 41, 42 ], [ 42, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 36, 49 ], [ 49, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 51, 57 ], [ 8, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 58, 68 ], [ 68, 69 ], [ 69, 70 ], [ 58, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 8, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 81, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 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.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n-1];\n\t\tint[] num = new int[n];\n\n\t\tint i = 0;\n\t\twhile(i < n-1) {\n\t\t\ta[i] = sc.nextInt();\n\t\t\tnum[i] = 0;\n\t\t\ti++;\n\t\t}\n\n\t\tnum[n-1] = 0;\n\n\t\tfor(i = 0; i < n-1; i++) {\n\t\t\tnum[a[i]-1]++;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tSystem.out.println(num[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 sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n-1];\n\t\tint[] num = new int[n];\n\n\t\tint i = 0;\n\t\twhile(i < n-1) {\n\t\t\ta[i] = sc.nextInt();\n\t\t\tnum[i] = 0;\n\t\t\ti++;\n\t\t}\n\n\t\tnum[n-1] = 0;\n\n\t\tfor(i = 0; i < n-1; i++) {\n\t\t\tnum[a[i]-1]++;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tSystem.out.println(num[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\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n-1];\n\t\tint[] num = new int[n];\n\n\t\tint i = 0;\n\t\twhile(i < n-1) {\n\t\t\ta[i] = sc.nextInt();\n\t\t\tnum[i] = 0;\n\t\t\ti++;\n\t\t}\n\n\t\tnum[n-1] = 0;\n\n\t\tfor(i = 0; i < n-1; i++) {\n\t\t\tnum[a[i]-1]++;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n-1];\n\t\tint[] num = new int[n];\n\n\t\tint i = 0;\n\t\twhile(i < n-1) {\n\t\t\ta[i] = sc.nextInt();\n\t\t\tnum[i] = 0;\n\t\t\ti++;\n\t\t}\n\n\t\tnum[n-1] = 0;\n\n\t\tfor(i = 0; i < n-1; i++) {\n\t\t\tnum[a[i]-1]++;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tSystem.out.println(num[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[] num = new int[n];", "num", "new int[n]", "n", "int i = 0;", "i", "0", "while(i < n-1) {\n\t\t\ta[i] = sc.nextInt();\n\t\t\tnum[i] = 0;\n\t\t\ti++;\n\t\t}", "i < n-1", "i", "n-1", "n", "1", "{\n\t\t\ta[i] = sc.nextInt();\n\t\t\tnum[i] = 0;\n\t\t\ti++;\n\t\t}", "a[i] = sc.nextInt()", "a[i]", "a", "i", "sc.nextInt()", "sc.nextInt", "sc", "num[i] = 0", "num[i]", "num", "i", "0", "i++", "i", "num[n-1] = 0", "num[n-1]", "num", "n-1", "n", "1", "0", "for(i = 0; i < n-1; i++) {\n\t\t\tnum[a[i]-1]++;\n\t\t}", "i = 0;", "i = 0", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n\t\t\tnum[a[i]-1]++;\n\t\t}", "{\n\t\t\tnum[a[i]-1]++;\n\t\t}", "num[a[i]-1]++", "num[a[i]-1]", "num", "a[i]-1", "a[i]", "a", "i", "1", "for(i = 0; i < n; i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}", "i = 0;", "i = 0", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(num[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(num[i]);\n\t\t}", "System.out.println(num[i])", "System.out.println", "System.out", "System", "System.out", "num[i]", "num", "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\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n-1];\n\t\tint[] num = new int[n];\n\n\t\tint i = 0;\n\t\twhile(i < n-1) {\n\t\t\ta[i] = sc.nextInt();\n\t\t\tnum[i] = 0;\n\t\t\ti++;\n\t\t}\n\n\t\tnum[n-1] = 0;\n\n\t\tfor(i = 0; i < n-1; i++) {\n\t\t\tnum[a[i]-1]++;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tSystem.out.println(num[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\n\t\tint n = sc.nextInt();\n\t\tint[] a = new int[n-1];\n\t\tint[] num = new int[n];\n\n\t\tint i = 0;\n\t\twhile(i < n-1) {\n\t\t\ta[i] = sc.nextInt();\n\t\t\tnum[i] = 0;\n\t\t\ti++;\n\t\t}\n\n\t\tnum[n-1] = 0;\n\n\t\tfor(i = 0; i < n-1; i++) {\n\t\t\tnum[a[i]-1]++;\n\t\t}\n\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n-1]; int[] num = new int[n]; int i = 0; while(i < n-1) { a[i] = sc.nextInt(); num[i] = 0; i++; } num[n-1] = 0; for(i = 0; i < n-1; i++) { num[a[i]-1]++; } for(i = 0; i < n; i++) { System.out.println(num[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 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, 40, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 13, 18, 13, 13, 4, 18, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13 ]
[ [ 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 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 29, 30 ], [ 29, 31 ], [ 11, 32 ], [ 32, 33 ], [ 32, 34 ], [ 11, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 56, 57 ], [ 49, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 11, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 62, 70 ], [ 70, 71 ], [ 71, 72 ], [ 62, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 11, 80 ], [ 80, 81 ], [ 81, 82 ], [ 11, 83 ], [ 83, 84 ], [ 84, 85 ], [ 9, 86 ], [ 86, 87 ], [ 7, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 88, 92 ], [ 92, 93 ], [ 88, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 96, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 102, 106 ], [ 94, 107 ], [ 107, 108 ], [ 94, 109 ], [ 109, 110 ] ]
[ "import java.util.*;\nimport java.io.*;\n\n\nclass Main {\n\n public static void main(String[] args) throws IOException\n {\n PrintWriter out = new PrintWriter(System.out);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n\n int arr[] = new int[n+1];\n StringTokenizer st1 = new StringTokenizer(br.readLine());\n for(int i = 0 ; i < n-1 ; i++)\n {\n int tmp = Integer.parseInt(st1.nextToken());\n arr[tmp]++;\n }\n for(int i = 1 ; i <= n ; i++)\n out.println(arr[i]);\n out.flush();\n out.close();\n\n }\n\n static class pair{\n long x1;\n long x2;\n\n public pair(long x1 , long x2)\n {\n this.x1 = x1;\n this.x2 = x2;\n }\n\n }\n\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "class Main {\n\n public static void main(String[] args) throws IOException\n {\n PrintWriter out = new PrintWriter(System.out);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n\n int arr[] = new int[n+1];\n StringTokenizer st1 = new StringTokenizer(br.readLine());\n for(int i = 0 ; i < n-1 ; i++)\n {\n int tmp = Integer.parseInt(st1.nextToken());\n arr[tmp]++;\n }\n for(int i = 1 ; i <= n ; i++)\n out.println(arr[i]);\n out.flush();\n out.close();\n\n }\n\n static class pair{\n long x1;\n long x2;\n\n public pair(long x1 , long x2)\n {\n this.x1 = x1;\n this.x2 = x2;\n }\n\n }\n\n}", "Main", "public static void main(String[] args) throws IOException\n {\n PrintWriter out = new PrintWriter(System.out);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n\n int arr[] = new int[n+1];\n StringTokenizer st1 = new StringTokenizer(br.readLine());\n for(int i = 0 ; i < n-1 ; i++)\n {\n int tmp = Integer.parseInt(st1.nextToken());\n arr[tmp]++;\n }\n for(int i = 1 ; i <= n ; i++)\n out.println(arr[i]);\n out.flush();\n out.close();\n\n }", "main", "{\n PrintWriter out = new PrintWriter(System.out);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n\n int arr[] = new int[n+1];\n StringTokenizer st1 = new StringTokenizer(br.readLine());\n for(int i = 0 ; i < n-1 ; i++)\n {\n int tmp = Integer.parseInt(st1.nextToken());\n arr[tmp]++;\n }\n for(int i = 1 ; i <= n ; i++)\n out.println(arr[i]);\n out.flush();\n out.close();\n\n }", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "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", "int arr[] = new int[n+1];", "arr", "new int[n+1]", "n+1", "n", "1", "StringTokenizer st1 = new StringTokenizer(br.readLine());", "st1", "new StringTokenizer(br.readLine())", "for(int i = 0 ; i < n-1 ; i++)\n {\n int tmp = Integer.parseInt(st1.nextToken());\n arr[tmp]++;\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n int tmp = Integer.parseInt(st1.nextToken());\n arr[tmp]++;\n }", "{\n int tmp = Integer.parseInt(st1.nextToken());\n arr[tmp]++;\n }", "int tmp = Integer.parseInt(st1.nextToken());", "tmp", "Integer.parseInt(st1.nextToken())", "Integer.parseInt", "Integer", "st1.nextToken()", "st1.nextToken", "st1", "arr[tmp]++", "arr[tmp]", "arr", "tmp", "for(int i = 1 ; i <= n ; i++)\n out.println(arr[i]);", "int i = 1 ;", "int i = 1 ;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "out.println(arr[i]);", "out.println(arr[i])", "out.println", "out", "arr[i]", "arr", "i", "out.flush()", "out.flush", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class pair{\n long x1;\n long x2;\n\n public pair(long x1 , long x2)\n {\n this.x1 = x1;\n this.x2 = x2;\n }\n\n }", "pair", "long x1;", "x1", "long x2;", "x2", "public pair(long x1 , long x2)\n {\n this.x1 = x1;\n this.x2 = x2;\n }", "pair", "{\n this.x1 = x1;\n this.x2 = x2;\n }", "this.x1 = x1", "this.x1", "this", "this.x1", "x1", "this.x2 = x2", "this.x2", "this", "this.x2", "x2", "long x1", "x1", "long x2", "x2" ]
import java.util.*; import java.io.*; class Main { public static void main(String[] args) throws IOException { PrintWriter out = new PrintWriter(System.out); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int arr[] = new int[n+1]; StringTokenizer st1 = new StringTokenizer(br.readLine()); for(int i = 0 ; i < n-1 ; i++) { int tmp = Integer.parseInt(st1.nextToken()); arr[tmp]++; } for(int i = 1 ; i <= n ; i++) out.println(arr[i]); out.flush(); out.close(); } static class pair{ long x1; long x2; public pair(long x1 , long x2) { this.x1 = x1; this.x2 = x2; } } }
[ 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, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 41, 13, 20, 0, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 4, 18, 13, 14, 4, 18, 13, 13, 4, 18, 13, 13, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 13, 8, 4, 18, 13, 13, 4, 18, 13, 13, 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 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 113, 17 ], [ 113, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 20, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 32, 33 ], [ 20, 34 ], [ 34, 35 ], [ 20, 36 ], [ 36, 37 ], [ 36, 38 ], [ 20, 39 ], [ 39, 40 ], [ 39, 41 ], [ 20, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 42, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 61, 62 ], [ 54, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 63, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 68, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 72, 77 ], [ 63, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 78, 82 ], [ 20, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 83, 91 ], [ 91, 92 ], [ 92, 93 ], [ 83, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 100, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 100, 109 ], [ 18, 110 ], [ 110, 111 ], [ 0, 112 ], [ 112, 113 ], [ 112, 114 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.HashMap;\nimport java.util.StringTokenizer;\n\npublic class Main\n{\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;\n\t\tint N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (int i = 1; i < N; i++)\n\t\t{\n\t\t\tA = Integer.parseInt(ST.nextToken());\n\t\t\tif (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : \"0\");\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", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main\n{\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;\n\t\tint N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (int i = 1; i < N; i++)\n\t\t{\n\t\t\tA = Integer.parseInt(ST.nextToken());\n\t\t\tif (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : \"0\");\n\t}\n}", "Main", "public static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;\n\t\tint N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (int i = 1; i < N; i++)\n\t\t{\n\t\t\tA = Integer.parseInt(ST.nextToken());\n\t\t\tif (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : \"0\");\n\t}", "main", "{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;\n\t\tint N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (int i = 1; i < N; i++)\n\t\t{\n\t\t\tA = Integer.parseInt(ST.nextToken());\n\t\t\tif (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : \"0\");\n\t}", "BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));", "BR", "new BufferedReader(new InputStreamReader(System.in))", "StringTokenizer ST;", "ST", "int N = Integer.parseInt(BR.readLine())", "N", "Integer.parseInt(BR.readLine())", "Integer.parseInt", "Integer", "BR.readLine()", "BR.readLine", "BR", "A;", "A", "HashMap<Integer, Integer> Counts = new HashMap<>();", "Counts", "new HashMap<>()", "ST = new StringTokenizer(BR.readLine())", "ST", "new StringTokenizer(BR.readLine())", "for (int i = 1; i < N; i++)\n\t\t{\n\t\t\tA = Integer.parseInt(ST.nextToken());\n\t\t\tif (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tA = Integer.parseInt(ST.nextToken());\n\t\t\tif (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);\n\t\t}", "{\n\t\t\tA = Integer.parseInt(ST.nextToken());\n\t\t\tif (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);\n\t\t}", "A = Integer.parseInt(ST.nextToken())", "A", "Integer.parseInt(ST.nextToken())", "Integer.parseInt", "Integer", "ST.nextToken()", "ST.nextToken", "ST", "if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);", "Counts.containsKey(A)", "Counts.containsKey", "Counts", "A", "Counts.put(A, Counts.get(A) + 1)", "Counts.put", "Counts", "A", "Counts.get(A) + 1", "Counts.get(A)", "Counts.get", "Counts", "A", "1", "Counts.put(A, 1)", "Counts.put", "Counts", "A", "1", "for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : \"0\");", "int i = 1;", "int i = 1;", "i", "1", "i <= N", "i", "N", "i++", "i++", "i", "System.out.println((Counts.containsKey(i)) ? Counts.get(i) : \"0\");", "System.out.println((Counts.containsKey(i)) ? Counts.get(i) : \"0\")", "System.out.println", "System.out", "System", "System.out", "(Counts.containsKey(i)) ? Counts.get(i) : \"0\"", "(Counts.containsKey(i))", "Counts.containsKey", "Counts", "i", "Counts.get(i)", "Counts.get", "Counts", "i", "\"0\"", "String[] Arguments", "Arguments", "public class Main\n{\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;\n\t\tint N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (int i = 1; i < N; i++)\n\t\t{\n\t\t\tA = Integer.parseInt(ST.nextToken());\n\t\t\tif (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : \"0\");\n\t}\n}", "public class Main\n{\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST;\n\t\tint N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>();\n\t\tST = new StringTokenizer(BR.readLine());\n\t\tfor (int i = 1; i < N; i++)\n\t\t{\n\t\t\tA = Integer.parseInt(ST.nextToken());\n\t\t\tif (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1);\n\t\t\telse Counts.put(A, 1);\n\t\t}\n\t\tfor (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : \"0\");\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashMap; import java.util.StringTokenizer; public class Main { public static void main(String[] Arguments) throws IOException { BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST; int N = Integer.parseInt(BR.readLine()), A; HashMap<Integer, Integer> Counts = new HashMap<>(); ST = new StringTokenizer(BR.readLine()); for (int i = 1; i < N; i++) { A = Integer.parseInt(ST.nextToken()); if (Counts.containsKey(A)) Counts.put(A, Counts.get(A) + 1); else Counts.put(A, 1); } for (int i = 1; i <= N; i++) System.out.println((Counts.containsKey(i)) ? Counts.get(i) : "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, 13, 1, 40, 13, 30, 40, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 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 ], [ 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 ], [ 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 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 8, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 6, 61 ], [ 61, 62 ], [ 0, 63 ], [ 63, 64 ], [ 63, 65 ] ]
[ "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 = sc.nextInt();\n int[] a = new int[n+1];\n for (int i=1;i<n;i++)a[sc.nextInt()]++;\n for (int i=1;i<=n;i++)System.out.println(a[i]);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] a = new int[n+1];\n for (int i=1;i<n;i++)a[sc.nextInt()]++;\n for (int i=1;i<=n;i++)System.out.println(a[i]);\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+1];\n for (int i=1;i<n;i++)a[sc.nextInt()]++;\n for (int i=1;i<=n;i++)System.out.println(a[i]);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] a = new int[n+1];\n for (int i=1;i<n;i++)a[sc.nextInt()]++;\n for (int i=1;i<=n;i++)System.out.println(a[i]);\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+1];", "a", "new int[n+1]", "n+1", "n", "1", "for (int i=1;i<n;i++)a[sc.nextInt()]++;", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "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++)System.out.println(a[i]);", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "System.out.println(a[i]);", "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 int n = sc.nextInt();\n int[] a = new int[n+1];\n for (int i=1;i<n;i++)a[sc.nextInt()]++;\n for (int i=1;i<=n;i++)System.out.println(a[i]);\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+1];\n for (int i=1;i<n;i++)a[sc.nextInt()]++;\n for (int i=1;i<=n;i++)System.out.println(a[i]);\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+1]; for (int i=1;i<n;i++)a[sc.nextInt()]++; for (int i=1;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, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 18, 13, 13, 14, 4, 18, 13, 13, 4, 18, 13, 13, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 110, 5 ], [ 110, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 22, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 38, 40 ], [ 31, 41 ], [ 41, 42 ], [ 42, 43 ], [ 31, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 51, 52 ], [ 51, 53 ], [ 45, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 54, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 59, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 63, 68 ], [ 54, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 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 ], [ 88, 91 ], [ 87, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 87, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 101, 106 ], [ 6, 107 ], [ 107, 108 ], [ 0, 109 ], [ 109, 110 ], [ 109, 111 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n \n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.nextLine());\n String[] subs = scan.nextLine().split(\" \");\n HashMap<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < subs.length; i++) {\n int val = Integer.valueOf(subs[i]);\n if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);\n }\n \n for (int i = 1; i <= n; i++) {\n if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n \n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.nextLine());\n String[] subs = scan.nextLine().split(\" \");\n HashMap<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < subs.length; i++) {\n int val = Integer.valueOf(subs[i]);\n if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);\n }\n \n for (int i = 1; i <= n; i++) {\n if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.nextLine());\n String[] subs = scan.nextLine().split(\" \");\n HashMap<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < subs.length; i++) {\n int val = Integer.valueOf(subs[i]);\n if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);\n }\n \n for (int i = 1; i <= n; i++) {\n if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.nextLine());\n String[] subs = scan.nextLine().split(\" \");\n HashMap<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < subs.length; i++) {\n int val = Integer.valueOf(subs[i]);\n if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);\n }\n \n for (int i = 1; i <= n; i++) {\n if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = Integer.valueOf(scan.nextLine());", "n", "Integer.valueOf(scan.nextLine())", "Integer.valueOf", "Integer", "scan.nextLine()", "scan.nextLine", "scan", "String[] subs = scan.nextLine().split(\" \");", "subs", "scan.nextLine().split(\" \")", "scan.nextLine().split", "scan.nextLine()", "scan.nextLine", "scan", "\" \"", "HashMap<Integer, Integer> map = new HashMap<>();", "map", "new HashMap<>()", "for (int i = 0; i < subs.length; i++) {\n int val = Integer.valueOf(subs[i]);\n if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < subs.length", "i", "subs.length", "subs", "subs.length", "i++", "i++", "i", "{\n int val = Integer.valueOf(subs[i]);\n if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);\n }", "{\n int val = Integer.valueOf(subs[i]);\n if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);\n }", "int val = Integer.valueOf(subs[i]);", "val", "Integer.valueOf(subs[i])", "Integer.valueOf", "Integer", "subs[i]", "subs", "i", "if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);", "map.containsKey(val)", "map.containsKey", "map", "val", "map.replace(val, map.get(val) + 1)", "map.replace", "map", "val", "map.get(val) + 1", "map.get(val)", "map.get", "map", "val", "1", "map.put(val, 1)", "map.put", "map", "val", "1", "for (int i = 1; i <= n; i++) {\n if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);\n }", "{\n if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);\n }", "if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);", "map.containsKey(i)", "map.containsKey", "map", "i", "System.out.println(map.get(i))", "System.out.println", "System.out", "System", "System.out", "map.get(i)", "map.get", "map", "i", "System.out.println(0)", "System.out.println", "System.out", "System", "System.out", "0", "String[] args", "args", "public class Main {\n\n \n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.nextLine());\n String[] subs = scan.nextLine().split(\" \");\n HashMap<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < subs.length; i++) {\n int val = Integer.valueOf(subs[i]);\n if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);\n }\n \n for (int i = 1; i <= n; i++) {\n if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);\n }\n }\n}", "public class Main {\n\n \n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = Integer.valueOf(scan.nextLine());\n String[] subs = scan.nextLine().split(\" \");\n HashMap<Integer, Integer> map = new HashMap<>();\n for (int i = 0; i < subs.length; i++) {\n int val = Integer.valueOf(subs[i]);\n if (map.containsKey(val)) map.replace(val, map.get(val) + 1);\n else map.put(val, 1);\n }\n \n for (int i = 1; i <= n; i++) {\n if (map.containsKey(i)) System.out.println(map.get(i));\n else System.out.println(0);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = Integer.valueOf(scan.nextLine()); String[] subs = scan.nextLine().split(" "); HashMap<Integer, Integer> map = new HashMap<>(); for (int i = 0; i < subs.length; i++) { int val = Integer.valueOf(subs[i]); if (map.containsKey(val)) map.replace(val, map.get(val) + 1); else map.put(val, 1); } for (int i = 1; i <= n; i++) { if (map.containsKey(i)) System.out.println(map.get(i)); else System.out.println(0); } } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 18, 13, 13, 2, 4, 18, 13, 18, 13, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 13, 13, 17, 4, 18, 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, 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, 4, 13, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 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, 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 ], [ 395, 8 ], [ 395, 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, 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 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 52, 53 ], [ 52, 54 ], [ 49, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 59, 61 ], [ 56, 62 ], [ 55, 63 ], [ 11, 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 ], [ 83, 84 ], [ 82, 85 ], [ 82, 86 ], [ 11, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 9, 92 ], [ 92, 93 ], [ 0, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 94, 98 ], [ 98, 99 ], [ 98, 100 ], [ 94, 102 ], [ 102, 103 ], [ 94, 104 ], [ 104, 105 ], [ 94, 106 ], [ 106, 107 ], [ 94, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 108, 116 ], [ 116, 117 ], [ 94, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 121, 126 ], [ 126, 127 ], [ 120, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 132, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 140, 141 ], [ 136, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 132, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 153, 154 ], [ 154, 155 ], [ 120, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 94, 161 ], [ 161, 162 ], [ 161, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 163, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 168, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 163, 176 ], [ 176, 177 ], [ 176, 178 ], [ 163, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 179, 183 ], [ 183, 184 ], [ 184, 185 ], [ 184, 186 ], [ 186, 187 ], [ 183, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 163, 192 ], [ 192, 193 ], [ 192, 194 ], [ 163, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 195, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 203, 205 ], [ 202, 206 ], [ 206, 207 ], [ 206, 208 ], [ 201, 209 ], [ 209, 210 ], [ 200, 211 ], [ 211, 212 ], [ 211, 213 ], [ 200, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 216, 218 ], [ 200, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 163, 223 ], [ 223, 224 ], [ 224, 225 ], [ 224, 226 ], [ 94, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 232, 233 ], [ 229, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 234, 238 ], [ 238, 239 ], [ 238, 240 ], [ 240, 241 ], [ 229, 242 ], [ 242, 243 ], [ 242, 244 ], [ 229, 245 ], [ 245, 246 ], [ 246, 247 ], [ 246, 248 ], [ 245, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 252, 253 ], [ 249, 254 ], [ 254, 255 ], [ 254, 256 ], [ 256, 257 ], [ 229, 258 ], [ 258, 259 ], [ 258, 260 ], [ 229, 261 ], [ 261, 262 ], [ 262, 263 ], [ 263, 264 ], [ 263, 265 ], [ 261, 266 ], [ 266, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 269, 271 ], [ 268, 272 ], [ 272, 273 ], [ 272, 274 ], [ 267, 275 ], [ 275, 276 ], [ 266, 277 ], [ 277, 278 ], [ 277, 279 ], [ 266, 280 ], [ 280, 281 ], [ 280, 282 ], [ 282, 283 ], [ 282, 284 ], [ 266, 285 ], [ 285, 286 ], [ 285, 287 ], [ 287, 288 ], [ 229, 289 ], [ 289, 290 ], [ 290, 291 ], [ 290, 292 ], [ 94, 293 ], [ 293, 294 ], [ 293, 295 ], [ 295, 296 ], [ 296, 297 ], [ 296, 298 ], [ 298, 299 ], [ 295, 300 ], [ 300, 301 ], [ 301, 302 ], [ 301, 303 ], [ 300, 304 ], [ 304, 305 ], [ 304, 306 ], [ 306, 307 ], [ 295, 308 ], [ 308, 309 ], [ 308, 310 ], [ 295, 311 ], [ 311, 312 ], [ 312, 313 ], [ 313, 314 ], [ 313, 315 ], [ 311, 316 ], [ 316, 317 ], [ 317, 318 ], [ 318, 319 ], [ 317, 320 ], [ 316, 321 ], [ 321, 322 ], [ 321, 323 ], [ 323, 324 ], [ 295, 325 ], [ 325, 326 ], [ 326, 327 ], [ 327, 328 ], [ 94, 329 ], [ 329, 330 ], [ 329, 331 ], [ 331, 332 ], [ 332, 333 ], [ 333, 334 ], [ 333, 335 ], [ 332, 336 ], [ 336, 337 ], [ 337, 338 ], [ 338, 339 ], [ 337, 340 ], [ 331, 341 ], [ 341, 342 ], [ 342, 343 ], [ 342, 344 ], [ 329, 345 ], [ 345, 346 ], [ 94, 347 ], [ 347, 348 ], [ 347, 349 ], [ 349, 350 ], [ 350, 351 ], [ 351, 352 ], [ 352, 353 ], [ 351, 354 ], [ 354, 355 ], [ 94, 356 ], [ 356, 357 ], [ 356, 358 ], [ 358, 359 ], [ 359, 360 ], [ 363, 361 ], [ 373, 362 ], [ 370, 363 ], [ 363, 364 ], [ 364, 365 ], [ 364, 366 ], [ 363, 367 ], [ 367, 368 ], [ 367, 369 ], [ 370, 370 ], [ 370, 371 ], [ 370, 372 ], [ 373, 373 ], [ 373, 374 ], [ 373, 375 ], [ 363, 376 ], [ 376, 377 ], [ 376, 378 ], [ 378, 379 ], [ 356, 380 ], [ 380, 381 ], [ 94, 382 ], [ 382, 383 ], [ 382, 384 ], [ 384, 385 ], [ 385, 386 ], [ 386, 387 ], [ 94, 388 ], [ 388, 389 ], [ 388, 390 ], [ 390, 391 ], [ 390, 392 ], [ 392, 393 ], [ 0, 394 ], [ 394, 395 ], [ 394, 396 ] ]
[ "import java.util.*;\nimport java.io.*;\n\n\npublic class Main {\n public static void main(String[] args) {\n InputReader_INTXOR ir = new InputReader_INTXOR(System.in);\n int n = ir.readInt();\n int a[] = new int[n+1];\n Map<Integer, Integer> map= new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = ir.readInt();\n map.put(a[i], map.getOrDefault(a[i], 0)+1);\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n System.out.flush();\n }\n}\n class InputReader_INTXOR {\n\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n\n public InputReader_INTXOR(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\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 return buf[curChar++];\n }\n\n public final 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 if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long readLong() {\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 do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\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 } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return isWhitespace(c);\n }\n\n public double readDouble() {\n return Double.parseDouble(readString());\n }\n\n public static boolean isWhitespace(int 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 }", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n public static void main(String[] args) {\n InputReader_INTXOR ir = new InputReader_INTXOR(System.in);\n int n = ir.readInt();\n int a[] = new int[n+1];\n Map<Integer, Integer> map= new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = ir.readInt();\n map.put(a[i], map.getOrDefault(a[i], 0)+1);\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n System.out.flush();\n }\n}", "Main", "public static void main(String[] args) {\n InputReader_INTXOR ir = new InputReader_INTXOR(System.in);\n int n = ir.readInt();\n int a[] = new int[n+1];\n Map<Integer, Integer> map= new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = ir.readInt();\n map.put(a[i], map.getOrDefault(a[i], 0)+1);\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n System.out.flush();\n }", "main", "{\n InputReader_INTXOR ir = new InputReader_INTXOR(System.in);\n int n = ir.readInt();\n int a[] = new int[n+1];\n Map<Integer, Integer> map= new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = ir.readInt();\n map.put(a[i], map.getOrDefault(a[i], 0)+1);\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n System.out.flush();\n }", "InputReader_INTXOR ir = new InputReader_INTXOR(System.in);", "ir", "new InputReader_INTXOR(System.in)", "int n = ir.readInt();", "n", "ir.readInt()", "ir.readInt", "ir", "int a[] = new int[n+1];", "a", "new int[n+1]", "n+1", "n", "1", "Map<Integer, Integer> map= new HashMap<>();", "map", "new HashMap<>()", "for (int i = 1; i < n; i++) {\n a[i] = ir.readInt();\n map.put(a[i], map.getOrDefault(a[i], 0)+1);\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n a[i] = ir.readInt();\n map.put(a[i], map.getOrDefault(a[i], 0)+1);\n }", "{\n a[i] = ir.readInt();\n map.put(a[i], map.getOrDefault(a[i], 0)+1);\n }", "a[i] = ir.readInt()", "a[i]", "a", "i", "ir.readInt()", "ir.readInt", "ir", "map.put(a[i], map.getOrDefault(a[i], 0)+1)", "map.put", "map", "a[i]", "a", "i", "map.getOrDefault(a[i], 0)+1", "map.getOrDefault(a[i], 0)", "map.getOrDefault", "map", "a[i]", "a", "i", "0", "1", "for (int i = 1; i <= n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }", "int i = 1;", "int i = 1;", "i", "1", "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", "System.out.flush()", "System.out.flush", "System.out", "System", "System.out", "String[] args", "args", "class InputReader_INTXOR {\n\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n\n public InputReader_INTXOR(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\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 return buf[curChar++];\n }\n\n public final 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 if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long readLong() {\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 do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\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 } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return isWhitespace(c);\n }\n\n public double readDouble() {\n return Double.parseDouble(readString());\n }\n\n public static boolean isWhitespace(int 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 }", "InputReader_INTXOR", "private InputStream stream;", "stream", "private byte[] buf = new byte[1024];", "buf", "new byte[1024]", "1024", "private int curChar;", "curChar", "private int numChars;", "numChars", "private SpaceCharFilter filter;", "filter", "public InputReader_INTXOR(InputStream stream) {\n this.stream = stream;\n }", "InputReader_INTXOR", "{\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 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 return buf[curChar++];\n }", "read", "{\n if (numChars == -1)\n throw new InputMismatchException();\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 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 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 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 final 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 if (c < '0' || c > '9')\n throw new InputMismatchException();\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 if (c < '0' || c > '9')\n throw new InputMismatchException();\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 if (c < '0' || c > '9')\n throw new InputMismatchException();\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 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 readLong() {\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 do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }", "readLong", "{\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 do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\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", "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 } 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 } while (!isSpaceChar(c));\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 } while (!isSpaceChar(c));\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 } 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 isWhitespace(c);\n }", "isSpaceChar", "{\n if (filter != null)\n return filter.isSpaceChar(c);\n return isWhitespace(c);\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 isWhitespace(c);", "isWhitespace(c)", "isWhitespace", "c", "int c", "c", "public double readDouble() {\n return Double.parseDouble(readString());\n }", "readDouble", "{\n return Double.parseDouble(readString());\n }", "return Double.parseDouble(readString());", "Double.parseDouble(readString())", "Double.parseDouble", "Double", "readString()", "readString", "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 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 }", "SpaceCharFilter", "public boolean isSpaceChar(int ch);", "isSpaceChar", "int ch", "ch", "public class Main {\n public static void main(String[] args) {\n InputReader_INTXOR ir = new InputReader_INTXOR(System.in);\n int n = ir.readInt();\n int a[] = new int[n+1];\n Map<Integer, Integer> map= new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = ir.readInt();\n map.put(a[i], map.getOrDefault(a[i], 0)+1);\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n System.out.flush();\n }\n}", "public class Main {\n public static void main(String[] args) {\n InputReader_INTXOR ir = new InputReader_INTXOR(System.in);\n int n = ir.readInt();\n int a[] = new int[n+1];\n Map<Integer, Integer> map= new HashMap<>();\n for (int i = 1; i < n; i++) {\n a[i] = ir.readInt();\n map.put(a[i], map.getOrDefault(a[i], 0)+1);\n }\n for (int i = 1; i <= n; i++) {\n System.out.println(map.getOrDefault(i, 0));\n }\n System.out.flush();\n }\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { InputReader_INTXOR ir = new InputReader_INTXOR(System.in); int n = ir.readInt(); int a[] = new int[n+1]; Map<Integer, Integer> map= new HashMap<>(); for (int i = 1; i < n; i++) { a[i] = ir.readInt(); map.put(a[i], map.getOrDefault(a[i], 0)+1); } for (int i = 1; i <= n; i++) { System.out.println(map.getOrDefault(i, 0)); } System.out.flush(); } } class InputReader_INTXOR { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; private SpaceCharFilter filter; public InputReader_INTXOR(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 final 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 long readLong() { 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 isWhitespace(c); } public double readDouble() { return Double.parseDouble(readString()); } public static boolean isWhitespace(int 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, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 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, 29, 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 ], [ 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 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 43, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 61, 62 ], [ 55, 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 ], [ 8, 92 ], [ 6, 93 ], [ 93, 94 ], [ 0, 95 ], [ 95, 96 ], [ 95, 97 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint member_count = sc.nextInt();\n\n\t\tint boss [] = new int[member_count];\n\t\tint assistant [] = new int[member_count];\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tassistant[i] = 0;\n\t\t}\n\n\t\tfor (int i = 1; i < member_count; i++) {\n\t\t\tboss[i] = sc.nextInt();\n\t\t\tassistant[boss[i] - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tSystem.out.println(assistant[i]);\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 member_count = sc.nextInt();\n\n\t\tint boss [] = new int[member_count];\n\t\tint assistant [] = new int[member_count];\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tassistant[i] = 0;\n\t\t}\n\n\t\tfor (int i = 1; i < member_count; i++) {\n\t\t\tboss[i] = sc.nextInt();\n\t\t\tassistant[boss[i] - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tSystem.out.println(assistant[i]);\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 member_count = sc.nextInt();\n\n\t\tint boss [] = new int[member_count];\n\t\tint assistant [] = new int[member_count];\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tassistant[i] = 0;\n\t\t}\n\n\t\tfor (int i = 1; i < member_count; i++) {\n\t\t\tboss[i] = sc.nextInt();\n\t\t\tassistant[boss[i] - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tSystem.out.println(assistant[i]);\n\t\t}\n\n\treturn;\n\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint member_count = sc.nextInt();\n\n\t\tint boss [] = new int[member_count];\n\t\tint assistant [] = new int[member_count];\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tassistant[i] = 0;\n\t\t}\n\n\t\tfor (int i = 1; i < member_count; i++) {\n\t\t\tboss[i] = sc.nextInt();\n\t\t\tassistant[boss[i] - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tSystem.out.println(assistant[i]);\n\t\t}\n\n\treturn;\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int member_count = sc.nextInt();", "member_count", "sc.nextInt()", "sc.nextInt", "sc", "int boss [] = new int[member_count];", "boss", "new int[member_count]", "member_count", "int assistant [] = new int[member_count];", "assistant", "new int[member_count]", "member_count", "for (int i = 0; i < member_count; i++) {\n\t\t\tassistant[i] = 0;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < member_count", "i", "member_count", "i++", "i++", "i", "{\n\t\t\tassistant[i] = 0;\n\t\t}", "{\n\t\t\tassistant[i] = 0;\n\t\t}", "assistant[i] = 0", "assistant[i]", "assistant", "i", "0", "for (int i = 1; i < member_count; i++) {\n\t\t\tboss[i] = sc.nextInt();\n\t\t\tassistant[boss[i] - 1]++;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < member_count", "i", "member_count", "i++", "i++", "i", "{\n\t\t\tboss[i] = sc.nextInt();\n\t\t\tassistant[boss[i] - 1]++;\n\t\t}", "{\n\t\t\tboss[i] = sc.nextInt();\n\t\t\tassistant[boss[i] - 1]++;\n\t\t}", "boss[i] = sc.nextInt()", "boss[i]", "boss", "i", "sc.nextInt()", "sc.nextInt", "sc", "assistant[boss[i] - 1]++", "assistant[boss[i] - 1]", "assistant", "boss[i] - 1", "boss[i]", "boss", "i", "1", "for (int i = 0; i < member_count; i++) {\n\t\t\tSystem.out.println(assistant[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < member_count", "i", "member_count", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(assistant[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(assistant[i]);\n\t\t}", "System.out.println(assistant[i])", "System.out.println", "System.out", "System", "System.out", "assistant[i]", "assistant", "i", "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 member_count = sc.nextInt();\n\n\t\tint boss [] = new int[member_count];\n\t\tint assistant [] = new int[member_count];\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tassistant[i] = 0;\n\t\t}\n\n\t\tfor (int i = 1; i < member_count; i++) {\n\t\t\tboss[i] = sc.nextInt();\n\t\t\tassistant[boss[i] - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tSystem.out.println(assistant[i]);\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 member_count = sc.nextInt();\n\n\t\tint boss [] = new int[member_count];\n\t\tint assistant [] = new int[member_count];\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tassistant[i] = 0;\n\t\t}\n\n\t\tfor (int i = 1; i < member_count; i++) {\n\t\t\tboss[i] = sc.nextInt();\n\t\t\tassistant[boss[i] - 1]++;\n\t\t}\n\n\t\tfor (int i = 0; i < member_count; i++) {\n\t\t\tSystem.out.println(assistant[i]);\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 member_count = sc.nextInt(); int boss [] = new int[member_count]; int assistant [] = new int[member_count]; for (int i = 0; i < member_count; i++) { assistant[i] = 0; } for (int i = 1; i < member_count; i++) { boss[i] = sc.nextInt(); assistant[boss[i] - 1]++; } for (int i = 0; i < member_count; i++) { System.out.println(assistant[i]); } return; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 2, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 2, 18, 13, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 89, 8 ], [ 89, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 11, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 30, 34 ], [ 11, 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 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 56, 57 ], [ 51, 58 ], [ 11, 59 ], [ 59, 60 ], [ 60, 61 ], [ 11, 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 ], [ 75, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 11, 83 ], [ 83, 84 ], [ 84, 85 ], [ 9, 86 ], [ 86, 87 ], [ 0, 88 ], [ 88, 89 ], [ 88, 90 ] ]
[ "import java.util.*;\nimport java.io.*;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter ou = new PrintWriter(System.out);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint[] q = new int[n];\n\t\tArrays.fill(q , 0);\n\t\tfor(int i = 1 ; i < n ; i++){\n\t\t\tq[Integer.parseInt(sc.next()) - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tou.print(q[i] + \"\\n\");\n\t\t}\n\t\tou.flush();\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter ou = new PrintWriter(System.out);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint[] q = new int[n];\n\t\tArrays.fill(q , 0);\n\t\tfor(int i = 1 ; i < n ; i++){\n\t\t\tq[Integer.parseInt(sc.next()) - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tou.print(q[i] + \"\\n\");\n\t\t}\n\t\tou.flush();\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter ou = new PrintWriter(System.out);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint[] q = new int[n];\n\t\tArrays.fill(q , 0);\n\t\tfor(int i = 1 ; i < n ; i++){\n\t\t\tq[Integer.parseInt(sc.next()) - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tou.print(q[i] + \"\\n\");\n\t\t}\n\t\tou.flush();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter ou = new PrintWriter(System.out);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint[] q = new int[n];\n\t\tArrays.fill(q , 0);\n\t\tfor(int i = 1 ; i < n ; i++){\n\t\t\tq[Integer.parseInt(sc.next()) - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tou.print(q[i] + \"\\n\");\n\t\t}\n\t\tou.flush();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "PrintWriter ou = new PrintWriter(System.out);", "ou", "new PrintWriter(System.out)", "int n = Integer.parseInt(sc.next());", "n", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int[] q = new int[n];", "q", "new int[n]", "n", "Arrays.fill(q , 0)", "Arrays.fill", "Arrays", "q", "0", "for(int i = 1 ; i < n ; i++){\n\t\t\tq[Integer.parseInt(sc.next()) - 1]++;\n\t\t}", "int i = 1 ;", "int i = 1 ;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tq[Integer.parseInt(sc.next()) - 1]++;\n\t\t}", "{\n\t\t\tq[Integer.parseInt(sc.next()) - 1]++;\n\t\t}", "q[Integer.parseInt(sc.next()) - 1]++", "q[Integer.parseInt(sc.next()) - 1]", "q", "Integer.parseInt(sc.next()) - 1", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "1", "sc.close()", "sc.close", "sc", "for(int i = 0 ; i < n ; i++){\n\t\t\tou.print(q[i] + \"\\n\");\n\t\t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tou.print(q[i] + \"\\n\");\n\t\t}", "{\n\t\t\tou.print(q[i] + \"\\n\");\n\t\t}", "ou.print(q[i] + \"\\n\")", "ou.print", "ou", "q[i] + \"\\n\"", "q[i]", "q", "i", "\"\\n\"", "ou.flush()", "ou.flush", "ou", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter ou = new PrintWriter(System.out);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint[] q = new int[n];\n\t\tArrays.fill(q , 0);\n\t\tfor(int i = 1 ; i < n ; i++){\n\t\t\tq[Integer.parseInt(sc.next()) - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tou.print(q[i] + \"\\n\");\n\t\t}\n\t\tou.flush();\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter ou = new PrintWriter(System.out);\n\t\tint n = Integer.parseInt(sc.next());\n\t\tint[] q = new int[n];\n\t\tArrays.fill(q , 0);\n\t\tfor(int i = 1 ; i < n ; i++){\n\t\t\tq[Integer.parseInt(sc.next()) - 1]++;\n\t\t}\n\t\tsc.close();\n\t\tfor(int i = 0 ; i < n ; i++){\n\t\t\tou.print(q[i] + \"\\n\");\n\t\t}\n\t\tou.flush();\n\t}\n}", "Main" ]
import java.util.*; import java.io.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); PrintWriter ou = new PrintWriter(System.out); int n = Integer.parseInt(sc.next()); int[] q = new int[n]; Arrays.fill(q , 0); for(int i = 1 ; i < n ; i++){ q[Integer.parseInt(sc.next()) - 1]++; } sc.close(); for(int i = 0 ; i < n ; i++){ ou.print(q[i] + "\n"); } ou.flush(); } }
[ 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, 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 ], [ 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 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 8, 77 ], [ 77, 78 ], [ 78, 79 ], [ 6, 80 ], [ 80, 81 ], [ 0, 82 ], [ 82, 83 ], [ 82, 84 ] ]
[ "import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n - 1];\n int[] out = new int[n];\n for(int i = 0; i < n - 1; i++) {\n a[i] = scan.nextInt();\n out[a[i] - 1]++;\n }\n for(int i = 0; i < n; i++) System.out.println(out[i]);\n scan.close();\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n - 1];\n int[] out = new int[n];\n for(int i = 0; i < n - 1; i++) {\n a[i] = scan.nextInt();\n out[a[i] - 1]++;\n }\n for(int i = 0; i < n; i++) System.out.println(out[i]);\n scan.close();\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n - 1];\n int[] out = new int[n];\n for(int i = 0; i < n - 1; i++) {\n a[i] = scan.nextInt();\n out[a[i] - 1]++;\n }\n for(int i = 0; i < n; i++) System.out.println(out[i]);\n scan.close();\n }", "main", "{\n Scanner scan = new java.util.Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n - 1];\n int[] out = new int[n];\n for(int i = 0; i < n - 1; i++) {\n a[i] = scan.nextInt();\n out[a[i] - 1]++;\n }\n for(int i = 0; i < n; i++) System.out.println(out[i]);\n scan.close();\n }", "Scanner scan = new java.util.Scanner(System.in);", "scan", "new java.util.Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int[] a = new int[n - 1];", "a", "new int[n - 1]", "n - 1", "n", "1", "int[] out = new int[n];", "out", "new int[n]", "n", "for(int i = 0; i < n - 1; i++) {\n a[i] = scan.nextInt();\n out[a[i] - 1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "{\n a[i] = scan.nextInt();\n out[a[i] - 1]++;\n }", "{\n a[i] = scan.nextInt();\n out[a[i] - 1]++;\n }", "a[i] = scan.nextInt()", "a[i]", "a", "i", "scan.nextInt()", "scan.nextInt", "scan", "out[a[i] - 1]++", "out[a[i] - 1]", "out", "a[i] - 1", "a[i]", "a", "i", "1", "for(int i = 0; i < n; i++) System.out.println(out[i]);", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "System.out.println(out[i]);", "System.out.println(out[i])", "System.out.println", "System.out", "System", "System.out", "out[i]", "out", "i", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n - 1];\n int[] out = new int[n];\n for(int i = 0; i < n - 1; i++) {\n a[i] = scan.nextInt();\n out[a[i] - 1]++;\n }\n for(int i = 0; i < n; i++) System.out.println(out[i]);\n scan.close();\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scan = new java.util.Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n - 1];\n int[] out = new int[n];\n for(int i = 0; i < n - 1; i++) {\n a[i] = scan.nextInt();\n out[a[i] - 1]++;\n }\n for(int i = 0; i < n; i++) System.out.println(out[i]);\n scan.close();\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new java.util.Scanner(System.in); int n = scan.nextInt(); int[] a = new int[n - 1]; int[] out = new int[n]; for(int i = 0; i < n - 1; i++) { a[i] = scan.nextInt(); out[a[i] - 1]++; } for(int i = 0; i < n; i++) System.out.println(out[i]); scan.close(); } }
[ 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, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 14, 40, 4, 18, 13, 13, 30, 4, 18, 13, 13, 17, 30, 4, 18, 13, 13, 2, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 13, 2, 13, 17, 30, 4, 18, 18, 13, 13, 4, 18, 13, 2, 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 ], [ 107, 8 ], [ 107, 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 ], [ 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 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 50, 54 ], [ 43, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 56, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 60, 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 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 79, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 79, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 9, 104 ], [ 104, 105 ], [ 0, 106 ], [ 106, 107 ], [ 106, 108 ] ]
[ "import java.util.HashMap;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan= new Scanner(System.in);\n int n=scan.nextInt();\n HashMap<Integer,Integer> map= new HashMap<Integer, Integer>();\n for(int i=0;i<n-1;i++){\n int x=scan.nextInt();\n if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }\n }\n for(int i=0;i<n;i++){\n if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);\n }\n }\n}", "import java.util.HashMap;", "HashMap", "java.util", "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 n=scan.nextInt();\n HashMap<Integer,Integer> map= new HashMap<Integer, Integer>();\n for(int i=0;i<n-1;i++){\n int x=scan.nextInt();\n if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }\n }\n for(int i=0;i<n;i++){\n if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan= new Scanner(System.in);\n int n=scan.nextInt();\n HashMap<Integer,Integer> map= new HashMap<Integer, Integer>();\n for(int i=0;i<n-1;i++){\n int x=scan.nextInt();\n if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }\n }\n for(int i=0;i<n;i++){\n if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);\n }\n }", "main", "{\n Scanner scan= new Scanner(System.in);\n int n=scan.nextInt();\n HashMap<Integer,Integer> map= new HashMap<Integer, Integer>();\n for(int i=0;i<n-1;i++){\n int x=scan.nextInt();\n if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }\n }\n for(int i=0;i<n;i++){\n if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);\n }\n }", "Scanner scan= new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n=scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "HashMap<Integer,Integer> map= new HashMap<Integer, Integer>();", "map", "new HashMap<Integer, Integer>()", "for(int i=0;i<n-1;i++){\n int x=scan.nextInt();\n if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n int x=scan.nextInt();\n if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }\n }", "{\n int x=scan.nextInt();\n if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }\n }", "int x=scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }", "!map.containsKey(x)", "map.containsKey(x)", "map.containsKey", "map", "x", "{\n map.put(x,1);\n }", "map.put(x,1)", "map.put", "map", "x", "1", "{\n map.replace(x, map.get(x) + 1);\n }", "map.replace(x, map.get(x) + 1)", "map.replace", "map", "x", "map.get(x) + 1", "map.get(x)", "map.get", "map", "x", "1", "for(int i=0;i<n;i++){\n if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);\n }", "{\n if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);\n }", "if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);", "map.containsKey(i+1)", "map.containsKey", "map", "i+1", "i", "1", "{\n System.out.println(map.get(i+1));\n }", "System.out.println(map.get(i+1))", "System.out.println", "System.out", "System", "System.out", "map.get(i+1)", "map.get", "map", "i+1", "i", "1", "System.out.println(0)", "System.out.println", "System.out", "System", "System.out", "0", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scan= new Scanner(System.in);\n int n=scan.nextInt();\n HashMap<Integer,Integer> map= new HashMap<Integer, Integer>();\n for(int i=0;i<n-1;i++){\n int x=scan.nextInt();\n if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }\n }\n for(int i=0;i<n;i++){\n if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scan= new Scanner(System.in);\n int n=scan.nextInt();\n HashMap<Integer,Integer> map= new HashMap<Integer, Integer>();\n for(int i=0;i<n-1;i++){\n int x=scan.nextInt();\n if(!map.containsKey(x)){\n map.put(x,1);\n }\n else {\n map.replace(x, map.get(x) + 1);\n }\n }\n for(int i=0;i<n;i++){\n if(map.containsKey(i+1)){\n System.out.println(map.get(i+1));\n }\n else System.out.println(0);\n }\n }\n}", "Main" ]
import java.util.HashMap; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan= new Scanner(System.in); int n=scan.nextInt(); HashMap<Integer,Integer> map= new HashMap<Integer, Integer>(); for(int i=0;i<n-1;i++){ int x=scan.nextInt(); if(!map.containsKey(x)){ map.put(x,1); } else { map.replace(x, map.get(x) + 1); } } for(int i=0;i<n;i++){ if(map.containsKey(i+1)){ System.out.println(map.get(i+1)); } else System.out.println(0); } } }
[ 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, 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, 2, 4, 18, 13, 4, 18, 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 ], [ 100, 5 ], [ 100, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 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 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 63, 64 ], [ 64, 65 ], [ 59, 66 ], [ 56, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 8, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 76, 84 ], [ 84, 85 ], [ 85, 86 ], [ 76, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 6, 97 ], [ 97, 98 ], [ 0, 99 ], [ 99, 100 ], [ 99, 101 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = Integer.parseInt(sc.next());\n // int[] A = new int[N - 1];\n int[] B = new int[N];\n for (int i = 0; i < N; i++) {\n B[i] = 0;\n }\n for (int i = 0; i < N -1; i++) {\n int tmp = Integer.parseInt(sc.next()) -1;\n B[tmp] = B[tmp] +1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(B[i]);\n }\n\n }\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = Integer.parseInt(sc.next());\n // int[] A = new int[N - 1];\n int[] B = new int[N];\n for (int i = 0; i < N; i++) {\n B[i] = 0;\n }\n for (int i = 0; i < N -1; i++) {\n int tmp = Integer.parseInt(sc.next()) -1;\n B[tmp] = B[tmp] +1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(B[i]);\n }\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 // int[] A = new int[N - 1];\n int[] B = new int[N];\n for (int i = 0; i < N; i++) {\n B[i] = 0;\n }\n for (int i = 0; i < N -1; i++) {\n int tmp = Integer.parseInt(sc.next()) -1;\n B[tmp] = B[tmp] +1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(B[i]);\n }\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = Integer.parseInt(sc.next());\n // int[] A = new int[N - 1];\n int[] B = new int[N];\n for (int i = 0; i < N; i++) {\n B[i] = 0;\n }\n for (int i = 0; i < N -1; i++) {\n int tmp = Integer.parseInt(sc.next()) -1;\n B[tmp] = B[tmp] +1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(B[i]);\n }\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[] B = new int[N];", "B", "new int[N]", "N", "for (int i = 0; i < N; i++) {\n B[i] = 0;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n B[i] = 0;\n }", "{\n B[i] = 0;\n }", "B[i] = 0", "B[i]", "B", "i", "0", "for (int i = 0; i < N -1; i++) {\n int tmp = Integer.parseInt(sc.next()) -1;\n B[tmp] = B[tmp] +1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N -1", "i", "N -1", "N", "1", "i++", "i++", "i", "{\n int tmp = Integer.parseInt(sc.next()) -1;\n B[tmp] = B[tmp] +1;\n }", "{\n int tmp = Integer.parseInt(sc.next()) -1;\n B[tmp] = B[tmp] +1;\n }", "int tmp = Integer.parseInt(sc.next()) -1;", "tmp", "Integer.parseInt(sc.next()) -1", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "1", "B[tmp] = B[tmp] +1", "B[tmp]", "B", "tmp", "B[tmp] +1", "B[tmp]", "B", "tmp", "1", "for (int i = 0; i < N; i++) {\n System.out.println(B[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "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", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = Integer.parseInt(sc.next());\n // int[] A = new int[N - 1];\n int[] B = new int[N];\n for (int i = 0; i < N; i++) {\n B[i] = 0;\n }\n for (int i = 0; i < N -1; i++) {\n int tmp = Integer.parseInt(sc.next()) -1;\n B[tmp] = B[tmp] +1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(B[i]);\n }\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 // int[] A = new int[N - 1];\n int[] B = new int[N];\n for (int i = 0; i < N; i++) {\n B[i] = 0;\n }\n for (int i = 0; i < N -1; i++) {\n int tmp = Integer.parseInt(sc.next()) -1;\n B[tmp] = B[tmp] +1;\n }\n for (int i = 0; i < N; i++) {\n System.out.println(B[i]);\n }\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()); // int[] A = new int[N - 1]; int[] B = new int[N]; for (int i = 0; i < N; i++) { B[i] = 0; } for (int i = 0; i < N -1; i++) { int tmp = Integer.parseInt(sc.next()) -1; B[tmp] = B[tmp] +1; } for (int i = 0; i < N; i++) { System.out.println(B[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, 40, 18, 13, 2, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 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 ], [ 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 ], [ 28, 30 ], [ 21, 31 ], [ 31, 32 ], [ 32, 33 ], [ 21, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 38, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 48, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 43, 54 ], [ 54, 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.*;\npublic 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[] arr=new int[n];\n for(int i=0;i<n-1;i++)\n arr[Sc.nextInt()-1]++;\n for(int i=0;i<n;i++)\n System.out.println(arr[i]);\n }\n}", "import java.util.*;", "util.*", "java", "public 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[] arr=new int[n];\n for(int i=0;i<n-1;i++)\n arr[Sc.nextInt()-1]++;\n for(int i=0;i<n;i++)\n System.out.println(arr[i]);\n }\n}", "Main", "public static void main(String args[])\n {\n Scanner Sc=new Scanner(System.in);\n int n=Sc.nextInt();\n int[] arr=new int[n];\n for(int i=0;i<n-1;i++)\n arr[Sc.nextInt()-1]++;\n for(int i=0;i<n;i++)\n System.out.println(arr[i]);\n }", "main", "{\n Scanner Sc=new Scanner(System.in);\n int n=Sc.nextInt();\n int[] arr=new int[n];\n for(int i=0;i<n-1;i++)\n arr[Sc.nextInt()-1]++;\n for(int i=0;i<n;i++)\n System.out.println(arr[i]);\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<n-1;i++)\n arr[Sc.nextInt()-1]++;", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "arr[Sc.nextInt()-1]++;", "arr[Sc.nextInt()-1]++", "arr[Sc.nextInt()-1]", "arr", "Sc.nextInt()-1", "Sc.nextInt()", "Sc.nextInt", "Sc", "1", "for(int i=0;i<n;i++)\n System.out.println(arr[i]);", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "System.out.println(arr[i]);", "System.out.println(arr[i])", "System.out.println", "System.out", "System", "System.out", "arr[i]", "arr", "i", "String args[]", "args", "public 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[] arr=new int[n];\n for(int i=0;i<n-1;i++)\n arr[Sc.nextInt()-1]++;\n for(int i=0;i<n;i++)\n System.out.println(arr[i]);\n }\n}", "public 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[] arr=new int[n];\n for(int i=0;i<n-1;i++)\n arr[Sc.nextInt()-1]++;\n for(int i=0;i<n;i++)\n System.out.println(arr[i]);\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[] arr=new int[n]; for(int i=0;i<n-1;i++) arr[Sc.nextInt()-1]++; for(int i=0;i<n;i++) System.out.println(arr[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, 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, 18, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 4, 18, 13, 17, 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 ], [ 171, 14 ], [ 171, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 17, 26 ], [ 26, 27 ], [ 26, 28 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 32, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 17, 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 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 17, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 15, 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.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int[] group = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n group[sc.nextInt()]++;\n }\n\n for (int i = 1; i < group.length; i++) {\n System.out.println(group[i]);\n }\n\n System.exit(0);\n }\n\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 } 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}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int[] group = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n group[sc.nextInt()]++;\n }\n\n for (int i = 1; i < group.length; i++) {\n System.out.println(group[i]);\n }\n\n System.exit(0);\n }\n\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 } 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}", "Main", "public static void main(String[] args) {\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int[] group = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n group[sc.nextInt()]++;\n }\n\n for (int i = 1; i < group.length; i++) {\n System.out.println(group[i]);\n }\n\n System.exit(0);\n }", "main", "{\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int[] group = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n group[sc.nextInt()]++;\n }\n\n for (int i = 1; i < group.length; i++) {\n System.out.println(group[i]);\n }\n\n System.exit(0);\n }", "FastReader sc = new FastReader();", "sc", "new FastReader()", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] group = new int[n + 1];", "group", "new int[n + 1]", "n + 1", "n", "1", "for (int i = 0; i < n - 1; i++) {\n group[sc.nextInt()]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "{\n group[sc.nextInt()]++;\n }", "{\n group[sc.nextInt()]++;\n }", "group[sc.nextInt()]++", "group[sc.nextInt()]", "group", "sc.nextInt()", "sc.nextInt", "sc", "for (int i = 1; i < group.length; i++) {\n System.out.println(group[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i < group.length", "i", "group.length", "group", "group.length", "i++", "i++", "i", "{\n System.out.println(group[i]);\n }", "{\n System.out.println(group[i]);\n }", "System.out.println(group[i])", "System.out.println", "System.out", "System", "System.out", "group[i]", "group", "i", "System.exit(0)", "System.exit", "System", "0", "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 } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "FastReader", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int[] group = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n group[sc.nextInt()]++;\n }\n\n for (int i = 1; i < group.length; i++) {\n System.out.println(group[i]);\n }\n\n System.exit(0);\n }\n\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 } 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}", "public class Main {\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int[] group = new int[n + 1];\n\n for (int i = 0; i < n - 1; i++) {\n group[sc.nextInt()]++;\n }\n\n for (int i = 1; i < group.length; i++) {\n System.out.println(group[i]);\n }\n\n System.exit(0);\n }\n\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 } 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}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { public static void main(String[] args) { FastReader sc = new FastReader(); int n = sc.nextInt(); int[] group = new int[n + 1]; for (int i = 0; i < n - 1; i++) { group[sc.nextInt()]++; } for (int i = 1; i < group.length; i++) { System.out.println(group[i]); } System.exit(0); } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ 7, 15, 13, 17, 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, 2, 4, 18, 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 ], [ 62, 8 ], [ 62, 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 ], [ 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 ], [ 42, 46 ], [ 39, 47 ], [ 11, 48 ], [ 48, 49 ], [ 48, 50 ], [ 48, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 9, 59 ], [ 59, 60 ], [ 0, 61 ], [ 61, 62 ], [ 61, 63 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int worker_number = sc.nextInt();\n int[] worker_number_counter = new int[worker_number];\n\n for(int i = 0;i < worker_number-1;i++){\n worker_number_counter[sc.nextInt()-1] += 1;\n }\n for(int i : worker_number_counter){\n System.out.println(i);\n }\n }\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int worker_number = sc.nextInt();\n int[] worker_number_counter = new int[worker_number];\n\n for(int i = 0;i < worker_number-1;i++){\n worker_number_counter[sc.nextInt()-1] += 1;\n }\n for(int i : worker_number_counter){\n System.out.println(i);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int worker_number = sc.nextInt();\n int[] worker_number_counter = new int[worker_number];\n\n for(int i = 0;i < worker_number-1;i++){\n worker_number_counter[sc.nextInt()-1] += 1;\n }\n for(int i : worker_number_counter){\n System.out.println(i);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int worker_number = sc.nextInt();\n int[] worker_number_counter = new int[worker_number];\n\n for(int i = 0;i < worker_number-1;i++){\n worker_number_counter[sc.nextInt()-1] += 1;\n }\n for(int i : worker_number_counter){\n System.out.println(i);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int worker_number = sc.nextInt();", "worker_number", "sc.nextInt()", "sc.nextInt", "sc", "int[] worker_number_counter = new int[worker_number];", "worker_number_counter", "new int[worker_number]", "worker_number", "for(int i = 0;i < worker_number-1;i++){\n worker_number_counter[sc.nextInt()-1] += 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < worker_number-1", "i", "worker_number-1", "worker_number", "1", "i++", "i++", "i", "{\n worker_number_counter[sc.nextInt()-1] += 1;\n }", "{\n worker_number_counter[sc.nextInt()-1] += 1;\n }", "worker_number_counter[sc.nextInt()-1] += 1", "worker_number_counter[sc.nextInt()-1]", "worker_number_counter", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "1", "for(int i : worker_number_counter){\n System.out.println(i);\n }", "int i", "worker_number_counter", "{\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 public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int worker_number = sc.nextInt();\n int[] worker_number_counter = new int[worker_number];\n\n for(int i = 0;i < worker_number-1;i++){\n worker_number_counter[sc.nextInt()-1] += 1;\n }\n for(int i : worker_number_counter){\n System.out.println(i);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int worker_number = sc.nextInt();\n int[] worker_number_counter = new int[worker_number];\n\n for(int i = 0;i < worker_number-1;i++){\n worker_number_counter[sc.nextInt()-1] += 1;\n }\n for(int i : worker_number_counter){\n System.out.println(i);\n }\n }\n}", "Main" ]
import java.util.ArrayList; import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int worker_number = sc.nextInt(); int[] worker_number_counter = new int[worker_number]; for(int i = 0;i < worker_number-1;i++){ worker_number_counter[sc.nextInt()-1] += 1; } for(int i : worker_number_counter){ 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, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 0, 18, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 70, 8 ], [ 70, 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 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 26, 36 ], [ 36, 37 ], [ 37, 38 ], [ 26, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 40, 46 ], [ 11, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 9, 67 ], [ 67, 68 ], [ 0, 69 ], [ 69, 70 ], [ 69, 71 ] ]
[ "import java.util.*;\nimport java.math.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] sub = new int[n + 1];\n\t\tfor(int i = 0; i < n - 1; i++) sub[in.nextInt()] += 1;\n\t\tfor(int i = 1; i <= n; i++) System.out.println(sub[i]);\n\t}\n} ", "import java.util.*;", "util.*", "java", "import java.math.*;", "math.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] sub = new int[n + 1];\n\t\tfor(int i = 0; i < n - 1; i++) sub[in.nextInt()] += 1;\n\t\tfor(int i = 1; i <= n; i++) System.out.println(sub[i]);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] sub = new int[n + 1];\n\t\tfor(int i = 0; i < n - 1; i++) sub[in.nextInt()] += 1;\n\t\tfor(int i = 1; i <= n; i++) System.out.println(sub[i]);\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] sub = new int[n + 1];\n\t\tfor(int i = 0; i < n - 1; i++) sub[in.nextInt()] += 1;\n\t\tfor(int i = 1; i <= n; i++) System.out.println(sub[i]);\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] sub = new int[n + 1];", "sub", "new int[n + 1]", "n + 1", "n", "1", "for(int i = 0; i < n - 1; i++) sub[in.nextInt()] += 1;", "int i = 0;", "int i = 0;", "i", "0", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "sub[in.nextInt()] += 1;", "sub[in.nextInt()] += 1", "sub[in.nextInt()]", "sub", "in.nextInt()", "in.nextInt", "in", "1", "for(int i = 1; i <= n; i++) System.out.println(sub[i]);", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "System.out.println(sub[i]);", "System.out.println(sub[i])", "System.out.println", "System.out", "System", "System.out", "sub[i]", "sub", "i", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] sub = new int[n + 1];\n\t\tfor(int i = 0; i < n - 1; i++) sub[in.nextInt()] += 1;\n\t\tfor(int i = 1; i <= n; i++) System.out.println(sub[i]);\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] sub = new int[n + 1];\n\t\tfor(int i = 0; i < n - 1; i++) sub[in.nextInt()] += 1;\n\t\tfor(int i = 1; i <= n; i++) System.out.println(sub[i]);\n\t}\n}", "Main" ]
import java.util.*; import java.math.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] sub = new int[n + 1]; for(int i = 0; i < n - 1; i++) sub[in.nextInt()] += 1; for(int i = 1; i <= n; i++) System.out.println(sub[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, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 4, 18, 13, 17, 0, 18, 13, 18, 13, 13, 2, 18, 13, 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 ], [ 86, 5 ], [ 86, 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 ], [ 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 ], [ 46, 47 ], [ 44, 48 ], [ 39, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 52, 54 ], [ 49, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 55, 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 ], [ 0, 85 ], [ 85, 86 ], [ 85, 87 ] ]
[ "import java.util.Scanner;\n\n/**\n * Main\n */\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int[] A = new int[N];\n int[] count = new int[N];\n\n for(int i = 0; i<N-1; i++){\n A[i] = sc.nextInt()-1;\n count[A[i]] = count[A[i]] + 1;\n }\n\n for(int i = 0; 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 sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int[] A = new int[N];\n int[] count = new int[N];\n\n for(int i = 0; i<N-1; i++){\n A[i] = sc.nextInt()-1;\n count[A[i]] = count[A[i]] + 1;\n }\n\n for(int i = 0; i<N; i++){\n System.out.println(count[i]);\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[] A = new int[N];\n int[] count = new int[N];\n\n for(int i = 0; i<N-1; i++){\n A[i] = sc.nextInt()-1;\n count[A[i]] = count[A[i]] + 1;\n }\n\n for(int i = 0; i<N; i++){\n System.out.println(count[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int[] A = new int[N];\n int[] count = new int[N];\n\n for(int i = 0; i<N-1; i++){\n A[i] = sc.nextInt()-1;\n count[A[i]] = count[A[i]] + 1;\n }\n\n for(int i = 0; i<N; i++){\n System.out.println(count[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[] A = new int[N];", "A", "new int[N]", "N", "int[] count = new int[N];", "count", "new int[N]", "N", "for(int i = 0; i<N-1; i++){\n A[i] = sc.nextInt()-1;\n count[A[i]] = count[A[i]] + 1;\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()-1;\n count[A[i]] = count[A[i]] + 1;\n }", "{\n A[i] = sc.nextInt()-1;\n count[A[i]] = count[A[i]] + 1;\n }", "A[i] = sc.nextInt()-1", "A[i]", "A", "i", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "count[A[i]] = count[A[i]] + 1", "count[A[i]]", "count", "A[i]", "A", "i", "count[A[i]] + 1", "count[A[i]]", "count", "A[i]", "A", "i", "1", "for(int i = 0; i<N; i++){\n System.out.println(count[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "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 sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int[] A = new int[N];\n int[] count = new int[N];\n\n for(int i = 0; i<N-1; i++){\n A[i] = sc.nextInt()-1;\n count[A[i]] = count[A[i]] + 1;\n }\n\n for(int i = 0; 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 sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int[] A = new int[N];\n int[] count = new int[N];\n\n for(int i = 0; i<N-1; i++){\n A[i] = sc.nextInt()-1;\n count[A[i]] = count[A[i]] + 1;\n }\n\n for(int i = 0; i<N; i++){\n System.out.println(count[i]);\n }\n }\n}", "Main" ]
import java.util.Scanner; /** * Main */ 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[] count = new int[N]; for(int i = 0; i<N-1; i++){ A[i] = sc.nextInt()-1; count[A[i]] = count[A[i]] + 1; } for(int i = 0; i<N; i++){ System.out.println(count[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, 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, 28, 13, 13, 30, 30, 4, 18, 13, 13, 23, 13, 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 ], [ 158, 14 ], [ 158, 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 ], [ 158, 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 ], [ 52, 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 ], [ 76, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 82, 88 ], [ 52, 89 ], [ 89, 90 ], [ 89, 91 ], [ 89, 92 ], [ 93, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 50, 98 ], [ 98, 99 ], [ 50, 100 ], [ 100, 101 ], [ 50, 102 ], [ 102, 103 ], [ 158, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 104, 108 ], [ 108, 109 ], [ 104, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 116, 117 ], [ 116, 118 ], [ 110, 119 ], [ 119, 120 ], [ 104, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 125, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 124, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 134, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 123, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 104, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 152, 155 ], [ 155, 156 ], [ 0, 157 ], [ 157, 158 ], [ 157, 159 ] ]
[ "//package beginner163.c;\n\nimport java.io.*;\nimport java.util.Map;\nimport java.util.StringTokenizer;\nimport java.util.TreeMap;\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 TaskC solver = new TaskC();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskC {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int numOfEmployees = in.nextInt();\n\n int[] dep = new int[numOfEmployees];\n\n for (int i = 0; i < numOfEmployees - 1; ++i) {\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }\n\n for (Integer subCount : dep) {\n out.println(subCount);\n }\n }\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.Map;", "Map", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.util.TreeMap;", "TreeMap", "java.util", "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 TaskC solver = new TaskC();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskC {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int numOfEmployees = in.nextInt();\n\n int[] dep = new int[numOfEmployees];\n\n for (int i = 0; i < numOfEmployees - 1; ++i) {\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }\n\n for (Integer subCount : dep) {\n out.println(subCount);\n }\n }\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskC solver = new TaskC();\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 TaskC solver = new TaskC();\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)", "TaskC solver = new TaskC();", "solver", "new TaskC()", "solver.solve(1, in, out)", "solver.solve", "solver", "1", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class TaskC {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int numOfEmployees = in.nextInt();\n\n int[] dep = new int[numOfEmployees];\n\n for (int i = 0; i < numOfEmployees - 1; ++i) {\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }\n\n for (Integer subCount : dep) {\n out.println(subCount);\n }\n }\n }", "TaskC", "public void solve(int testNumber, InputReader in, PrintWriter out) {\n int numOfEmployees = in.nextInt();\n\n int[] dep = new int[numOfEmployees];\n\n for (int i = 0; i < numOfEmployees - 1; ++i) {\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }\n\n for (Integer subCount : dep) {\n out.println(subCount);\n }\n }", "solve", "{\n int numOfEmployees = in.nextInt();\n\n int[] dep = new int[numOfEmployees];\n\n for (int i = 0; i < numOfEmployees - 1; ++i) {\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }\n\n for (Integer subCount : dep) {\n out.println(subCount);\n }\n }", "int numOfEmployees = in.nextInt();", "numOfEmployees", "in.nextInt()", "in.nextInt", "in", "int[] dep = new int[numOfEmployees];", "dep", "new int[numOfEmployees]", "numOfEmployees", "for (int i = 0; i < numOfEmployees - 1; ++i) {\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < numOfEmployees - 1", "i", "numOfEmployees - 1", "numOfEmployees", "1", "++i", "++i", "i", "{\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }", "{\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }", "int bossId = in.nextInt();", "bossId", "in.nextInt()", "in.nextInt", "in", "dep[bossId-1] += 1", "dep[bossId-1]", "dep", "bossId-1", "bossId", "1", "1", "for (Integer subCount : dep) {\n out.println(subCount);\n }", "Integer subCount", "dep", "{\n out.println(subCount);\n }", "{\n out.println(subCount);\n }", "out.println(subCount)", "out.println", "out", "subCount", "int testNumber", "testNumber", "InputReader in", "in", "PrintWriter out", "out", "static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }", "InputReader", "public BufferedReader reader;", "reader", "public StringTokenizer tokenizer;", "tokenizer", "public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "InputReader", "{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "reader = new BufferedReader(new InputStreamReader(stream), 32768)", "reader", "new BufferedReader(new InputStreamReader(stream), 32768)", "tokenizer = null", "tokenizer", "null", "InputStream stream", "stream", "public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "next", "{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n throw new RuntimeException(e);\n }", "IOException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n tokenizer = new StringTokenizer(reader.readLine());\n }", "tokenizer = new StringTokenizer(reader.readLine())", "tokenizer", "new StringTokenizer(reader.readLine())", "return tokenizer.nextToken();", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "public int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskC solver = new TaskC();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskC {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int numOfEmployees = in.nextInt();\n\n int[] dep = new int[numOfEmployees];\n\n for (int i = 0; i < numOfEmployees - 1; ++i) {\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }\n\n for (Integer subCount : dep) {\n out.println(subCount);\n }\n }\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskC solver = new TaskC();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskC {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int numOfEmployees = in.nextInt();\n\n int[] dep = new int[numOfEmployees];\n\n for (int i = 0; i < numOfEmployees - 1; ++i) {\n int bossId = in.nextInt();\n dep[bossId-1] += 1;\n }\n\n for (Integer subCount : dep) {\n out.println(subCount);\n }\n }\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}", "Main" ]
//package beginner163.c; import java.io.*; import java.util.Map; import java.util.StringTokenizer; import java.util.TreeMap; 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); TaskC solver = new TaskC(); solver.solve(1, in, out); out.close(); } static class TaskC { public void solve(int testNumber, InputReader in, PrintWriter out) { int numOfEmployees = in.nextInt(); int[] dep = new int[numOfEmployees]; for (int i = 0; i < numOfEmployees - 1; ++i) { int bossId = in.nextInt(); dep[bossId-1] += 1; } for (Integer subCount : dep) { out.println(subCount); } } } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 41, 13, 20, 2, 13, 17, 0, 18, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 87, 8 ], [ 87, 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 ], [ 29, 30 ], [ 29, 31 ], [ 11, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 11, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 37, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 55, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 11, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 9, 84 ], [ 84, 85 ], [ 0, 86 ], [ 86, 87 ], [ 86, 88 ] ]
[ "import java.util.*; \nimport java.lang.*; \n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint N = scan.nextInt();\n int[] A = new int[N+1];\n int[] cnt = new int[N+1];\n A[1]=0;\n for(int i=2; i<=N; i++){\n A[i] = scan.nextInt();\n cnt[A[i]]++;\n }\n \n for(int i=1; i<=N; i++){\n System.out.println(cnt[i]);\n }\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint N = scan.nextInt();\n int[] A = new int[N+1];\n int[] cnt = new int[N+1];\n A[1]=0;\n for(int i=2; i<=N; i++){\n A[i] = scan.nextInt();\n cnt[A[i]]++;\n }\n \n for(int i=1; i<=N; i++){\n System.out.println(cnt[i]);\n }\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint N = scan.nextInt();\n int[] A = new int[N+1];\n int[] cnt = new int[N+1];\n A[1]=0;\n for(int i=2; i<=N; i++){\n A[i] = scan.nextInt();\n cnt[A[i]]++;\n }\n \n for(int i=1; i<=N; i++){\n System.out.println(cnt[i]);\n }\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint N = scan.nextInt();\n int[] A = new int[N+1];\n int[] cnt = new int[N+1];\n A[1]=0;\n for(int i=2; i<=N; i++){\n A[i] = scan.nextInt();\n cnt[A[i]]++;\n }\n \n for(int i=1; i<=N; i++){\n System.out.println(cnt[i]);\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[] A = new int[N+1];", "A", "new int[N+1]", "N+1", "N", "1", "int[] cnt = new int[N+1];", "cnt", "new int[N+1]", "N+1", "N", "1", "A[1]=0", "A[1]", "A", "1", "0", "for(int i=2; i<=N; i++){\n A[i] = scan.nextInt();\n cnt[A[i]]++;\n }", "int i=2;", "int i=2;", "i", "2", "i<=N", "i", "N", "i++", "i++", "i", "{\n A[i] = scan.nextInt();\n cnt[A[i]]++;\n }", "{\n A[i] = scan.nextInt();\n cnt[A[i]]++;\n }", "A[i] = scan.nextInt()", "A[i]", "A", "i", "scan.nextInt()", "scan.nextInt", "scan", "cnt[A[i]]++", "cnt[A[i]]", "cnt", "A[i]", "A", "i", "for(int i=1; i<=N; i++){\n System.out.println(cnt[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<=N", "i", "N", "i++", "i++", "i", "{\n System.out.println(cnt[i]);\n }", "{\n System.out.println(cnt[i]);\n }", "System.out.println(cnt[i])", "System.out.println", "System.out", "System", "System.out", "cnt[i]", "cnt", "i", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint N = scan.nextInt();\n int[] A = new int[N+1];\n int[] cnt = new int[N+1];\n A[1]=0;\n for(int i=2; i<=N; i++){\n A[i] = scan.nextInt();\n cnt[A[i]]++;\n }\n \n for(int i=1; i<=N; i++){\n System.out.println(cnt[i]);\n }\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint N = scan.nextInt();\n int[] A = new int[N+1];\n int[] cnt = new int[N+1];\n A[1]=0;\n for(int i=2; i<=N; i++){\n A[i] = scan.nextInt();\n cnt[A[i]]++;\n }\n \n for(int i=1; i<=N; i++){\n System.out.println(cnt[i]);\n }\n\t}\n}", "Main" ]
import java.util.*; import java.lang.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int[] A = new int[N+1]; int[] cnt = new int[N+1]; A[1]=0; for(int i=2; i<=N; i++){ A[i] = scan.nextInt(); cnt[A[i]]++; } for(int i=1; i<=N; i++){ System.out.println(cnt[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, 2, 13, 17, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 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 ], [ 88, 11 ], [ 88, 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 ], [ 29, 30 ], [ 29, 31 ], [ 14, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 34, 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 ], [ 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 ], [ 12, 85 ], [ 85, 86 ], [ 0, 87 ], [ 87, 88 ], [ 87, 89 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int[] res = new int[n+1];\n String[] str = br.readLine().split(\" \");\n for(int i=0; i<n-1; ++i){\n res[Integer.parseInt(str[i])]++;\n }\n for(int i=1; i<=n; ++i){\n System.out.println(res[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 public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int[] res = new int[n+1];\n String[] str = br.readLine().split(\" \");\n for(int i=0; i<n-1; ++i){\n res[Integer.parseInt(str[i])]++;\n }\n for(int i=1; i<=n; ++i){\n System.out.println(res[i]);\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int[] res = new int[n+1];\n String[] str = br.readLine().split(\" \");\n for(int i=0; i<n-1; ++i){\n res[Integer.parseInt(str[i])]++;\n }\n for(int i=1; i<=n; ++i){\n System.out.println(res[i]);\n }\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int[] res = new int[n+1];\n String[] str = br.readLine().split(\" \");\n for(int i=0; i<n-1; ++i){\n res[Integer.parseInt(str[i])]++;\n }\n for(int i=1; i<=n; ++i){\n System.out.println(res[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", "int[] res = new int[n+1];", "res", "new int[n+1]", "n+1", "n", "1", "String[] str = br.readLine().split(\" \");", "str", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "for(int i=0; i<n-1; ++i){\n res[Integer.parseInt(str[i])]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "++i", "++i", "i", "{\n res[Integer.parseInt(str[i])]++;\n }", "{\n res[Integer.parseInt(str[i])]++;\n }", "res[Integer.parseInt(str[i])]++", "res[Integer.parseInt(str[i])]", "res", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "for(int i=1; i<=n; ++i){\n System.out.println(res[i]);\n }", "int i=1;", "int i=1;", "i", "1", "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", "public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int[] res = new int[n+1];\n String[] str = br.readLine().split(\" \");\n for(int i=0; i<n-1; ++i){\n res[Integer.parseInt(str[i])]++;\n }\n for(int i=1; i<=n; ++i){\n System.out.println(res[i]);\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n int[] res = new int[n+1];\n String[] str = br.readLine().split(\" \");\n for(int i=0; i<n-1; ++i){\n res[Integer.parseInt(str[i])]++;\n }\n for(int i=1; i<=n; ++i){\n System.out.println(res[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()); int[] res = new int[n+1]; String[] str = br.readLine().split(" "); for(int i=0; i<n-1; ++i){ res[Integer.parseInt(str[i])]++; } for(int i=1; i<=n; ++i){ System.out.println(res[i]); } } }
[ 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, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 40, 18, 13, 2, 4, 18, 13, 4, 18, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 67, 11 ], [ 67, 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 ], [ 14, 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 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 49, 50 ], [ 50, 51 ], [ 45, 52 ], [ 14, 53 ], [ 53, 54 ], [ 53, 55 ], [ 53, 56 ], [ 57, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 12, 64 ], [ 64, 65 ], [ 0, 66 ], [ 66, 67 ], [ 66, 68 ] ]
[ "/*\n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor.\n */\n\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\n\n/**\n *\n * @author yoovraj.shinde\n */\npublic class Main {\n public static void main(String[] args) {\n // if (true) return;\n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int n = in.nextInt();\n int[] mem = new int[n];\n for (int i = 0 ; i < n-1; i++) {\n mem[Integer.parseInt(in.next()) - 1 ] ++;\n }\n for (int i : mem) {\n System.out.println(i);\n }\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 class Main {\n public static void main(String[] args) {\n // if (true) return;\n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int n = in.nextInt();\n int[] mem = new int[n];\n for (int i = 0 ; i < n-1; i++) {\n mem[Integer.parseInt(in.next()) - 1 ] ++;\n }\n for (int i : mem) {\n System.out.println(i);\n }\n }\n\n}", "Main", "public static void main(String[] args) {\n // if (true) return;\n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int n = in.nextInt();\n int[] mem = new int[n];\n for (int i = 0 ; i < n-1; i++) {\n mem[Integer.parseInt(in.next()) - 1 ] ++;\n }\n for (int i : mem) {\n System.out.println(i);\n }\n }", "main", "{\n // if (true) return;\n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int n = in.nextInt();\n int[] mem = new int[n];\n for (int i = 0 ; i < n-1; i++) {\n mem[Integer.parseInt(in.next()) - 1 ] ++;\n }\n for (int i : mem) {\n System.out.println(i);\n }\n }", "Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));", "in", "new Scanner(new BufferedReader(new InputStreamReader(System.in)))", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] mem = new int[n];", "mem", "new int[n]", "n", "for (int i = 0 ; i < n-1; i++) {\n mem[Integer.parseInt(in.next()) - 1 ] ++;\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n mem[Integer.parseInt(in.next()) - 1 ] ++;\n }", "{\n mem[Integer.parseInt(in.next()) - 1 ] ++;\n }", "mem[Integer.parseInt(in.next()) - 1 ] ++", "mem[Integer.parseInt(in.next()) - 1 ]", "mem", "Integer.parseInt(in.next()) - 1", "Integer.parseInt(in.next())", "Integer.parseInt", "Integer", "in.next()", "in.next", "in", "1", "for (int i : mem) {\n System.out.println(i);\n }", "int i", "mem", "{\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 public static void main(String[] args) {\n // if (true) return;\n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int n = in.nextInt();\n int[] mem = new int[n];\n for (int i = 0 ; i < n-1; i++) {\n mem[Integer.parseInt(in.next()) - 1 ] ++;\n }\n for (int i : mem) {\n System.out.println(i);\n }\n }\n\n}", "public class Main {\n public static void main(String[] args) {\n // if (true) return;\n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int n = in.nextInt();\n int[] mem = new int[n];\n for (int i = 0 ; i < n-1; i++) {\n mem[Integer.parseInt(in.next()) - 1 ] ++;\n }\n for (int i : mem) {\n System.out.println(i);\n }\n }\n\n}", "Main" ]
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; /** * * @author yoovraj.shinde */ public class Main { public static void main(String[] args) { // if (true) return; Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); int n = in.nextInt(); int[] mem = new int[n]; for (int i = 0 ; i < n-1; i++) { mem[Integer.parseInt(in.next()) - 1 ] ++; } for (int i : mem) { System.out.println(i); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 0, 13, 20, 41, 13, 4, 18, 13, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 2, 4, 18, 13, 17, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 0, 13, 20, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 4, 13, 17, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 4, 18, 13, 17, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 288, 11 ], [ 288, 12 ], [ 12, 13 ], [ 288, 14 ], [ 14, 15 ], [ 288, 16 ], [ 16, 17 ], [ 288, 18 ], [ 18, 19 ], [ 288, 20 ], [ 20, 21 ], [ 20, 22 ], [ 288, 23 ], [ 23, 24 ], [ 288, 25 ], [ 25, 26 ], [ 288, 27 ], [ 27, 28 ], [ 288, 29 ], [ 29, 30 ], [ 288, 31 ], [ 31, 32 ], [ 288, 33 ], [ 33, 34 ], [ 288, 35 ], [ 35, 36 ], [ 288, 37 ], [ 37, 38 ], [ 288, 39 ], [ 39, 40 ], [ 288, 41 ], [ 41, 42 ], [ 288, 43 ], [ 43, 44 ], [ 288, 45 ], [ 45, 46 ], [ 288, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 53, 55 ], [ 49, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 49, 61 ], [ 61, 62 ], [ 61, 63 ], [ 49, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 65, 73 ], [ 73, 74 ], [ 74, 75 ], [ 65, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 49, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 87, 88 ], [ 87, 89 ], [ 82, 90 ], [ 90, 91 ], [ 91, 92 ], [ 82, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 98, 102 ], [ 94, 103 ], [ 49, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 109, 110 ], [ 109, 111 ], [ 104, 112 ], [ 112, 113 ], [ 113, 114 ], [ 104, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 116, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 49, 126 ], [ 126, 127 ], [ 127, 128 ], [ 47, 129 ], [ 129, 130 ], [ 288, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 131, 135 ], [ 135, 136 ], [ 131, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 137, 143 ], [ 143, 144 ], [ 131, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 145, 151 ], [ 151, 152 ], [ 131, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 157, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 156, 165 ], [ 165, 166 ], [ 165, 167 ], [ 155, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 131, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 131, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 183, 186 ], [ 186, 187 ], [ 131, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 193, 194 ], [ 192, 195 ], [ 195, 196 ], [ 131, 197 ], [ 197, 198 ], [ 197, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 201, 205 ], [ 131, 206 ], [ 206, 207 ], [ 206, 208 ], [ 208, 209 ], [ 209, 210 ], [ 210, 211 ], [ 211, 212 ], [ 210, 213 ], [ 213, 214 ], [ 131, 215 ], [ 215, 216 ], [ 215, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 217, 222 ], [ 222, 223 ], [ 223, 224 ], [ 224, 225 ], [ 224, 226 ], [ 222, 227 ], [ 227, 228 ], [ 227, 229 ], [ 222, 230 ], [ 230, 231 ], [ 231, 232 ], [ 222, 233 ], [ 233, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 234, 238 ], [ 238, 239 ], [ 217, 240 ], [ 240, 241 ], [ 215, 242 ], [ 242, 243 ], [ 131, 244 ], [ 244, 245 ], [ 244, 246 ], [ 246, 247 ], [ 247, 248 ], [ 247, 249 ], [ 246, 251 ], [ 251, 252 ], [ 252, 253 ], [ 253, 254 ], [ 253, 255 ], [ 251, 256 ], [ 256, 257 ], [ 256, 258 ], [ 251, 259 ], [ 259, 260 ], [ 260, 261 ], [ 251, 262 ], [ 262, 263 ], [ 263, 264 ], [ 264, 265 ], [ 264, 266 ], [ 263, 267 ], [ 267, 268 ], [ 246, 269 ], [ 269, 270 ], [ 244, 271 ], [ 271, 272 ], [ 131, 273 ], [ 273, 274 ], [ 273, 275 ], [ 275, 276 ], [ 276, 277 ], [ 277, 278 ], [ 278, 279 ], [ 131, 280 ], [ 280, 281 ], [ 280, 282 ], [ 282, 283 ], [ 283, 284 ], [ 284, 285 ], [ 283, 286 ], [ 0, 287 ], [ 287, 288 ], [ 287, 289 ] ]
[ "import java.io.*;\nimport java.math.BigInteger;\nimport java.util.*;\n\npublic class Main {\n\tstatic PrintWriter out;\n\tstatic StringBuilder sb;\n\tstatic int n, k;\n\tstatic long mod = 1000000007;\n\tstatic int[][] memo;\n\tstatic String s;\n\tstatic HashSet<Integer> nodes;\n\tstatic ArrayList<Integer>[] ad, tree;\n\tstatic boolean[] vis, taken;\n\tstatic int[] a;\n\tstatic TreeSet<Long> al;\n\tstatic long[] val;\n\tstatic ArrayList<String> aa;\n\tstatic char[] b;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tad=new ArrayList[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tad[i]=new ArrayList<>();\n\t\tfor(int i=1;i<n;i++)\n\t\t\tad[sc.nextInt()-1].add(i);\n\t\tfor(int i=0;i<n;i++)\n\t\t\tSystem.out.println(ad[i].size());\n\t\tout.flush();\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\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[] nextArrLong(int n) throws IOException {\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.*;", "util.*", "java", "public class Main {\n\tstatic PrintWriter out;\n\tstatic StringBuilder sb;\n\tstatic int n, k;\n\tstatic long mod = 1000000007;\n\tstatic int[][] memo;\n\tstatic String s;\n\tstatic HashSet<Integer> nodes;\n\tstatic ArrayList<Integer>[] ad, tree;\n\tstatic boolean[] vis, taken;\n\tstatic int[] a;\n\tstatic TreeSet<Long> al;\n\tstatic long[] val;\n\tstatic ArrayList<String> aa;\n\tstatic char[] b;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tad=new ArrayList[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tad[i]=new ArrayList<>();\n\t\tfor(int i=1;i<n;i++)\n\t\t\tad[sc.nextInt()-1].add(i);\n\t\tfor(int i=0;i<n;i++)\n\t\t\tSystem.out.println(ad[i].size());\n\t\tout.flush();\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\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[] nextArrLong(int n) throws IOException {\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n}", "Main", "static PrintWriter out;", "out", "static StringBuilder sb;", "sb", "static int n", "n", "k;", "k", "static long mod = 1000000007;", "mod", "1000000007", "static int[][] memo;", "memo", "static String s;", "s", "static HashSet<Integer> nodes;", "nodes", "static ArrayList<Integer>[] ad", "ad", "tree;", "tree", "static boolean[] vis", "vis", "taken;", "taken", "static int[] a;", "a", "static TreeSet<Long> al;", "al", "static long[] val;", "val", "static ArrayList<String> aa;", "aa", "static char[] b;", "b", "public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tad=new ArrayList[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tad[i]=new ArrayList<>();\n\t\tfor(int i=1;i<n;i++)\n\t\t\tad[sc.nextInt()-1].add(i);\n\t\tfor(int i=0;i<n;i++)\n\t\t\tSystem.out.println(ad[i].size());\n\t\tout.flush();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tad=new ArrayList[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tad[i]=new ArrayList<>();\n\t\tfor(int i=1;i<n;i++)\n\t\t\tad[sc.nextInt()-1].add(i);\n\t\tfor(int i=0;i<n;i++)\n\t\t\tSystem.out.println(ad[i].size());\n\t\tout.flush();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "ad=new ArrayList[n]", "ad", "new ArrayList[n]", "n", "for(int i=0;i<n;i++)\n\t\t\tad[i]=new ArrayList<>();", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "ad[i]=new ArrayList<>();", "ad[i]=new ArrayList<>()", "ad[i]", "ad", "i", "new ArrayList<>()", "for(int i=1;i<n;i++)\n\t\t\tad[sc.nextInt()-1].add(i);", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "ad[sc.nextInt()-1].add(i);", "ad[sc.nextInt()-1].add(i)", "ad[sc.nextInt()-1].add", "ad[sc.nextInt()-1]", "ad", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "i", "for(int i=0;i<n;i++)\n\t\t\tSystem.out.println(ad[i].size());", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "System.out.println(ad[i].size());", "System.out.println(ad[i].size())", "System.out.println", "System.out", "System", "System.out", "ad[i].size()", "ad[i].size", "ad[i]", "ad", "i", "out.flush()", "out.flush", "out", "String[] args", "args", "static class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\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[] nextArrLong(int n) throws IOException {\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}", "Scanner", "StringTokenizer st;", "st", "BufferedReader br;", "br", "public Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}", "Scanner", "{\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}", "br = new BufferedReader(new InputStreamReader(system))", "br", "new BufferedReader(new InputStreamReader(system))", "InputStream system", "system", "public Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}", "Scanner", "{\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}", "br = new BufferedReader(new FileReader(file))", "br", "new BufferedReader(new FileReader(file))", "String file", "file", "public String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}", "next", "{\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}", "while (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "public String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}", "nextLine", "{\n\t\t\treturn br.readLine();\n\t\t}", "return br.readLine();", "br.readLine()", "br.readLine", "br", "public int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "nextInt", "{\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}", "nextDouble", "{\n\t\t\treturn Double.parseDouble(next());\n\t\t}", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}", "nextChar", "{\n\t\t\treturn next().charAt(0);\n\t\t}", "return next().charAt(0);", "next().charAt(0)", "next().charAt", "next()", "next", "0", "public Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}", "nextLong", "{\n\t\t\treturn Long.parseLong(next());\n\t\t}", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public int[] nextArrInt(int n) throws IOException {\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}", "nextArrInt", "{\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[] nextArrLong(int n) throws IOException {\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}", "nextArrLong", "{\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}", "ready", "{\n\t\t\treturn br.ready();\n\t\t}", "return br.ready();", "br.ready()", "br.ready", "br", "public void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}", "waitForInput", "{\n\t\t\tThread.sleep(3000);\n\t\t}", "Thread.sleep(3000)", "Thread.sleep", "Thread", "3000", "public class Main {\n\tstatic PrintWriter out;\n\tstatic StringBuilder sb;\n\tstatic int n, k;\n\tstatic long mod = 1000000007;\n\tstatic int[][] memo;\n\tstatic String s;\n\tstatic HashSet<Integer> nodes;\n\tstatic ArrayList<Integer>[] ad, tree;\n\tstatic boolean[] vis, taken;\n\tstatic int[] a;\n\tstatic TreeSet<Long> al;\n\tstatic long[] val;\n\tstatic ArrayList<String> aa;\n\tstatic char[] b;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tad=new ArrayList[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tad[i]=new ArrayList<>();\n\t\tfor(int i=1;i<n;i++)\n\t\t\tad[sc.nextInt()-1].add(i);\n\t\tfor(int i=0;i<n;i++)\n\t\t\tSystem.out.println(ad[i].size());\n\t\tout.flush();\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\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[] nextArrLong(int n) throws IOException {\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n}", "public class Main {\n\tstatic PrintWriter out;\n\tstatic StringBuilder sb;\n\tstatic int n, k;\n\tstatic long mod = 1000000007;\n\tstatic int[][] memo;\n\tstatic String s;\n\tstatic HashSet<Integer> nodes;\n\tstatic ArrayList<Integer>[] ad, tree;\n\tstatic boolean[] vis, taken;\n\tstatic int[] a;\n\tstatic TreeSet<Long> al;\n\tstatic long[] val;\n\tstatic ArrayList<String> aa;\n\tstatic char[] b;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tout = new PrintWriter(System.out);\n\t\tint n=sc.nextInt();\n\t\tad=new ArrayList[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t\tad[i]=new ArrayList<>();\n\t\tfor(int i=1;i<n;i++)\n\t\t\tad[sc.nextInt()-1].add(i);\n\t\tfor(int i=0;i<n;i++)\n\t\t\tSystem.out.println(ad[i].size());\n\t\tout.flush();\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n\n\t\tpublic Scanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n\n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n\n\t\tpublic Long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tpublic int[] nextArrInt(int n) throws IOException {\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[] nextArrLong(int n) throws IOException {\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n}", "Main" ]
import java.io.*; import java.math.BigInteger; import java.util.*; public class Main { static PrintWriter out; static StringBuilder sb; static int n, k; static long mod = 1000000007; static int[][] memo; static String s; static HashSet<Integer> nodes; static ArrayList<Integer>[] ad, tree; static boolean[] vis, taken; static int[] a; static TreeSet<Long> al; static long[] val; static ArrayList<String> aa; static char[] b; public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); out = new PrintWriter(System.out); int n=sc.nextInt(); ad=new ArrayList[n]; for(int i=0;i<n;i++) ad[i]=new ArrayList<>(); for(int i=1;i<n;i++) ad[sc.nextInt()-1].add(i); for(int i=0;i<n;i++) System.out.println(ad[i].size()); out.flush(); } static class Scanner { StringTokenizer st; BufferedReader br; public Scanner(InputStream system) { br = new BufferedReader(new InputStreamReader(system)); } public Scanner(String file) throws Exception { br = new BufferedReader(new FileReader(file)); } public String next() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); return st.nextToken(); } public String nextLine() throws IOException { return br.readLine(); } public int nextInt() throws IOException { return Integer.parseInt(next()); } public double nextDouble() throws IOException { return Double.parseDouble(next()); } public char nextChar() throws IOException { return next().charAt(0); } public Long nextLong() throws IOException { return Long.parseLong(next()); } public int[] nextArrInt(int n) throws IOException { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = nextInt(); return a; } public long[] nextArrLong(int n) throws IOException { long[] a = new long[n]; for (int i = 0; i < n; i++) a[i] = nextLong(); return a; } public boolean ready() throws IOException { return br.ready(); } public void waitForInput() throws InterruptedException { Thread.sleep(3000); } } }
[ 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, 20, 2, 13, 17, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 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 ], [ 86, 8 ], [ 86, 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 ], [ 26, 27 ], [ 26, 28 ], [ 11, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 29, 33 ], [ 11, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 52, 53 ], [ 53, 54 ], [ 46, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 11, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 60, 70 ], [ 70, 71 ], [ 71, 72 ], [ 60, 73 ], [ 74, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 9, 83 ], [ 83, 84 ], [ 0, 85 ], [ 85, 86 ], [ 85, 87 ] ]
[ "import java.util.*;\nimport java.io.PrintWriter;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// N人の社員,配列を0(=まずは上司なし)初期化\n\t\tint N = Integer.parseInt(sc.next());\n Integer syain[] = new Integer[N+1];\n Arrays.fill(syain, 0);\n\n // 社員の上司IDに +1 していく\n for (int i=2; i<=N; i++) {\n int joushi = Integer.parseInt(sc.next());\n syain[joushi] += 1;\n }\n\n // 直属の部下の人数を出力\n for(int i=1; i<syain.length; i++) {\n System.out.println( syain[i]);\n }\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.io.PrintWriter;", "PrintWriter", "java.io", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// N人の社員,配列を0(=まずは上司なし)初期化\n\t\tint N = Integer.parseInt(sc.next());\n Integer syain[] = new Integer[N+1];\n Arrays.fill(syain, 0);\n\n // 社員の上司IDに +1 していく\n for (int i=2; i<=N; i++) {\n int joushi = Integer.parseInt(sc.next());\n syain[joushi] += 1;\n }\n\n // 直属の部下の人数を出力\n for(int i=1; i<syain.length; i++) {\n System.out.println( syain[i]);\n }\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// N人の社員,配列を0(=まずは上司なし)初期化\n\t\tint N = Integer.parseInt(sc.next());\n Integer syain[] = new Integer[N+1];\n Arrays.fill(syain, 0);\n\n // 社員の上司IDに +1 していく\n for (int i=2; i<=N; i++) {\n int joushi = Integer.parseInt(sc.next());\n syain[joushi] += 1;\n }\n\n // 直属の部下の人数を出力\n for(int i=1; i<syain.length; i++) {\n System.out.println( syain[i]);\n }\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t// N人の社員,配列を0(=まずは上司なし)初期化\n\t\tint N = Integer.parseInt(sc.next());\n Integer syain[] = new Integer[N+1];\n Arrays.fill(syain, 0);\n\n // 社員の上司IDに +1 していく\n for (int i=2; i<=N; i++) {\n int joushi = Integer.parseInt(sc.next());\n syain[joushi] += 1;\n }\n\n // 直属の部下の人数を出力\n for(int i=1; i<syain.length; i++) {\n System.out.println( syain[i]);\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", "Integer syain[] = new Integer[N+1];", "syain", "new Integer[N+1]", "N+1", "N", "1", "Arrays.fill(syain, 0)", "Arrays.fill", "Arrays", "syain", "0", "for (int i=2; i<=N; i++) {\n int joushi = Integer.parseInt(sc.next());\n syain[joushi] += 1;\n }", "int i=2;", "int i=2;", "i", "2", "i<=N", "i", "N", "i++", "i++", "i", "{\n int joushi = Integer.parseInt(sc.next());\n syain[joushi] += 1;\n }", "{\n int joushi = Integer.parseInt(sc.next());\n syain[joushi] += 1;\n }", "int joushi = Integer.parseInt(sc.next());", "joushi", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "syain[joushi] += 1", "syain[joushi]", "syain", "joushi", "1", "for(int i=1; i<syain.length; i++) {\n System.out.println( syain[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<syain.length", "i", "syain.length", "syain", "syain.length", "i++", "i++", "i", "{\n System.out.println( syain[i]);\n }", "{\n System.out.println( syain[i]);\n }", "System.out.println( syain[i])", "System.out.println", "System.out", "System", "System.out", "syain[i]", "syain", "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人の社員,配列を0(=まずは上司なし)初期化\n\t\tint N = Integer.parseInt(sc.next());\n Integer syain[] = new Integer[N+1];\n Arrays.fill(syain, 0);\n\n // 社員の上司IDに +1 していく\n for (int i=2; i<=N; i++) {\n int joushi = Integer.parseInt(sc.next());\n syain[joushi] += 1;\n }\n\n // 直属の部下の人数を出力\n for(int i=1; i<syain.length; i++) {\n System.out.println( syain[i]);\n }\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// N人の社員,配列を0(=まずは上司なし)初期化\n\t\tint N = Integer.parseInt(sc.next());\n Integer syain[] = new Integer[N+1];\n Arrays.fill(syain, 0);\n\n // 社員の上司IDに +1 していく\n for (int i=2; i<=N; i++) {\n int joushi = Integer.parseInt(sc.next());\n syain[joushi] += 1;\n }\n\n // 直属の部下の人数を出力\n for(int i=1; i<syain.length; i++) {\n System.out.println( syain[i]);\n }\n\t}\n}", "Main" ]
import java.util.*; import java.io.PrintWriter; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // N人の社員,配列を0(=まずは上司なし)初期化 int N = Integer.parseInt(sc.next()); Integer syain[] = new Integer[N+1]; Arrays.fill(syain, 0); // 社員の上司IDに +1 していく for (int i=2; i<=N; i++) { int joushi = Integer.parseInt(sc.next()); syain[joushi] += 1; } // 直属の部下の人数を出力 for(int i=1; i<syain.length; i++) { System.out.println( syain[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, 13, 1, 40, 13, 30, 30, 0, 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, 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 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 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 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 36, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 42, 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 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 6, 70 ], [ 70, 71 ], [ 0, 72 ], [ 72, 73 ], [ 72, 74 ] ]
[ "import java.util.*;\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int[] arr = new int[N];\n int tmp = 0;\n for(int i = 1; i < N; i++) {\n tmp = sc.nextInt();\n arr[tmp - 1] += 1;\n }\n for(int j = 0; j < N; j++) {\n System.out.println(arr[j]);\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\n int N = sc.nextInt();\n int[] arr = new int[N];\n int tmp = 0;\n for(int i = 1; i < N; i++) {\n tmp = sc.nextInt();\n arr[tmp - 1] += 1;\n }\n for(int j = 0; j < N; j++) {\n System.out.println(arr[j]);\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[] arr = new int[N];\n int tmp = 0;\n for(int i = 1; i < N; i++) {\n tmp = sc.nextInt();\n arr[tmp - 1] += 1;\n }\n for(int j = 0; j < N; j++) {\n System.out.println(arr[j]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int[] arr = new int[N];\n int tmp = 0;\n for(int i = 1; i < N; i++) {\n tmp = sc.nextInt();\n arr[tmp - 1] += 1;\n }\n for(int j = 0; j < N; j++) {\n System.out.println(arr[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[] arr = new int[N];", "arr", "new int[N]", "N", "int tmp = 0;", "tmp", "0", "for(int i = 1; i < N; i++) {\n tmp = sc.nextInt();\n arr[tmp - 1] += 1;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n tmp = sc.nextInt();\n arr[tmp - 1] += 1;\n }", "{\n tmp = sc.nextInt();\n arr[tmp - 1] += 1;\n }", "tmp = sc.nextInt()", "tmp", "sc.nextInt()", "sc.nextInt", "sc", "arr[tmp - 1] += 1", "arr[tmp - 1]", "arr", "tmp - 1", "tmp", "1", "1", "for(int j = 0; j < N; j++) {\n System.out.println(arr[j]);\n }", "int j = 0;", "int j = 0;", "j", "0", "j < N", "j", "N", "j++", "j++", "j", "{\n System.out.println(arr[j]);\n }", "{\n System.out.println(arr[j]);\n }", "System.out.println(arr[j])", "System.out.println", "System.out", "System", "System.out", "arr[j]", "arr", "j", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int[] arr = new int[N];\n int tmp = 0;\n for(int i = 1; i < N; i++) {\n tmp = sc.nextInt();\n arr[tmp - 1] += 1;\n }\n for(int j = 0; j < N; j++) {\n System.out.println(arr[j]);\n }\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n int[] arr = new int[N];\n int tmp = 0;\n for(int i = 1; i < N; i++) {\n tmp = sc.nextInt();\n arr[tmp - 1] += 1;\n }\n for(int j = 0; j < N; j++) {\n System.out.println(arr[j]);\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[] arr = new int[N]; int tmp = 0; for(int i = 1; i < N; i++) { tmp = sc.nextInt(); arr[tmp - 1] += 1; } for(int j = 0; j < N; j++) { System.out.println(arr[j]); } } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 13, 13, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 101, 8 ], [ 101, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 11, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 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 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 76, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 76, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 9, 98 ], [ 98, 99 ], [ 0, 100 ], [ 100, 101 ], [ 100, 102 ] ]
[ "import java.util.HashMap;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer>map = new HashMap<Integer, Integer>();\n\n\t\tfor (int i=1; i<n; i++){\n\t\t\tint a = sc.nextInt();\n\t\t\tif (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=1; i<=n; i++){\n\t\t\tif (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}\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\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer>map = new HashMap<Integer, Integer>();\n\n\t\tfor (int i=1; i<n; i++){\n\t\t\tint a = sc.nextInt();\n\t\t\tif (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=1; i<=n; i++){\n\t\t\tif (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer>map = new HashMap<Integer, Integer>();\n\n\t\tfor (int i=1; i<n; i++){\n\t\t\tint a = sc.nextInt();\n\t\t\tif (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=1; i<=n; i++){\n\t\t\tif (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}\n\t\t}\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer>map = new HashMap<Integer, Integer>();\n\n\t\tfor (int i=1; i<n; i++){\n\t\t\tint a = sc.nextInt();\n\t\t\tif (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=1; i<=n; i++){\n\t\t\tif (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}\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<Integer, Integer>();", "map", "new HashMap<Integer, Integer>()", "for (int i=1; i<n; i++){\n\t\t\tint a = sc.nextInt();\n\t\t\tif (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 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 a = sc.nextInt();\n\t\t\tif (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}", "{\n\t\t\tint a = sc.nextInt();\n\t\t\tif (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "if (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}", "map.containsKey(a)", "map.containsKey", "map", "a", "{\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t}", "map.put(a, map.get(a)+1)", "map.put", "map", "a", "map.get(a)+1", "map.get(a)", "map.get", "map", "a", "1", "{\n\t\t\t\tmap.put(a, 1);\n\t\t\t}", "map.put(a, 1)", "map.put", "map", "a", "1", "for (int i=1; i<=n; i++){\n\t\t\tif (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\tif (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}\n\t\t}", "{\n\t\t\tif (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}\n\t\t}", "if (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}", "map.containsKey(i)", "map.containsKey", "map", "i", "{\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", "{\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\"", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer>map = new HashMap<Integer, Integer>();\n\n\t\tfor (int i=1; i<n; i++){\n\t\t\tint a = sc.nextInt();\n\t\t\tif (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=1; i<=n; i++){\n\t\t\tif (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tHashMap<Integer, Integer>map = new HashMap<Integer, Integer>();\n\n\t\tfor (int i=1; i<n; i++){\n\t\t\tint a = sc.nextInt();\n\t\t\tif (map.containsKey(a)){\n\t\t\t\tmap.put(a, map.get(a)+1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\n\t\tfor (int i=1; i<=n; i++){\n\t\t\tif (map.containsKey(i)){\n\t\t\t\tSystem.out.println(map.get(i));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"0\");\n\t\t\t}\n\t\t}\n\t}\n}", "Main" ]
import java.util.HashMap; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); HashMap<Integer, Integer>map = new HashMap<Integer, Integer>(); for (int i=1; i<n; i++){ int a = sc.nextInt(); if (map.containsKey(a)){ map.put(a, map.get(a)+1); } else { map.put(a, 1); } } for (int i=1; i<=n; i++){ if (map.containsKey(i)){ System.out.println(map.get(i)); } else { System.out.println("0"); } } } }
[ 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, 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, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 78, 20 ], [ 78, 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 ], [ 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 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 59, 63 ], [ 23, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 21, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ] ]
[ "import java.util.Arrays;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Scanner;\nimport java.util.function.Function;\nimport java.util.stream.Collectors;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n int[] boss = new int[numberOfPerson];\n for (int i = 0; i < boss.length - 1; i++){\n boss[scanner.nextInt() - 1]++;\n }\n for (int i : boss){\n System.out.println(i);\n }\n\n /*\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n List<String> boss = Arrays.asList(scanner.nextLine().split(\" \"));\n Map<String, Integer> map = boss.stream().collect(\n Collectors.groupingBy(\n Function.identity(),\n Collectors.summingInt(s -> 1)\n )\n );\n for (int i = 1; i < numberOfPerson + 1; i++){\n if (map.containsKey(String.valueOf(i))) {\n System.out.println(map.get(String.valueOf(i)));\n }else {\n System.out.println(0);\n }\n }\n\n\n\n int[] array = new int[10];\n for (int i = 0; i < array.length; i++){\n System.out.println(array[i]);\n }\n\n */\n }\n}", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.function.Function;", "Function", "java.util.function", "import java.util.stream.Collectors;", "Collectors", "java.util.stream", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n int[] boss = new int[numberOfPerson];\n for (int i = 0; i < boss.length - 1; i++){\n boss[scanner.nextInt() - 1]++;\n }\n for (int i : boss){\n System.out.println(i);\n }\n\n /*\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n List<String> boss = Arrays.asList(scanner.nextLine().split(\" \"));\n Map<String, Integer> map = boss.stream().collect(\n Collectors.groupingBy(\n Function.identity(),\n Collectors.summingInt(s -> 1)\n )\n );\n for (int i = 1; i < numberOfPerson + 1; i++){\n if (map.containsKey(String.valueOf(i))) {\n System.out.println(map.get(String.valueOf(i)));\n }else {\n System.out.println(0);\n }\n }\n\n\n\n int[] array = new int[10];\n for (int i = 0; i < array.length; i++){\n System.out.println(array[i]);\n }\n\n */\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n int[] boss = new int[numberOfPerson];\n for (int i = 0; i < boss.length - 1; i++){\n boss[scanner.nextInt() - 1]++;\n }\n for (int i : boss){\n System.out.println(i);\n }\n\n /*\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n List<String> boss = Arrays.asList(scanner.nextLine().split(\" \"));\n Map<String, Integer> map = boss.stream().collect(\n Collectors.groupingBy(\n Function.identity(),\n Collectors.summingInt(s -> 1)\n )\n );\n for (int i = 1; i < numberOfPerson + 1; i++){\n if (map.containsKey(String.valueOf(i))) {\n System.out.println(map.get(String.valueOf(i)));\n }else {\n System.out.println(0);\n }\n }\n\n\n\n int[] array = new int[10];\n for (int i = 0; i < array.length; i++){\n System.out.println(array[i]);\n }\n\n */\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n int[] boss = new int[numberOfPerson];\n for (int i = 0; i < boss.length - 1; i++){\n boss[scanner.nextInt() - 1]++;\n }\n for (int i : boss){\n System.out.println(i);\n }\n\n /*\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n List<String> boss = Arrays.asList(scanner.nextLine().split(\" \"));\n Map<String, Integer> map = boss.stream().collect(\n Collectors.groupingBy(\n Function.identity(),\n Collectors.summingInt(s -> 1)\n )\n );\n for (int i = 1; i < numberOfPerson + 1; i++){\n if (map.containsKey(String.valueOf(i))) {\n System.out.println(map.get(String.valueOf(i)));\n }else {\n System.out.println(0);\n }\n }\n\n\n\n int[] array = new int[10];\n for (int i = 0; i < array.length; i++){\n System.out.println(array[i]);\n }\n\n */\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int numberOfPerson = Integer.parseInt(scanner.nextLine());", "numberOfPerson", "Integer.parseInt(scanner.nextLine())", "Integer.parseInt", "Integer", "scanner.nextLine()", "scanner.nextLine", "scanner", "int[] boss = new int[numberOfPerson];", "boss", "new int[numberOfPerson]", "numberOfPerson", "for (int i = 0; i < boss.length - 1; i++){\n boss[scanner.nextInt() - 1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < boss.length - 1", "i", "boss.length - 1", "boss.length", "boss", "boss.length", "1", "i++", "i++", "i", "{\n boss[scanner.nextInt() - 1]++;\n }", "{\n boss[scanner.nextInt() - 1]++;\n }", "boss[scanner.nextInt() - 1]++", "boss[scanner.nextInt() - 1]", "boss", "scanner.nextInt() - 1", "scanner.nextInt()", "scanner.nextInt", "scanner", "1", "for (int i : boss){\n System.out.println(i);\n }", "int i", "boss", "{\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 Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n int[] boss = new int[numberOfPerson];\n for (int i = 0; i < boss.length - 1; i++){\n boss[scanner.nextInt() - 1]++;\n }\n for (int i : boss){\n System.out.println(i);\n }\n\n /*\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n List<String> boss = Arrays.asList(scanner.nextLine().split(\" \"));\n Map<String, Integer> map = boss.stream().collect(\n Collectors.groupingBy(\n Function.identity(),\n Collectors.summingInt(s -> 1)\n )\n );\n for (int i = 1; i < numberOfPerson + 1; i++){\n if (map.containsKey(String.valueOf(i))) {\n System.out.println(map.get(String.valueOf(i)));\n }else {\n System.out.println(0);\n }\n }\n\n\n\n int[] array = new int[10];\n for (int i = 0; i < array.length; i++){\n System.out.println(array[i]);\n }\n\n */\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n int[] boss = new int[numberOfPerson];\n for (int i = 0; i < boss.length - 1; i++){\n boss[scanner.nextInt() - 1]++;\n }\n for (int i : boss){\n System.out.println(i);\n }\n\n /*\n Scanner scanner = new Scanner(System.in);\n int numberOfPerson = Integer.parseInt(scanner.nextLine());\n List<String> boss = Arrays.asList(scanner.nextLine().split(\" \"));\n Map<String, Integer> map = boss.stream().collect(\n Collectors.groupingBy(\n Function.identity(),\n Collectors.summingInt(s -> 1)\n )\n );\n for (int i = 1; i < numberOfPerson + 1; i++){\n if (map.containsKey(String.valueOf(i))) {\n System.out.println(map.get(String.valueOf(i)));\n }else {\n System.out.println(0);\n }\n }\n\n\n\n int[] array = new int[10];\n for (int i = 0; i < array.length; i++){\n System.out.println(array[i]);\n }\n\n */\n }\n}", "Main" ]
import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Scanner; import java.util.function.Function; import java.util.stream.Collectors; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int numberOfPerson = Integer.parseInt(scanner.nextLine()); int[] boss = new int[numberOfPerson]; for (int i = 0; i < boss.length - 1; i++){ boss[scanner.nextInt() - 1]++; } for (int i : boss){ System.out.println(i); } /* Scanner scanner = new Scanner(System.in); int numberOfPerson = Integer.parseInt(scanner.nextLine()); List<String> boss = Arrays.asList(scanner.nextLine().split(" ")); Map<String, Integer> map = boss.stream().collect( Collectors.groupingBy( Function.identity(), Collectors.summingInt(s -> 1) ) ); for (int i = 1; i < numberOfPerson + 1; i++){ if (map.containsKey(String.valueOf(i))) { System.out.println(map.get(String.valueOf(i))); }else { System.out.println(0); } } int[] array = new int[10]; for (int i = 0; i < array.length; i++){ System.out.println(array[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, 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, 0, 18, 13, 13, 17, 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 ]
[ [ 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 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 8, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 52, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 8, 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 ], [ 73, 75 ], [ 75, 76 ], [ 75, 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 ] ]
[ "import java.util.Scanner;\nclass Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n \n int n = scan.nextInt();\n int sup[] = new int[n+1];\n int ans[] = new int[n+1];\n ans[1] = 0;\n for(int i = 2; i<=n; i++){ //初期化\n sup[i] = scan.nextInt();\n ans[i] = 0;\n }\n for(int i = 2; i<= n; i++){\n ans[sup[i]]++;\n }\n for(int i = 1; i<= n; i++){\n System.out.println(ans[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n \n int n = scan.nextInt();\n int sup[] = new int[n+1];\n int ans[] = new int[n+1];\n ans[1] = 0;\n for(int i = 2; i<=n; i++){ //初期化\n sup[i] = scan.nextInt();\n ans[i] = 0;\n }\n for(int i = 2; i<= n; i++){\n ans[sup[i]]++;\n }\n for(int i = 1; i<= n; i++){\n System.out.println(ans[i]);\n }\n }\n}", "Main", "public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n \n int n = scan.nextInt();\n int sup[] = new int[n+1];\n int ans[] = new int[n+1];\n ans[1] = 0;\n for(int i = 2; i<=n; i++){ //初期化\n sup[i] = scan.nextInt();\n ans[i] = 0;\n }\n for(int i = 2; i<= n; i++){\n ans[sup[i]]++;\n }\n for(int i = 1; i<= n; i++){\n System.out.println(ans[i]);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n \n int n = scan.nextInt();\n int sup[] = new int[n+1];\n int ans[] = new int[n+1];\n ans[1] = 0;\n for(int i = 2; i<=n; i++){ //初期化\n sup[i] = scan.nextInt();\n ans[i] = 0;\n }\n for(int i = 2; i<= n; i++){\n ans[sup[i]]++;\n }\n for(int i = 1; i<= n; i++){\n System.out.println(ans[i]);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int sup[] = new int[n+1];", "sup", "new int[n+1]", "n+1", "n", "1", "int ans[] = new int[n+1];", "ans", "new int[n+1]", "n+1", "n", "1", "ans[1] = 0", "ans[1]", "ans", "1", "0", "for(int i = 2; i<=n; i++){ //初期化\n sup[i] = scan.nextInt();\n ans[i] = 0;\n }", "int i = 2;", "int i = 2;", "i", "2", "i<=n", "i", "n", "i++", "i++", "i", "{ //初期化\n sup[i] = scan.nextInt();\n ans[i] = 0;\n }", "{ //初期化\n sup[i] = scan.nextInt();\n ans[i] = 0;\n }", "sup[i] = scan.nextInt()", "sup[i]", "sup", "i", "scan.nextInt()", "scan.nextInt", "scan", "ans[i] = 0", "ans[i]", "ans", "i", "0", "for(int i = 2; i<= n; i++){\n ans[sup[i]]++;\n }", "int i = 2;", "int i = 2;", "i", "2", "i<= n", "i", "n", "i++", "i++", "i", "{\n ans[sup[i]]++;\n }", "{\n ans[sup[i]]++;\n }", "ans[sup[i]]++", "ans[sup[i]]", "ans", "sup[i]", "sup", "i", "for(int i = 1; i<= n; i++){\n System.out.println(ans[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "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.Scanner; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int sup[] = new int[n+1]; int ans[] = new int[n+1]; ans[1] = 0; for(int i = 2; i<=n; i++){ //初期化 sup[i] = scan.nextInt(); ans[i] = 0; } for(int i = 2; i<= n; i++){ ans[sup[i]]++; } for(int i = 1; i<= n; i++){ System.out.println(ans[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, 4, 18, 13, 41, 13, 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, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 18, 13, 13, 17, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 124, 11 ], [ 124, 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 ], [ 14, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 14, 37 ], [ 37, 38 ], [ 37, 39 ], [ 40, 41 ], [ 40, 42 ], [ 14, 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 ], [ 62, 65 ], [ 65, 66 ], [ 65, 67 ], [ 14, 68 ], [ 68, 69 ], [ 68, 70 ], [ 14, 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 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 14, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 105, 107 ], [ 98, 108 ], [ 108, 109 ], [ 109, 110 ], [ 98, 111 ], [ 112, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 118, 119 ], [ 118, 120 ], [ 12, 121 ], [ 121, 122 ], [ 0, 123 ], [ 123, 124 ], [ 123, 125 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\n public static void main(String[] args) throws IOException {\n // write your code here\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(reader.readLine());\n String s = reader.readLine();\n String[] inp = s.split(\" \");\n\n int[] arr = new int[n-1];\n\n for (int i = 0; i < inp.length; i++) {\n arr[i]=Integer.parseInt(inp[i]);\n }\n\n int[] countarr = new int[n];\n\n for (int i = 0; i < arr.length; i++) {\n //System.out.print(i+\" \");\n int val = arr[i]-1 ;\n //System.out.println(val);\n countarr[val]++;\n }\n\n for (int i = 0; i <countarr.length ; i++) {\n System.out.println(countarr[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", "public class Main{\n\n public static void main(String[] args) throws IOException {\n // write your code here\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(reader.readLine());\n String s = reader.readLine();\n String[] inp = s.split(\" \");\n\n int[] arr = new int[n-1];\n\n for (int i = 0; i < inp.length; i++) {\n arr[i]=Integer.parseInt(inp[i]);\n }\n\n int[] countarr = new int[n];\n\n for (int i = 0; i < arr.length; i++) {\n //System.out.print(i+\" \");\n int val = arr[i]-1 ;\n //System.out.println(val);\n countarr[val]++;\n }\n\n for (int i = 0; i <countarr.length ; i++) {\n System.out.println(countarr[i]);\n }\n\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n // write your code here\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(reader.readLine());\n String s = reader.readLine();\n String[] inp = s.split(\" \");\n\n int[] arr = new int[n-1];\n\n for (int i = 0; i < inp.length; i++) {\n arr[i]=Integer.parseInt(inp[i]);\n }\n\n int[] countarr = new int[n];\n\n for (int i = 0; i < arr.length; i++) {\n //System.out.print(i+\" \");\n int val = arr[i]-1 ;\n //System.out.println(val);\n countarr[val]++;\n }\n\n for (int i = 0; i <countarr.length ; i++) {\n System.out.println(countarr[i]);\n }\n\n }", "main", "{\n // write your code here\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(reader.readLine());\n String s = reader.readLine();\n String[] inp = s.split(\" \");\n\n int[] arr = new int[n-1];\n\n for (int i = 0; i < inp.length; i++) {\n arr[i]=Integer.parseInt(inp[i]);\n }\n\n int[] countarr = new int[n];\n\n for (int i = 0; i < arr.length; i++) {\n //System.out.print(i+\" \");\n int val = arr[i]-1 ;\n //System.out.println(val);\n countarr[val]++;\n }\n\n for (int i = 0; i <countarr.length ; i++) {\n System.out.println(countarr[i]);\n }\n\n }", "BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "int n = Integer.parseInt(reader.readLine());", "n", "Integer.parseInt(reader.readLine())", "Integer.parseInt", "Integer", "reader.readLine()", "reader.readLine", "reader", "String s = reader.readLine();", "s", "reader.readLine()", "reader.readLine", "reader", "String[] inp = s.split(\" \");", "inp", "s.split(\" \")", "s.split", "s", "\" \"", "int[] arr = new int[n-1];", "arr", "new int[n-1]", "n-1", "n", "1", "for (int i = 0; i < inp.length; i++) {\n arr[i]=Integer.parseInt(inp[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < inp.length", "i", "inp.length", "inp", "inp.length", "i++", "i++", "i", "{\n arr[i]=Integer.parseInt(inp[i]);\n }", "{\n arr[i]=Integer.parseInt(inp[i]);\n }", "arr[i]=Integer.parseInt(inp[i])", "arr[i]", "arr", "i", "Integer.parseInt(inp[i])", "Integer.parseInt", "Integer", "inp[i]", "inp", "i", "int[] countarr = new int[n];", "countarr", "new int[n]", "n", "for (int i = 0; i < arr.length; i++) {\n //System.out.print(i+\" \");\n int val = arr[i]-1 ;\n //System.out.println(val);\n countarr[val]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < arr.length", "i", "arr.length", "arr", "arr.length", "i++", "i++", "i", "{\n //System.out.print(i+\" \");\n int val = arr[i]-1 ;\n //System.out.println(val);\n countarr[val]++;\n }", "{\n //System.out.print(i+\" \");\n int val = arr[i]-1 ;\n //System.out.println(val);\n countarr[val]++;\n }", "int val = arr[i]-1 ;", "val", "arr[i]-1", "arr[i]", "arr", "i", "1", "countarr[val]++", "countarr[val]", "countarr", "val", "for (int i = 0; i <countarr.length ; i++) {\n System.out.println(countarr[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i <countarr.length", "i", "countarr.length", "countarr", "countarr.length", "i++", "i++", "i", "{\n System.out.println(countarr[i]);\n }", "{\n System.out.println(countarr[i]);\n }", "System.out.println(countarr[i])", "System.out.println", "System.out", "System", "System.out", "countarr[i]", "countarr", "i", "String[] args", "args", "public class Main{\n\n public static void main(String[] args) throws IOException {\n // write your code here\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(reader.readLine());\n String s = reader.readLine();\n String[] inp = s.split(\" \");\n\n int[] arr = new int[n-1];\n\n for (int i = 0; i < inp.length; i++) {\n arr[i]=Integer.parseInt(inp[i]);\n }\n\n int[] countarr = new int[n];\n\n for (int i = 0; i < arr.length; i++) {\n //System.out.print(i+\" \");\n int val = arr[i]-1 ;\n //System.out.println(val);\n countarr[val]++;\n }\n\n for (int i = 0; i <countarr.length ; i++) {\n System.out.println(countarr[i]);\n }\n\n }\n}", "public class Main{\n\n public static void main(String[] args) throws IOException {\n // write your code here\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(reader.readLine());\n String s = reader.readLine();\n String[] inp = s.split(\" \");\n\n int[] arr = new int[n-1];\n\n for (int i = 0; i < inp.length; i++) {\n arr[i]=Integer.parseInt(inp[i]);\n }\n\n int[] countarr = new int[n];\n\n for (int i = 0; i < arr.length; i++) {\n //System.out.print(i+\" \");\n int val = arr[i]-1 ;\n //System.out.println(val);\n countarr[val]++;\n }\n\n for (int i = 0; i <countarr.length ; i++) {\n System.out.println(countarr[i]);\n }\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 { // write your code here BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(reader.readLine()); String s = reader.readLine(); String[] inp = s.split(" "); int[] arr = new int[n-1]; for (int i = 0; i < inp.length; i++) { arr[i]=Integer.parseInt(inp[i]); } int[] countarr = new int[n]; for (int i = 0; i < arr.length; i++) { //System.out.print(i+" "); int val = arr[i]-1 ; //System.out.println(val); countarr[val]++; } for (int i = 0; i <countarr.length ; i++) { System.out.println(countarr[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, 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 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 64, 8 ], [ 64, 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 ], [ 11, 50 ], [ 50, 51 ], [ 50, 52 ], [ 50, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 9, 61 ], [ 61, 62 ], [ 0, 63 ], [ 63, 64 ], [ 63, 65 ] ]
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n Integer N = input.nextInt();\n Integer[] org = new Integer[N];\n Arrays.fill(org, 0);\n for (int i = 1; i < N; i++) {\n org[input.nextInt()-1]++;\n }\n for (int num : org) {\n System.out.println(num);\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 input = new Scanner(System.in);\n Integer N = input.nextInt();\n Integer[] org = new Integer[N];\n Arrays.fill(org, 0);\n for (int i = 1; i < N; i++) {\n org[input.nextInt()-1]++;\n }\n for (int num : org) {\n System.out.println(num);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n Integer N = input.nextInt();\n Integer[] org = new Integer[N];\n Arrays.fill(org, 0);\n for (int i = 1; i < N; i++) {\n org[input.nextInt()-1]++;\n }\n for (int num : org) {\n System.out.println(num);\n }\n }", "main", "{\n Scanner input = new Scanner(System.in);\n Integer N = input.nextInt();\n Integer[] org = new Integer[N];\n Arrays.fill(org, 0);\n for (int i = 1; i < N; i++) {\n org[input.nextInt()-1]++;\n }\n for (int num : org) {\n System.out.println(num);\n }\n }", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "Integer N = input.nextInt();", "N", "input.nextInt()", "input.nextInt", "input", "Integer[] org = new Integer[N];", "org", "new Integer[N]", "N", "Arrays.fill(org, 0)", "Arrays.fill", "Arrays", "org", "0", "for (int i = 1; i < N; i++) {\n org[input.nextInt()-1]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n org[input.nextInt()-1]++;\n }", "{\n org[input.nextInt()-1]++;\n }", "org[input.nextInt()-1]++", "org[input.nextInt()-1]", "org", "input.nextInt()-1", "input.nextInt()", "input.nextInt", "input", "1", "for (int num : org) {\n System.out.println(num);\n }", "int num", "org", "{\n System.out.println(num);\n }", "{\n System.out.println(num);\n }", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n Integer N = input.nextInt();\n Integer[] org = new Integer[N];\n Arrays.fill(org, 0);\n for (int i = 1; i < N; i++) {\n org[input.nextInt()-1]++;\n }\n for (int num : org) {\n System.out.println(num);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n Integer N = input.nextInt();\n Integer[] org = new Integer[N];\n Arrays.fill(org, 0);\n for (int i = 1; i < N; i++) {\n org[input.nextInt()-1]++;\n }\n for (int num : org) {\n System.out.println(num);\n }\n }\n}", "Main" ]
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); Integer N = input.nextInt(); Integer[] org = new Integer[N]; Arrays.fill(org, 0); for (int i = 1; i < N; i++) { org[input.nextInt()-1]++; } for (int num : org) { System.out.println(num); } } }
[ 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, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 4, 13, 41, 13, 20, 13, 0, 18, 13, 17, 40, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 4, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 18, 13, 13, 28, 13, 13, 30, 4, 18, 13, 2, 13, 17, 4, 18, 13, 12, 13, 30, 0, 13, 8, 4, 18, 13, 18, 13, 13, 20, 0, 13, 20, 41, 13, 4, 18, 13, 4, 13, 4, 18, 13, 14, 40, 4, 18, 13, 4, 13, 2, 2, 4, 18, 13, 13, 17, 12, 13, 30, 4, 18, 20, 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, 29, 40, 2, 2, 13, 17, 2, 13, 17, 23, 13, 12, 13, 30, 41, 13, 42, 2, 2, 0, 13, 4, 13, 40, 17, 4, 13, 13, 29, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 13, 12, 13, 30, 41, 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, 20, 13, 41, 13, 4, 13, 41, 13, 17, 42, 2, 2, 13, 13, 40, 4, 13, 13, 30, 0, 18, 13, 40, 13, 13, 0, 13, 4, 13, 29, 8, 2, 13, 13, 13, 4, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 13, 29, 13, 23, 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, 17, 41, 13, 41, 13, 17, 42, 2, 2, 0, 13, 4, 13, 40, 17, 40, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 4, 13, 42, 17, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 2, 13, 17, 30, 29, 8, 13, 40, 13, 13, 0, 13, 4, 13, 12, 13, 30, 41, 13, 17, 41, 13, 41, 13, 17, 42, 2, 2, 0, 13, 4, 13, 40, 17, 40, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 4, 13, 42, 17, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 2, 13, 17, 30, 29, 8, 13, 40, 13, 13, 0, 13, 4, 13, 12, 13, 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 ], [ 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 ], [ 568, 35 ], [ 568, 36 ], [ 36, 37 ], [ 568, 38 ], [ 38, 39 ], [ 568, 40 ], [ 40, 41 ], [ 40, 42 ], [ 568, 43 ], [ 43, 44 ], [ 43, 45 ], [ 568, 47 ], [ 47, 48 ], [ 47, 49 ], [ 568, 50 ], [ 50, 51 ], [ 50, 52 ], [ 568, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 64, 68 ], [ 68, 69 ], [ 55, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 70, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 55, 90 ], [ 90, 91 ], [ 90, 92 ], [ 55, 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 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 55, 113 ], [ 113, 114 ], [ 113, 115 ], [ 113, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 120, 122 ], [ 55, 123 ], [ 123, 124 ], [ 124, 125 ], [ 568, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 131, 135 ], [ 135, 136 ], [ 135, 137 ], [ 131, 138 ], [ 128, 139 ], [ 139, 140 ], [ 139, 141 ], [ 128, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 145, 146 ], [ 128, 147 ], [ 147, 148 ], [ 128, 149 ], [ 149, 150 ], [ 150, 151 ], [ 128, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 152, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 160, 164 ], [ 159, 165 ], [ 568, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 166, 172 ], [ 172, 173 ], [ 568, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 177, 182 ], [ 182, 183 ], [ 176, 184 ], [ 184, 185 ], [ 185, 186 ], [ 185, 187 ], [ 184, 188 ], [ 188, 189 ], [ 189, 190 ], [ 189, 191 ], [ 188, 192 ], [ 192, 193 ], [ 193, 194 ], [ 193, 195 ], [ 195, 196 ], [ 196, 197 ], [ 192, 198 ], [ 198, 199 ], [ 199, 200 ], [ 199, 201 ], [ 201, 202 ], [ 202, 203 ], [ 201, 204 ], [ 188, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 205, 209 ], [ 209, 210 ], [ 210, 211 ], [ 176, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 215, 216 ], [ 568, 217 ], [ 217, 218 ], [ 217, 219 ], [ 219, 220 ], [ 220, 221 ], [ 221, 222 ], [ 222, 223 ], [ 223, 224 ], [ 223, 225 ], [ 222, 226 ], [ 226, 227 ], [ 226, 228 ], [ 217, 229 ], [ 229, 230 ], [ 568, 231 ], [ 231, 232 ], [ 231, 233 ], [ 233, 234 ], [ 234, 235 ], [ 233, 236 ], [ 236, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 241, 242 ], [ 238, 243 ], [ 243, 244 ], [ 237, 245 ], [ 245, 246 ], [ 245, 247 ], [ 233, 248 ], [ 248, 249 ], [ 568, 250 ], [ 250, 251 ], [ 250, 252 ], [ 252, 253 ], [ 253, 254 ], [ 254, 255 ], [ 255, 256 ], [ 254, 257 ], [ 257, 258 ], [ 568, 259 ], [ 259, 260 ], [ 259, 261 ], [ 261, 262 ], [ 262, 263 ], [ 263, 264 ], [ 568, 265 ], [ 265, 266 ], [ 265, 267 ], [ 267, 268 ], [ 268, 269 ], [ 268, 270 ], [ 270, 271 ], [ 267, 272 ], [ 272, 273 ], [ 272, 274 ], [ 267, 275 ], [ 275, 276 ], [ 276, 277 ], [ 277, 278 ], [ 277, 279 ], [ 275, 280 ], [ 280, 281 ], [ 281, 282 ], [ 282, 283 ], [ 281, 284 ], [ 280, 285 ], [ 285, 286 ], [ 285, 287 ], [ 287, 288 ], [ 267, 289 ], [ 289, 290 ], [ 290, 291 ], [ 291, 292 ], [ 568, 293 ], [ 293, 294 ], [ 293, 295 ], [ 295, 296 ], [ 296, 297 ], [ 296, 298 ], [ 295, 300 ], [ 300, 301 ], [ 300, 302 ], [ 302, 303 ], [ 295, 304 ], [ 304, 305 ], [ 304, 306 ], [ 295, 307 ], [ 307, 308 ], [ 308, 309 ], [ 309, 310 ], [ 309, 311 ], [ 308, 312 ], [ 312, 313 ], [ 313, 314 ], [ 313, 315 ], [ 307, 316 ], [ 316, 317 ], [ 317, 318 ], [ 318, 319 ], [ 318, 320 ], [ 320, 321 ], [ 317, 322 ], [ 316, 323 ], [ 323, 324 ], [ 323, 325 ], [ 325, 326 ], [ 295, 327 ], [ 327, 328 ], [ 328, 329 ], [ 329, 330 ], [ 329, 331 ], [ 328, 332 ], [ 328, 333 ], [ 333, 334 ], [ 334, 335 ], [ 333, 336 ], [ 333, 337 ], [ 293, 338 ], [ 338, 339 ], [ 568, 340 ], [ 340, 341 ], [ 340, 342 ], [ 342, 343 ], [ 343, 344 ], [ 343, 345 ], [ 342, 347 ], [ 347, 348 ], [ 348, 349 ], [ 349, 350 ], [ 349, 351 ], [ 347, 352 ], [ 352, 353 ], [ 352, 354 ], [ 347, 355 ], [ 355, 356 ], [ 356, 357 ], [ 347, 358 ], [ 358, 359 ], [ 359, 360 ], [ 360, 361 ], [ 360, 362 ], [ 359, 363 ], [ 363, 364 ], [ 363, 365 ], [ 342, 366 ], [ 366, 367 ], [ 340, 368 ], [ 368, 369 ], [ 340, 370 ], [ 370, 371 ], [ 568, 372 ], [ 372, 373 ], [ 372, 374 ], [ 374, 375 ], [ 375, 376 ], [ 375, 377 ], [ 374, 379 ], [ 379, 380 ], [ 380, 381 ], [ 381, 382 ], [ 381, 383 ], [ 379, 384 ], [ 384, 385 ], [ 384, 386 ], [ 379, 387 ], [ 387, 388 ], [ 388, 389 ], [ 379, 390 ], [ 390, 391 ], [ 391, 392 ], [ 392, 393 ], [ 392, 394 ], [ 391, 395 ], [ 395, 396 ], [ 374, 397 ], [ 397, 398 ], [ 372, 399 ], [ 399, 400 ], [ 568, 401 ], [ 401, 402 ], [ 401, 403 ], [ 403, 404 ], [ 404, 405 ], [ 404, 406 ], [ 403, 407 ], [ 407, 408 ], [ 403, 409 ], [ 409, 410 ], [ 409, 411 ], [ 403, 412 ], [ 412, 413 ], [ 413, 414 ], [ 414, 415 ], [ 415, 416 ], [ 415, 417 ], [ 417, 418 ], [ 414, 419 ], [ 419, 420 ], [ 413, 421 ], [ 421, 422 ], [ 422, 423 ], [ 423, 424 ], [ 424, 425 ], [ 424, 426 ], [ 423, 427 ], [ 427, 428 ], [ 427, 429 ], [ 422, 430 ], [ 430, 431 ], [ 430, 432 ], [ 403, 433 ], [ 433, 434 ], [ 434, 435 ], [ 434, 436 ], [ 433, 437 ], [ 437, 438 ], [ 438, 439 ], [ 438, 440 ], [ 437, 441 ], [ 441, 442 ], [ 441, 443 ], [ 443, 444 ], [ 403, 445 ], [ 445, 446 ], [ 445, 447 ], [ 447, 448 ], [ 448, 449 ], [ 449, 450 ], [ 450, 451 ], [ 450, 452 ], [ 449, 453 ], [ 453, 454 ], [ 453, 455 ], [ 448, 456 ], [ 456, 457 ], [ 457, 458 ], [ 457, 459 ], [ 459, 460 ], [ 460, 461 ], [ 460, 462 ], [ 459, 463 ], [ 463, 464 ], [ 463, 465 ], [ 448, 466 ], [ 466, 467 ], [ 467, 468 ], [ 468, 469 ], [ 468, 470 ], [ 470, 471 ], [ 468, 472 ], [ 447, 473 ], [ 473, 474 ], [ 473, 475 ], [ 475, 476 ], [ 568, 477 ], [ 477, 478 ], [ 477, 479 ], [ 479, 480 ], [ 480, 481 ], [ 480, 482 ], [ 479, 483 ], [ 483, 484 ], [ 479, 485 ], [ 485, 486 ], [ 485, 487 ], [ 479, 488 ], [ 488, 489 ], [ 489, 490 ], [ 490, 491 ], [ 491, 492 ], [ 491, 493 ], [ 493, 494 ], [ 490, 495 ], [ 495, 496 ], [ 489, 497 ], [ 497, 498 ], [ 498, 499 ], [ 499, 500 ], [ 500, 501 ], [ 500, 502 ], [ 499, 503 ], [ 503, 504 ], [ 503, 505 ], [ 498, 506 ], [ 506, 507 ], [ 506, 508 ], [ 479, 509 ], [ 509, 510 ], [ 510, 511 ], [ 510, 512 ], [ 509, 513 ], [ 513, 514 ], [ 514, 515 ], [ 514, 516 ], [ 513, 517 ], [ 517, 518 ], [ 517, 519 ], [ 519, 520 ], [ 479, 521 ], [ 521, 522 ], [ 521, 523 ], [ 523, 524 ], [ 524, 525 ], [ 525, 526 ], [ 526, 527 ], [ 526, 528 ], [ 525, 529 ], [ 529, 530 ], [ 529, 531 ], [ 524, 532 ], [ 532, 533 ], [ 533, 534 ], [ 533, 535 ], [ 535, 536 ], [ 536, 537 ], [ 536, 538 ], [ 535, 539 ], [ 539, 540 ], [ 539, 541 ], [ 524, 542 ], [ 542, 543 ], [ 543, 544 ], [ 544, 545 ], [ 544, 546 ], [ 546, 547 ], [ 544, 548 ], [ 523, 549 ], [ 549, 550 ], [ 549, 551 ], [ 551, 552 ], [ 568, 553 ], [ 553, 554 ], [ 553, 555 ], [ 555, 556 ], [ 556, 557 ], [ 557, 558 ], [ 558, 559 ], [ 558, 560 ], [ 556, 561 ], [ 561, 562 ], [ 562, 563 ], [ 561, 564 ], [ 553, 565 ], [ 565, 566 ], [ 0, 567 ], [ 567, 568 ], [ 567, 569 ] ]
[ "import java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.InputMismatchException;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.TreeSet;\n\npublic class Main {\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tvoid solve() {\n\t\tint n = ni();\n\t\tint[] a = new int[n];\n\t\ta[0] = -1;\n\t\tfor(int i = 1; i < n; i++) a[i] = ni()-1;\n\t\tint[] deg = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tdeg[a[i]]++;\n\t\t}\n\t\tfor(int v : deg) out.println(v+\" \");\n\t\tout.println();\n\t}\n\t\t\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n}", "import java.io.ByteArrayInputStream;", "ByteArrayInputStream", "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.ArrayList;", "ArrayList", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.TreeSet;", "TreeSet", "java.util", "public class Main {\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tvoid solve() {\n\t\tint n = ni();\n\t\tint[] a = new int[n];\n\t\ta[0] = -1;\n\t\tfor(int i = 1; i < n; i++) a[i] = ni()-1;\n\t\tint[] deg = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tdeg[a[i]]++;\n\t\t}\n\t\tfor(int v : deg) out.println(v+\" \");\n\t\tout.println();\n\t}\n\t\t\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n}", "Main", "InputStream is;", "is", "PrintWriter out;", "out", "String INPUT = \"\";", "INPUT", "\"\"", "private byte[] inbuf = new byte[1024];", "inbuf", "new byte[1024]", "1024", "public int lenbuf = 0", "lenbuf", "0", "ptrbuf = 0;", "ptrbuf", "0", "void solve() {\n\t\tint n = ni();\n\t\tint[] a = new int[n];\n\t\ta[0] = -1;\n\t\tfor(int i = 1; i < n; i++) a[i] = ni()-1;\n\t\tint[] deg = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tdeg[a[i]]++;\n\t\t}\n\t\tfor(int v : deg) out.println(v+\" \");\n\t\tout.println();\n\t}", "solve", "{\n\t\tint n = ni();\n\t\tint[] a = new int[n];\n\t\ta[0] = -1;\n\t\tfor(int i = 1; i < n; i++) a[i] = ni()-1;\n\t\tint[] deg = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tdeg[a[i]]++;\n\t\t}\n\t\tfor(int v : deg) out.println(v+\" \");\n\t\tout.println();\n\t}", "int n = ni();", "n", "ni()", "ni", "int[] a = new int[n];", "a", "new int[n]", "n", "a[0] = -1", "a[0]", "a", "0", "-1", "1", "for(int i = 1; i < n; i++) a[i] = ni()-1;", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "a[i] = ni()-1;", "a[i] = ni()-1", "a[i]", "a", "i", "ni()-1", "ni()", "ni", "1", "int[] deg = new int[n];", "deg", "new int[n]", "n", "for(int i = 1; i < n; i++) {\n\t\t\tdeg[a[i]]++;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tdeg[a[i]]++;\n\t\t}", "{\n\t\t\tdeg[a[i]]++;\n\t\t}", "deg[a[i]]++", "deg[a[i]]", "deg", "a[i]", "a", "i", "for(int v : deg) out.println(v+\" \");", "int v", "deg", "out.println(v+\" \");", "out.println(v+\" \")", "out.println", "out", "v+\" \"", "v", "\" \"", "out.println()", "out.println", "out", "void run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}", "run", "{\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}", "is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())", "is", "INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())", "INPUT.isEmpty()", "INPUT.isEmpty", "INPUT", "System.in", "System", "System.in", "new ByteArrayInputStream(INPUT.getBytes())", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "long s = System.currentTimeMillis();", "s", "System.currentTimeMillis()", "System.currentTimeMillis", "System", "solve()", "solve", "out.flush()", "out.flush", "out", "if (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");", "!INPUT.isEmpty()", "INPUT.isEmpty()", "INPUT.isEmpty", "INPUT", "tr(System.currentTimeMillis() - s + \"ms\")", "tr", "System.currentTimeMillis() - s + \"ms\"", "System.currentTimeMillis() - s", "System.currentTimeMillis()", "System.currentTimeMillis", "System", "s", "\"ms\"", "public static void main(String[] args) throws Exception {\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", "private int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}", "readByte", "{\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}", "if (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();", "lenbuf == -1", "lenbuf", "-1", "1", "throw new InputMismatchException();", "new InputMismatchException()", "if (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}", "ptrbuf >= lenbuf", "ptrbuf", "lenbuf", "{\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}", "ptrbuf = 0", "ptrbuf", "0", "try {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}", "catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}", "IOException e", "{\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}", "throw new InputMismatchException();", "new InputMismatchException()", "{\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t}", "lenbuf = is.read(inbuf)", "lenbuf", "is.read(inbuf)", "is.read", "is", "inbuf", "if (lenbuf <= 0)\n\t\t\t\treturn -1;", "lenbuf <= 0", "lenbuf", "0", "return -1;", "-1", "1", "return inbuf[ptrbuf++];", "inbuf[ptrbuf++]", "inbuf", "ptrbuf++", "ptrbuf", "private boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}", "isSpaceChar", "{\n\t\treturn !(c >= 33 && c <= 126);\n\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 int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}", "skip", "{\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}", "int b;", "b", "while ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;", "(b = readByte()) != -1 && isSpaceChar(b)", "(b = readByte()) != -1", "(b = readByte())", "b", "readByte()", "readByte", "-1", "1", "isSpaceChar(b)", "isSpaceChar", "b", "return b;", "b", "private double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}", "nd", "{\n\t\treturn Double.parseDouble(ns());\n\t}", "return Double.parseDouble(ns());", "Double.parseDouble(ns())", "Double.parseDouble", "Double", "ns()", "ns", "private char nc() {\n\t\treturn (char) skip();\n\t}", "nc", "{\n\t\treturn (char) skip();\n\t}", "return (char) skip();", "(char) skip()", "skip", "private String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}", "ns", "{\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}", "int b = skip();", "b", "skip()", "skip", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}", "!(isSpaceChar(b))", "(isSpaceChar(b))", "isSpaceChar", "b", "{ // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}", "sb.appendCodePoint(b)", "sb.appendCodePoint", "sb", "b", "b = readByte()", "b", "readByte()", "readByte", "return sb.toString();", "sb.toString()", "sb.toString", "sb", "private char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}", "ns", "{\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}", "char[] buf = new char[n];", "buf", "new char[n]", "n", "int b = skip()", "b", "skip()", "skip", "p = 0;", "p", "0", "while (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}", "p < n && !(isSpaceChar(b))", "p < n", "p", "n", "!(isSpaceChar(b))", "(isSpaceChar(b))", "isSpaceChar", "b", "{\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}", "buf[p++] = (char) b", "buf[p++]", "buf", "p++", "p", "(char) b", "b = readByte()", "b", "readByte()", "readByte", "return n == p ? buf : Arrays.copyOf(buf, p);", "n == p ? buf : Arrays.copyOf(buf, p)", "n == p", "n", "p", "buf", "Arrays.copyOf(buf, p)", "Arrays.copyOf", "Arrays", "buf", "p", "int n", "n", "private char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}", "nm", "{\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}", "char[][] map = new char[n][];", "map", "new char[n][]", "n", "for (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "map[i] = ns(m);", "map[i] = ns(m)", "map[i]", "map", "i", "ns(m)", "ns", "m", "return map;", "map", "int n", "n", "int m", "m", "private int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}", "na", "{\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}", "int[] a = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = ni();", "a[i] = ni()", "a[i]", "a", "i", "ni()", "ni", "return a;", "a", "int n", "n", "private int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "ni", "{\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "int num = 0", "num", "0", "b;", "b", "boolean minus = false;", "minus", "false", "while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;", "(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')", "(b = readByte()) != -1", "(b = readByte())", "b", "readByte()", "readByte", "-1", "1", "!((b >= '0' && b <= '9') || b == '-')", "((b >= '0' && b <= '9') || b == '-')", "(b >= '0' && b <= '9')", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "b == '-'", "b", "'-'", "if (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "b == '-'", "b", "'-'", "{\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "minus = true", "minus", "true", "b = readByte()", "b", "readByte()", "readByte", "while (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "true", "{\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "if (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "b >= '0' && b <= '9'", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t}", "num = num * 10 + (b - '0')", "num", "num * 10 + (b - '0')", "num * 10", "num", "10", "(b - '0')", "b", "'0'", "{\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "return minus ? -num : num;", "minus ? -num : num", "minus", "-num", "num", "num", "b = readByte()", "b", "readByte()", "readByte", "private long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "nl", "{\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}", "long num = 0;", "num", "0", "int b;", "b", "boolean minus = false;", "minus", "false", "while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;", "(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')", "(b = readByte()) != -1", "(b = readByte())", "b", "readByte()", "readByte", "-1", "1", "!((b >= '0' && b <= '9') || b == '-')", "((b >= '0' && b <= '9') || b == '-')", "(b >= '0' && b <= '9')", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "b == '-'", "b", "'-'", "if (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "b == '-'", "b", "'-'", "{\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}", "minus = true", "minus", "true", "b = readByte()", "b", "readByte()", "readByte", "while (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "true", "{\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}", "if (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "b >= '0' && b <= '9'", "b >= '0'", "b", "'0'", "b <= '9'", "b", "'9'", "{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t}", "num = num * 10 + (b - '0')", "num", "num * 10 + (b - '0')", "num * 10", "num", "10", "(b - '0')", "b", "'0'", "{\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}", "return minus ? -num : num;", "minus ? -num : num", "minus", "-num", "num", "num", "b = readByte()", "b", "readByte()", "readByte", "private static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}", "tr", "{\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}", "System.out.println(Arrays.deepToString(o))", "System.out.println", "System.out", "System", "System.out", "Arrays.deepToString(o)", "Arrays.deepToString", "Arrays", "o", "Object... o", "o", "public class Main {\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tvoid solve() {\n\t\tint n = ni();\n\t\tint[] a = new int[n];\n\t\ta[0] = -1;\n\t\tfor(int i = 1; i < n; i++) a[i] = ni()-1;\n\t\tint[] deg = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tdeg[a[i]]++;\n\t\t}\n\t\tfor(int v : deg) out.println(v+\" \");\n\t\tout.println();\n\t}\n\t\t\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n}", "public class Main {\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tvoid solve() {\n\t\tint n = ni();\n\t\tint[] a = new int[n];\n\t\ta[0] = -1;\n\t\tfor(int i = 1; i < n; i++) a[i] = ni()-1;\n\t\tint[] deg = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tdeg[a[i]]++;\n\t\t}\n\t\tfor(int v : deg) out.println(v+\" \");\n\t\tout.println();\n\t}\n\t\t\n\tvoid run() throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\n\t\tlong s = System.currentTimeMillis();\n\t\tsolve();\n\t\tout.flush();\n\t\tif (!INPUT.isEmpty())\n\t\t\ttr(System.currentTimeMillis() - s + \"ms\");\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tnew Main().run();\n\t}\n\n\tprivate byte[] inbuf = new byte[1024];\n\tpublic int lenbuf = 0, ptrbuf = 0;\n\n\tprivate int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\n\tprivate boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\n\tprivate int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\n\tprivate double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\n\tprivate char nc() {\n\t\treturn (char) skip();\n\t}\n\n\tprivate String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\n\tprivate char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\n\tprivate char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\n\tprivate int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\n\tprivate int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\n\tprivate static void tr(Object... o) {\n\t\tSystem.out.println(Arrays.deepToString(o));\n\t}\n}", "Main" ]
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.InputMismatchException; import java.util.List; import java.util.Map; import java.util.TreeSet; public class Main { InputStream is; PrintWriter out; String INPUT = ""; void solve() { int n = ni(); int[] a = new int[n]; a[0] = -1; for(int i = 1; i < n; i++) a[i] = ni()-1; int[] deg = new int[n]; for(int i = 1; i < n; i++) { deg[a[i]]++; } for(int v : deg) out.println(v+" "); out.println(); } void run() throws Exception { is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes()); out = new PrintWriter(System.out); long s = System.currentTimeMillis(); solve(); out.flush(); if (!INPUT.isEmpty()) tr(System.currentTimeMillis() - s + "ms"); } public static void main(String[] args) throws Exception { new Main().run(); } private byte[] inbuf = new byte[1024]; public int lenbuf = 0, ptrbuf = 0; private int readByte() { if (lenbuf == -1) throw new InputMismatchException(); if (ptrbuf >= lenbuf) { ptrbuf = 0; try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); } if (lenbuf <= 0) return -1; } return inbuf[ptrbuf++]; } private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); } private int skip() { int b; while ((b = readByte()) != -1 && isSpaceChar(b)) ; return b; } private double nd() { return Double.parseDouble(ns()); } private char nc() { return (char) skip(); } private String ns() { int b = skip(); StringBuilder sb = new StringBuilder(); while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ') sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } private char[] ns(int n) { char[] buf = new char[n]; int b = skip(), p = 0; while (p < n && !(isSpaceChar(b))) { buf[p++] = (char) b; b = readByte(); } return n == p ? buf : Arrays.copyOf(buf, p); } private char[][] nm(int n, int m) { char[][] map = new char[n][]; for (int i = 0; i < n; i++) map[i] = ns(m); return map; } private int[] na(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = ni(); return a; } private int ni() { int num = 0, b; boolean minus = false; while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ; if (b == '-') { minus = true; b = readByte(); } while (true) { if (b >= '0' && b <= '9') { num = num * 10 + (b - '0'); } else { return minus ? -num : num; } b = readByte(); } } private long nl() { long num = 0; int b; boolean minus = false; while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ; if (b == '-') { minus = true; b = readByte(); } while (true) { if (b >= '0' && b <= '9') { num = num * 10 + (b - '0'); } else { return minus ? -num : num; } b = readByte(); } } private static void tr(Object... o) { System.out.println(Arrays.deepToString(o)); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 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 ]
[ [ 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, 24 ], [ 24, 25 ], [ 11, 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 ], [ 11, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 59, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 11, 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 ], [ 9, 89 ], [ 89, 90 ] ]
[ "import java.util.Scanner;\nimport java.lang.Math;\nclass 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 j;\n for(int i=0;i<n;i++){\n A[i]=0;\n }\n for(int i=1;i<n;i++){\n j = sc.nextInt()-1;\n A[j]++;\n }\n for(int i=0;i<n;i++){\n System.out.println(A[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.lang.Math;", "Math", "java.lang", "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 j;\n for(int i=0;i<n;i++){\n A[i]=0;\n }\n for(int i=1;i<n;i++){\n j = sc.nextInt()-1;\n A[j]++;\n }\n for(int i=0;i<n;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 int n = sc.nextInt();\n int[] A = new int[n];\n int j;\n for(int i=0;i<n;i++){\n A[i]=0;\n }\n for(int i=1;i<n;i++){\n j = sc.nextInt()-1;\n A[j]++;\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 = sc.nextInt();\n int[] A = new int[n];\n int j;\n for(int i=0;i<n;i++){\n A[i]=0;\n }\n for(int i=1;i<n;i++){\n j = sc.nextInt()-1;\n A[j]++;\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 = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] A = new int[n];", "A", "new int[n]", "n", "int j;", "j", "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 j = sc.nextInt()-1;\n A[j]++;\n }", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n j = sc.nextInt()-1;\n A[j]++;\n }", "{\n j = sc.nextInt()-1;\n A[j]++;\n }", "j = sc.nextInt()-1", "j", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "A[j]++", "A[j]", "A", "j", "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", "String[] args", "args" ]
import java.util.Scanner; import java.lang.Math; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] A = new int[n]; int j; for(int i=0;i<n;i++){ A[i]=0; } for(int i=1;i<n;i++){ j = sc.nextInt()-1; A[j]++; } 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, 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.*;\npublic class Main{\n\n\tpublic static void main (String[]args){\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt(),ar[]=new int[a];\n for(int i=0;i<a-1;i++){\n \tint p=sc.nextInt();\n ar[p-1]++;\n }\n for(int i=0;i<a;i++){\n System.out.println(ar[i]);\n }\n \n \n }\n\n\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\n\tpublic static void main (String[]args){\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt(),ar[]=new int[a];\n for(int i=0;i<a-1;i++){\n \tint p=sc.nextInt();\n ar[p-1]++;\n }\n for(int i=0;i<a;i++){\n System.out.println(ar[i]);\n }\n \n \n }\n\n\n}", "Main", "public static void main (String[]args){\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt(),ar[]=new int[a];\n for(int i=0;i<a-1;i++){\n \tint p=sc.nextInt();\n ar[p-1]++;\n }\n for(int i=0;i<a;i++){\n System.out.println(ar[i]);\n }\n \n \n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt(),ar[]=new int[a];\n for(int i=0;i<a-1;i++){\n \tint p=sc.nextInt();\n ar[p-1]++;\n }\n for(int i=0;i<a;i++){\n System.out.println(ar[i]);\n }\n \n \n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a=sc.nextInt()", "a", "sc.nextInt()", "sc.nextInt", "sc", "ar[]=new int[a];", "ar", "new int[a]", "a", "for(int i=0;i<a-1;i++){\n \tint p=sc.nextInt();\n ar[p-1]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<a-1", "i", "a-1", "a", "1", "i++", "i++", "i", "{\n \tint p=sc.nextInt();\n ar[p-1]++;\n }", "{\n \tint p=sc.nextInt();\n ar[p-1]++;\n }", "int p=sc.nextInt();", "p", "sc.nextInt()", "sc.nextInt", "sc", "ar[p-1]++", "ar[p-1]", "ar", "p-1", "p", "1", "for(int i=0;i<a;i++){\n System.out.println(ar[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<a", "i", "a", "i++", "i++", "i", "{\n System.out.println(ar[i]);\n }", "{\n System.out.println(ar[i]);\n }", "System.out.println(ar[i])", "System.out.println", "System.out", "System", "System.out", "ar[i]", "ar", "i", "String[]args", "args", "public class Main{\n\n\tpublic static void main (String[]args){\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt(),ar[]=new int[a];\n for(int i=0;i<a-1;i++){\n \tint p=sc.nextInt();\n ar[p-1]++;\n }\n for(int i=0;i<a;i++){\n System.out.println(ar[i]);\n }\n \n \n }\n\n\n}", "public class Main{\n\n\tpublic static void main (String[]args){\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt(),ar[]=new int[a];\n for(int i=0;i<a-1;i++){\n \tint p=sc.nextInt();\n ar[p-1]++;\n }\n for(int i=0;i<a;i++){\n System.out.println(ar[i]);\n }\n \n \n }\n\n\n}", "Main" ]
import java.util.*; public class Main{ public static void main (String[]args){ Scanner sc=new Scanner(System.in); int a=sc.nextInt(),ar[]=new int[a]; for(int i=0;i<a-1;i++){ int p=sc.nextInt(); ar[p-1]++; } for(int i=0;i<a;i++){ System.out.println(ar[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, 40, 18, 13, 2, 13, 17, 4, 18, 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 ], [ 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 ], [ 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 ], [ 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;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] employees = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int temp = scanner.nextInt();\n employees[temp - 1]++;\n }\n\n scanner.close();\n\n for (int i : employees) {\n System.out.println(i);\n }\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] employees = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int temp = scanner.nextInt();\n employees[temp - 1]++;\n }\n\n scanner.close();\n\n for (int i : employees) {\n System.out.println(i);\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] employees = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int temp = scanner.nextInt();\n employees[temp - 1]++;\n }\n\n scanner.close();\n\n for (int i : employees) {\n System.out.println(i);\n }\n\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] employees = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int temp = scanner.nextInt();\n employees[temp - 1]++;\n }\n\n scanner.close();\n\n for (int i : employees) {\n System.out.println(i);\n }\n\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] employees = new int[N];", "employees", "new int[N]", "N", "for (int i = 0; i < N - 1; i++) {\n int temp = scanner.nextInt();\n employees[temp - 1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N - 1", "i", "N - 1", "N", "1", "i++", "i++", "i", "{\n int temp = scanner.nextInt();\n employees[temp - 1]++;\n }", "{\n int temp = scanner.nextInt();\n employees[temp - 1]++;\n }", "int temp = scanner.nextInt();", "temp", "scanner.nextInt()", "scanner.nextInt", "scanner", "employees[temp - 1]++", "employees[temp - 1]", "employees", "temp - 1", "temp", "1", "scanner.close()", "scanner.close", "scanner", "for (int i : employees) {\n System.out.println(i);\n }", "int i", "employees", "{\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 public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] employees = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int temp = scanner.nextInt();\n employees[temp - 1]++;\n }\n\n scanner.close();\n\n for (int i : employees) {\n System.out.println(i);\n }\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 int[] employees = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int temp = scanner.nextInt();\n employees[temp - 1]++;\n }\n\n scanner.close();\n\n for (int i : employees) {\n System.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[] employees = new int[N]; for (int i = 0; i < N - 1; i++) { int temp = scanner.nextInt(); employees[temp - 1]++; } scanner.close(); for (int i : employees) { 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 17, 40, 18, 13, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 4, 18, 13, 18, 13, 13, 17, 4, 18, 18, 13, 13, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 84, 5 ], [ 84, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 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 ], [ 38, 39 ], [ 36, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 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 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 66, 68 ], [ 61, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 76, 77 ], [ 8, 78 ], [ 78, 79 ], [ 79, 80 ], [ 6, 81 ], [ 81, 82 ], [ 0, 83 ], [ 83, 84 ], [ 83, 85 ] ]
[ "import java.util.*;\n\npublic class Main {\n\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 for (int i = 1; i < n; i++) {\n int x = sc.nextInt()-1;\n a[x]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < n; i++) {\n sb.append(a[i]).append(\"\\n\");\n }\n System.out.print(sb.toString());\n sc.close();\n\n }\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\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 for (int i = 1; i < n; i++) {\n int x = sc.nextInt()-1;\n a[x]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < n; i++) {\n sb.append(a[i]).append(\"\\n\");\n }\n System.out.print(sb.toString());\n sc.close();\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[] a = new int[n];\n for (int i = 1; i < n; i++) {\n int x = sc.nextInt()-1;\n a[x]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < n; i++) {\n sb.append(a[i]).append(\"\\n\");\n }\n System.out.print(sb.toString());\n sc.close();\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] a = new int[n];\n for (int i = 1; i < n; i++) {\n int x = sc.nextInt()-1;\n a[x]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < n; i++) {\n sb.append(a[i]).append(\"\\n\");\n }\n System.out.print(sb.toString());\n sc.close();\n\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", "for (int i = 1; i < n; i++) {\n int x = sc.nextInt()-1;\n a[x]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n int x = sc.nextInt()-1;\n a[x]++;\n }", "{\n int x = sc.nextInt()-1;\n a[x]++;\n }", "int x = sc.nextInt()-1;", "x", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "a[x]++", "a[x]", "a", "x", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "for (int i = 0; i < n; i++) {\n sb.append(a[i]).append(\"\\n\");\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n sb.append(a[i]).append(\"\\n\");\n }", "{\n sb.append(a[i]).append(\"\\n\");\n }", "sb.append(a[i]).append(\"\\n\")", "sb.append(a[i]).append", "sb.append(a[i])", "sb.append", "sb", "a[i]", "a", "i", "\"\\n\"", "System.out.print(sb.toString())", "System.out.print", "System.out", "System", "System.out", "sb.toString()", "sb.toString", "sb", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\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 for (int i = 1; i < n; i++) {\n int x = sc.nextInt()-1;\n a[x]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < n; i++) {\n sb.append(a[i]).append(\"\\n\");\n }\n System.out.print(sb.toString());\n sc.close();\n\n }\n\n}", "public class Main {\n\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 for (int i = 1; i < n; i++) {\n int x = sc.nextInt()-1;\n a[x]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < n; i++) {\n sb.append(a[i]).append(\"\\n\");\n }\n System.out.print(sb.toString());\n sc.close();\n\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[] a = new int[n]; for (int i = 1; i < n; i++) { int x = sc.nextInt()-1; a[x]++; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { sb.append(a[i]).append("\n"); } System.out.print(sb.toString()); sc.close(); } }
[ 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, 0, 18, 13, 17, 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, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 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, 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 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 8, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 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 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 70, 71 ], [ 64, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 75, 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 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 95, 96 ], [ 95, 97 ], [ 6, 98 ], [ 98, 99 ] ]
[ "import java.util.*;\n\nclass Main{\n public static void main(String[] args) {\n Scanner reader=new Scanner(System.in);\n int n=reader.nextInt();\n int buka[]=new int[n+1];\n int number[]=new int[n+1];\n buka[0]=0;\n for(int i=0;i<n;i++)\n {\n number[i]=0;\n }\n for(int i=2;i<=n;i++)\n {\n buka[i]=reader.nextInt();\n\n number[buka[i]]++;\n\n }\n for(int i=1;i<=n;i++)\n System.out.println(number[i]);\n\n\n\n\n\n\n\n\n\n\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String[] args) {\n Scanner reader=new Scanner(System.in);\n int n=reader.nextInt();\n int buka[]=new int[n+1];\n int number[]=new int[n+1];\n buka[0]=0;\n for(int i=0;i<n;i++)\n {\n number[i]=0;\n }\n for(int i=2;i<=n;i++)\n {\n buka[i]=reader.nextInt();\n\n number[buka[i]]++;\n\n }\n for(int i=1;i<=n;i++)\n System.out.println(number[i]);\n\n\n\n\n\n\n\n\n\n\n }\n}", "Main", "public static void main(String[] args) {\n Scanner reader=new Scanner(System.in);\n int n=reader.nextInt();\n int buka[]=new int[n+1];\n int number[]=new int[n+1];\n buka[0]=0;\n for(int i=0;i<n;i++)\n {\n number[i]=0;\n }\n for(int i=2;i<=n;i++)\n {\n buka[i]=reader.nextInt();\n\n number[buka[i]]++;\n\n }\n for(int i=1;i<=n;i++)\n System.out.println(number[i]);\n\n\n\n\n\n\n\n\n\n\n }", "main", "{\n Scanner reader=new Scanner(System.in);\n int n=reader.nextInt();\n int buka[]=new int[n+1];\n int number[]=new int[n+1];\n buka[0]=0;\n for(int i=0;i<n;i++)\n {\n number[i]=0;\n }\n for(int i=2;i<=n;i++)\n {\n buka[i]=reader.nextInt();\n\n number[buka[i]]++;\n\n }\n for(int i=1;i<=n;i++)\n System.out.println(number[i]);\n\n\n\n\n\n\n\n\n\n\n }", "Scanner reader=new Scanner(System.in);", "reader", "new Scanner(System.in)", "int n=reader.nextInt();", "n", "reader.nextInt()", "reader.nextInt", "reader", "int buka[]=new int[n+1];", "buka", "new int[n+1]", "n+1", "n", "1", "int number[]=new int[n+1];", "number", "new int[n+1]", "n+1", "n", "1", "buka[0]=0", "buka[0]", "buka", "0", "0", "for(int i=0;i<n;i++)\n {\n number[i]=0;\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n number[i]=0;\n }", "{\n number[i]=0;\n }", "number[i]=0", "number[i]", "number", "i", "0", "for(int i=2;i<=n;i++)\n {\n buka[i]=reader.nextInt();\n\n number[buka[i]]++;\n\n }", "int i=2;", "int i=2;", "i", "2", "i<=n", "i", "n", "i++", "i++", "i", "{\n buka[i]=reader.nextInt();\n\n number[buka[i]]++;\n\n }", "{\n buka[i]=reader.nextInt();\n\n number[buka[i]]++;\n\n }", "buka[i]=reader.nextInt()", "buka[i]", "buka", "i", "reader.nextInt()", "reader.nextInt", "reader", "number[buka[i]]++", "number[buka[i]]", "number", "buka[i]", "buka", "i", "for(int i=1;i<=n;i++)\n System.out.println(number[i]);", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "System.out.println(number[i]);", "System.out.println(number[i])", "System.out.println", "System.out", "System", "System.out", "number[i]", "number", "i", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args) { Scanner reader=new Scanner(System.in); int n=reader.nextInt(); int buka[]=new int[n+1]; int number[]=new int[n+1]; buka[0]=0; for(int i=0;i<n;i++) { number[i]=0; } for(int i=2;i<=n;i++) { buka[i]=reader.nextInt(); number[buka[i]]++; } for(int i=1;i<=n;i++) System.out.println(number[i]); } }
[ 7, 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, 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, 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 ], [ 95, 8 ], [ 95, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 11, 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 ], [ 11, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 52, 54 ], [ 45, 55 ], [ 55, 56 ], [ 56, 57 ], [ 45, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 11, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 76, 77 ], [ 76, 78 ], [ 71, 79 ], [ 79, 80 ], [ 80, 81 ], [ 71, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 89, 90 ], [ 89, 91 ], [ 9, 92 ], [ 92, 93 ], [ 0, 94 ], [ 94, 95 ], [ 94, 96 ] ]
[ "//デバッグ用\n\nimport java.io.*;\nimport java.util.Scanner;//スキャナつかう\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 \tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\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 }\n \n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = scan.nextInt();\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\t\t}\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.util.Scanner;//スキャナつかう", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n \tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\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 }\n \n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = scan.nextInt();\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\t\t}\n\t}\n}", "Main", "public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n \tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\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 }\n \n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = scan.nextInt();\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\t\t}\n\t}", "main", "{\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n \tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\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 }\n \n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = scan.nextInt();\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\t\t}\n\t}", "BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "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; i++) {\n\t\t\tA[i] = 0;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tA[i] = 0;\n }", "{\n\t\t\tA[i] = 0;\n }", "A[i] = 0", "A[i]", "A", "i", "0", "for (int i = 0; i < N - 1; i++) {\n\t\t\tint count = scan.nextInt();\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 = scan.nextInt();\n\t\t\tA[count - 1]++;\n\t\t}", "{\n\t\t\tint count = scan.nextInt();\n\t\t\tA[count - 1]++;\n\t\t}", "int count = scan.nextInt();", "count", "scan.nextInt()", "scan.nextInt", "scan", "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\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 IOException {\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n \tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\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 }\n \n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = scan.nextInt();\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\t\t}\n\t}\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 \tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\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 }\n \n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint count = scan.nextInt();\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\t\t}\n\t}\n}", "Main" ]
//デバッグ用 import java.io.*; import java.util.Scanner;//スキャナつかう public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int A[] = new int[N]; for (int i = 0; i < N; i++) { A[i] = 0; } for (int i = 0; i < N - 1; i++) { int count = scan.nextInt(); 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, 13, 42, 4, 18, 13, 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 ], [ 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 ], [ 17, 19 ], [ 8, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 21, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 29, 33 ], [ 8, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 6, 55 ], [ 55, 56 ], [ 0, 57 ], [ 57, 58 ], [ 57, 59 ] ]
[ "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 = sc.nextInt();\n int[] a = new int[n];\n \n while(sc.hasNext()){\n a[sc.nextInt() - 1] ++;\n }\n \n for(int i = 0; i < n; i++){\n System.out.println(a[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] a = new int[n];\n \n while(sc.hasNext()){\n a[sc.nextInt() - 1] ++;\n }\n \n for(int i = 0; i < n; 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 int n = sc.nextInt();\n int[] a = new int[n];\n \n while(sc.hasNext()){\n a[sc.nextInt() - 1] ++;\n }\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 = sc.nextInt();\n int[] a = new int[n];\n \n while(sc.hasNext()){\n a[sc.nextInt() - 1] ++;\n }\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 = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] a = new int[n];", "a", "new int[n]", "n", "while(sc.hasNext()){\n a[sc.nextInt() - 1] ++;\n }", "sc.hasNext()", "sc.hasNext", "sc", "{\n a[sc.nextInt() - 1] ++;\n }", "a[sc.nextInt() - 1] ++", "a[sc.nextInt() - 1]", "a", "sc.nextInt() - 1", "sc.nextInt()", "sc.nextInt", "sc", "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", "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 \n while(sc.hasNext()){\n a[sc.nextInt() - 1] ++;\n }\n \n for(int i = 0; i < n; 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 int n = sc.nextInt();\n int[] a = new int[n];\n \n while(sc.hasNext()){\n a[sc.nextInt() - 1] ++;\n }\n \n for(int i = 0; i < n; i++){\n System.out.println(a[i]);\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]; while(sc.hasNext()){ a[sc.nextInt() - 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, 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 ]
[ [ 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 ], [ 6, 55 ], [ 55, 56 ] ]
[ "import java.util.*; \nclass Main{\npublic static void main(String[] args){\n\tScanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n \n \t\tint[] a=new int[n];\n\t\tfor(int c=0;c<n-1;c++){\n \t\ta[sc.nextInt()-1]++;\n }\n \n for(int ans: a){\n System.out.println(ans);\n }\n \n }\n\n}", "import java.util.*;", "util.*", "java", "class Main{\npublic static void main(String[] args){\n\tScanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n \n \t\tint[] a=new int[n];\n\t\tfor(int c=0;c<n-1;c++){\n \t\ta[sc.nextInt()-1]++;\n }\n \n for(int ans: a){\n System.out.println(ans);\n }\n \n }\n\n}", "Main", "public static void main(String[] args){\n\tScanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n \n \t\tint[] a=new int[n];\n\t\tfor(int c=0;c<n-1;c++){\n \t\ta[sc.nextInt()-1]++;\n }\n \n for(int ans: a){\n System.out.println(ans);\n }\n \n }", "main", "{\n\tScanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n \n \t\tint[] a=new int[n];\n\t\tfor(int c=0;c<n-1;c++){\n \t\ta[sc.nextInt()-1]++;\n }\n \n for(int ans: a){\n System.out.println(ans);\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[] a=new int[n];", "a", "new int[n]", "n", "for(int c=0;c<n-1;c++){\n \t\ta[sc.nextInt()-1]++;\n }", "int c=0;", "int c=0;", "c", "0", "c<n-1", "c", "n-1", "n", "1", "c++", "c++", "c", "{\n \t\ta[sc.nextInt()-1]++;\n }", "{\n \t\ta[sc.nextInt()-1]++;\n }", "a[sc.nextInt()-1]++", "a[sc.nextInt()-1]", "a", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "for(int ans: a){\n System.out.println(ans);\n }", "int ans", "a", "{\n System.out.println(ans);\n }", "{\n System.out.println(ans);\n }", "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 sc=new Scanner(System.in); int n=sc.nextInt(); int[] a=new int[n]; for(int c=0;c<n-1;c++){ a[sc.nextInt()-1]++; } for(int ans: a){ System.out.println(ans); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 20, 4, 18, 4, 18, 13, 17, 40, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 4, 18, 13, 2, 13, 17, 13, 4, 18, 4, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 2, 4, 18, 4, 18, 13, 13, 17, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 135, 8 ], [ 135, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 11, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 23, 26 ], [ 26, 27 ], [ 27, 28 ], [ 11, 29 ], [ 29, 30 ], [ 29, 31 ], [ 11, 32 ], [ 32, 33 ], [ 32, 34 ], [ 11, 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 ], [ 48, 51 ], [ 48, 52 ], [ 11, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 53, 59 ], [ 59, 60 ], [ 11, 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 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 82, 83 ], [ 75, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 84, 92 ], [ 75, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 93, 99 ], [ 99, 100 ], [ 99, 101 ], [ 11, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 102, 110 ], [ 110, 111 ], [ 111, 112 ], [ 102, 113 ], [ 114, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 118, 125 ], [ 11, 126 ], [ 126, 127 ], [ 127, 128 ], [ 11, 129 ], [ 129, 130 ], [ 130, 131 ], [ 9, 132 ], [ 132, 133 ], [ 0, 134 ], [ 134, 135 ], [ 134, 136 ] ]
[ "import java.util.*;\nimport java.io.*;\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception{\n\t\tint num = 998244353;\n\n\t\t// TODO Auto-generated method stub\n \t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n \t\tPrintWriter out = new PrintWriter(System.out);\n \t\tint n = Integer.parseInt(bf.readLine());\n \t\tStringTokenizer st = new StringTokenizer(bf.readLine());\n \t\tMap<Integer, ArrayList<Integer>> tree = new HashMap<Integer, ArrayList<Integer>>();\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\ttree.put(i, new ArrayList<Integer>());\n \t\t}\n \t\ttree.get(1).add(-1);\n \t\tfor(int i = 0;i<n-1;i++){\n//\t \t\tString input1 = bf.readLine().trim();\n//\t \t\tString input2 = bf.readLine().trim();\n\t \t\tint a = Integer.parseInt(st.nextToken());\n\t \t\ttree.get(i+2).add(a);\n\t \t\ttree.get(a).add(i+2);\n \t\t}\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\tout.println((tree.get(i).size()-1));\n \t\t}\n \t\t\n \t\t\n \t\tout.println();\n\t \t\t\n \t\tout.close();\n \t\t\n \t\t\n \t\t\n \t}\n}\n \t\n \n//StringJoiner sj = new StringJoiner(\" \"); \n//sj.add(strings)\n//sj.toString() gives string of those stuff w spaces or whatever that sequence is\n\n \t\t\n \t\t\n \t\t\n \t\t\n\t\n\n", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n\n\tpublic static void main(String[] args) throws Exception{\n\t\tint num = 998244353;\n\n\t\t// TODO Auto-generated method stub\n \t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n \t\tPrintWriter out = new PrintWriter(System.out);\n \t\tint n = Integer.parseInt(bf.readLine());\n \t\tStringTokenizer st = new StringTokenizer(bf.readLine());\n \t\tMap<Integer, ArrayList<Integer>> tree = new HashMap<Integer, ArrayList<Integer>>();\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\ttree.put(i, new ArrayList<Integer>());\n \t\t}\n \t\ttree.get(1).add(-1);\n \t\tfor(int i = 0;i<n-1;i++){\n//\t \t\tString input1 = bf.readLine().trim();\n//\t \t\tString input2 = bf.readLine().trim();\n\t \t\tint a = Integer.parseInt(st.nextToken());\n\t \t\ttree.get(i+2).add(a);\n\t \t\ttree.get(a).add(i+2);\n \t\t}\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\tout.println((tree.get(i).size()-1));\n \t\t}\n \t\t\n \t\t\n \t\tout.println();\n\t \t\t\n \t\tout.close();\n \t\t\n \t\t\n \t\t\n \t}\n}", "Main", "public static void main(String[] args) throws Exception{\n\t\tint num = 998244353;\n\n\t\t// TODO Auto-generated method stub\n \t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n \t\tPrintWriter out = new PrintWriter(System.out);\n \t\tint n = Integer.parseInt(bf.readLine());\n \t\tStringTokenizer st = new StringTokenizer(bf.readLine());\n \t\tMap<Integer, ArrayList<Integer>> tree = new HashMap<Integer, ArrayList<Integer>>();\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\ttree.put(i, new ArrayList<Integer>());\n \t\t}\n \t\ttree.get(1).add(-1);\n \t\tfor(int i = 0;i<n-1;i++){\n//\t \t\tString input1 = bf.readLine().trim();\n//\t \t\tString input2 = bf.readLine().trim();\n\t \t\tint a = Integer.parseInt(st.nextToken());\n\t \t\ttree.get(i+2).add(a);\n\t \t\ttree.get(a).add(i+2);\n \t\t}\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\tout.println((tree.get(i).size()-1));\n \t\t}\n \t\t\n \t\t\n \t\tout.println();\n\t \t\t\n \t\tout.close();\n \t\t\n \t\t\n \t\t\n \t}", "main", "{\n\t\tint num = 998244353;\n\n\t\t// TODO Auto-generated method stub\n \t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n \t\tPrintWriter out = new PrintWriter(System.out);\n \t\tint n = Integer.parseInt(bf.readLine());\n \t\tStringTokenizer st = new StringTokenizer(bf.readLine());\n \t\tMap<Integer, ArrayList<Integer>> tree = new HashMap<Integer, ArrayList<Integer>>();\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\ttree.put(i, new ArrayList<Integer>());\n \t\t}\n \t\ttree.get(1).add(-1);\n \t\tfor(int i = 0;i<n-1;i++){\n//\t \t\tString input1 = bf.readLine().trim();\n//\t \t\tString input2 = bf.readLine().trim();\n\t \t\tint a = Integer.parseInt(st.nextToken());\n\t \t\ttree.get(i+2).add(a);\n\t \t\ttree.get(a).add(i+2);\n \t\t}\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\tout.println((tree.get(i).size()-1));\n \t\t}\n \t\t\n \t\t\n \t\tout.println();\n\t \t\t\n \t\tout.close();\n \t\t\n \t\t\n \t\t\n \t}", "int num = 998244353;", "num", "998244353", "BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));", "bf", "new BufferedReader(new InputStreamReader(System.in))", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "int n = Integer.parseInt(bf.readLine());", "n", "Integer.parseInt(bf.readLine())", "Integer.parseInt", "Integer", "bf.readLine()", "bf.readLine", "bf", "StringTokenizer st = new StringTokenizer(bf.readLine());", "st", "new StringTokenizer(bf.readLine())", "Map<Integer, ArrayList<Integer>> tree = new HashMap<Integer, ArrayList<Integer>>();", "tree", "new HashMap<Integer, ArrayList<Integer>>()", "for(int i = 1;i<=n;i++){\n \t\t\ttree.put(i, new ArrayList<Integer>());\n \t\t}", "int i = 1;", "int i = 1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n \t\t\ttree.put(i, new ArrayList<Integer>());\n \t\t}", "{\n \t\t\ttree.put(i, new ArrayList<Integer>());\n \t\t}", "tree.put(i, new ArrayList<Integer>())", "tree.put", "tree", "i", "new ArrayList<Integer>()", "tree.get(1).add(-1)", "tree.get(1).add", "tree.get(1)", "tree.get", "tree", "1", "-1", "1", "for(int i = 0;i<n-1;i++){\n//\t \t\tString input1 = bf.readLine().trim();\n//\t \t\tString input2 = bf.readLine().trim();\n\t \t\tint a = Integer.parseInt(st.nextToken());\n\t \t\ttree.get(i+2).add(a);\n\t \t\ttree.get(a).add(i+2);\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\tString input1 = bf.readLine().trim();\n//\t \t\tString input2 = bf.readLine().trim();\n\t \t\tint a = Integer.parseInt(st.nextToken());\n\t \t\ttree.get(i+2).add(a);\n\t \t\ttree.get(a).add(i+2);\n \t\t}", "{\n//\t \t\tString input1 = bf.readLine().trim();\n//\t \t\tString input2 = bf.readLine().trim();\n\t \t\tint a = Integer.parseInt(st.nextToken());\n\t \t\ttree.get(i+2).add(a);\n\t \t\ttree.get(a).add(i+2);\n \t\t}", "int a = Integer.parseInt(st.nextToken());", "a", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "tree.get(i+2).add(a)", "tree.get(i+2).add", "tree.get(i+2)", "tree.get", "tree", "i+2", "i", "2", "a", "tree.get(a).add(i+2)", "tree.get(a).add", "tree.get(a)", "tree.get", "tree", "a", "i+2", "i", "2", "for(int i = 1;i<=n;i++){\n \t\t\tout.println((tree.get(i).size()-1));\n \t\t}", "int i = 1;", "int i = 1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n \t\t\tout.println((tree.get(i).size()-1));\n \t\t}", "{\n \t\t\tout.println((tree.get(i).size()-1));\n \t\t}", "out.println((tree.get(i).size()-1))", "out.println", "out", "(tree.get(i).size()-1)", "tree.get(i).size()", "tree.get(i).size", "tree.get(i)", "tree.get", "tree", "i", "1", "out.println()", "out.println", "out", "out.close()", "out.close", "out", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws Exception{\n\t\tint num = 998244353;\n\n\t\t// TODO Auto-generated method stub\n \t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n \t\tPrintWriter out = new PrintWriter(System.out);\n \t\tint n = Integer.parseInt(bf.readLine());\n \t\tStringTokenizer st = new StringTokenizer(bf.readLine());\n \t\tMap<Integer, ArrayList<Integer>> tree = new HashMap<Integer, ArrayList<Integer>>();\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\ttree.put(i, new ArrayList<Integer>());\n \t\t}\n \t\ttree.get(1).add(-1);\n \t\tfor(int i = 0;i<n-1;i++){\n//\t \t\tString input1 = bf.readLine().trim();\n//\t \t\tString input2 = bf.readLine().trim();\n\t \t\tint a = Integer.parseInt(st.nextToken());\n\t \t\ttree.get(i+2).add(a);\n\t \t\ttree.get(a).add(i+2);\n \t\t}\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\tout.println((tree.get(i).size()-1));\n \t\t}\n \t\t\n \t\t\n \t\tout.println();\n\t \t\t\n \t\tout.close();\n \t\t\n \t\t\n \t\t\n \t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws Exception{\n\t\tint num = 998244353;\n\n\t\t// TODO Auto-generated method stub\n \t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n \t\tPrintWriter out = new PrintWriter(System.out);\n \t\tint n = Integer.parseInt(bf.readLine());\n \t\tStringTokenizer st = new StringTokenizer(bf.readLine());\n \t\tMap<Integer, ArrayList<Integer>> tree = new HashMap<Integer, ArrayList<Integer>>();\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\ttree.put(i, new ArrayList<Integer>());\n \t\t}\n \t\ttree.get(1).add(-1);\n \t\tfor(int i = 0;i<n-1;i++){\n//\t \t\tString input1 = bf.readLine().trim();\n//\t \t\tString input2 = bf.readLine().trim();\n\t \t\tint a = Integer.parseInt(st.nextToken());\n\t \t\ttree.get(i+2).add(a);\n\t \t\ttree.get(a).add(i+2);\n \t\t}\n \t\tfor(int i = 1;i<=n;i++){\n \t\t\tout.println((tree.get(i).size()-1));\n \t\t}\n \t\t\n \t\t\n \t\tout.println();\n\t \t\t\n \t\tout.close();\n \t\t\n \t\t\n \t\t\n \t}\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception{ int num = 998244353; // TODO Auto-generated method stub BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(System.out); int n = Integer.parseInt(bf.readLine()); StringTokenizer st = new StringTokenizer(bf.readLine()); Map<Integer, ArrayList<Integer>> tree = new HashMap<Integer, ArrayList<Integer>>(); for(int i = 1;i<=n;i++){ tree.put(i, new ArrayList<Integer>()); } tree.get(1).add(-1); for(int i = 0;i<n-1;i++){ // String input1 = bf.readLine().trim(); // String input2 = bf.readLine().trim(); int a = Integer.parseInt(st.nextToken()); tree.get(i+2).add(a); tree.get(a).add(i+2); } for(int i = 1;i<=n;i++){ out.println((tree.get(i).size()-1)); } out.println(); out.close(); } } //StringJoiner sj = new StringJoiner(" "); //sj.add(strings) //sj.toString() gives string of those stuff w spaces or whatever that sequence is
[ 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, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 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, 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 ], [ 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 ], [ 36, 37 ], [ 36, 38 ], [ 29, 39 ], [ 39, 40 ], [ 40, 41 ], [ 29, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 49, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 8, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 6, 78 ], [ 78, 79 ], [ 0, 80 ], [ 80, 81 ], [ 80, 82 ] ]
[ "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 = sc.nextInt(); \n int[] a = new int[n - 1];\n int[] ans = new int[n + 1];\n for(int i = 0;i < n - 1;i++){\n a[i] = sc.nextInt();\n ans[a[i]]++;\n }\n for(int j = 1;j <= n;j++){\n System.out.println(ans[j]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(); \n int[] a = new int[n - 1];\n int[] ans = new int[n + 1];\n for(int i = 0;i < n - 1;i++){\n a[i] = sc.nextInt();\n ans[a[i]]++;\n }\n for(int j = 1;j <= n;j++){\n System.out.println(ans[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[] a = new int[n - 1];\n int[] ans = new int[n + 1];\n for(int i = 0;i < n - 1;i++){\n a[i] = sc.nextInt();\n ans[a[i]]++;\n }\n for(int j = 1;j <= n;j++){\n System.out.println(ans[j]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(); \n int[] a = new int[n - 1];\n int[] ans = new int[n + 1];\n for(int i = 0;i < n - 1;i++){\n a[i] = sc.nextInt();\n ans[a[i]]++;\n }\n for(int j = 1;j <= n;j++){\n System.out.println(ans[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[] a = new int[n - 1];", "a", "new int[n - 1]", "n - 1", "n", "1", "int[] ans = new int[n + 1];", "ans", "new int[n + 1]", "n + 1", "n", "1", "for(int i = 0;i < n - 1;i++){\n a[i] = sc.nextInt();\n ans[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 ans[a[i]]++;\n }", "{\n a[i] = sc.nextInt();\n ans[a[i]]++;\n }", "a[i] = sc.nextInt()", "a[i]", "a", "i", "sc.nextInt()", "sc.nextInt", "sc", "ans[a[i]]++", "ans[a[i]]", "ans", "a[i]", "a", "i", "for(int j = 1;j <= n;j++){\n System.out.println(ans[j]);\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n System.out.println(ans[j]);\n }", "{\n System.out.println(ans[j]);\n }", "System.out.println(ans[j])", "System.out.println", "System.out", "System", "System.out", "ans[j]", "ans", "j", "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 - 1];\n int[] ans = new int[n + 1];\n for(int i = 0;i < n - 1;i++){\n a[i] = sc.nextInt();\n ans[a[i]]++;\n }\n for(int j = 1;j <= n;j++){\n System.out.println(ans[j]);\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[] a = new int[n - 1];\n int[] ans = new int[n + 1];\n for(int i = 0;i < n - 1;i++){\n a[i] = sc.nextInt();\n ans[a[i]]++;\n }\n for(int j = 1;j <= n;j++){\n System.out.println(ans[j]);\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 - 1]; int[] ans = new int[n + 1]; for(int i = 0;i < n - 1;i++){ a[i] = sc.nextInt(); ans[a[i]]++; } for(int j = 1;j <= n;j++){ System.out.println(ans[j]); } } }