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, 0, 18, 13, 2, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 21, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 28, 30 ], [ 21, 31 ], [ 31, 32 ], [ 32, 33 ], [ 21, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 35, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 41, 47 ], [ 8, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 48, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 6, 69 ], [ 69, 70 ] ]
[ "import java.util.Scanner;\nclass Main{\npublic static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n int work[] = new int[N];\n for (int i = 0; i < N-1; i++){\n int a = scan.nextInt();\n work[a-1] += 1;\n }\n for (int j = 0; j < N ; j++){\n System.out.println(work[j]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\npublic static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n int work[] = new int[N];\n for (int i = 0; i < N-1; i++){\n int a = scan.nextInt();\n work[a-1] += 1;\n }\n for (int j = 0; j < N ; j++){\n System.out.println(work[j]);\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 work[] = new int[N];\n for (int i = 0; i < N-1; i++){\n int a = scan.nextInt();\n work[a-1] += 1;\n }\n for (int j = 0; j < N ; j++){\n System.out.println(work[j]);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n int work[] = new int[N];\n for (int i = 0; i < N-1; i++){\n int a = scan.nextInt();\n work[a-1] += 1;\n }\n for (int j = 0; j < N ; j++){\n System.out.println(work[j]);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int work[] = new int[N];", "work", "new int[N]", "N", "for (int i = 0; i < N-1; i++){\n int a = scan.nextInt();\n work[a-1] += 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n int a = scan.nextInt();\n work[a-1] += 1;\n }", "{\n int a = scan.nextInt();\n work[a-1] += 1;\n }", "int a = scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "work[a-1] += 1", "work[a-1]", "work", "a-1", "a", "1", "1", "for (int j = 0; j < N ; j++){\n System.out.println(work[j]);\n }", "int j = 0;", "int j = 0;", "j", "0", "j < N", "j", "N", "j++", "j++", "j", "{\n System.out.println(work[j]);\n }", "{\n System.out.println(work[j]);\n }", "System.out.println(work[j])", "System.out.println", "System.out", "System", "System.out", "work[j]", "work", "j", "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 work[] = new int[N]; for (int i = 0; i < N-1; i++){ int a = scan.nextInt(); work[a-1] += 1; } for (int j = 0; j < N ; j++){ System.out.println(work[j]); } } }
[ 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, 0, 18, 13, 17, 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 ], [ 94, 5 ], [ 94, 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 ], [ 35, 37 ], [ 34, 38 ], [ 8, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 70, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 6, 91 ], [ 91, 92 ], [ 0, 93 ], [ 93, 94 ], [ 93, 95 ] ]
[ "\nimport 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 A[] = new int[N+1];//上司マップ\n int B[] = new int[N+1];//部下の数配列\n A[0]=0;\n A[1]=0;\n B[0]=0;\n for(int i=2;i<=N;i++){\n A[i]=sc.nextInt();\n B[A[i]]++;\n }\n for(int i=1;i<=N;i++){\n System.out.println(B[i]);\n }\n\n\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\n int N = sc.nextInt();\n int A[] = new int[N+1];//上司マップ\n int B[] = new int[N+1];//部下の数配列\n A[0]=0;\n A[1]=0;\n B[0]=0;\n for(int i=2;i<=N;i++){\n A[i]=sc.nextInt();\n B[A[i]]++;\n }\n for(int i=1;i<=N;i++){\n System.out.println(B[i]);\n }\n\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 B[] = new int[N+1];//部下の数配列\n A[0]=0;\n A[1]=0;\n B[0]=0;\n for(int i=2;i<=N;i++){\n A[i]=sc.nextInt();\n B[A[i]]++;\n }\n for(int i=1;i<=N;i++){\n System.out.println(B[i]);\n }\n\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 B[] = new int[N+1];//部下の数配列\n A[0]=0;\n A[1]=0;\n B[0]=0;\n for(int i=2;i<=N;i++){\n A[i]=sc.nextInt();\n B[A[i]]++;\n }\n for(int i=1;i<=N;i++){\n System.out.println(B[i]);\n }\n\n\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int A[] = new int[N+1];", "A", "new int[N+1]", "N+1", "N", "1", "int B[] = new int[N+1];", "B", "new int[N+1]", "N+1", "N", "1", "A[0]=0", "A[0]", "A", "0", "0", "A[1]=0", "A[1]", "A", "1", "0", "B[0]=0", "B[0]", "B", "0", "0", "for(int i=2;i<=N;i++){\n A[i]=sc.nextInt();\n B[A[i]]++;\n }", "int i=2;", "int i=2;", "i", "2", "i<=N", "i", "N", "i++", "i++", "i", "{\n A[i]=sc.nextInt();\n B[A[i]]++;\n }", "{\n A[i]=sc.nextInt();\n B[A[i]]++;\n }", "A[i]=sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "B[A[i]]++", "B[A[i]]", "B", "A[i]", "A", "i", "for(int i=1;i<=N;i++){\n System.out.println(B[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<=N", "i", "N", "i++", "i++", "i", "{\n System.out.println(B[i]);\n }", "{\n System.out.println(B[i]);\n }", "System.out.println(B[i])", "System.out.println", "System.out", "System", "System.out", "B[i]", "B", "i", "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 A[] = new int[N+1];//上司マップ\n int B[] = new int[N+1];//部下の数配列\n A[0]=0;\n A[1]=0;\n B[0]=0;\n for(int i=2;i<=N;i++){\n A[i]=sc.nextInt();\n B[A[i]]++;\n }\n for(int i=1;i<=N;i++){\n System.out.println(B[i]);\n }\n\n\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 A[] = new int[N+1];//上司マップ\n int B[] = new int[N+1];//部下の数配列\n A[0]=0;\n A[1]=0;\n B[0]=0;\n for(int i=2;i<=N;i++){\n A[i]=sc.nextInt();\n B[A[i]]++;\n }\n for(int i=1;i<=N;i++){\n System.out.println(B[i]);\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 N = sc.nextInt(); int A[] = new int[N+1];//上司マップ int B[] = new int[N+1];//部下の数配列 A[0]=0; A[1]=0; B[0]=0; for(int i=2;i<=N;i++){ A[i]=sc.nextInt(); B[A[i]]++; } for(int i=1;i<=N;i++){ System.out.println(B[i]); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 4, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 2, 4, 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, 23, 13, 12, 13, 30, 29, 4, 18, 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, 12, 13, 30, 29, 4, 18, 13, 17, 23, 13, 12, 13, 30, 29, 4, 18, 13, 23, 13, 12, 13, 30, 29, 2, 13, 17, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 18, 13, 13, 29, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 306, 5 ], [ 306, 6 ], [ 6, 7 ], [ 6, 8 ], [ 306, 9 ], [ 9, 10 ], [ 9, 11 ], [ 306, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 14, 19 ], [ 19, 20 ], [ 19, 21 ], [ 14, 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 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 14, 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 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 12, 64 ], [ 64, 65 ], [ 306, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 66, 73 ], [ 73, 74 ], [ 306, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 75, 82 ], [ 82, 83 ], [ 306, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 306, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 98, 99 ], [ 99, 100 ], [ 306, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 108, 109 ], [ 109, 110 ], [ 306, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 119, 120 ], [ 306, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 125, 128 ], [ 121, 129 ], [ 129, 130 ], [ 306, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 131, 138 ], [ 138, 139 ], [ 306, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 140, 147 ], [ 147, 148 ], [ 306, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 154, 156 ], [ 151, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 159, 161 ], [ 151, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 162, 167 ], [ 167, 168 ], [ 167, 169 ], [ 162, 170 ], [ 170, 171 ], [ 171, 172 ], [ 162, 173 ], [ 174, 174 ], [ 174, 175 ], [ 175, 176 ], [ 175, 177 ], [ 177, 178 ], [ 178, 179 ], [ 177, 180 ], [ 177, 181 ], [ 181, 182 ], [ 181, 183 ], [ 151, 184 ], [ 184, 185 ], [ 149, 186 ], [ 186, 187 ], [ 306, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 193, 195 ], [ 190, 196 ], [ 196, 197 ], [ 196, 198 ], [ 198, 199 ], [ 198, 200 ], [ 190, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 203, 205 ], [ 201, 206 ], [ 206, 207 ], [ 206, 208 ], [ 201, 209 ], [ 209, 210 ], [ 210, 211 ], [ 201, 212 ], [ 213, 213 ], [ 213, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 217, 218 ], [ 216, 219 ], [ 216, 220 ], [ 220, 221 ], [ 220, 222 ], [ 190, 223 ], [ 223, 224 ], [ 188, 225 ], [ 225, 226 ], [ 306, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 232, 233 ], [ 232, 234 ], [ 229, 235 ], [ 235, 236 ], [ 235, 237 ], [ 237, 238 ], [ 237, 239 ], [ 229, 240 ], [ 240, 241 ], [ 241, 242 ], [ 242, 243 ], [ 242, 244 ], [ 240, 245 ], [ 245, 246 ], [ 245, 247 ], [ 240, 248 ], [ 248, 249 ], [ 249, 250 ], [ 240, 251 ], [ 252, 252 ], [ 252, 253 ], [ 253, 254 ], [ 253, 255 ], [ 255, 256 ], [ 256, 257 ], [ 255, 258 ], [ 255, 259 ], [ 259, 260 ], [ 259, 261 ], [ 229, 262 ], [ 262, 263 ], [ 227, 264 ], [ 264, 265 ], [ 306, 266 ], [ 266, 267 ], [ 266, 268 ], [ 268, 269 ], [ 269, 270 ], [ 269, 271 ], [ 271, 272 ], [ 271, 273 ], [ 268, 274 ], [ 274, 275 ], [ 274, 276 ], [ 276, 277 ], [ 276, 278 ], [ 268, 279 ], [ 279, 280 ], [ 280, 281 ], [ 281, 282 ], [ 281, 283 ], [ 279, 284 ], [ 284, 285 ], [ 284, 286 ], [ 279, 287 ], [ 287, 288 ], [ 288, 289 ], [ 279, 290 ], [ 291, 291 ], [ 291, 292 ], [ 292, 293 ], [ 292, 294 ], [ 294, 295 ], [ 295, 296 ], [ 294, 297 ], [ 294, 298 ], [ 298, 299 ], [ 298, 300 ], [ 268, 301 ], [ 301, 302 ], [ 266, 303 ], [ 303, 304 ], [ 0, 305 ], [ 305, 306 ], [ 305, 307 ] ]
[ "import java.util.*;\n\n//update 2020/1/1 23:01\n\npublic class Main{\n\n static Scanner sc = new Scanner(System.in);\n static StringBuilder sb = new StringBuilder();\n\n public static void main(String[] args) {\n\n int n = nextInt();\n int[] ans = new int[n];\n for(int i=1;i<n;i++){\n ans[nextInt()-1]++;\n }\n for(int i=0;i<n;i++){\n System.out.println(ans[i]);\n }\n\n\n\n\n //System.out.println();\n\n }\n /*\n static String toSmall(String s){\n char c = s.charAt(0);\n //if(Character.isUpperCase(c)){\n if(c<=90){\n c += 32;\n }\n return String.valueOf(c);\n }\n static String toBig(String s){\n char c = s.charAt(0);\n //if(Character.isLowerCase(c)){\n if(c>=97){\n c -= 32;\n }\n return String.valueOf(c);\n }\n */\n\n static String toSmall(String s){\n return s.toLowerCase();\n }\n\n static String toBig(String s){\n return s.toUpperCase();\n }\n\n static String next(){\n return sc.next();\n }\n\n static int nextInt(){\n return Integer.parseInt(sc.next());\n }\n\n static long nextLong(){\n return Long.parseLong(sc.next());\n }\n\n static double nextDouble(){\n return Double.parseDouble(sc.next());\n }\n\n static String[] splitString(String s){\n return s.split(\"\");\n }\n\n static char[] splitChar(String s){\n return s.toCharArray();\n }\n\n static int charToInt(char a){\n return a - 48;\n }\n\n////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n////////////////////////////////////////////\n\n////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n////////////////////////////////////////////\n\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\n static Scanner sc = new Scanner(System.in);\n static StringBuilder sb = new StringBuilder();\n\n public static void main(String[] args) {\n\n int n = nextInt();\n int[] ans = new int[n];\n for(int i=1;i<n;i++){\n ans[nextInt()-1]++;\n }\n for(int i=0;i<n;i++){\n System.out.println(ans[i]);\n }\n\n\n\n\n //System.out.println();\n\n }\n /*\n static String toSmall(String s){\n char c = s.charAt(0);\n //if(Character.isUpperCase(c)){\n if(c<=90){\n c += 32;\n }\n return String.valueOf(c);\n }\n static String toBig(String s){\n char c = s.charAt(0);\n //if(Character.isLowerCase(c)){\n if(c>=97){\n c -= 32;\n }\n return String.valueOf(c);\n }\n */\n\n static String toSmall(String s){\n return s.toLowerCase();\n }\n\n static String toBig(String s){\n return s.toUpperCase();\n }\n\n static String next(){\n return sc.next();\n }\n\n static int nextInt(){\n return Integer.parseInt(sc.next());\n }\n\n static long nextLong(){\n return Long.parseLong(sc.next());\n }\n\n static double nextDouble(){\n return Double.parseDouble(sc.next());\n }\n\n static String[] splitString(String s){\n return s.split(\"\");\n }\n\n static char[] splitChar(String s){\n return s.toCharArray();\n }\n\n static int charToInt(char a){\n return a - 48;\n }\n\n////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n////////////////////////////////////////////\n\n////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n////////////////////////////////////////////\n\n}", "Main", "static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "static StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "public static void main(String[] args) {\n\n int n = nextInt();\n int[] ans = new int[n];\n for(int i=1;i<n;i++){\n ans[nextInt()-1]++;\n }\n for(int i=0;i<n;i++){\n System.out.println(ans[i]);\n }\n\n\n\n\n //System.out.println();\n\n }", "main", "{\n\n int n = nextInt();\n int[] ans = new int[n];\n for(int i=1;i<n;i++){\n ans[nextInt()-1]++;\n }\n for(int i=0;i<n;i++){\n System.out.println(ans[i]);\n }\n\n\n\n\n //System.out.println();\n\n }", "int n = nextInt();", "n", "nextInt()", "nextInt", "int[] ans = new int[n];", "ans", "new int[n]", "n", "for(int i=1;i<n;i++){\n ans[nextInt()-1]++;\n }", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n ans[nextInt()-1]++;\n }", "{\n ans[nextInt()-1]++;\n }", "ans[nextInt()-1]++", "ans[nextInt()-1]", "ans", "nextInt()-1", "nextInt()", "nextInt", "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", "static String toSmall(String s){\n return s.toLowerCase();\n }", "toSmall", "{\n return s.toLowerCase();\n }", "return s.toLowerCase();", "s.toLowerCase()", "s.toLowerCase", "s", "String s", "s", "static String toBig(String s){\n return s.toUpperCase();\n }", "toBig", "{\n return s.toUpperCase();\n }", "return s.toUpperCase();", "s.toUpperCase()", "s.toUpperCase", "s", "String s", "s", "static String next(){\n return sc.next();\n }", "next", "{\n return sc.next();\n }", "return sc.next();", "sc.next()", "sc.next", "sc", "static int nextInt(){\n return Integer.parseInt(sc.next());\n }", "nextInt", "{\n return Integer.parseInt(sc.next());\n }", "return Integer.parseInt(sc.next());", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "static long nextLong(){\n return Long.parseLong(sc.next());\n }", "nextLong", "{\n return Long.parseLong(sc.next());\n }", "return Long.parseLong(sc.next());", "Long.parseLong(sc.next())", "Long.parseLong", "Long", "sc.next()", "sc.next", "sc", "static double nextDouble(){\n return Double.parseDouble(sc.next());\n }", "nextDouble", "{\n return Double.parseDouble(sc.next());\n }", "return Double.parseDouble(sc.next());", "Double.parseDouble(sc.next())", "Double.parseDouble", "Double", "sc.next()", "sc.next", "sc", "static String[] splitString(String s){\n return s.split(\"\");\n }", "splitString", "{\n return s.split(\"\");\n }", "return s.split(\"\");", "s.split(\"\")", "s.split", "s", "\"\"", "String s", "s", "static char[] splitChar(String s){\n return s.toCharArray();\n }", "splitChar", "{\n return s.toCharArray();\n }", "return s.toCharArray();", "s.toCharArray()", "s.toCharArray", "s", "String s", "s", "static int charToInt(char a){\n return a - 48;\n }", "charToInt", "{\n return a - 48;\n }", "return a - 48;", "a - 48", "a", "48", "char a", "a", "////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }", "max", "{\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }", "int lng = a.length;", "lng", "a.length", "a", "a.length", "int max = a[0];", "max", "a[0]", "a", "0", "for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<lng", "i", "lng", "i++", "i++", "i", "{\n max = Math.max(max,a[i]);\n }", "{\n max = Math.max(max,a[i]);\n }", "max = Math.max(max,a[i])", "max", "Math.max(max,a[i])", "Math.max", "Math", "max", "a[i]", "a", "i", "return max;", "max", "int[] a", "a", "public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }", "max", "{\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }", "int lng = a.length;", "lng", "a.length", "a", "a.length", "long max = a[0];", "max", "a[0]", "a", "0", "for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<lng", "i", "lng", "i++", "i++", "i", "{\n max = Math.max(max,a[i]);\n }", "{\n max = Math.max(max,a[i]);\n }", "max = Math.max(max,a[i])", "max", "Math.max(max,a[i])", "Math.max", "Math", "max", "a[i]", "a", "i", "return max;", "max", "long[] a", "a", "////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }", "min", "{\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }", "int lng = a.length;", "lng", "a.length", "a", "a.length", "int min = a[0];", "min", "a[0]", "a", "0", "for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<lng", "i", "lng", "i++", "i++", "i", "{\n min = Math.min(min,a[i]);\n }", "{\n min = Math.min(min,a[i]);\n }", "min = Math.min(min,a[i])", "min", "Math.min(min,a[i])", "Math.min", "Math", "min", "a[i]", "a", "i", "return min;", "min", "int[] a", "a", "public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }", "min", "{\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }", "int lng = a.length;", "lng", "a.length", "a", "a.length", "long min = a[0];", "min", "a[0]", "a", "0", "for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<lng", "i", "lng", "i++", "i++", "i", "{\n min = Math.min(min,a[i]);\n }", "{\n min = Math.min(min,a[i]);\n }", "min = Math.min(min,a[i])", "min", "Math.min(min,a[i])", "Math.min", "Math", "min", "a[i]", "a", "i", "return min;", "min", "long[] a", "a", "public class Main{\n\n static Scanner sc = new Scanner(System.in);\n static StringBuilder sb = new StringBuilder();\n\n public static void main(String[] args) {\n\n int n = nextInt();\n int[] ans = new int[n];\n for(int i=1;i<n;i++){\n ans[nextInt()-1]++;\n }\n for(int i=0;i<n;i++){\n System.out.println(ans[i]);\n }\n\n\n\n\n //System.out.println();\n\n }\n /*\n static String toSmall(String s){\n char c = s.charAt(0);\n //if(Character.isUpperCase(c)){\n if(c<=90){\n c += 32;\n }\n return String.valueOf(c);\n }\n static String toBig(String s){\n char c = s.charAt(0);\n //if(Character.isLowerCase(c)){\n if(c>=97){\n c -= 32;\n }\n return String.valueOf(c);\n }\n */\n\n static String toSmall(String s){\n return s.toLowerCase();\n }\n\n static String toBig(String s){\n return s.toUpperCase();\n }\n\n static String next(){\n return sc.next();\n }\n\n static int nextInt(){\n return Integer.parseInt(sc.next());\n }\n\n static long nextLong(){\n return Long.parseLong(sc.next());\n }\n\n static double nextDouble(){\n return Double.parseDouble(sc.next());\n }\n\n static String[] splitString(String s){\n return s.split(\"\");\n }\n\n static char[] splitChar(String s){\n return s.toCharArray();\n }\n\n static int charToInt(char a){\n return a - 48;\n }\n\n////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n////////////////////////////////////////////\n\n////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n////////////////////////////////////////////\n\n}", "public class Main{\n\n static Scanner sc = new Scanner(System.in);\n static StringBuilder sb = new StringBuilder();\n\n public static void main(String[] args) {\n\n int n = nextInt();\n int[] ans = new int[n];\n for(int i=1;i<n;i++){\n ans[nextInt()-1]++;\n }\n for(int i=0;i<n;i++){\n System.out.println(ans[i]);\n }\n\n\n\n\n //System.out.println();\n\n }\n /*\n static String toSmall(String s){\n char c = s.charAt(0);\n //if(Character.isUpperCase(c)){\n if(c<=90){\n c += 32;\n }\n return String.valueOf(c);\n }\n static String toBig(String s){\n char c = s.charAt(0);\n //if(Character.isLowerCase(c)){\n if(c>=97){\n c -= 32;\n }\n return String.valueOf(c);\n }\n */\n\n static String toSmall(String s){\n return s.toLowerCase();\n }\n\n static String toBig(String s){\n return s.toUpperCase();\n }\n\n static String next(){\n return sc.next();\n }\n\n static int nextInt(){\n return Integer.parseInt(sc.next());\n }\n\n static long nextLong(){\n return Long.parseLong(sc.next());\n }\n\n static double nextDouble(){\n return Double.parseDouble(sc.next());\n }\n\n static String[] splitString(String s){\n return s.split(\"\");\n }\n\n static char[] splitChar(String s){\n return s.toCharArray();\n }\n\n static int charToInt(char a){\n return a - 48;\n }\n\n////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n////////////////////////////////////////////\n\n////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n////////////////////////////////////////////\n\n}", "Main" ]
import java.util.*; //update 2020/1/1 23:01 public class Main{ static Scanner sc = new Scanner(System.in); static StringBuilder sb = new StringBuilder(); public static void main(String[] args) { int n = nextInt(); int[] ans = new int[n]; for(int i=1;i<n;i++){ ans[nextInt()-1]++; } for(int i=0;i<n;i++){ System.out.println(ans[i]); } //System.out.println(); } /* static String toSmall(String s){ char c = s.charAt(0); //if(Character.isUpperCase(c)){ if(c<=90){ c += 32; } return String.valueOf(c); } static String toBig(String s){ char c = s.charAt(0); //if(Character.isLowerCase(c)){ if(c>=97){ c -= 32; } return String.valueOf(c); } */ static String toSmall(String s){ return s.toLowerCase(); } static String toBig(String s){ return s.toUpperCase(); } static String next(){ return sc.next(); } static int nextInt(){ return Integer.parseInt(sc.next()); } static long nextLong(){ return Long.parseLong(sc.next()); } static double nextDouble(){ return Double.parseDouble(sc.next()); } static String[] splitString(String s){ return s.split(""); } static char[] splitChar(String s){ return s.toCharArray(); } static int charToInt(char a){ return a - 48; } //////////////////////////////////////////// public static int max(int[] a){ int lng = a.length; int max = a[0]; for(int i=1;i<lng;i++){ max = Math.max(max,a[i]); } return max; } public static long max(long[] a){ int lng = a.length; long max = a[0]; for(int i=1;i<lng;i++){ max = Math.max(max,a[i]); } return max; } //////////////////////////////////////////// //////////////////////////////////////////// public static int min(int[] a){ int lng = a.length; int min = a[0]; for(int i=1;i<lng;i++){ min = Math.min(min,a[i]); } return min; } public static long min(long[] a){ int lng = a.length; long min = a[0]; for(int i=1;i<lng;i++){ min = Math.min(min,a[i]); } return min; } //////////////////////////////////////////// }
[ 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, 2, 13, 17, 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, 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 ], [ 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 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 28, 30 ], [ 25, 31 ], [ 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 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 53, 63 ], [ 63, 64 ], [ 64, 65 ], [ 53, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 8, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 75, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 92, 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\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n= sc.nextInt();\n\t\tlong[] A = new long[n];\n\t\tlong[] ANS = new long[n];\n\t\tANS[n-1]=0;\t\n\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tA[i]= sc.nextInt();\n\t\t\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tANS[(int) (A[i]-1)]++;\t\n\n\t\tfor (int i = 0; i < n; i++) \n\t\tSystem.out.println(ANS[i]);\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\t\tint n= sc.nextInt();\n\t\tlong[] A = new long[n];\n\t\tlong[] ANS = new long[n];\n\t\tANS[n-1]=0;\t\n\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tA[i]= sc.nextInt();\n\t\t\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tANS[(int) (A[i]-1)]++;\t\n\n\t\tfor (int i = 0; i < n; i++) \n\t\tSystem.out.println(ANS[i]);\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 n= sc.nextInt();\n\t\tlong[] A = new long[n];\n\t\tlong[] ANS = new long[n];\n\t\tANS[n-1]=0;\t\n\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tA[i]= sc.nextInt();\n\t\t\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tANS[(int) (A[i]-1)]++;\t\n\n\t\tfor (int i = 0; i < n; i++) \n\t\tSystem.out.println(ANS[i]);\n \n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n= sc.nextInt();\n\t\tlong[] A = new long[n];\n\t\tlong[] ANS = new long[n];\n\t\tANS[n-1]=0;\t\n\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tA[i]= sc.nextInt();\n\t\t\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tANS[(int) (A[i]-1)]++;\t\n\n\t\tfor (int i = 0; i < n; i++) \n\t\tSystem.out.println(ANS[i]);\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", "long[] A = new long[n];", "A", "new long[n]", "n", "long[] ANS = new long[n];", "ANS", "new long[n]", "n", "ANS[n-1]=0", "ANS[n-1]", "ANS", "n-1", "n", "1", "0", "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", "for (int i = 0; i < n-1; i++)\n\t\t\tANS[(int) (A[i]-1)]++;", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "ANS[(int) (A[i]-1)]++;", "ANS[(int) (A[i]-1)]++", "ANS[(int) (A[i]-1)]", "ANS", "(int) (A[i]-1)", "A[i]", "A", "i", "1", "for (int i = 0; i < n; i++) \n\t\tSystem.out.println(ANS[i]);", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "System.out.println(ANS[i]);", "System.out.println(ANS[i])", "System.out.println", "System.out", "System", "System.out", "ANS[i]", "ANS", "i", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n= sc.nextInt();\n\t\tlong[] A = new long[n];\n\t\tlong[] ANS = new long[n];\n\t\tANS[n-1]=0;\t\n\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tA[i]= sc.nextInt();\n\t\t\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tANS[(int) (A[i]-1)]++;\t\n\n\t\tfor (int i = 0; i < n; i++) \n\t\tSystem.out.println(ANS[i]);\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\t\tint n= sc.nextInt();\n\t\tlong[] A = new long[n];\n\t\tlong[] ANS = new long[n];\n\t\tANS[n-1]=0;\t\n\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tA[i]= sc.nextInt();\n\t\t\n\t\tfor (int i = 0; i < n-1; i++)\n\t\t\tANS[(int) (A[i]-1)]++;\t\n\n\t\tfor (int i = 0; i < n; i++) \n\t\tSystem.out.println(ANS[i]);\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(); long[] A = new long[n]; long[] ANS = new long[n]; ANS[n-1]=0; for (int i = 0; i < n-1; i++) A[i]= sc.nextInt(); for (int i = 0; i < n-1; i++) ANS[(int) (A[i]-1)]++; for (int i = 0; i < n; i++) System.out.println(ANS[i]); sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 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, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 13, 2, 4, 18, 13, 13, 17, 2, 4, 18, 13, 2, 4, 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, 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 ], [ 137, 23 ], [ 137, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 26, 35 ], [ 35, 36 ], [ 35, 37 ], [ 26, 38 ], [ 38, 39 ], [ 38, 40 ], [ 26, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 52 ], [ 53, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 58, 59 ], [ 26, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 65, 67 ], [ 60, 68 ], [ 68, 69 ], [ 69, 70 ], [ 60, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 26, 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 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 95, 100 ], [ 92, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 105, 110 ], [ 101, 111 ], [ 26, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 117, 118 ], [ 117, 119 ], [ 112, 120 ], [ 120, 121 ], [ 121, 122 ], [ 112, 123 ], [ 124, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 125, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 24, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "import java.io.BufferedReader;\nimport java.io.*;\nimport java.util.*;\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Collections;\n\npublic class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n List<Integer> list = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n\n for(int i = 1 ; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n for(int i = 0 ; i < n ; i++){\n list2.add(0);\n }\n\n for(int i = 0 ; i < n-1 ; i++){\n list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1);\n //System.out.println(list2);\n }\n\n for(int i = 0 ; i < n ; i++){\n System.out.println(list2.get(i));\n }\n\n\n \n \n\n\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Iterator;", "Iterator", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Collections;", "Collections", "java.util", "public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n List<Integer> list = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n\n for(int i = 1 ; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n for(int i = 0 ; i < n ; i++){\n list2.add(0);\n }\n\n for(int i = 0 ; i < n-1 ; i++){\n list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1);\n //System.out.println(list2);\n }\n\n for(int i = 0 ; i < n ; i++){\n System.out.println(list2.get(i));\n }\n\n\n \n \n\n\n }\n}", "Main", "public static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n List<Integer> list = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n\n for(int i = 1 ; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n for(int i = 0 ; i < n ; i++){\n list2.add(0);\n }\n\n for(int i = 0 ; i < n-1 ; i++){\n list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1);\n //System.out.println(list2);\n }\n\n for(int i = 0 ; i < n ; i++){\n System.out.println(list2.get(i));\n }\n\n\n \n \n\n\n }", "main", "{\n \n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n List<Integer> list = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n\n for(int i = 1 ; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n for(int i = 0 ; i < n ; i++){\n list2.add(0);\n }\n\n for(int i = 0 ; i < n-1 ; i++){\n list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1);\n //System.out.println(list2);\n }\n\n for(int i = 0 ; i < n ; i++){\n System.out.println(list2.get(i));\n }\n\n\n \n \n\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "List<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "List<Integer> list2 = new ArrayList<>();", "list2", "new ArrayList<>()", "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 list2.add(0);\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n list2.add(0);\n }", "{\n list2.add(0);\n }", "list2.add(0)", "list2.add", "list2", "0", "for(int i = 0 ; i < n-1 ; i++){\n list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1);\n //System.out.println(list2);\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1);\n //System.out.println(list2);\n }", "{\n list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1);\n //System.out.println(list2);\n }", "list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1)", "list2.set", "list2", "list.get(i)-1", "list.get(i)", "list.get", "list", "i", "1", "list2.get(list.get(i)-1)+1", "list2.get(list.get(i)-1)", "list2.get", "list2", "list.get(i)-1", "list.get(i)", "list.get", "list", "i", "1", "1", "for(int i = 0 ; i < n ; i++){\n System.out.println(list2.get(i));\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n System.out.println(list2.get(i));\n }", "{\n System.out.println(list2.get(i));\n }", "System.out.println(list2.get(i))", "System.out.println", "System.out", "System", "System.out", "list2.get(i)", "list2.get", "list2", "i", "final String[] args", "args", "public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n List<Integer> list = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n\n for(int i = 1 ; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n for(int i = 0 ; i < n ; i++){\n list2.add(0);\n }\n\n for(int i = 0 ; i < n-1 ; i++){\n list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1);\n //System.out.println(list2);\n }\n\n for(int i = 0 ; i < n ; i++){\n System.out.println(list2.get(i));\n }\n\n\n \n \n\n\n }\n}", "public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n List<Integer> list = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n\n for(int i = 1 ; i < n ; i++){\n list.add(sc.nextInt());\n }\n\n for(int i = 0 ; i < n ; i++){\n list2.add(0);\n }\n\n for(int i = 0 ; i < n-1 ; i++){\n list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1);\n //System.out.println(list2);\n }\n\n for(int i = 0 ; i < n ; i++){\n System.out.println(list2.get(i));\n }\n\n\n \n \n\n\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.*; import java.util.*; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Collections; public class Main { public static void main(final String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); List<Integer> list = new ArrayList<>(); List<Integer> list2 = new ArrayList<>(); for(int i = 1 ; i < n ; i++){ list.add(sc.nextInt()); } for(int i = 0 ; i < n ; i++){ list2.add(0); } for(int i = 0 ; i < n-1 ; i++){ list2.set(list.get(i)-1, list2.get(list.get(i)-1)+1); //System.out.println(list2); } for(int i = 0 ; i < n ; i++){ System.out.println(list2.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, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 40, 18, 13, 2, 13, 17, 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, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 81, 5 ], [ 81, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 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 ], [ 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 ], [ 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 scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int[] cnt = new int[N];\n for (int i = 1; i < N; i++) {\n int A = scanner.nextInt();\n cnt[A - 1]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(cnt[i]).append('\\n');\n }\n System.out.println(sb.toString());\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\n int N = scanner.nextInt();\n int[] cnt = new int[N];\n for (int i = 1; i < N; i++) {\n int A = scanner.nextInt();\n cnt[A - 1]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(cnt[i]).append('\\n');\n }\n System.out.println(sb.toString());\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int[] cnt = new int[N];\n for (int i = 1; i < N; i++) {\n int A = scanner.nextInt();\n cnt[A - 1]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(cnt[i]).append('\\n');\n }\n System.out.println(sb.toString());\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int[] cnt = new int[N];\n for (int i = 1; i < N; i++) {\n int A = scanner.nextInt();\n cnt[A - 1]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(cnt[i]).append('\\n');\n }\n System.out.println(sb.toString());\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int[] cnt = new int[N];", "cnt", "new int[N]", "N", "for (int i = 1; i < N; i++) {\n int A = scanner.nextInt();\n cnt[A - 1]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n int A = scanner.nextInt();\n cnt[A - 1]++;\n }", "{\n int A = scanner.nextInt();\n cnt[A - 1]++;\n }", "int A = scanner.nextInt();", "A", "scanner.nextInt()", "scanner.nextInt", "scanner", "cnt[A - 1]++", "cnt[A - 1]", "cnt", "A - 1", "A", "1", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "for (int i = 0; i < N; i++) {\n sb.append(cnt[i]).append('\\n');\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n sb.append(cnt[i]).append('\\n');\n }", "{\n sb.append(cnt[i]).append('\\n');\n }", "sb.append(cnt[i]).append('\\n')", "sb.append(cnt[i]).append", "sb.append(cnt[i])", "sb.append", "sb", "cnt[i]", "cnt", "i", "'\\n'", "System.out.println(sb.toString())", "System.out.println", "System.out", "System", "System.out", "sb.toString()", "sb.toString", "sb", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int[] cnt = new int[N];\n for (int i = 1; i < N; i++) {\n int A = scanner.nextInt();\n cnt[A - 1]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(cnt[i]).append('\\n');\n }\n System.out.println(sb.toString());\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int[] cnt = new int[N];\n for (int i = 1; i < N; i++) {\n int A = scanner.nextInt();\n cnt[A - 1]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(cnt[i]).append('\\n');\n }\n System.out.println(sb.toString());\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[] cnt = new int[N]; for (int i = 1; i < N; i++) { int A = scanner.nextInt(); cnt[A - 1]++; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < N; i++) { sb.append(cnt[i]).append('\n'); } System.out.println(sb.toString()); } }
[ 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, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 104, 11 ], [ 104, 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 ], [ 14, 43 ], [ 43, 44 ], [ 43, 45 ], [ 14, 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 ], [ 62, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 69, 71 ], [ 61, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 75, 79 ], [ 14, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 80, 88 ], [ 88, 89 ], [ 89, 90 ], [ 80, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 12, 101 ], [ 101, 102 ], [ 0, 103 ], [ 103, 104 ], [ 103, 105 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(boss[i]);\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(boss[i]);\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(boss[i]);\n }\n }", "main", "{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(boss[i]);\n }\n }", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "int n = Integer.parseInt(in.readLine());", "n", "Integer.parseInt(in.readLine())", "Integer.parseInt", "Integer", "in.readLine()", "in.readLine", "in", "int[] a = new int[n-1];", "a", "new int[n-1]", "n-1", "n", "1", "String[] str = in.readLine().split(\" \");", "str", "in.readLine().split(\" \")", "in.readLine().split", "in.readLine()", "in.readLine", "in", "\" \"", "in.close()", "in.close", "in", "int[] boss = new int[n];", "boss", "new int[n]", "n", "for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[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] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }", "{\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }", "a[i] = Integer.parseInt(str[i])", "a[i]", "a", "i", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "boss[a[i]-1]++", "boss[a[i]-1]", "boss", "a[i]-1", "a[i]", "a", "i", "1", "for(int i=0; i<n; i++) {\n System.out.println(boss[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n System.out.println(boss[i]);\n }", "{\n System.out.println(boss[i]);\n }", "System.out.println(boss[i])", "System.out.println", "System.out", "System", "System.out", "boss[i]", "boss", "i", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(boss[i]);\n }\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(boss[i]);\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(in.readLine()); int[] a = new int[n-1]; String[] str = in.readLine().split(" "); in.close(); int[] boss = new int[n]; for(int i=0; i<n-1; i++) { a[i] = Integer.parseInt(str[i]); boss[a[i]-1]++; } for(int i=0; i<n; i++) { System.out.println(boss[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 0, 13, 4, 18, 13, 41, 13, 17, 41, 13, 20, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 40, 18, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 13, 2, 18, 13, 13, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 8, 24 ], [ 24, 25 ], [ 24, 26 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 49, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 8, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 69, 77 ], [ 77, 78 ], [ 78, 79 ], [ 69, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 86, 90 ], [ 6, 91 ], [ 91, 92 ] ]
[ "import java.util.*;\nclass Main\n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint t,k;\n\t\t\n\t\tk=sc.nextInt();\n\t\tint sum=0;\n\t\tint a[]=new int[200010];\n\t\tint arr[]=new int[200010];\n\n\t\tfor(int i=2;i<=k;i++)\n\t\ta[i]=sc.nextInt();\n\t\tfor(int i=2;i<=k;i++)\n\t\tarr[a[i]]++;\n\t\tfor(int i=1;i<=k;i++)\n\t\tSystem.out.println(arr[i]+\"\");\n\t\t\n\t\n\t\t\n\t}\n\t\n\t\n\t\t\t\n\t\n\t\t\n}\n", "import java.util.*;", "util.*", "java", "class Main\n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint t,k;\n\t\t\n\t\tk=sc.nextInt();\n\t\tint sum=0;\n\t\tint a[]=new int[200010];\n\t\tint arr[]=new int[200010];\n\n\t\tfor(int i=2;i<=k;i++)\n\t\ta[i]=sc.nextInt();\n\t\tfor(int i=2;i<=k;i++)\n\t\tarr[a[i]]++;\n\t\tfor(int i=1;i<=k;i++)\n\t\tSystem.out.println(arr[i]+\"\");\n\t\t\n\t\n\t\t\n\t}\n\t\n\t\n\t\t\t\n\t\n\t\t\n}", "Main", "public static void main(String[] args) \n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint t,k;\n\t\t\n\t\tk=sc.nextInt();\n\t\tint sum=0;\n\t\tint a[]=new int[200010];\n\t\tint arr[]=new int[200010];\n\n\t\tfor(int i=2;i<=k;i++)\n\t\ta[i]=sc.nextInt();\n\t\tfor(int i=2;i<=k;i++)\n\t\tarr[a[i]]++;\n\t\tfor(int i=1;i<=k;i++)\n\t\tSystem.out.println(arr[i]+\"\");\n\t\t\n\t\n\t\t\n\t}", "main", "{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint t,k;\n\t\t\n\t\tk=sc.nextInt();\n\t\tint sum=0;\n\t\tint a[]=new int[200010];\n\t\tint arr[]=new int[200010];\n\n\t\tfor(int i=2;i<=k;i++)\n\t\ta[i]=sc.nextInt();\n\t\tfor(int i=2;i<=k;i++)\n\t\tarr[a[i]]++;\n\t\tfor(int i=1;i<=k;i++)\n\t\tSystem.out.println(arr[i]+\"\");\n\t\t\n\t\n\t\t\n\t}", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int t", "t", "k;", "k", "k=sc.nextInt()", "k", "sc.nextInt()", "sc.nextInt", "sc", "int sum=0;", "sum", "0", "int a[]=new int[200010];", "a", "new int[200010]", "200010", "int arr[]=new int[200010];", "arr", "new int[200010]", "200010", "for(int i=2;i<=k;i++)\n\t\ta[i]=sc.nextInt();", "int i=2;", "int i=2;", "i", "2", "i<=k", "i", "k", "i++", "i++", "i", "a[i]=sc.nextInt();", "a[i]=sc.nextInt()", "a[i]", "a", "i", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=2;i<=k;i++)\n\t\tarr[a[i]]++;", "int i=2;", "int i=2;", "i", "2", "i<=k", "i", "k", "i++", "i++", "i", "arr[a[i]]++;", "arr[a[i]]++", "arr[a[i]]", "arr", "a[i]", "a", "i", "for(int i=1;i<=k;i++)\n\t\tSystem.out.println(arr[i]+\"\");", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "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]", "arr", "i", "\"\"", "String[] args", "args" ]
import java.util.*; class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int t,k; k=sc.nextInt(); int sum=0; int a[]=new int[200010]; int arr[]=new int[200010]; for(int i=2;i<=k;i++) a[i]=sc.nextInt(); for(int i=2;i<=k;i++) arr[a[i]]++; for(int i=1;i<=k;i++) System.out.println(arr[i]+""); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 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 ], [ 75, 5 ], [ 75, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 21 ], [ 21, 22 ], [ 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 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 6, 72 ], [ 72, 73 ], [ 0, 74 ], [ 74, 75 ], [ 74, 76 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint a[] = new int[300000];\n\t\tint ans[] = new int[300000];\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= n; 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 scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint a[] = new int[300000];\n\t\tint ans[] = new int[300000];\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= n; 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 scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint a[] = new int[300000];\n\t\tint ans[] = new int[300000];\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint a[] = new int[300000];\n\t\tint ans[] = new int[300000];\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\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[300000];", "a", "new int[300000]", "300000", "int ans[] = new int[300000];", "ans", "new int[300000]", "300000", "for (int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\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\ta[i] = scan.nextInt();\n\t\t\tans[a[i]]++;\n\t\t}", "{\n\t\t\ta[i] = scan.nextInt();\n\t\t\tans[a[i]]++;\n\t\t}", "a[i] = scan.nextInt()", "a[i]", "a", "i", "scan.nextInt()", "scan.nextInt", "scan", "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\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint a[] = new int[300000];\n\t\tint ans[] = new int[300000];\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= n; 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 scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint a[] = new int[300000];\n\t\tint ans[] = new int[300000];\n\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tans[a[i]]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= n; 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 scan = new Scanner(System.in); int n = scan.nextInt(); int a[] = new int[300000]; int ans[] = new int[300000]; for (int i = 2; i <= n; i++) { a[i] = scan.nextInt(); 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, 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\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] directSubordinateCnts = new int[n + 10];\n\t\tfor (int i = 2; i <= n; ++i) {\n\t\t\tint directBoss = sc.nextInt();\n\t\t\t++directSubordinateCnts[directBoss];\n\t\t}\n\n\t\tfor (int i = 1; i <= n; ++i) {\n\t\t\tSystem.out.println(directSubordinateCnts[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\t\tint n = sc.nextInt();\n\t\tint[] directSubordinateCnts = new int[n + 10];\n\t\tfor (int i = 2; i <= n; ++i) {\n\t\t\tint directBoss = sc.nextInt();\n\t\t\t++directSubordinateCnts[directBoss];\n\t\t}\n\n\t\tfor (int i = 1; i <= n; ++i) {\n\t\t\tSystem.out.println(directSubordinateCnts[i]);\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] directSubordinateCnts = new int[n + 10];\n\t\tfor (int i = 2; i <= n; ++i) {\n\t\t\tint directBoss = sc.nextInt();\n\t\t\t++directSubordinateCnts[directBoss];\n\t\t}\n\n\t\tfor (int i = 1; i <= n; ++i) {\n\t\t\tSystem.out.println(directSubordinateCnts[i]);\n\t\t}\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] directSubordinateCnts = new int[n + 10];\n\t\tfor (int i = 2; i <= n; ++i) {\n\t\t\tint directBoss = sc.nextInt();\n\t\t\t++directSubordinateCnts[directBoss];\n\t\t}\n\n\t\tfor (int i = 1; i <= n; ++i) {\n\t\t\tSystem.out.println(directSubordinateCnts[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[] directSubordinateCnts = new int[n + 10];", "directSubordinateCnts", "new int[n + 10]", "n + 10", "n", "10", "for (int i = 2; i <= n; ++i) {\n\t\t\tint directBoss = sc.nextInt();\n\t\t\t++directSubordinateCnts[directBoss];\n\t\t}", "int i = 2;", "int i = 2;", "i", "2", "i <= n", "i", "n", "++i", "++i", "i", "{\n\t\t\tint directBoss = sc.nextInt();\n\t\t\t++directSubordinateCnts[directBoss];\n\t\t}", "{\n\t\t\tint directBoss = sc.nextInt();\n\t\t\t++directSubordinateCnts[directBoss];\n\t\t}", "int directBoss = sc.nextInt();", "directBoss", "sc.nextInt()", "sc.nextInt", "sc", "++directSubordinateCnts[directBoss]", "directSubordinateCnts[directBoss]", "directSubordinateCnts", "directBoss", "for (int i = 1; i <= n; ++i) {\n\t\t\tSystem.out.println(directSubordinateCnts[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(directSubordinateCnts[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(directSubordinateCnts[i]);\n\t\t}", "System.out.println(directSubordinateCnts[i])", "System.out.println", "System.out", "System", "System.out", "directSubordinateCnts[i]", "directSubordinateCnts", "i", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] directSubordinateCnts = new int[n + 10];\n\t\tfor (int i = 2; i <= n; ++i) {\n\t\t\tint directBoss = sc.nextInt();\n\t\t\t++directSubordinateCnts[directBoss];\n\t\t}\n\n\t\tfor (int i = 1; i <= n; ++i) {\n\t\t\tSystem.out.println(directSubordinateCnts[i]);\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] directSubordinateCnts = new int[n + 10];\n\t\tfor (int i = 2; i <= n; ++i) {\n\t\t\tint directBoss = sc.nextInt();\n\t\t\t++directSubordinateCnts[directBoss];\n\t\t}\n\n\t\tfor (int i = 1; i <= n; ++i) {\n\t\t\tSystem.out.println(directSubordinateCnts[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[] directSubordinateCnts = new int[n + 10]; for (int i = 2; i <= n; ++i) { int directBoss = sc.nextInt(); ++directSubordinateCnts[directBoss]; } for (int i = 1; i <= n; ++i) { System.out.println(directSubordinateCnts[i]); } } }
[ 7, 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, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 2, 18, 13, 13, 17, 41, 13, 17, 42, 2, 13, 13, 30, 41, 13, 2, 13, 2, 2, 13, 13, 17, 14, 2, 18, 13, 13, 13, 30, 0, 13, 2, 13, 17, 0, 13, 13, 0, 13, 2, 13, 17, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 2, 4, 18, 13, 17, 42, 2, 13, 13, 30, 14, 2, 4, 18, 13, 40, 13, 4, 18, 13, 40, 13, 29, 17, 29, 17, 23, 13, 12, 13, 30, 14, 2, 13, 18, 13, 13, 30, 14, 4, 13, 13, 29, 13, 29, 17, 14, 2, 2, 4, 18, 13, 17, 4, 13, 13, 29, 13, 41, 13, 4, 13, 13, 2, 13, 18, 13, 13, 2, 13, 17, 41, 13, 4, 13, 13, 13, 2, 13, 17, 14, 2, 4, 18, 13, 17, 29, 13, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 13, 2, 18, 13, 13, 13, 29, 17, 41, 13, 17, 41, 13, 17, 14, 2, 18, 13, 13, 13, 0, 13, 2, 4, 13, 13, 2, 13, 17, 13, 13, 17, 14, 2, 18, 13, 13, 13, 0, 13, 2, 4, 13, 13, 13, 2, 13, 17, 13, 17, 29, 2, 13, 13, 23, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 4, 18, 13, 18, 13, 13, 29, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 14, 2, 4, 18, 4, 18, 13, 4, 18, 13, 17, 18, 13, 13, 17, 0, 13, 4, 13, 4, 18, 13, 4, 18, 13, 17, 2, 13, 17, 14, 2, 4, 18, 4, 18, 13, 4, 18, 13, 17, 18, 13, 13, 17, 0, 13, 4, 13, 4, 18, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 17, 2, 13, 17, 14, 2, 4, 18, 4, 18, 13, 4, 18, 13, 17, 18, 13, 13, 17, 0, 13, 4, 13, 4, 18, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 17, 2, 13, 17, 14, 4, 18, 13, 13, 29, 4, 18, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 13, 29, 4, 18, 13, 13, 4, 18, 13, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 480, 17 ], [ 480, 18 ], [ 18, 19 ], [ 480, 20 ], [ 20, 21 ], [ 480, 22 ], [ 22, 23 ], [ 480, 24 ], [ 24, 25 ], [ 480, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 28, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 28, 37 ], [ 37, 38 ], [ 37, 39 ], [ 40, 41 ], [ 40, 42 ], [ 28, 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 ], [ 59, 60 ], [ 60, 61 ], [ 28, 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 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 84 ], [ 26, 85 ], [ 85, 86 ], [ 480, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 89, 100 ], [ 100, 101 ], [ 100, 102 ], [ 89, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 107, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 117, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 126, 128 ], [ 123, 129 ], [ 129, 130 ], [ 129, 131 ], [ 117, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 134, 136 ], [ 89, 137 ], [ 137, 138 ], [ 87, 139 ], [ 139, 140 ], [ 87, 141 ], [ 141, 142 ], [ 480, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 145, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 151, 155 ], [ 145, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 156, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 163, 166 ], [ 166, 167 ], [ 162, 168 ], [ 168, 169 ], [ 169, 170 ], [ 168, 171 ], [ 171, 172 ], [ 161, 173 ], [ 173, 174 ], [ 145, 175 ], [ 175, 176 ], [ 143, 177 ], [ 177, 178 ], [ 480, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 185, 186 ], [ 185, 187 ], [ 182, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 189, 193 ], [ 193, 194 ], [ 188, 195 ], [ 195, 196 ], [ 181, 197 ], [ 197, 198 ], [ 198, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 199, 203 ], [ 198, 204 ], [ 204, 205 ], [ 204, 206 ], [ 197, 207 ], [ 207, 208 ], [ 181, 209 ], [ 209, 210 ], [ 209, 211 ], [ 211, 212 ], [ 211, 213 ], [ 211, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 216, 218 ], [ 211, 219 ], [ 219, 220 ], [ 219, 221 ], [ 181, 222 ], [ 222, 223 ], [ 222, 224 ], [ 224, 225 ], [ 224, 226 ], [ 224, 227 ], [ 224, 228 ], [ 228, 229 ], [ 228, 230 ], [ 181, 231 ], [ 231, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 232, 236 ], [ 231, 237 ], [ 237, 238 ], [ 181, 239 ], [ 239, 240 ], [ 179, 241 ], [ 241, 242 ], [ 179, 243 ], [ 243, 244 ], [ 179, 245 ], [ 245, 246 ], [ 480, 247 ], [ 247, 248 ], [ 247, 249 ], [ 249, 250 ], [ 250, 251 ], [ 251, 252 ], [ 252, 253 ], [ 252, 254 ], [ 251, 255 ], [ 255, 256 ], [ 256, 257 ], [ 256, 258 ], [ 255, 259 ], [ 250, 260 ], [ 260, 261 ], [ 249, 262 ], [ 262, 263 ], [ 262, 264 ], [ 249, 265 ], [ 265, 266 ], [ 265, 267 ], [ 249, 268 ], [ 268, 269 ], [ 269, 270 ], [ 270, 271 ], [ 270, 272 ], [ 269, 273 ], [ 268, 274 ], [ 274, 275 ], [ 274, 276 ], [ 276, 277 ], [ 277, 278 ], [ 277, 279 ], [ 277, 280 ], [ 280, 281 ], [ 280, 282 ], [ 277, 283 ], [ 277, 284 ], [ 276, 285 ], [ 268, 286 ], [ 286, 287 ], [ 287, 288 ], [ 288, 289 ], [ 288, 290 ], [ 287, 291 ], [ 286, 292 ], [ 292, 293 ], [ 292, 294 ], [ 294, 295 ], [ 295, 296 ], [ 295, 297 ], [ 295, 298 ], [ 295, 299 ], [ 299, 300 ], [ 299, 301 ], [ 295, 302 ], [ 294, 303 ], [ 249, 304 ], [ 304, 305 ], [ 305, 306 ], [ 305, 307 ], [ 247, 308 ], [ 308, 309 ], [ 247, 310 ], [ 310, 311 ], [ 247, 312 ], [ 312, 313 ], [ 247, 314 ], [ 314, 315 ], [ 480, 316 ], [ 316, 317 ], [ 316, 318 ], [ 318, 319 ], [ 319, 320 ], [ 320, 321 ], [ 321, 322 ], [ 320, 323 ], [ 323, 324 ], [ 323, 325 ], [ 319, 326 ], [ 326, 327 ], [ 318, 328 ], [ 328, 329 ], [ 328, 330 ], [ 330, 331 ], [ 330, 332 ], [ 318, 333 ], [ 333, 334 ], [ 333, 335 ], [ 335, 336 ], [ 335, 337 ], [ 318, 338 ], [ 338, 339 ], [ 338, 340 ], [ 340, 341 ], [ 340, 342 ], [ 318, 343 ], [ 343, 344 ], [ 344, 345 ], [ 345, 346 ], [ 346, 347 ], [ 347, 348 ], [ 348, 349 ], [ 347, 350 ], [ 350, 351 ], [ 351, 352 ], [ 350, 353 ], [ 345, 354 ], [ 354, 355 ], [ 354, 356 ], [ 344, 357 ], [ 343, 358 ], [ 358, 359 ], [ 358, 360 ], [ 360, 361 ], [ 360, 362 ], [ 362, 363 ], [ 363, 364 ], [ 362, 365 ], [ 365, 366 ], [ 366, 367 ], [ 365, 368 ], [ 360, 369 ], [ 369, 370 ], [ 369, 371 ], [ 343, 372 ], [ 372, 373 ], [ 373, 374 ], [ 374, 375 ], [ 375, 376 ], [ 376, 377 ], [ 377, 378 ], [ 376, 379 ], [ 379, 380 ], [ 380, 381 ], [ 379, 382 ], [ 374, 383 ], [ 383, 384 ], [ 383, 385 ], [ 373, 386 ], [ 372, 387 ], [ 387, 388 ], [ 387, 389 ], [ 389, 390 ], [ 389, 391 ], [ 391, 392 ], [ 392, 393 ], [ 393, 394 ], [ 394, 395 ], [ 393, 396 ], [ 396, 397 ], [ 397, 398 ], [ 396, 399 ], [ 391, 400 ], [ 400, 401 ], [ 401, 402 ], [ 400, 403 ], [ 389, 404 ], [ 404, 405 ], [ 404, 406 ], [ 372, 407 ], [ 407, 408 ], [ 408, 409 ], [ 409, 410 ], [ 410, 411 ], [ 411, 412 ], [ 412, 413 ], [ 411, 414 ], [ 414, 415 ], [ 415, 416 ], [ 414, 417 ], [ 409, 418 ], [ 418, 419 ], [ 418, 420 ], [ 408, 421 ], [ 407, 422 ], [ 422, 423 ], [ 422, 424 ], [ 424, 425 ], [ 424, 426 ], [ 426, 427 ], [ 427, 428 ], [ 428, 429 ], [ 429, 430 ], [ 428, 431 ], [ 431, 432 ], [ 432, 433 ], [ 431, 434 ], [ 426, 435 ], [ 435, 436 ], [ 436, 437 ], [ 435, 438 ], [ 424, 439 ], [ 439, 440 ], [ 439, 441 ], [ 318, 442 ], [ 442, 443 ], [ 443, 444 ], [ 444, 445 ], [ 443, 446 ], [ 442, 447 ], [ 447, 448 ], [ 448, 449 ], [ 449, 450 ], [ 448, 451 ], [ 318, 452 ], [ 452, 453 ], [ 453, 454 ], [ 452, 455 ], [ 452, 456 ], [ 456, 457 ], [ 457, 458 ], [ 456, 459 ], [ 456, 460 ], [ 460, 461 ], [ 461, 462 ], [ 460, 463 ], [ 460, 464 ], [ 318, 465 ], [ 465, 466 ], [ 466, 467 ], [ 467, 468 ], [ 466, 469 ], [ 466, 470 ], [ 470, 471 ], [ 471, 472 ], [ 470, 473 ], [ 470, 474 ], [ 316, 475 ], [ 475, 476 ], [ 316, 477 ], [ 477, 478 ], [ 0, 479 ], [ 479, 480 ], [ 479, 481 ] ]
[ "\nimport java.io.IOException;\nimport java.math.BigInteger;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Scanner;\n\npublic class Main {\n static Map<BigInteger, Integer> memo;\n static boolean[][] vis;\n static List<List<Integer>> adj;\n static List<Integer> vertices;\n\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int[] occ = new int[n+1];\n\n for (int i = 1; i < n; ++i) {\n occ[sc.nextInt()]++;\n }\n\n for(int i =1; i < occ.length; ++i){\n System.out.println(occ[i]);\n }\n }\n\n\n static int lowerBound(int[] arr, int element) {\n\n int low = 0, high = arr.length - 1, ans = 0;\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= element) {\n low = mid + 1;\n ans = mid;\n } else\n high = mid - 1;\n\n }\n\n return high;\n }\n\n static boolean isPalindrome(String word) {\n int i = 0, j = word.length() - 1;\n\n while (i <= j) {\n if (word.charAt(i++) != word.charAt(j--))\n return false;\n }\n\n return true;\n }\n\n static String longestPalindrome(String[] words, String word, int i) {\n if (i >= words.length) {\n if (isPalindrome(word))\n return word;\n\n return \"\";\n }\n\n if (word.length() > 0 && isPalindrome(word))\n return word;\n String left = longestPalindrome(words, word + words[i], i + 1);\n String right = longestPalindrome(words, word, i + 1);\n\n if (left.length() > 0)\n return left;\n return right;\n }\n\n\n static int solve(int[] arr, int i, int j, int k) {\n if (i == j && arr[i] <= k)\n return 1;\n\n int left = 0, right = 0;\n if (arr[i] <= k)\n left = solve(arr, i + 1, j, k) + 1;\n\n else if (arr[j] <= k)\n right = solve(arr, i, j - 1, k) + 1;\n\n return left + right;\n }\n\n static int minMove(BigInteger bg, int count) {\n if (bg.equals(BigInteger.ONE))\n return count;\n\n int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;\n if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)\n first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)\n sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)\n last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);\n\n if (memo.containsKey(bg))\n return memo.get(bg);\n\n memo.put(bg, Math.min(first, Math.min(sec, last)));\n\n return Math.min(first, Math.min(sec, last));\n }\n}", "import java.io.IOException;", "IOException", "java.io", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.List;", "List", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n static Map<BigInteger, Integer> memo;\n static boolean[][] vis;\n static List<List<Integer>> adj;\n static List<Integer> vertices;\n\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int[] occ = new int[n+1];\n\n for (int i = 1; i < n; ++i) {\n occ[sc.nextInt()]++;\n }\n\n for(int i =1; i < occ.length; ++i){\n System.out.println(occ[i]);\n }\n }\n\n\n static int lowerBound(int[] arr, int element) {\n\n int low = 0, high = arr.length - 1, ans = 0;\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= element) {\n low = mid + 1;\n ans = mid;\n } else\n high = mid - 1;\n\n }\n\n return high;\n }\n\n static boolean isPalindrome(String word) {\n int i = 0, j = word.length() - 1;\n\n while (i <= j) {\n if (word.charAt(i++) != word.charAt(j--))\n return false;\n }\n\n return true;\n }\n\n static String longestPalindrome(String[] words, String word, int i) {\n if (i >= words.length) {\n if (isPalindrome(word))\n return word;\n\n return \"\";\n }\n\n if (word.length() > 0 && isPalindrome(word))\n return word;\n String left = longestPalindrome(words, word + words[i], i + 1);\n String right = longestPalindrome(words, word, i + 1);\n\n if (left.length() > 0)\n return left;\n return right;\n }\n\n\n static int solve(int[] arr, int i, int j, int k) {\n if (i == j && arr[i] <= k)\n return 1;\n\n int left = 0, right = 0;\n if (arr[i] <= k)\n left = solve(arr, i + 1, j, k) + 1;\n\n else if (arr[j] <= k)\n right = solve(arr, i, j - 1, k) + 1;\n\n return left + right;\n }\n\n static int minMove(BigInteger bg, int count) {\n if (bg.equals(BigInteger.ONE))\n return count;\n\n int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;\n if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)\n first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)\n sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)\n last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);\n\n if (memo.containsKey(bg))\n return memo.get(bg);\n\n memo.put(bg, Math.min(first, Math.min(sec, last)));\n\n return Math.min(first, Math.min(sec, last));\n }\n}", "Main", "static Map<BigInteger, Integer> memo;", "memo", "static boolean[][] vis;", "vis", "static List<List<Integer>> adj;", "adj", "static List<Integer> vertices;", "vertices", "public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int[] occ = new int[n+1];\n\n for (int i = 1; i < n; ++i) {\n occ[sc.nextInt()]++;\n }\n\n for(int i =1; i < occ.length; ++i){\n System.out.println(occ[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int[] occ = new int[n+1];\n\n for (int i = 1; i < n; ++i) {\n occ[sc.nextInt()]++;\n }\n\n for(int i =1; i < occ.length; ++i){\n System.out.println(occ[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[] occ = new int[n+1];", "occ", "new int[n+1]", "n+1", "n", "1", "for (int i = 1; i < n; ++i) {\n occ[sc.nextInt()]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "++i", "++i", "i", "{\n occ[sc.nextInt()]++;\n }", "{\n occ[sc.nextInt()]++;\n }", "occ[sc.nextInt()]++", "occ[sc.nextInt()]", "occ", "sc.nextInt()", "sc.nextInt", "sc", "for(int i =1; i < occ.length; ++i){\n System.out.println(occ[i]);\n }", "int i =1;", "int i =1;", "i", "1", "i < occ.length", "i", "occ.length", "occ", "occ.length", "++i", "++i", "i", "{\n System.out.println(occ[i]);\n }", "{\n System.out.println(occ[i]);\n }", "System.out.println(occ[i])", "System.out.println", "System.out", "System", "System.out", "occ[i]", "occ", "i", "String[] args", "args", "static int lowerBound(int[] arr, int element) {\n\n int low = 0, high = arr.length - 1, ans = 0;\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= element) {\n low = mid + 1;\n ans = mid;\n } else\n high = mid - 1;\n\n }\n\n return high;\n }", "lowerBound", "{\n\n int low = 0, high = arr.length - 1, ans = 0;\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= element) {\n low = mid + 1;\n ans = mid;\n } else\n high = mid - 1;\n\n }\n\n return high;\n }", "int low = 0", "low", "0", "high = arr.length - 1", "high", "arr.length - 1", "arr.length", "arr", "arr.length", "1", "ans = 0;", "ans", "0", "while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= element) {\n low = mid + 1;\n ans = mid;\n } else\n high = mid - 1;\n\n }", "low <= high", "low", "high", "{\n int mid = low + (high - low) / 2;\n if (arr[mid] <= element) {\n low = mid + 1;\n ans = mid;\n } else\n high = mid - 1;\n\n }", "int mid = low + (high - low) / 2;", "mid", "low + (high - low) / 2", "low", "(high - low) / 2", "(high - low)", "high", "low", "2", "if (arr[mid] <= element) {\n low = mid + 1;\n ans = mid;\n } else\n high = mid - 1;", "arr[mid] <= element", "arr[mid]", "arr", "mid", "element", "{\n low = mid + 1;\n ans = mid;\n }", "low = mid + 1", "low", "mid + 1", "mid", "1", "ans = mid", "ans", "mid", "high = mid - 1", "high", "mid - 1", "mid", "1", "return high;", "high", "int[] arr", "arr", "int element", "element", "static boolean isPalindrome(String word) {\n int i = 0, j = word.length() - 1;\n\n while (i <= j) {\n if (word.charAt(i++) != word.charAt(j--))\n return false;\n }\n\n return true;\n }", "isPalindrome", "{\n int i = 0, j = word.length() - 1;\n\n while (i <= j) {\n if (word.charAt(i++) != word.charAt(j--))\n return false;\n }\n\n return true;\n }", "int i = 0", "i", "0", "j = word.length() - 1;", "j", "word.length() - 1", "word.length()", "word.length", "word", "1", "while (i <= j) {\n if (word.charAt(i++) != word.charAt(j--))\n return false;\n }", "i <= j", "i", "j", "{\n if (word.charAt(i++) != word.charAt(j--))\n return false;\n }", "if (word.charAt(i++) != word.charAt(j--))\n return false;", "word.charAt(i++) != word.charAt(j--)", "word.charAt(i++)", "word.charAt", "word", "i++", "i", "word.charAt(j--)", "word.charAt", "word", "j--", "j", "return false;", "false", "return true;", "true", "String word", "word", "static String longestPalindrome(String[] words, String word, int i) {\n if (i >= words.length) {\n if (isPalindrome(word))\n return word;\n\n return \"\";\n }\n\n if (word.length() > 0 && isPalindrome(word))\n return word;\n String left = longestPalindrome(words, word + words[i], i + 1);\n String right = longestPalindrome(words, word, i + 1);\n\n if (left.length() > 0)\n return left;\n return right;\n }", "longestPalindrome", "{\n if (i >= words.length) {\n if (isPalindrome(word))\n return word;\n\n return \"\";\n }\n\n if (word.length() > 0 && isPalindrome(word))\n return word;\n String left = longestPalindrome(words, word + words[i], i + 1);\n String right = longestPalindrome(words, word, i + 1);\n\n if (left.length() > 0)\n return left;\n return right;\n }", "if (i >= words.length) {\n if (isPalindrome(word))\n return word;\n\n return \"\";\n }", "i >= words.length", "i", "words.length", "words", "words.length", "{\n if (isPalindrome(word))\n return word;\n\n return \"\";\n }", "if (isPalindrome(word))\n return word;", "isPalindrome(word)", "isPalindrome", "word", "return word;", "word", "return \"\";", "\"\"", "if (word.length() > 0 && isPalindrome(word))\n return word;", "word.length() > 0 && isPalindrome(word)", "word.length() > 0", "word.length()", "word.length", "word", "0", "isPalindrome(word)", "isPalindrome", "word", "return word;", "word", "String left = longestPalindrome(words, word + words[i], i + 1);", "left", "longestPalindrome(words, word + words[i], i + 1)", "longestPalindrome", "words", "word + words[i]", "word", "words[i]", "words", "i", "i + 1", "i", "1", "String right = longestPalindrome(words, word, i + 1);", "right", "longestPalindrome(words, word, i + 1)", "longestPalindrome", "words", "word", "i + 1", "i", "1", "if (left.length() > 0)\n return left;", "left.length() > 0", "left.length()", "left.length", "left", "0", "return left;", "left", "return right;", "right", "String[] words", "words", "String word", "word", "int i", "i", "static int solve(int[] arr, int i, int j, int k) {\n if (i == j && arr[i] <= k)\n return 1;\n\n int left = 0, right = 0;\n if (arr[i] <= k)\n left = solve(arr, i + 1, j, k) + 1;\n\n else if (arr[j] <= k)\n right = solve(arr, i, j - 1, k) + 1;\n\n return left + right;\n }", "solve", "{\n if (i == j && arr[i] <= k)\n return 1;\n\n int left = 0, right = 0;\n if (arr[i] <= k)\n left = solve(arr, i + 1, j, k) + 1;\n\n else if (arr[j] <= k)\n right = solve(arr, i, j - 1, k) + 1;\n\n return left + right;\n }", "if (i == j && arr[i] <= k)\n return 1;", "i == j && arr[i] <= k", "i == j", "i", "j", "arr[i] <= k", "arr[i]", "arr", "i", "k", "return 1;", "1", "int left = 0", "left", "0", "right = 0;", "right", "0", "if (arr[i] <= k)\n left = solve(arr, i + 1, j, k) + 1;\n\n else if (arr[j] <= k)\n right = solve(arr, i, j - 1, k) + 1;", "arr[i] <= k", "arr[i]", "arr", "i", "k", "left = solve(arr, i + 1, j, k) + 1", "left", "solve(arr, i + 1, j, k) + 1", "solve(arr, i + 1, j, k)", "solve", "arr", "i + 1", "i", "1", "j", "k", "1", "if (arr[j] <= k)\n right = solve(arr, i, j - 1, k) + 1;", "arr[j] <= k", "arr[j]", "arr", "j", "k", "right = solve(arr, i, j - 1, k) + 1", "right", "solve(arr, i, j - 1, k) + 1", "solve(arr, i, j - 1, k)", "solve", "arr", "i", "j - 1", "j", "1", "k", "1", "return left + right;", "left + right", "left", "right", "int[] arr", "arr", "int i", "i", "int j", "j", "int k", "k", "static int minMove(BigInteger bg, int count) {\n if (bg.equals(BigInteger.ONE))\n return count;\n\n int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;\n if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)\n first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)\n sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)\n last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);\n\n if (memo.containsKey(bg))\n return memo.get(bg);\n\n memo.put(bg, Math.min(first, Math.min(sec, last)));\n\n return Math.min(first, Math.min(sec, last));\n }", "minMove", "{\n if (bg.equals(BigInteger.ONE))\n return count;\n\n int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;\n if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)\n first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)\n sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)\n last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);\n\n if (memo.containsKey(bg))\n return memo.get(bg);\n\n memo.put(bg, Math.min(first, Math.min(sec, last)));\n\n return Math.min(first, Math.min(sec, last));\n }", "if (bg.equals(BigInteger.ONE))\n return count;", "bg.equals(BigInteger.ONE)", "bg.equals", "bg", "BigInteger.ONE", "BigInteger", "BigInteger.ONE", "return count;", "count", "int first = Integer.MAX_VALUE", "first", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "sec = Integer.MAX_VALUE", "sec", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "last = Integer.MAX_VALUE;", "last", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)\n first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)\n sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)\n last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);", "bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0", "bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO)", "bg.mod(BigInteger.valueOf(2)).compareTo", "bg.mod(BigInteger.valueOf(2))", "bg.mod", "bg", "BigInteger.valueOf(2)", "BigInteger.valueOf", "BigInteger", "2", "BigInteger.ZERO", "BigInteger", "BigInteger.ZERO", "0", "first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1)", "first", "minMove(bg.divide(BigInteger.valueOf(2)), count + 1)", "minMove", "bg.divide(BigInteger.valueOf(2))", "bg.divide", "bg", "BigInteger.valueOf(2)", "BigInteger.valueOf", "BigInteger", "2", "count + 1", "count", "1", "if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)\n sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)\n last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);", "bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0", "bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO)", "bg.mod(BigInteger.valueOf(3)).compareTo", "bg.mod(BigInteger.valueOf(3))", "bg.mod", "bg", "BigInteger.valueOf(3)", "BigInteger.valueOf", "BigInteger", "3", "BigInteger.ZERO", "BigInteger", "BigInteger.ZERO", "0", "sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1)", "sec", "minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1)", "minMove", "bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3))", "bg.multiply(BigInteger.valueOf(2)).divide", "bg.multiply(BigInteger.valueOf(2))", "bg.multiply", "bg", "BigInteger.valueOf(2)", "BigInteger.valueOf", "BigInteger", "2", "BigInteger.valueOf(3)", "BigInteger.valueOf", "BigInteger", "3", "count + 1", "count", "1", "if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)\n last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);", "bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0", "bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO)", "bg.mod(BigInteger.valueOf(5)).compareTo", "bg.mod(BigInteger.valueOf(5))", "bg.mod", "bg", "BigInteger.valueOf(5)", "BigInteger.valueOf", "BigInteger", "5", "BigInteger.ZERO", "BigInteger", "BigInteger.ZERO", "0", "last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1)", "last", "minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1)", "minMove", "bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5))", "bg.multiply(BigInteger.valueOf(4)).divide", "bg.multiply(BigInteger.valueOf(4))", "bg.multiply", "bg", "BigInteger.valueOf(4)", "BigInteger.valueOf", "BigInteger", "4", "BigInteger.valueOf(5)", "BigInteger.valueOf", "BigInteger", "5", "count + 1", "count", "1", "if (memo.containsKey(bg))\n return memo.get(bg);", "memo.containsKey(bg)", "memo.containsKey", "memo", "bg", "return memo.get(bg);", "memo.get(bg)", "memo.get", "memo", "bg", "memo.put(bg, Math.min(first, Math.min(sec, last)))", "memo.put", "memo", "bg", "Math.min(first, Math.min(sec, last))", "Math.min", "Math", "first", "Math.min(sec, last)", "Math.min", "Math", "sec", "last", "return Math.min(first, Math.min(sec, last));", "Math.min(first, Math.min(sec, last))", "Math.min", "Math", "first", "Math.min(sec, last)", "Math.min", "Math", "sec", "last", "BigInteger bg", "bg", "int count", "count", "public class Main {\n static Map<BigInteger, Integer> memo;\n static boolean[][] vis;\n static List<List<Integer>> adj;\n static List<Integer> vertices;\n\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int[] occ = new int[n+1];\n\n for (int i = 1; i < n; ++i) {\n occ[sc.nextInt()]++;\n }\n\n for(int i =1; i < occ.length; ++i){\n System.out.println(occ[i]);\n }\n }\n\n\n static int lowerBound(int[] arr, int element) {\n\n int low = 0, high = arr.length - 1, ans = 0;\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= element) {\n low = mid + 1;\n ans = mid;\n } else\n high = mid - 1;\n\n }\n\n return high;\n }\n\n static boolean isPalindrome(String word) {\n int i = 0, j = word.length() - 1;\n\n while (i <= j) {\n if (word.charAt(i++) != word.charAt(j--))\n return false;\n }\n\n return true;\n }\n\n static String longestPalindrome(String[] words, String word, int i) {\n if (i >= words.length) {\n if (isPalindrome(word))\n return word;\n\n return \"\";\n }\n\n if (word.length() > 0 && isPalindrome(word))\n return word;\n String left = longestPalindrome(words, word + words[i], i + 1);\n String right = longestPalindrome(words, word, i + 1);\n\n if (left.length() > 0)\n return left;\n return right;\n }\n\n\n static int solve(int[] arr, int i, int j, int k) {\n if (i == j && arr[i] <= k)\n return 1;\n\n int left = 0, right = 0;\n if (arr[i] <= k)\n left = solve(arr, i + 1, j, k) + 1;\n\n else if (arr[j] <= k)\n right = solve(arr, i, j - 1, k) + 1;\n\n return left + right;\n }\n\n static int minMove(BigInteger bg, int count) {\n if (bg.equals(BigInteger.ONE))\n return count;\n\n int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;\n if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)\n first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)\n sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)\n last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);\n\n if (memo.containsKey(bg))\n return memo.get(bg);\n\n memo.put(bg, Math.min(first, Math.min(sec, last)));\n\n return Math.min(first, Math.min(sec, last));\n }\n}", "public class Main {\n static Map<BigInteger, Integer> memo;\n static boolean[][] vis;\n static List<List<Integer>> adj;\n static List<Integer> vertices;\n\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int[] occ = new int[n+1];\n\n for (int i = 1; i < n; ++i) {\n occ[sc.nextInt()]++;\n }\n\n for(int i =1; i < occ.length; ++i){\n System.out.println(occ[i]);\n }\n }\n\n\n static int lowerBound(int[] arr, int element) {\n\n int low = 0, high = arr.length - 1, ans = 0;\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= element) {\n low = mid + 1;\n ans = mid;\n } else\n high = mid - 1;\n\n }\n\n return high;\n }\n\n static boolean isPalindrome(String word) {\n int i = 0, j = word.length() - 1;\n\n while (i <= j) {\n if (word.charAt(i++) != word.charAt(j--))\n return false;\n }\n\n return true;\n }\n\n static String longestPalindrome(String[] words, String word, int i) {\n if (i >= words.length) {\n if (isPalindrome(word))\n return word;\n\n return \"\";\n }\n\n if (word.length() > 0 && isPalindrome(word))\n return word;\n String left = longestPalindrome(words, word + words[i], i + 1);\n String right = longestPalindrome(words, word, i + 1);\n\n if (left.length() > 0)\n return left;\n return right;\n }\n\n\n static int solve(int[] arr, int i, int j, int k) {\n if (i == j && arr[i] <= k)\n return 1;\n\n int left = 0, right = 0;\n if (arr[i] <= k)\n left = solve(arr, i + 1, j, k) + 1;\n\n else if (arr[j] <= k)\n right = solve(arr, i, j - 1, k) + 1;\n\n return left + right;\n }\n\n static int minMove(BigInteger bg, int count) {\n if (bg.equals(BigInteger.ONE))\n return count;\n\n int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE;\n if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0)\n first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0)\n sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1);\n\n else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0)\n last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1);\n\n if (memo.containsKey(bg))\n return memo.get(bg);\n\n memo.put(bg, Math.min(first, Math.min(sec, last)));\n\n return Math.min(first, Math.min(sec, last));\n }\n}", "Main" ]
import java.io.IOException; import java.math.BigInteger; import java.util.List; import java.util.Map; import java.util.Scanner; public class Main { static Map<BigInteger, Integer> memo; static boolean[][] vis; static List<List<Integer>> adj; static List<Integer> vertices; public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] occ = new int[n+1]; for (int i = 1; i < n; ++i) { occ[sc.nextInt()]++; } for(int i =1; i < occ.length; ++i){ System.out.println(occ[i]); } } static int lowerBound(int[] arr, int element) { int low = 0, high = arr.length - 1, ans = 0; while (low <= high) { int mid = low + (high - low) / 2; if (arr[mid] <= element) { low = mid + 1; ans = mid; } else high = mid - 1; } return high; } static boolean isPalindrome(String word) { int i = 0, j = word.length() - 1; while (i <= j) { if (word.charAt(i++) != word.charAt(j--)) return false; } return true; } static String longestPalindrome(String[] words, String word, int i) { if (i >= words.length) { if (isPalindrome(word)) return word; return ""; } if (word.length() > 0 && isPalindrome(word)) return word; String left = longestPalindrome(words, word + words[i], i + 1); String right = longestPalindrome(words, word, i + 1); if (left.length() > 0) return left; return right; } static int solve(int[] arr, int i, int j, int k) { if (i == j && arr[i] <= k) return 1; int left = 0, right = 0; if (arr[i] <= k) left = solve(arr, i + 1, j, k) + 1; else if (arr[j] <= k) right = solve(arr, i, j - 1, k) + 1; return left + right; } static int minMove(BigInteger bg, int count) { if (bg.equals(BigInteger.ONE)) return count; int first = Integer.MAX_VALUE, sec = Integer.MAX_VALUE, last = Integer.MAX_VALUE; if (bg.mod(BigInteger.valueOf(2)).compareTo(BigInteger.ZERO) == 0) first = minMove(bg.divide(BigInteger.valueOf(2)), count + 1); else if (bg.mod(BigInteger.valueOf(3)).compareTo(BigInteger.ZERO) == 0) sec = minMove(bg.multiply(BigInteger.valueOf(2)).divide(BigInteger.valueOf(3)), count + 1); else if (bg.mod(BigInteger.valueOf(5)).compareTo(BigInteger.ZERO) == 0) last = minMove(bg.multiply(BigInteger.valueOf(4)).divide(BigInteger.valueOf(5)), count + 1); if (memo.containsKey(bg)) return memo.get(bg); memo.put(bg, Math.min(first, Math.min(sec, last))); return Math.min(first, Math.min(sec, last)); } }
[ 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 sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] tmp = new int[n];\n \n for(int i=0; i<n-1; i++){\n int j = sc.nextInt();\n tmp[j-1]++;\n }\n \n for(int i : tmp){\n System.out.println(i);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] tmp = new int[n];\n \n for(int i=0; i<n-1; i++){\n int j = sc.nextInt();\n tmp[j-1]++;\n }\n \n for(int i : tmp){\n System.out.println(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[] tmp = new int[n];\n \n for(int i=0; i<n-1; i++){\n int j = sc.nextInt();\n tmp[j-1]++;\n }\n \n for(int i : tmp){\n System.out.println(i);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] tmp = new int[n];\n \n for(int i=0; i<n-1; i++){\n int j = sc.nextInt();\n tmp[j-1]++;\n }\n \n for(int i : tmp){\n System.out.println(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[] tmp = new int[n];", "tmp", "new int[n]", "n", "for(int i=0; i<n-1; i++){\n int j = sc.nextInt();\n tmp[j-1]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n int j = sc.nextInt();\n tmp[j-1]++;\n }", "{\n int j = sc.nextInt();\n tmp[j-1]++;\n }", "int j = sc.nextInt();", "j", "sc.nextInt()", "sc.nextInt", "sc", "tmp[j-1]++", "tmp[j-1]", "tmp", "j-1", "j", "1", "for(int i : tmp){\n System.out.println(i);\n }", "int i", "tmp", "{\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 n = sc.nextInt();\n int[] tmp = new int[n];\n \n for(int i=0; i<n-1; i++){\n int j = sc.nextInt();\n tmp[j-1]++;\n }\n \n for(int i : tmp){\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 n = sc.nextInt();\n int[] tmp = new int[n];\n \n for(int i=0; i<n-1; i++){\n int j = sc.nextInt();\n tmp[j-1]++;\n }\n \n for(int i : tmp){\n System.out.println(i);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] tmp = new int[n]; for(int i=0; i<n-1; i++){ int j = sc.nextInt(); tmp[j-1]++; } for(int i : tmp){ System.out.println(i); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 4, 18, 13, 23, 13, 12, 13, 30, 0, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 0, 13, 20, 13, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 4, 18, 13, 18, 13, 2, 13, 17, 17, 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, 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, 12, 13, 30, 12, 13, 30, 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 ], [ 152, 14 ], [ 152, 15 ], [ 15, 16 ], [ 152, 17 ], [ 17, 18 ], [ 152, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 21, 25 ], [ 25, 26 ], [ 25, 27 ], [ 21, 28 ], [ 28, 29 ], [ 28, 30 ], [ 21, 31 ], [ 31, 32 ], [ 32, 33 ], [ 21, 34 ], [ 34, 35 ], [ 35, 36 ], [ 19, 37 ], [ 37, 38 ], [ 152, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 48, 49 ], [ 41, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 52, 57 ], [ 41, 58 ], [ 58, 59 ], [ 58, 60 ], [ 41, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 62, 66 ], [ 41, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 84, 93 ], [ 41, 94 ], [ 94, 95 ], [ 94, 96 ], [ 41, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 98, 102 ], [ 41, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 103, 108 ], [ 108, 109 ], [ 108, 110 ], [ 103, 111 ], [ 111, 112 ], [ 112, 113 ], [ 103, 114 ], [ 115, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 119, 121 ], [ 41, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 122, 127 ], [ 127, 128 ], [ 127, 129 ], [ 122, 130 ], [ 130, 131 ], [ 131, 132 ], [ 122, 133 ], [ 134, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 135, 140 ], [ 140, 141 ], [ 140, 142 ], [ 39, 143 ], [ 143, 144 ], [ 152, 145 ], [ 145, 146 ], [ 145, 147 ], [ 152, 148 ], [ 148, 149 ], [ 148, 150 ], [ 0, 151 ], [ 151, 152 ], [ 151, 153 ] ]
[ "import java.util.*;\nimport java.util.stream.Collectors;\nimport java.io.*;\nimport java.nio.charset.StandardCharsets;\n\npublic class Main {\n\tint N;\n\tint[] A;\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tMain(BufferedReader in) throws IOException {\n\t\tN = Integer.parseInt(in.readLine());\n\t\tString[] tokens = in.readLine().split(\" \");\n\t\tA = new int[N];\n\t\tArrays.fill(A, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tA[i] = Integer.parseInt(tokens[i - 1]) - 1;\n\t\t}\n\t\tint[] sums = new int[N];\n\t\tArrays.fill(sums, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tsums[A[i]]++;\n\t\t}\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tSystem.out.println(sums[i]);\n\t\t}\n\t}\n\n\tvoid calc() {\n\t}\n\n\tvoid showResult() {\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.util.stream.Collectors;", "Collectors", "java.util.stream", "import java.io.*;", "io.*", "java", "import java.nio.charset.StandardCharsets;", "StandardCharsets", "java.nio.charset", "public class Main {\n\tint N;\n\tint[] A;\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tMain(BufferedReader in) throws IOException {\n\t\tN = Integer.parseInt(in.readLine());\n\t\tString[] tokens = in.readLine().split(\" \");\n\t\tA = new int[N];\n\t\tArrays.fill(A, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tA[i] = Integer.parseInt(tokens[i - 1]) - 1;\n\t\t}\n\t\tint[] sums = new int[N];\n\t\tArrays.fill(sums, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tsums[A[i]]++;\n\t\t}\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tSystem.out.println(sums[i]);\n\t\t}\n\t}\n\n\tvoid calc() {\n\t}\n\n\tvoid showResult() {\n\t}\n}", "Main", "int N;", "N", "int[] A;", "A", "public static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}", "main", "{\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}", "InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);", "reader", "new InputStreamReader(System.in, StandardCharsets.UTF_8)", "BufferedReader in = new BufferedReader(reader);", "in", "new BufferedReader(reader)", "Main ins = new Main(in);", "ins", "new Main(in)", "ins.calc()", "ins.calc", "ins", "ins.showResult()", "ins.showResult", "ins", "String[] args", "args", "Main(BufferedReader in) throws IOException {\n\t\tN = Integer.parseInt(in.readLine());\n\t\tString[] tokens = in.readLine().split(\" \");\n\t\tA = new int[N];\n\t\tArrays.fill(A, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tA[i] = Integer.parseInt(tokens[i - 1]) - 1;\n\t\t}\n\t\tint[] sums = new int[N];\n\t\tArrays.fill(sums, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tsums[A[i]]++;\n\t\t}\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tSystem.out.println(sums[i]);\n\t\t}\n\t}", "Main", "{\n\t\tN = Integer.parseInt(in.readLine());\n\t\tString[] tokens = in.readLine().split(\" \");\n\t\tA = new int[N];\n\t\tArrays.fill(A, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tA[i] = Integer.parseInt(tokens[i - 1]) - 1;\n\t\t}\n\t\tint[] sums = new int[N];\n\t\tArrays.fill(sums, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tsums[A[i]]++;\n\t\t}\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tSystem.out.println(sums[i]);\n\t\t}\n\t}", "N = Integer.parseInt(in.readLine())", "N", "Integer.parseInt(in.readLine())", "Integer.parseInt", "Integer", "in.readLine()", "in.readLine", "in", "String[] tokens = in.readLine().split(\" \");", "tokens", "in.readLine().split(\" \")", "in.readLine().split", "in.readLine()", "in.readLine", "in", "\" \"", "A = new int[N]", "A", "new int[N]", "N", "Arrays.fill(A, 0)", "Arrays.fill", "Arrays", "A", "0", "for (int i = 1; i < N; ++i) {\n\t\t\tA[i] = Integer.parseInt(tokens[i - 1]) - 1;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "++i", "++i", "i", "{\n\t\t\tA[i] = Integer.parseInt(tokens[i - 1]) - 1;\n\t\t}", "{\n\t\t\tA[i] = Integer.parseInt(tokens[i - 1]) - 1;\n\t\t}", "A[i] = Integer.parseInt(tokens[i - 1]) - 1", "A[i]", "A", "i", "Integer.parseInt(tokens[i - 1]) - 1", "Integer.parseInt(tokens[i - 1])", "Integer.parseInt", "Integer", "tokens[i - 1]", "tokens", "i - 1", "i", "1", "1", "int[] sums = new int[N];", "sums", "new int[N]", "N", "Arrays.fill(sums, 0)", "Arrays.fill", "Arrays", "sums", "0", "for (int i = 1; i < N; ++i) {\n\t\t\tsums[A[i]]++;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "++i", "++i", "i", "{\n\t\t\tsums[A[i]]++;\n\t\t}", "{\n\t\t\tsums[A[i]]++;\n\t\t}", "sums[A[i]]++", "sums[A[i]]", "sums", "A[i]", "A", "i", "for (int i = 0; i < N; ++i) {\n\t\t\tSystem.out.println(sums[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(sums[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(sums[i]);\n\t\t}", "System.out.println(sums[i])", "System.out.println", "System.out", "System", "System.out", "sums[i]", "sums", "i", "BufferedReader in", "in", "void calc() {\n\t}", "calc", "{\n\t}", "void showResult() {\n\t}", "showResult", "{\n\t}", "public class Main {\n\tint N;\n\tint[] A;\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tMain(BufferedReader in) throws IOException {\n\t\tN = Integer.parseInt(in.readLine());\n\t\tString[] tokens = in.readLine().split(\" \");\n\t\tA = new int[N];\n\t\tArrays.fill(A, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tA[i] = Integer.parseInt(tokens[i - 1]) - 1;\n\t\t}\n\t\tint[] sums = new int[N];\n\t\tArrays.fill(sums, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tsums[A[i]]++;\n\t\t}\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tSystem.out.println(sums[i]);\n\t\t}\n\t}\n\n\tvoid calc() {\n\t}\n\n\tvoid showResult() {\n\t}\n}", "public class Main {\n\tint N;\n\tint[] A;\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tMain(BufferedReader in) throws IOException {\n\t\tN = Integer.parseInt(in.readLine());\n\t\tString[] tokens = in.readLine().split(\" \");\n\t\tA = new int[N];\n\t\tArrays.fill(A, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tA[i] = Integer.parseInt(tokens[i - 1]) - 1;\n\t\t}\n\t\tint[] sums = new int[N];\n\t\tArrays.fill(sums, 0);\n\t\tfor (int i = 1; i < N; ++i) {\n\t\t\tsums[A[i]]++;\n\t\t}\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tSystem.out.println(sums[i]);\n\t\t}\n\t}\n\n\tvoid calc() {\n\t}\n\n\tvoid showResult() {\n\t}\n}", "Main" ]
import java.util.*; import java.util.stream.Collectors; import java.io.*; import java.nio.charset.StandardCharsets; public class Main { int N; int[] A; public static void main(String[] args) throws IOException { InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8); BufferedReader in = new BufferedReader(reader); Main ins = new Main(in); ins.calc(); ins.showResult(); } Main(BufferedReader in) throws IOException { N = Integer.parseInt(in.readLine()); String[] tokens = in.readLine().split(" "); A = new int[N]; Arrays.fill(A, 0); for (int i = 1; i < N; ++i) { A[i] = Integer.parseInt(tokens[i - 1]) - 1; } int[] sums = new int[N]; Arrays.fill(sums, 0); for (int i = 1; i < N; ++i) { sums[A[i]]++; } for (int i = 0; i < N; ++i) { System.out.println(sums[i]); } } void calc() { } void showResult() { } }
[ 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, 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 ], [ 78, 5 ], [ 78, 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 ], [ 48, 50 ], [ 41, 51 ], [ 51, 52 ], [ 52, 53 ], [ 41, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 59, 63 ], [ 8, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 6, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int a[] = new int[n];\n for(int i = 0; i < a.length; i++){\n a[i] = 0;\n }\n for(int i = 0; i < n-1; i++){\n a[s.nextInt()-1]++;\n }\n for(int i:a){\n System.out.println(i);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int a[] = new int[n];\n for(int i = 0; i < a.length; i++){\n a[i] = 0;\n }\n for(int i = 0; i < n-1; i++){\n a[s.nextInt()-1]++;\n }\n for(int i:a){\n System.out.println(i);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int a[] = new int[n];\n for(int i = 0; i < a.length; i++){\n a[i] = 0;\n }\n for(int i = 0; i < n-1; i++){\n a[s.nextInt()-1]++;\n }\n for(int i:a){\n System.out.println(i);\n }\n }", "main", "{\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int a[] = new int[n];\n for(int i = 0; i < a.length; i++){\n a[i] = 0;\n }\n for(int i = 0; i < n-1; i++){\n a[s.nextInt()-1]++;\n }\n for(int i:a){\n System.out.println(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[n];", "a", "new int[n]", "n", "for(int i = 0; i < a.length; i++){\n a[i] = 0;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < a.length", "i", "a.length", "a", "a.length", "i++", "i++", "i", "{\n a[i] = 0;\n }", "{\n a[i] = 0;\n }", "a[i] = 0", "a[i]", "a", "i", "0", "for(int i = 0; i < n-1; i++){\n a[s.nextInt()-1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n a[s.nextInt()-1]++;\n }", "{\n a[s.nextInt()-1]++;\n }", "a[s.nextInt()-1]++", "a[s.nextInt()-1]", "a", "s.nextInt()-1", "s.nextInt()", "s.nextInt", "s", "1", "for(int i:a){\n System.out.println(i);\n }", "int i", "a", "{\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 s = new Scanner(System.in);\n int n = s.nextInt();\n int a[] = new int[n];\n for(int i = 0; i < a.length; i++){\n a[i] = 0;\n }\n for(int i = 0; i < n-1; i++){\n a[s.nextInt()-1]++;\n }\n for(int i:a){\n System.out.println(i);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int a[] = new int[n];\n for(int i = 0; i < a.length; i++){\n a[i] = 0;\n }\n for(int i = 0; i < n-1; i++){\n a[s.nextInt()-1]++;\n }\n for(int i:a){\n System.out.println(i);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in); int n = s.nextInt(); int a[] = new int[n]; for(int i = 0; i < a.length; i++){ a[i] = 0; } for(int i = 0; i < n-1; i++){ a[s.nextInt()-1]++; } for(int i:a){ System.out.println(i); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 2, 13, 17, 41, 13, 20, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 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, 14, 2, 4, 18, 13, 13, 17, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 4, 18, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 228, 17 ], [ 228, 18 ], [ 18, 19 ], [ 18, 20 ], [ 228, 21 ], [ 21, 22 ], [ 21, 23 ], [ 228, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 26, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 24, 40 ], [ 40, 41 ], [ 24, 42 ], [ 42, 43 ], [ 228, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 46, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 46, 60 ], [ 60, 61 ], [ 60, 62 ], [ 46, 64 ], [ 64, 65 ], [ 64, 66 ], [ 46, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 85, 86 ], [ 79, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 90, 91 ], [ 90, 92 ], [ 87, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 94, 100 ], [ 93, 101 ], [ 46, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 102, 110 ], [ 110, 111 ], [ 111, 112 ], [ 102, 113 ], [ 114, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 116, 121 ], [ 115, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 122, 127 ], [ 115, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 44, 137 ], [ 137, 138 ], [ 228, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 139, 143 ], [ 143, 144 ], [ 139, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 139, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 154, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 164, 171 ], [ 171, 172 ], [ 172, 173 ], [ 172, 174 ], [ 153, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 139, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 183, 186 ], [ 186, 187 ], [ 139, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 193, 194 ], [ 192, 195 ], [ 195, 196 ], [ 139, 197 ], [ 197, 198 ], [ 197, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 201, 204 ], [ 204, 205 ], [ 139, 206 ], [ 206, 207 ], [ 206, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 208, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 215, 216 ], [ 216, 217 ], [ 217, 218 ], [ 212, 219 ], [ 219, 220 ], [ 220, 221 ], [ 220, 222 ], [ 222, 223 ], [ 223, 224 ], [ 208, 225 ], [ 225, 226 ], [ 0, 227 ], [ 227, 228 ], [ 227, 229 ] ]
[ "\nimport java.io.*;\n\nimport java.math.BigInteger;\nimport java.util.*;\n\nimport java.util.ArrayList;\n\nimport java.util.Scanner;\n\n\npublic class Main {\n\n static 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 } 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 static final int mod = 1000000007;\n static final int mod1=1073741824;\n\n public static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int m=n-1;\n int a[]=new int[m];\n\n HashMap<Integer,Integer>hm=new HashMap<>();\n for(int j=0;j<m;j++)\n {\n a[j]=sc.nextInt();\n hm.put(a[j],hm.getOrDefault(a[j],0)+1);\n\n }\n for(int j=1;j<=n;j++)\n {\n if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));\n }\n\n\n }\n\n}\n\n\n\n\n\n\n\n", "import java.io.*;", "io.*", "java", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.*;", "util.*", "java", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n static 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 } 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 static final int mod = 1000000007;\n static final int mod1=1073741824;\n\n public static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int m=n-1;\n int a[]=new int[m];\n\n HashMap<Integer,Integer>hm=new HashMap<>();\n for(int j=0;j<m;j++)\n {\n a[j]=sc.nextInt();\n hm.put(a[j],hm.getOrDefault(a[j],0)+1);\n\n }\n for(int j=1;j<=n;j++)\n {\n if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));\n }\n\n\n }\n\n}", "Main", "static final int mod = 1000000007;", "mod", "1000000007", "static final int mod1=1073741824;", "mod1", "1073741824", "public static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }", "gcd", "{\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }", "if (a == 0)\n return b;", "a == 0", "a", "0", "return b;", "b", "return gcd(b % a, a);", "gcd(b % a, a)", "gcd", "b % a", "b", "a", "a", "int a", "a", "int b", "b", "public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int m=n-1;\n int a[]=new int[m];\n\n HashMap<Integer,Integer>hm=new HashMap<>();\n for(int j=0;j<m;j++)\n {\n a[j]=sc.nextInt();\n hm.put(a[j],hm.getOrDefault(a[j],0)+1);\n\n }\n for(int j=1;j<=n;j++)\n {\n if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));\n }\n\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int m=n-1;\n int a[]=new int[m];\n\n HashMap<Integer,Integer>hm=new HashMap<>();\n for(int j=0;j<m;j++)\n {\n a[j]=sc.nextInt();\n hm.put(a[j],hm.getOrDefault(a[j],0)+1);\n\n }\n for(int j=1;j<=n;j++)\n {\n if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));\n }\n\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int m=n-1;", "m", "n-1", "n", "1", "int a[]=new int[m];", "a", "new int[m]", "m", "HashMap<Integer,Integer>hm=new HashMap<>();", "hm", "new HashMap<>()", "for(int j=0;j<m;j++)\n {\n a[j]=sc.nextInt();\n hm.put(a[j],hm.getOrDefault(a[j],0)+1);\n\n }", "int j=0;", "int j=0;", "j", "0", "j<m", "j", "m", "j++", "j++", "j", "{\n a[j]=sc.nextInt();\n hm.put(a[j],hm.getOrDefault(a[j],0)+1);\n\n }", "{\n a[j]=sc.nextInt();\n hm.put(a[j],hm.getOrDefault(a[j],0)+1);\n\n }", "a[j]=sc.nextInt()", "a[j]", "a", "j", "sc.nextInt()", "sc.nextInt", "sc", "hm.put(a[j],hm.getOrDefault(a[j],0)+1)", "hm.put", "hm", "a[j]", "a", "j", "hm.getOrDefault(a[j],0)+1", "hm.getOrDefault(a[j],0)", "hm.getOrDefault", "hm", "a[j]", "a", "j", "0", "1", "for(int j=1;j<=n;j++)\n {\n if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));\n }", "int j=1;", "int j=1;", "j", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));\n }", "{\n if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));\n }", "if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));", "hm.get(j)==null", "hm.get(j)", "hm.get", "hm", "j", "null", "System.out.println(0)", "System.out.println", "System.out", "System", "System.out", "0", "System.out.println(hm.get(j))", "System.out.println", "System.out", "System", "System.out", "hm.get(j)", "hm.get", "hm", "j", "String[] args", "args", "static 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 } 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\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 } 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 static 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 } 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 static final int mod = 1000000007;\n static final int mod1=1073741824;\n\n public static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int m=n-1;\n int a[]=new int[m];\n\n HashMap<Integer,Integer>hm=new HashMap<>();\n for(int j=0;j<m;j++)\n {\n a[j]=sc.nextInt();\n hm.put(a[j],hm.getOrDefault(a[j],0)+1);\n\n }\n for(int j=1;j<=n;j++)\n {\n if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));\n }\n\n\n }\n\n}", "public class Main {\n\n static 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 } 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 static final int mod = 1000000007;\n static final int mod1=1073741824;\n\n public static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int m=n-1;\n int a[]=new int[m];\n\n HashMap<Integer,Integer>hm=new HashMap<>();\n for(int j=0;j<m;j++)\n {\n a[j]=sc.nextInt();\n hm.put(a[j],hm.getOrDefault(a[j],0)+1);\n\n }\n for(int j=1;j<=n;j++)\n {\n if(hm.get(j)==null)\n System.out.println(0);\n else\n System.out.println(hm.get(j));\n }\n\n\n }\n\n}", "Main" ]
import java.io.*; import java.math.BigInteger; import java.util.*; import java.util.ArrayList; import java.util.Scanner; public class Main { static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } static final int mod = 1000000007; static final int mod1=1073741824; public static int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int m=n-1; int a[]=new int[m]; HashMap<Integer,Integer>hm=new HashMap<>(); for(int j=0;j<m;j++) { a[j]=sc.nextInt(); hm.put(a[j],hm.getOrDefault(a[j],0)+1); } for(int j=1;j<=n;j++) { if(hm.get(j)==null) System.out.println(0); else System.out.println(hm.get(j)); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 0, 18, 13, 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, 2, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 78, 5 ], [ 78, 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 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 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 ], [ 69, 70 ], [ 69, 71 ], [ 8, 72 ], [ 72, 73 ], [ 73, 74 ], [ 6, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] nums = new int[n + 1];\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint next = scan.nextInt();\n\t\t\tnums[next] = ++nums[next];\n\t\t}\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(nums[j + 1]);\n\t\t}\n\n\t\tscan.close();\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] nums = new int[n + 1];\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint next = scan.nextInt();\n\t\t\tnums[next] = ++nums[next];\n\t\t}\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(nums[j + 1]);\n\t\t}\n\n\t\tscan.close();\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] nums = new int[n + 1];\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint next = scan.nextInt();\n\t\t\tnums[next] = ++nums[next];\n\t\t}\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(nums[j + 1]);\n\t\t}\n\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] nums = new int[n + 1];\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint next = scan.nextInt();\n\t\t\tnums[next] = ++nums[next];\n\t\t}\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(nums[j + 1]);\n\t\t}\n\n\t\tscan.close();\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int[] nums = new int[n + 1];", "nums", "new int[n + 1]", "n + 1", "n", "1", "for (int i = 1; i < n; i++) {\n\t\t\tint next = scan.nextInt();\n\t\t\tnums[next] = ++nums[next];\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tint next = scan.nextInt();\n\t\t\tnums[next] = ++nums[next];\n\t\t}", "{\n\t\t\tint next = scan.nextInt();\n\t\t\tnums[next] = ++nums[next];\n\t\t}", "int next = scan.nextInt();", "next", "scan.nextInt()", "scan.nextInt", "scan", "nums[next] = ++nums[next]", "nums[next]", "nums", "next", "++nums[next]", "nums[next]", "nums", "next", "for (int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(nums[j + 1]);\n\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < n", "j", "n", "j++", "j++", "j", "{\n\t\t\tSystem.out.println(nums[j + 1]);\n\t\t}", "{\n\t\t\tSystem.out.println(nums[j + 1]);\n\t\t}", "System.out.println(nums[j + 1])", "System.out.println", "System.out", "System", "System.out", "nums[j + 1]", "nums", "j + 1", "j", "1", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] nums = new int[n + 1];\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint next = scan.nextInt();\n\t\t\tnums[next] = ++nums[next];\n\t\t}\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(nums[j + 1]);\n\t\t}\n\n\t\tscan.close();\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] nums = new int[n + 1];\n\t\tfor (int i = 1; i < n; i++) {\n\t\t\tint next = scan.nextInt();\n\t\t\tnums[next] = ++nums[next];\n\t\t}\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(nums[j + 1]);\n\t\t}\n\n\t\tscan.close();\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] nums = new int[n + 1]; for (int i = 1; i < n; i++) { int next = scan.nextInt(); nums[next] = ++nums[next]; } for (int j = 0; j < n; j++) { System.out.println(nums[j + 1]); } scan.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, 2, 13, 17, 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, 30, 4, 18, 18, 13, 4, 18, 13, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 2, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 190, 11 ], [ 190, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 14, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 59, 66 ], [ 14, 67 ], [ 67, 68 ], [ 67, 69 ], [ 14, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 70, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 86, 92 ], [ 14, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 12, 99 ], [ 99, 100 ], [ 190, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 101, 105 ], [ 105, 106 ], [ 101, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 101, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 117, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 116, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 126, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 115, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 101, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 148, 149 ], [ 101, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 154, 157 ], [ 157, 158 ], [ 101, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 163, 166 ], [ 166, 167 ], [ 101, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 170, 174 ], [ 174, 175 ], [ 175, 176 ], [ 175, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 174, 181 ], [ 181, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 170, 187 ], [ 187, 188 ], [ 0, 189 ], [ 189, 190 ], [ 189, 191 ] ]
[ "import java.awt.*;\nimport java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n FastReader sc = new FastReader();\n int n=sc.nextInt();\n ArrayList<Integer> adj[]=new ArrayList[n+1];\n for (int i=0;i<=n;i++)adj[i]=new ArrayList<>();\n for (int i=2;i<=n;i++){\n adj[sc.nextInt()].add(i);\n }\n StringBuilder sb=new StringBuilder();\n for (int i=1;i<=n;i++){\n sb.append(adj[i].size()+\"\\n\");\n }\n System.out.print(sb);\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.awt.*;", "awt.*", "java", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n public static void main(String[] args) throws Exception {\n FastReader sc = new FastReader();\n int n=sc.nextInt();\n ArrayList<Integer> adj[]=new ArrayList[n+1];\n for (int i=0;i<=n;i++)adj[i]=new ArrayList<>();\n for (int i=2;i<=n;i++){\n adj[sc.nextInt()].add(i);\n }\n StringBuilder sb=new StringBuilder();\n for (int i=1;i<=n;i++){\n sb.append(adj[i].size()+\"\\n\");\n }\n System.out.print(sb);\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) throws Exception {\n FastReader sc = new FastReader();\n int n=sc.nextInt();\n ArrayList<Integer> adj[]=new ArrayList[n+1];\n for (int i=0;i<=n;i++)adj[i]=new ArrayList<>();\n for (int i=2;i<=n;i++){\n adj[sc.nextInt()].add(i);\n }\n StringBuilder sb=new StringBuilder();\n for (int i=1;i<=n;i++){\n sb.append(adj[i].size()+\"\\n\");\n }\n System.out.print(sb);\n }", "main", "{\n FastReader sc = new FastReader();\n int n=sc.nextInt();\n ArrayList<Integer> adj[]=new ArrayList[n+1];\n for (int i=0;i<=n;i++)adj[i]=new ArrayList<>();\n for (int i=2;i<=n;i++){\n adj[sc.nextInt()].add(i);\n }\n StringBuilder sb=new StringBuilder();\n for (int i=1;i<=n;i++){\n sb.append(adj[i].size()+\"\\n\");\n }\n System.out.print(sb);\n }", "FastReader sc = new FastReader();", "sc", "new FastReader()", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "ArrayList<Integer> adj[]=new ArrayList[n+1];", "adj", "new ArrayList[n+1]", "n+1", "n", "1", "for (int i=0;i<=n;i++)adj[i]=new ArrayList<>();", "int i=0;", "int i=0;", "i", "0", "i<=n", "i", "n", "i++", "i++", "i", "adj[i]=new ArrayList<>();", "adj[i]=new ArrayList<>()", "adj[i]", "adj", "i", "new ArrayList<>()", "for (int i=2;i<=n;i++){\n adj[sc.nextInt()].add(i);\n }", "int i=2;", "int i=2;", "i", "2", "i<=n", "i", "n", "i++", "i++", "i", "{\n adj[sc.nextInt()].add(i);\n }", "{\n adj[sc.nextInt()].add(i);\n }", "adj[sc.nextInt()].add(i)", "adj[sc.nextInt()].add", "adj[sc.nextInt()]", "adj", "sc.nextInt()", "sc.nextInt", "sc", "i", "StringBuilder sb=new StringBuilder();", "sb", "new StringBuilder()", "for (int i=1;i<=n;i++){\n sb.append(adj[i].size()+\"\\n\");\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n sb.append(adj[i].size()+\"\\n\");\n }", "{\n sb.append(adj[i].size()+\"\\n\");\n }", "sb.append(adj[i].size()+\"\\n\")", "sb.append", "sb", "adj[i].size()+\"\\n\"", "adj[i].size()", "adj[i].size", "adj[i]", "adj", "i", "\"\\n\"", "System.out.print(sb)", "System.out.print", "System.out", "System", "System.out", "sb", "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 public static void main(String[] args) throws Exception {\n FastReader sc = new FastReader();\n int n=sc.nextInt();\n ArrayList<Integer> adj[]=new ArrayList[n+1];\n for (int i=0;i<=n;i++)adj[i]=new ArrayList<>();\n for (int i=2;i<=n;i++){\n adj[sc.nextInt()].add(i);\n }\n StringBuilder sb=new StringBuilder();\n for (int i=1;i<=n;i++){\n sb.append(adj[i].size()+\"\\n\");\n }\n System.out.print(sb);\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 public static void main(String[] args) throws Exception {\n FastReader sc = new FastReader();\n int n=sc.nextInt();\n ArrayList<Integer> adj[]=new ArrayList[n+1];\n for (int i=0;i<=n;i++)adj[i]=new ArrayList<>();\n for (int i=2;i<=n;i++){\n adj[sc.nextInt()].add(i);\n }\n StringBuilder sb=new StringBuilder();\n for (int i=1;i<=n;i++){\n sb.append(adj[i].size()+\"\\n\");\n }\n System.out.print(sb);\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.awt.*; import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { FastReader sc = new FastReader(); int n=sc.nextInt(); ArrayList<Integer> adj[]=new ArrayList[n+1]; for (int i=0;i<=n;i++)adj[i]=new ArrayList<>(); for (int i=2;i<=n;i++){ adj[sc.nextInt()].add(i); } StringBuilder sb=new StringBuilder(); for (int i=1;i<=n;i++){ sb.append(adj[i].size()+"\n"); } System.out.print(sb); } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 40, 18, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 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, 21 ], [ 21, 22 ], [ 21, 23 ], [ 24, 25 ], [ 24, 26 ], [ 8, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 32, 33 ], [ 32, 34 ], [ 27, 35 ], [ 35, 36 ], [ 36, 37 ], [ 27, 38 ], [ 39, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 39, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 53, 63 ], [ 63, 64 ], [ 64, 65 ], [ 53, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 6, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] count = new int[n+1];\n\t\t\n\t\tfor(int i=1;i<n;i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tcount[a[i]]++;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<n+1;i++) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] count = new int[n+1];\n\t\t\n\t\tfor(int i=1;i<n;i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tcount[a[i]]++;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<n+1;i++) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] count = new int[n+1];\n\t\t\n\t\tfor(int i=1;i<n;i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tcount[a[i]]++;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<n+1;i++) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}\n\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] count = new int[n+1];\n\t\t\n\t\tfor(int i=1;i<n;i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tcount[a[i]]++;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<n+1;i++) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}\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];", "a", "new int[n]", "n", "int[] count = new int[n+1];", "count", "new int[n+1]", "n+1", "n", "1", "for(int i=1;i<n;i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tcount[a[i]]++;\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\ta[i] = scan.nextInt();\n\t\t\tcount[a[i]]++;\n\t\t}", "{\n\t\t\ta[i] = scan.nextInt();\n\t\t\tcount[a[i]]++;\n\t\t}", "a[i] = scan.nextInt()", "a[i]", "a", "i", "scan.nextInt()", "scan.nextInt", "scan", "count[a[i]]++", "count[a[i]]", "count", "a[i]", "a", "i", "for(int i=1;i<n+1;i++) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<n+1", "i", "n+1", "n", "1", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(count[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(count[i]);\n\t\t}", "System.out.println(count[i])", "System.out.println", "System.out", "System", "System.out", "count[i]", "count", "i", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] count = new int[n+1];\n\t\t\n\t\tfor(int i=1;i<n;i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tcount[a[i]]++;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<n+1;i++) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\t\tint[] count = new int[n+1];\n\t\t\n\t\tfor(int i=1;i<n;i++) {\n\t\t\ta[i] = scan.nextInt();\n\t\t\tcount[a[i]]++;\n\t\t}\n\t\t\n\t\tfor(int i=1;i<n+1;i++) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] a = new int[n]; int[] count = new int[n+1]; for(int i=1;i<n;i++) { a[i] = scan.nextInt(); count[a[i]]++; } for(int i=1;i<n+1;i++) { System.out.println(count[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, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 17, 42, 2, 40, 13, 17, 30, 4, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 2, 17, 2, 2, 13, 13, 17, 17, 4, 13, 17, 23, 13, 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, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 18, 13, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 17, 12, 13, 30, 4, 18, 13, 17, 12, 13, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 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, 41, 13, 20, 2, 13, 13, 11, 1, 41, 13, 13, 2, 13, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 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, 30, 0, 18, 13, 13, 4, 18, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 2, 13, 13, 11, 1, 41, 13, 13, 2, 13, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 421, 23 ], [ 421, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 26, 28 ], [ 421, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 31, 33 ], [ 421, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 36, 38 ], [ 421, 39 ], [ 39, 40 ], [ 39, 41 ], [ 421, 42 ], [ 42, 43 ], [ 42, 44 ], [ 421, 45 ], [ 45, 46 ], [ 45, 47 ], [ 421, 48 ], [ 48, 49 ], [ 48, 50 ], [ 421, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 57, 58 ], [ 53, 59 ], [ 59, 60 ], [ 59, 61 ], [ 53, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 62, 67 ], [ 67, 68 ], [ 68, 69 ], [ 53, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 53, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 79, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 79, 86 ], [ 53, 87 ], [ 87, 88 ], [ 87, 89 ], [ 51, 90 ], [ 90, 91 ], [ 421, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 94, 100 ], [ 100, 101 ], [ 100, 102 ], [ 103, 104 ], [ 103, 105 ], [ 94, 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 ], [ 120, 122 ], [ 119, 123 ], [ 123, 124 ], [ 124, 125 ], [ 94, 126 ], [ 126, 127 ], [ 126, 128 ], [ 129, 130 ], [ 129, 131 ], [ 94, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 132, 137 ], [ 137, 138 ], [ 137, 139 ], [ 132, 140 ], [ 140, 141 ], [ 141, 142 ], [ 132, 143 ], [ 144, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 148, 150 ], [ 94, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 151, 156 ], [ 156, 157 ], [ 156, 158 ], [ 151, 159 ], [ 159, 160 ], [ 160, 161 ], [ 151, 162 ], [ 163, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 164, 167 ], [ 167, 168 ], [ 167, 169 ], [ 421, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 173, 176 ], [ 177, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 178, 181 ], [ 170, 182 ], [ 182, 183 ], [ 421, 184 ], [ 184, 185 ], [ 184, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 187, 190 ], [ 421, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 194, 197 ], [ 421, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 200, 204 ], [ 204, 205 ], [ 205, 206 ], [ 200, 207 ], [ 207, 208 ], [ 208, 209 ], [ 207, 210 ], [ 198, 211 ], [ 211, 212 ], [ 421, 213 ], [ 213, 214 ], [ 213, 215 ], [ 215, 216 ], [ 213, 217 ], [ 217, 218 ], [ 213, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 221, 225 ], [ 225, 226 ], [ 225, 227 ], [ 219, 228 ], [ 228, 229 ], [ 213, 230 ], [ 230, 231 ], [ 230, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 234, 238 ], [ 238, 239 ], [ 239, 240 ], [ 240, 241 ], [ 233, 242 ], [ 242, 243 ], [ 243, 244 ], [ 244, 245 ], [ 244, 246 ], [ 246, 247 ], [ 247, 248 ], [ 243, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 232, 253 ], [ 253, 254 ], [ 254, 255 ], [ 255, 256 ], [ 213, 257 ], [ 257, 258 ], [ 257, 259 ], [ 259, 260 ], [ 260, 261 ], [ 261, 262 ], [ 262, 263 ], [ 261, 264 ], [ 264, 265 ], [ 213, 266 ], [ 266, 267 ], [ 266, 268 ], [ 268, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 270, 273 ], [ 273, 274 ], [ 213, 275 ], [ 275, 276 ], [ 275, 277 ], [ 277, 278 ], [ 278, 279 ], [ 278, 280 ], [ 277, 282 ], [ 282, 283 ], [ 283, 284 ], [ 284, 285 ], [ 284, 286 ], [ 282, 287 ], [ 287, 288 ], [ 287, 289 ], [ 282, 290 ], [ 290, 291 ], [ 291, 292 ], [ 282, 293 ], [ 294, 294 ], [ 294, 295 ], [ 295, 296 ], [ 296, 297 ], [ 296, 298 ], [ 295, 299 ], [ 299, 300 ], [ 300, 301 ], [ 277, 302 ], [ 302, 303 ], [ 275, 304 ], [ 304, 305 ], [ 213, 306 ], [ 306, 307 ], [ 306, 308 ], [ 308, 309 ], [ 309, 310 ], [ 309, 311 ], [ 312, 313 ], [ 312, 314 ], [ 308, 315 ], [ 315, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 315, 320 ], [ 320, 321 ], [ 320, 322 ], [ 322, 323 ], [ 322, 324 ], [ 315, 325 ], [ 325, 326 ], [ 326, 327 ], [ 315, 328 ], [ 329, 329 ], [ 329, 330 ], [ 330, 331 ], [ 331, 332 ], [ 331, 333 ], [ 330, 334 ], [ 334, 335 ], [ 335, 336 ], [ 308, 337 ], [ 337, 338 ], [ 306, 339 ], [ 339, 340 ], [ 306, 341 ], [ 341, 342 ], [ 213, 343 ], [ 343, 344 ], [ 343, 345 ], [ 345, 346 ], [ 346, 347 ], [ 346, 348 ], [ 345, 350 ], [ 350, 351 ], [ 351, 352 ], [ 352, 353 ], [ 352, 354 ], [ 350, 355 ], [ 355, 356 ], [ 355, 357 ], [ 350, 358 ], [ 358, 359 ], [ 359, 360 ], [ 350, 361 ], [ 362, 362 ], [ 362, 363 ], [ 363, 364 ], [ 364, 365 ], [ 364, 366 ], [ 363, 367 ], [ 367, 368 ], [ 368, 369 ], [ 345, 370 ], [ 370, 371 ], [ 343, 372 ], [ 372, 373 ], [ 213, 374 ], [ 374, 375 ], [ 374, 376 ], [ 376, 377 ], [ 377, 378 ], [ 377, 379 ], [ 380, 381 ], [ 380, 382 ], [ 376, 383 ], [ 383, 384 ], [ 384, 385 ], [ 385, 386 ], [ 385, 387 ], [ 383, 388 ], [ 388, 389 ], [ 388, 390 ], [ 390, 391 ], [ 390, 392 ], [ 383, 393 ], [ 393, 394 ], [ 394, 395 ], [ 383, 396 ], [ 397, 397 ], [ 397, 398 ], [ 398, 399 ], [ 399, 400 ], [ 399, 401 ], [ 398, 402 ], [ 402, 403 ], [ 403, 404 ], [ 376, 405 ], [ 405, 406 ], [ 374, 407 ], [ 407, 408 ], [ 374, 409 ], [ 409, 410 ], [ 213, 411 ], [ 411, 412 ], [ 411, 413 ], [ 413, 414 ], [ 414, 415 ], [ 415, 416 ], [ 416, 417 ], [ 415, 418 ], [ 418, 419 ], [ 0, 420 ], [ 420, 421 ], [ 420, 422 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n long startTime = System.nanoTime();\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n long endTime = System.nanoTime();\n err.println(\"Execution Time : +\" + (endTime - startTime) / 1000000 + \" ms\");\n exit(0);\n }\n\n static void solve() {\n int n = in.nextInt();\n int[] data = new int[n + 2];\n for (int i = 2; i <= n; i++) {\n data[i] = in.nextInt();\n }\n int[] count = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n count[data[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(count[i]);\n }\n }\n\n static void debug(Object... args) {\n for (Object a : args) {\n out.println(a);\n }\n }\n\n static void y() {\n out.println(\"YES\");\n }\n\n static void n() {\n out.println(\"NO\");\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 long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readAllInts(int n) {\n int[] p = new int[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public int[] readAllInts(int n, int s) {\n int[] p = new int[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n) {\n long[] p = new long[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n, int s) {\n long[] p = new long[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n static void exit(int a) {\n out.close();\n err.close();\n System.exit(a);\n }\n\n static InputStream inputStream = System.in;\n static OutputStream outputStream = System.out;\n static OutputStream errStream = System.err;\n static InputReader in = new InputReader(inputStream);\n static PrintWriter out = new PrintWriter(outputStream);\n static PrintWriter err = new PrintWriter(errStream);\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\n public static void main(String[] args) throws Exception {\n long startTime = System.nanoTime();\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n long endTime = System.nanoTime();\n err.println(\"Execution Time : +\" + (endTime - startTime) / 1000000 + \" ms\");\n exit(0);\n }\n\n static void solve() {\n int n = in.nextInt();\n int[] data = new int[n + 2];\n for (int i = 2; i <= n; i++) {\n data[i] = in.nextInt();\n }\n int[] count = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n count[data[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(count[i]);\n }\n }\n\n static void debug(Object... args) {\n for (Object a : args) {\n out.println(a);\n }\n }\n\n static void y() {\n out.println(\"YES\");\n }\n\n static void n() {\n out.println(\"NO\");\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 long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readAllInts(int n) {\n int[] p = new int[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public int[] readAllInts(int n, int s) {\n int[] p = new int[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n) {\n long[] p = new long[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n, int s) {\n long[] p = new long[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n static void exit(int a) {\n out.close();\n err.close();\n System.exit(a);\n }\n\n static InputStream inputStream = System.in;\n static OutputStream outputStream = System.out;\n static OutputStream errStream = System.err;\n static InputReader in = new InputReader(inputStream);\n static PrintWriter out = new PrintWriter(outputStream);\n static PrintWriter err = new PrintWriter(errStream);\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n}", "Main", "static InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "static OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "static OutputStream errStream = System.err;", "errStream", "System.err", "System", "System.err", "static InputReader in = new InputReader(inputStream);", "in", "new InputReader(inputStream)", "static PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "static PrintWriter err = new PrintWriter(errStream);", "err", "new PrintWriter(errStream)", "static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "public static void main(String[] args) throws Exception {\n long startTime = System.nanoTime();\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n long endTime = System.nanoTime();\n err.println(\"Execution Time : +\" + (endTime - startTime) / 1000000 + \" ms\");\n exit(0);\n }", "main", "{\n long startTime = System.nanoTime();\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n long endTime = System.nanoTime();\n err.println(\"Execution Time : +\" + (endTime - startTime) / 1000000 + \" ms\");\n exit(0);\n }", "long startTime = System.nanoTime();", "startTime", "System.nanoTime()", "System.nanoTime", "System", "int t = 1;", "t", "1", "while (t-- > 0) {\n solve();\n }", "t-- > 0", "t--", "t", "0", "{\n solve();\n }", "solve()", "solve", "long endTime = System.nanoTime();", "endTime", "System.nanoTime()", "System.nanoTime", "System", "err.println(\"Execution Time : +\" + (endTime - startTime) / 1000000 + \" ms\")", "err.println", "err", "\"Execution Time : +\" + (endTime - startTime) / 1000000 + \" ms\"", "\"Execution Time : +\" + (endTime - startTime) / 1000000 + \" ms\"", "\"Execution Time : +\"", "(endTime - startTime) / 1000000", "(endTime - startTime)", "endTime", "startTime", "1000000", "\" ms\"", "exit(0)", "exit", "0", "String[] args", "args", "static void solve() {\n int n = in.nextInt();\n int[] data = new int[n + 2];\n for (int i = 2; i <= n; i++) {\n data[i] = in.nextInt();\n }\n int[] count = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n count[data[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(count[i]);\n }\n }", "solve", "{\n int n = in.nextInt();\n int[] data = new int[n + 2];\n for (int i = 2; i <= n; i++) {\n data[i] = in.nextInt();\n }\n int[] count = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n count[data[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(count[i]);\n }\n }", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] data = new int[n + 2];", "data", "new int[n + 2]", "n + 2", "n", "2", "for (int i = 2; i <= n; i++) {\n data[i] = in.nextInt();\n }", "int i = 2;", "int i = 2;", "i", "2", "i <= n", "i", "n", "i++", "i++", "i", "{\n data[i] = in.nextInt();\n }", "{\n data[i] = in.nextInt();\n }", "data[i] = in.nextInt()", "data[i]", "data", "i", "in.nextInt()", "in.nextInt", "in", "int[] count = new int[n + 1];", "count", "new int[n + 1]", "n + 1", "n", "1", "for (int i = 2; i <= n; i++) {\n count[data[i]]++;\n }", "int i = 2;", "int i = 2;", "i", "2", "i <= n", "i", "n", "i++", "i++", "i", "{\n count[data[i]]++;\n }", "{\n count[data[i]]++;\n }", "count[data[i]]++", "count[data[i]]", "count", "data[i]", "data", "i", "for (int i = 1; i <= n; i++) {\n out.println(count[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n out.println(count[i]);\n }", "{\n out.println(count[i]);\n }", "out.println(count[i])", "out.println", "out", "count[i]", "count", "i", "static void debug(Object... args) {\n for (Object a : args) {\n out.println(a);\n }\n }", "debug", "{\n for (Object a : args) {\n out.println(a);\n }\n }", "for (Object a : args) {\n out.println(a);\n }", "Object a", "args", "{\n out.println(a);\n }", "{\n out.println(a);\n }", "out.println(a)", "out.println", "out", "a", "Object... args", "args", "static void y() {\n out.println(\"YES\");\n }", "y", "{\n out.println(\"YES\");\n }", "out.println(\"YES\")", "out.println", "out", "\"YES\"", "static void n() {\n out.println(\"NO\");\n }", "n", "{\n out.println(\"NO\");\n }", "out.println(\"NO\")", "out.println", "out", "\"NO\"", "static void exit(int a) {\n out.close();\n err.close();\n System.exit(a);\n }", "exit", "{\n out.close();\n err.close();\n System.exit(a);\n }", "out.close()", "out.close", "out", "err.close()", "err.close", "err", "System.exit(a)", "System.exit", "System", "a", "int a", "a", "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 long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readAllInts(int n) {\n int[] p = new int[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public int[] readAllInts(int n, int s) {\n int[] p = new int[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n) {\n long[] p = new long[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n, int s) {\n long[] p = new long[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\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 long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public 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 int[] readAllInts(int n) {\n int[] p = new int[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }", "readAllInts", "{\n int[] p = new int[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }", "int[] p = new int[n];", "p", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n p[i] = in.nextInt();\n }", "{\n p[i] = in.nextInt();\n }", "p[i] = in.nextInt()", "p[i]", "p", "i", "in.nextInt()", "in.nextInt", "in", "return p;", "p", "int n", "n", "public int[] readAllInts(int n, int s) {\n int[] p = new int[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }", "readAllInts", "{\n int[] p = new int[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }", "int[] p = new int[n + s];", "p", "new int[n + s]", "n + s", "n", "s", "for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }", "int i = s;", "int i = s;", "i", "s", "i < n + s", "i", "n + s", "n", "s", "i++", "i++", "i", "{\n p[i] = in.nextInt();\n }", "{\n p[i] = in.nextInt();\n }", "p[i] = in.nextInt()", "p[i]", "p", "i", "in.nextInt()", "in.nextInt", "in", "return p;", "p", "int n", "n", "int s", "s", "public long[] readAllLongs(int n) {\n long[] p = new long[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }", "readAllLongs", "{\n long[] p = new long[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }", "long[] p = new long[n];", "p", "new long[n]", "n", "for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n p[i] = in.nextInt();\n }", "{\n p[i] = in.nextInt();\n }", "p[i] = in.nextInt()", "p[i]", "p", "i", "in.nextInt()", "in.nextInt", "in", "return p;", "p", "int n", "n", "public long[] readAllLongs(int n, int s) {\n long[] p = new long[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }", "readAllLongs", "{\n long[] p = new long[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }", "long[] p = new long[n + s];", "p", "new long[n + s]", "n + s", "n", "s", "for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }", "int i = s;", "int i = s;", "i", "s", "i < n + s", "i", "n + s", "n", "s", "i++", "i++", "i", "{\n p[i] = in.nextInt();\n }", "{\n p[i] = in.nextInt();\n }", "p[i] = in.nextInt()", "p[i]", "p", "i", "in.nextInt()", "in.nextInt", "in", "return p;", "p", "int n", "n", "int s", "s", "public double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public class Main {\n\n public static void main(String[] args) throws Exception {\n long startTime = System.nanoTime();\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n long endTime = System.nanoTime();\n err.println(\"Execution Time : +\" + (endTime - startTime) / 1000000 + \" ms\");\n exit(0);\n }\n\n static void solve() {\n int n = in.nextInt();\n int[] data = new int[n + 2];\n for (int i = 2; i <= n; i++) {\n data[i] = in.nextInt();\n }\n int[] count = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n count[data[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(count[i]);\n }\n }\n\n static void debug(Object... args) {\n for (Object a : args) {\n out.println(a);\n }\n }\n\n static void y() {\n out.println(\"YES\");\n }\n\n static void n() {\n out.println(\"NO\");\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 long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readAllInts(int n) {\n int[] p = new int[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public int[] readAllInts(int n, int s) {\n int[] p = new int[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n) {\n long[] p = new long[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n, int s) {\n long[] p = new long[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n static void exit(int a) {\n out.close();\n err.close();\n System.exit(a);\n }\n\n static InputStream inputStream = System.in;\n static OutputStream outputStream = System.out;\n static OutputStream errStream = System.err;\n static InputReader in = new InputReader(inputStream);\n static PrintWriter out = new PrintWriter(outputStream);\n static PrintWriter err = new PrintWriter(errStream);\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n}", "public class Main {\n\n public static void main(String[] args) throws Exception {\n long startTime = System.nanoTime();\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n long endTime = System.nanoTime();\n err.println(\"Execution Time : +\" + (endTime - startTime) / 1000000 + \" ms\");\n exit(0);\n }\n\n static void solve() {\n int n = in.nextInt();\n int[] data = new int[n + 2];\n for (int i = 2; i <= n; i++) {\n data[i] = in.nextInt();\n }\n int[] count = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n count[data[i]]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(count[i]);\n }\n }\n\n static void debug(Object... args) {\n for (Object a : args) {\n out.println(a);\n }\n }\n\n static void y() {\n out.println(\"YES\");\n }\n\n static void n() {\n out.println(\"NO\");\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 long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readAllInts(int n) {\n int[] p = new int[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public int[] readAllInts(int n, int s) {\n int[] p = new int[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n) {\n long[] p = new long[n];\n for (int i = 0; i < n; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public long[] readAllLongs(int n, int s) {\n long[] p = new long[n + s];\n for (int i = s; i < n + s; i++) {\n p[i] = in.nextInt();\n }\n return p;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n static void exit(int a) {\n out.close();\n err.close();\n System.exit(a);\n }\n\n static InputStream inputStream = System.in;\n static OutputStream outputStream = System.out;\n static OutputStream errStream = System.err;\n static InputReader in = new InputReader(inputStream);\n static PrintWriter out = new PrintWriter(outputStream);\n static PrintWriter err = new PrintWriter(errStream);\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws Exception { long startTime = System.nanoTime(); int t = 1; while (t-- > 0) { solve(); } long endTime = System.nanoTime(); err.println("Execution Time : +" + (endTime - startTime) / 1000000 + " ms"); exit(0); } static void solve() { int n = in.nextInt(); int[] data = new int[n + 2]; for (int i = 2; i <= n; i++) { data[i] = in.nextInt(); } int[] count = new int[n + 1]; for (int i = 2; i <= n; i++) { count[data[i]]++; } for (int i = 1; i <= n; i++) { out.println(count[i]); } } static void debug(Object... args) { for (Object a : args) { out.println(a); } } static void y() { out.println("YES"); } static void n() { out.println("NO"); } 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 long nextLong() { return Long.parseLong(next()); } public int nextInt() { return Integer.parseInt(next()); } public int[] readAllInts(int n) { int[] p = new int[n]; for (int i = 0; i < n; i++) { p[i] = in.nextInt(); } return p; } public int[] readAllInts(int n, int s) { int[] p = new int[n + s]; for (int i = s; i < n + s; i++) { p[i] = in.nextInt(); } return p; } public long[] readAllLongs(int n) { long[] p = new long[n]; for (int i = 0; i < n; i++) { p[i] = in.nextInt(); } return p; } public long[] readAllLongs(int n, int s) { long[] p = new long[n + s]; for (int i = s; i < n + s; i++) { p[i] = in.nextInt(); } return p; } public double nextDouble() { return Double.parseDouble(next()); } } static void exit(int a) { out.close(); err.close(); System.exit(a); } static InputStream inputStream = System.in; static OutputStream outputStream = System.out; static OutputStream errStream = System.err; static InputReader in = new InputReader(inputStream); static PrintWriter out = new PrintWriter(outputStream); static PrintWriter err = new PrintWriter(errStream); static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); }
[ 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, 41, 13, 4, 18, 13, 40, 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, 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 ], [ 167, 14 ], [ 167, 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 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 46, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 17, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 15, 76 ], [ 76, 77 ], [ 167, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 78, 82 ], [ 82, 83 ], [ 78, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 78, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 93, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 103, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 92, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 78, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 125, 126 ], [ 78, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 78, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 78, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 147, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 151, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 147, 164 ], [ 164, 165 ], [ 0, 166 ], [ 166, 167 ], [ 166, 168 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\npublic class Main\n{\n static 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 } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n public static void main(String args[])\n {\n FastReader obj = new FastReader();\n int n = obj.nextInt(),arr[] = new int[n+1];\n for(int i=0;i<n-1;i++)\n {\n int k = obj.nextInt();\n arr[k]++;\n }\n for(int i=1;i<=n;i++)System.out.println(arr[i]);\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.StringTokenizer;", "StringTokenizer", "java.util", "public class Main\n{\n static 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 } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n public static void main(String args[])\n {\n FastReader obj = new FastReader();\n int n = obj.nextInt(),arr[] = new int[n+1];\n for(int i=0;i<n-1;i++)\n {\n int k = obj.nextInt();\n arr[k]++;\n }\n for(int i=1;i<=n;i++)System.out.println(arr[i]);\n }\n}", "Main", "public static void main(String args[])\n {\n FastReader obj = new FastReader();\n int n = obj.nextInt(),arr[] = new int[n+1];\n for(int i=0;i<n-1;i++)\n {\n int k = obj.nextInt();\n arr[k]++;\n }\n for(int i=1;i<=n;i++)System.out.println(arr[i]);\n }", "main", "{\n FastReader obj = new FastReader();\n int n = obj.nextInt(),arr[] = new int[n+1];\n for(int i=0;i<n-1;i++)\n {\n int k = obj.nextInt();\n arr[k]++;\n }\n for(int i=1;i<=n;i++)System.out.println(arr[i]);\n }", "FastReader obj = new FastReader();", "obj", "new FastReader()", "int n = obj.nextInt()", "n", "obj.nextInt()", "obj.nextInt", "obj", "arr[] = new int[n+1];", "arr", "new int[n+1]", "n+1", "n", "1", "for(int i=0;i<n-1;i++)\n {\n int k = obj.nextInt();\n arr[k]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n int k = obj.nextInt();\n arr[k]++;\n }", "{\n int k = obj.nextInt();\n arr[k]++;\n }", "int k = obj.nextInt();", "k", "obj.nextInt()", "obj.nextInt", "obj", "arr[k]++", "arr[k]", "arr", "k", "for(int i=1;i<=n;i++)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", "static 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 } 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\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 } 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 static 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 } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n public static void main(String args[])\n {\n FastReader obj = new FastReader();\n int n = obj.nextInt(),arr[] = new int[n+1];\n for(int i=0;i<n-1;i++)\n {\n int k = obj.nextInt();\n arr[k]++;\n }\n for(int i=1;i<=n;i++)System.out.println(arr[i]);\n }\n}", "public class Main\n{\n static 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 } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n\n public static void main(String args[])\n {\n FastReader obj = new FastReader();\n int n = obj.nextInt(),arr[] = new int[n+1];\n for(int i=0;i<n-1;i++)\n {\n int k = obj.nextInt();\n arr[k]++;\n }\n for(int i=1;i<=n;i++)System.out.println(arr[i]);\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } public static void main(String args[]) { FastReader obj = new FastReader(); int n = obj.nextInt(),arr[] = new int[n+1]; for(int i=0;i<n-1;i++) { int k = obj.nextInt(); arr[k]++; } for(int i=1;i<=n;i++)System.out.println(arr[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, 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 ], [ 90, 5 ], [ 90, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 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 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 57, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 66, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 84, 85 ], [ 84, 86 ], [ 6, 87 ], [ 87, 88 ], [ 0, 89 ], [ 89, 90 ], [ 89, 91 ] ]
[ "import java.util.Scanner;\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[] A = new int[(int)(N - 1)];\n int[] B = new int[(int)(N)];\n \n for(int i = 0 ; i < N - 1 ; i++){\n A[i] = sc.nextInt();\n B[A[i] - 1] = B[A[i] - 1] + 1; \n }\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) throws Exception {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] A = new int[(int)(N - 1)];\n int[] B = new int[(int)(N)];\n \n for(int i = 0 ; i < N - 1 ; i++){\n A[i] = sc.nextInt();\n B[A[i] - 1] = B[A[i] - 1] + 1; \n }\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) throws Exception {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] A = new int[(int)(N - 1)];\n int[] B = new int[(int)(N)];\n \n for(int i = 0 ; i < N - 1 ; i++){\n A[i] = sc.nextInt();\n B[A[i] - 1] = B[A[i] - 1] + 1; \n }\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 = sc.nextInt();\n int[] A = new int[(int)(N - 1)];\n int[] B = new int[(int)(N)];\n \n for(int i = 0 ; i < N - 1 ; i++){\n A[i] = sc.nextInt();\n B[A[i] - 1] = B[A[i] - 1] + 1; \n }\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 = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] A = new int[(int)(N - 1)];", "A", "new int[(int)(N - 1)]", "(int)(N - 1)", "N", "1", "int[] B = new int[(int)(N)];", "B", "new int[(int)(N)]", "(int)(N)", "for(int i = 0 ; i < N - 1 ; i++){\n A[i] = sc.nextInt();\n B[A[i] - 1] = B[A[i] - 1] + 1; \n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < N - 1", "i", "N - 1", "N", "1", "i++", "i++", "i", "{\n A[i] = sc.nextInt();\n B[A[i] - 1] = B[A[i] - 1] + 1; \n }", "{\n A[i] = sc.nextInt();\n B[A[i] - 1] = B[A[i] - 1] + 1; \n }", "A[i] = sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "B[A[i] - 1] = B[A[i] - 1] + 1", "B[A[i] - 1]", "B", "A[i] - 1", "A[i]", "A", "i", "1", "B[A[i] - 1] + 1", "B[A[i] - 1]", "B", "A[i] - 1", "A[i]", "A", "i", "1", "1", "for(int 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])", "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) throws Exception {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] A = new int[(int)(N - 1)];\n int[] B = new int[(int)(N)];\n \n for(int i = 0 ; i < N - 1 ; i++){\n A[i] = sc.nextInt();\n B[A[i] - 1] = B[A[i] - 1] + 1; \n }\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) throws Exception {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] A = new int[(int)(N - 1)];\n int[] B = new int[(int)(N)];\n \n for(int i = 0 ; i < N - 1 ; i++){\n A[i] = sc.nextInt();\n B[A[i] - 1] = B[A[i] - 1] + 1; \n }\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) throws Exception { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] A = new int[(int)(N - 1)]; int[] B = new int[(int)(N)]; for(int i = 0 ; i < N - 1 ; i++){ A[i] = sc.nextInt(); B[A[i] - 1] = B[A[i] - 1] + 1; } for(int i = 0 ; i < N ; i++){ System.out.println(B[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 2, 13, 17, 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, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 13, 17, 41, 13, 2, 18, 13, 13, 17, 4, 18, 18, 13, 13, 13, 4, 18, 18, 13, 13, 13, 41, 13, 20, 4, 18, 13, 2, 4, 18, 18, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 13, 2, 2, 4, 18, 18, 13, 13, 17, 17, 4, 18, 18, 13, 13, 4, 18, 4, 18, 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, 4, 13, 42, 4, 18, 13, 13, 30, 0, 13, 4, 13, 41, 13, 20, 4, 18, 13, 13, 0, 13, 4, 13, 42, 40, 4, 18, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 41, 13, 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, 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, 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, 18, 13, 13, 30, 0, 13, 4, 13, 29, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 2, 13, 17, 30, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 0, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 626, 8 ], [ 626, 9 ], [ 9, 10 ], [ 626, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 13, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 13, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 24, 27 ], [ 27, 28 ], [ 27, 29 ], [ 13, 30 ], [ 30, 31 ], [ 30, 32 ], [ 13, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 13, 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 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 65, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 73, 77 ], [ 65, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 65, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 13, 90 ], [ 90, 91 ], [ 90, 92 ], [ 13, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 96, 102 ], [ 13, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 103, 108 ], [ 108, 109 ], [ 108, 110 ], [ 103, 111 ], [ 111, 112 ], [ 112, 113 ], [ 103, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 119, 125 ], [ 118, 126 ], [ 13, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 11, 137 ], [ 137, 138 ], [ 0, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 143, 145 ], [ 139, 146 ], [ 146, 147 ], [ 139, 148 ], [ 148, 149 ], [ 139, 150 ], [ 150, 151 ], [ 139, 152 ], [ 152, 153 ], [ 139, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 156, 160 ], [ 160, 161 ], [ 160, 162 ], [ 156, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 166, 168 ], [ 139, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 172, 173 ], [ 172, 174 ], [ 171, 175 ], [ 175, 176 ], [ 175, 177 ], [ 171, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 181, 183 ], [ 169, 184 ], [ 184, 185 ], [ 139, 186 ], [ 186, 187 ], [ 186, 188 ], [ 188, 189 ], [ 189, 190 ], [ 189, 191 ], [ 188, 193 ], [ 193, 194 ], [ 193, 195 ], [ 188, 196 ], [ 196, 197 ], [ 188, 198 ], [ 198, 199 ], [ 199, 200 ], [ 200, 201 ], [ 200, 202 ], [ 202, 203 ], [ 199, 204 ], [ 204, 205 ], [ 198, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 208, 210 ], [ 207, 211 ], [ 206, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 215, 216 ], [ 212, 217 ], [ 188, 218 ], [ 218, 219 ], [ 139, 220 ], [ 220, 221 ], [ 220, 222 ], [ 222, 223 ], [ 223, 224 ], [ 223, 225 ], [ 225, 226 ], [ 222, 227 ], [ 227, 228 ], [ 228, 229 ], [ 229, 230 ], [ 228, 231 ], [ 227, 232 ], [ 232, 233 ], [ 233, 234 ], [ 233, 235 ], [ 235, 236 ], [ 222, 237 ], [ 237, 238 ], [ 237, 239 ], [ 222, 240 ], [ 240, 241 ], [ 241, 242 ], [ 240, 243 ], [ 222, 244 ], [ 244, 245 ], [ 244, 246 ], [ 246, 247 ], [ 222, 248 ], [ 248, 249 ], [ 249, 250 ], [ 250, 251 ], [ 251, 252 ], [ 250, 253 ], [ 248, 254 ], [ 254, 255 ], [ 255, 256 ], [ 256, 257 ], [ 255, 258 ], [ 254, 259 ], [ 259, 260 ], [ 259, 261 ], [ 261, 262 ], [ 222, 263 ], [ 263, 264 ], [ 264, 265 ], [ 265, 266 ], [ 139, 267 ], [ 267, 268 ], [ 267, 269 ], [ 269, 270 ], [ 270, 271 ], [ 270, 272 ], [ 269, 273 ], [ 273, 274 ], [ 273, 275 ], [ 275, 276 ], [ 269, 277 ], [ 277, 278 ], [ 278, 279 ], [ 278, 280 ], [ 277, 281 ], [ 281, 282 ], [ 281, 283 ], [ 283, 284 ], [ 269, 285 ], [ 285, 286 ], [ 285, 287 ], [ 287, 288 ], [ 287, 289 ], [ 269, 290 ], [ 290, 291 ], [ 290, 292 ], [ 292, 293 ], [ 292, 294 ], [ 294, 295 ], [ 269, 296 ], [ 296, 297 ], [ 297, 298 ], [ 298, 299 ], [ 299, 300 ], [ 299, 301 ], [ 301, 302 ], [ 298, 303 ], [ 297, 304 ], [ 304, 305 ], [ 304, 306 ], [ 296, 307 ], [ 307, 308 ], [ 308, 309 ], [ 308, 310 ], [ 310, 311 ], [ 311, 312 ], [ 312, 313 ], [ 312, 314 ], [ 311, 315 ], [ 310, 316 ], [ 269, 317 ], [ 317, 318 ], [ 317, 319 ], [ 319, 320 ], [ 320, 321 ], [ 269, 322 ], [ 322, 323 ], [ 139, 324 ], [ 324, 325 ], [ 324, 326 ], [ 326, 327 ], [ 327, 328 ], [ 327, 329 ], [ 326, 331 ], [ 331, 332 ], [ 332, 333 ], [ 333, 334 ], [ 333, 335 ], [ 331, 336 ], [ 336, 337 ], [ 336, 338 ], [ 331, 339 ], [ 339, 340 ], [ 340, 341 ], [ 331, 342 ], [ 343, 343 ], [ 343, 344 ], [ 344, 345 ], [ 345, 346 ], [ 345, 347 ], [ 344, 348 ], [ 348, 349 ], [ 326, 350 ], [ 350, 351 ], [ 324, 352 ], [ 352, 353 ], [ 139, 354 ], [ 354, 355 ], [ 354, 356 ], [ 356, 357 ], [ 357, 358 ], [ 357, 359 ], [ 356, 360 ], [ 360, 361 ], [ 360, 362 ], [ 362, 363 ], [ 356, 364 ], [ 364, 365 ], [ 365, 366 ], [ 365, 367 ], [ 364, 368 ], [ 368, 369 ], [ 368, 370 ], [ 370, 371 ], [ 356, 372 ], [ 372, 373 ], [ 372, 374 ], [ 374, 375 ], [ 374, 376 ], [ 356, 377 ], [ 377, 378 ], [ 377, 379 ], [ 379, 380 ], [ 379, 381 ], [ 381, 382 ], [ 356, 383 ], [ 383, 384 ], [ 384, 385 ], [ 385, 386 ], [ 386, 387 ], [ 386, 388 ], [ 388, 389 ], [ 385, 390 ], [ 384, 391 ], [ 391, 392 ], [ 391, 393 ], [ 383, 394 ], [ 394, 395 ], [ 395, 396 ], [ 395, 397 ], [ 397, 398 ], [ 398, 399 ], [ 399, 400 ], [ 399, 401 ], [ 398, 402 ], [ 397, 403 ], [ 356, 404 ], [ 404, 405 ], [ 404, 406 ], [ 406, 407 ], [ 407, 408 ], [ 356, 409 ], [ 409, 410 ], [ 139, 411 ], [ 411, 412 ], [ 411, 413 ], [ 413, 414 ], [ 414, 415 ], [ 414, 416 ], [ 413, 418 ], [ 418, 419 ], [ 419, 420 ], [ 420, 421 ], [ 420, 422 ], [ 418, 423 ], [ 423, 424 ], [ 423, 425 ], [ 418, 426 ], [ 426, 427 ], [ 427, 428 ], [ 418, 429 ], [ 430, 430 ], [ 430, 431 ], [ 431, 432 ], [ 432, 433 ], [ 432, 434 ], [ 431, 435 ], [ 435, 436 ], [ 413, 437 ], [ 437, 438 ], [ 411, 439 ], [ 439, 440 ], [ 139, 441 ], [ 441, 442 ], [ 441, 443 ], [ 443, 444 ], [ 444, 445 ], [ 444, 446 ], [ 446, 447 ], [ 443, 448 ], [ 448, 449 ], [ 449, 450 ], [ 450, 451 ], [ 449, 452 ], [ 448, 453 ], [ 453, 454 ], [ 454, 455 ], [ 454, 456 ], [ 456, 457 ], [ 443, 458 ], [ 458, 459 ], [ 139, 460 ], [ 460, 461 ], [ 460, 462 ], [ 462, 463 ], [ 463, 464 ], [ 463, 465 ], [ 462, 466 ], [ 466, 467 ], [ 466, 468 ], [ 462, 469 ], [ 469, 470 ], [ 469, 471 ], [ 471, 472 ], [ 462, 473 ], [ 473, 474 ], [ 474, 475 ], [ 474, 476 ], [ 473, 477 ], [ 477, 478 ], [ 477, 479 ], [ 479, 480 ], [ 462, 481 ], [ 481, 482 ], [ 481, 483 ], [ 483, 484 ], [ 483, 485 ], [ 462, 486 ], [ 486, 487 ], [ 486, 488 ], [ 488, 489 ], [ 488, 490 ], [ 490, 491 ], [ 462, 492 ], [ 492, 493 ], [ 493, 494 ], [ 494, 495 ], [ 495, 496 ], [ 495, 497 ], [ 497, 498 ], [ 494, 499 ], [ 493, 500 ], [ 500, 501 ], [ 500, 502 ], [ 492, 503 ], [ 503, 504 ], [ 504, 505 ], [ 504, 506 ], [ 506, 507 ], [ 507, 508 ], [ 508, 509 ], [ 508, 510 ], [ 507, 511 ], [ 506, 512 ], [ 462, 513 ], [ 513, 514 ], [ 514, 515 ], [ 514, 516 ], [ 513, 517 ], [ 517, 518 ], [ 518, 519 ], [ 519, 520 ], [ 520, 521 ], [ 521, 522 ], [ 521, 523 ], [ 523, 524 ], [ 520, 525 ], [ 519, 526 ], [ 526, 527 ], [ 526, 528 ], [ 518, 529 ], [ 529, 530 ], [ 530, 531 ], [ 530, 532 ], [ 532, 533 ], [ 533, 534 ], [ 533, 535 ], [ 532, 536 ], [ 536, 537 ], [ 536, 538 ], [ 462, 539 ], [ 539, 540 ], [ 539, 541 ], [ 541, 542 ], [ 542, 543 ], [ 462, 544 ], [ 544, 545 ], [ 139, 546 ], [ 546, 547 ], [ 546, 548 ], [ 548, 549 ], [ 549, 550 ], [ 549, 551 ], [ 548, 553 ], [ 553, 554 ], [ 554, 555 ], [ 555, 556 ], [ 555, 557 ], [ 553, 558 ], [ 558, 559 ], [ 558, 560 ], [ 553, 561 ], [ 561, 562 ], [ 562, 563 ], [ 553, 564 ], [ 565, 565 ], [ 565, 566 ], [ 566, 567 ], [ 567, 568 ], [ 567, 569 ], [ 566, 570 ], [ 570, 571 ], [ 548, 572 ], [ 572, 573 ], [ 546, 574 ], [ 574, 575 ], [ 139, 576 ], [ 576, 577 ], [ 576, 578 ], [ 578, 579 ], [ 579, 580 ], [ 579, 581 ], [ 581, 582 ], [ 582, 583 ], [ 581, 584 ], [ 581, 585 ], [ 585, 586 ], [ 585, 587 ], [ 581, 588 ], [ 578, 589 ], [ 589, 590 ], [ 590, 591 ], [ 590, 592 ], [ 592, 593 ], [ 589, 594 ], [ 594, 595 ], [ 595, 596 ], [ 595, 597 ], [ 594, 598 ], [ 598, 599 ], [ 139, 600 ], [ 600, 601 ], [ 600, 602 ], [ 602, 603 ], [ 603, 604 ], [ 604, 605 ], [ 604, 606 ], [ 603, 607 ], [ 607, 608 ], [ 602, 609 ], [ 609, 610 ], [ 610, 611 ], [ 610, 612 ], [ 612, 613 ], [ 139, 614 ], [ 614, 615 ], [ 614, 616 ], [ 616, 617 ], [ 617, 618 ], [ 618, 619 ], [ 618, 620 ], [ 617, 621 ], [ 616, 622 ], [ 622, 623 ], [ 623, 624 ], [ 0, 625 ], [ 625, 626 ], [ 625, 627 ] ]
[ "import java.util.*;\nimport java.io.*;\n\npublic class Main {\n static Set<Integer> [] al;\n\n public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n int n=sc.nextInt();\n int [] a=sc.nextIntArray(n-1);\n al=new HashSet[n];\n\n for(int i=0;i<n;i++)al[i]=new HashSet<>();\n\n for(int i=0;i<a.length;i++){\n int ind=i+1;\n int boss=a[i]-1;\n al[ind].add(boss);\n al[boss].add(ind);\n }\n\n StringBuilder sb=new StringBuilder(\"\");\n sb.append(al[0].size()+\"\\n\");\n for(int i=1;i<n;i++)sb.append((al[i].size()-1)+\"\\n\");\n System.out.println(sb.toString().trim());\n\n\n }\n\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass FastScanner{\t\n private int BUFFER_SIZE = 1 << 16;\n \n private DataInputStream din;\n \n private byte[] buffer;\n \n private int bufferPointer, bytesRead;\n \n public FastScanner() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public FastScanner( String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n \n public String readLine() throws IOException {\n byte[] buf = new byte[64];\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n \n public String next() throws IOException{\n\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n \n StringBuilder builder = new StringBuilder();\n builder.append((char)c);\n c = read();\n while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }\n \n return builder.toString();\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n \n public int[] nextIntArray( int n) throws IOException {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }\n return arr;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n \n public long[] nextLongArray( int n) throws IOException {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }\n return arr;\n }\n\n public char nextChar() throws IOException{\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n return (char) c;\t\n }\n \n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n \n public double[] nextDoubleArray( int n) throws IOException {\n double arr[] = new double[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }\n return arr;\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n}\n ", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n static Set<Integer> [] al;\n\n public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n int n=sc.nextInt();\n int [] a=sc.nextIntArray(n-1);\n al=new HashSet[n];\n\n for(int i=0;i<n;i++)al[i]=new HashSet<>();\n\n for(int i=0;i<a.length;i++){\n int ind=i+1;\n int boss=a[i]-1;\n al[ind].add(boss);\n al[boss].add(ind);\n }\n\n StringBuilder sb=new StringBuilder(\"\");\n sb.append(al[0].size()+\"\\n\");\n for(int i=1;i<n;i++)sb.append((al[i].size()-1)+\"\\n\");\n System.out.println(sb.toString().trim());\n\n\n }\n\n}", "Main", "static Set<Integer> [] al;", "al", "public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n int n=sc.nextInt();\n int [] a=sc.nextIntArray(n-1);\n al=new HashSet[n];\n\n for(int i=0;i<n;i++)al[i]=new HashSet<>();\n\n for(int i=0;i<a.length;i++){\n int ind=i+1;\n int boss=a[i]-1;\n al[ind].add(boss);\n al[boss].add(ind);\n }\n\n StringBuilder sb=new StringBuilder(\"\");\n sb.append(al[0].size()+\"\\n\");\n for(int i=1;i<n;i++)sb.append((al[i].size()-1)+\"\\n\");\n System.out.println(sb.toString().trim());\n\n\n }", "main", "{\n FastScanner sc=new FastScanner();\n int n=sc.nextInt();\n int [] a=sc.nextIntArray(n-1);\n al=new HashSet[n];\n\n for(int i=0;i<n;i++)al[i]=new HashSet<>();\n\n for(int i=0;i<a.length;i++){\n int ind=i+1;\n int boss=a[i]-1;\n al[ind].add(boss);\n al[boss].add(ind);\n }\n\n StringBuilder sb=new StringBuilder(\"\");\n sb.append(al[0].size()+\"\\n\");\n for(int i=1;i<n;i++)sb.append((al[i].size()-1)+\"\\n\");\n System.out.println(sb.toString().trim());\n\n\n }", "FastScanner sc=new FastScanner();", "sc", "new FastScanner()", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int [] a=sc.nextIntArray(n-1);", "a", "sc.nextIntArray(n-1)", "sc.nextIntArray", "sc", "n-1", "n", "1", "al=new HashSet[n]", "al", "new HashSet[n]", "n", "for(int i=0;i<n;i++)al[i]=new HashSet<>();", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "al[i]=new HashSet<>();", "al[i]=new HashSet<>()", "al[i]", "al", "i", "new HashSet<>()", "for(int i=0;i<a.length;i++){\n int ind=i+1;\n int boss=a[i]-1;\n al[ind].add(boss);\n al[boss].add(ind);\n }", "int i=0;", "int i=0;", "i", "0", "i<a.length", "i", "a.length", "a", "a.length", "i++", "i++", "i", "{\n int ind=i+1;\n int boss=a[i]-1;\n al[ind].add(boss);\n al[boss].add(ind);\n }", "{\n int ind=i+1;\n int boss=a[i]-1;\n al[ind].add(boss);\n al[boss].add(ind);\n }", "int ind=i+1;", "ind", "i+1", "i", "1", "int boss=a[i]-1;", "boss", "a[i]-1", "a[i]", "a", "i", "1", "al[ind].add(boss)", "al[ind].add", "al[ind]", "al", "ind", "boss", "al[boss].add(ind)", "al[boss].add", "al[boss]", "al", "boss", "ind", "StringBuilder sb=new StringBuilder(\"\");", "sb", "new StringBuilder(\"\")", "sb.append(al[0].size()+\"\\n\")", "sb.append", "sb", "al[0].size()+\"\\n\"", "al[0].size()", "al[0].size", "al[0]", "al", "0", "\"\\n\"", "for(int i=1;i<n;i++)sb.append((al[i].size()-1)+\"\\n\");", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "sb.append((al[i].size()-1)+\"\\n\");", "sb.append((al[i].size()-1)+\"\\n\")", "sb.append", "sb", "(al[i].size()-1)+\"\\n\"", "(al[i].size()-1)", "al[i].size()", "al[i].size", "al[i]", "al", "i", "1", "\"\\n\"", "System.out.println(sb.toString().trim())", "System.out.println", "System.out", "System", "System.out", "sb.toString().trim()", "sb.toString().trim", "sb.toString()", "sb.toString", "sb", "String [] args", "args", "class FastScanner{\t\n private int BUFFER_SIZE = 1 << 16;\n \n private DataInputStream din;\n \n private byte[] buffer;\n \n private int bufferPointer, bytesRead;\n \n public FastScanner() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public FastScanner( String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n \n public String readLine() throws IOException {\n byte[] buf = new byte[64];\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n \n public String next() throws IOException{\n\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n \n StringBuilder builder = new StringBuilder();\n builder.append((char)c);\n c = read();\n while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }\n \n return builder.toString();\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n \n public int[] nextIntArray( int n) throws IOException {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }\n return arr;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n \n public long[] nextLongArray( int n) throws IOException {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }\n return arr;\n }\n\n public char nextChar() throws IOException{\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n return (char) c;\t\n }\n \n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n \n public double[] nextDoubleArray( int n) throws IOException {\n double arr[] = new double[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }\n return arr;\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n}", "FastScanner", "private int BUFFER_SIZE = 1 << 16;", "BUFFER_SIZE", "1 << 16", "1", "16", "private DataInputStream din;", "din", "private byte[] buffer;", "buffer", "private int bufferPointer", "bufferPointer", "bytesRead;", "bytesRead", "public FastScanner() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "FastScanner", "{\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "din = new DataInputStream(System.in)", "din", "new DataInputStream(System.in)", "buffer = new byte[BUFFER_SIZE]", "buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "bufferPointer = bytesRead = 0", "bufferPointer", "bytesRead = 0", "bytesRead", "0", "public FastScanner( String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "FastScanner", "{\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "din = new DataInputStream(new FileInputStream(file_name))", "din", "new DataInputStream(new FileInputStream(file_name))", "buffer = new byte[BUFFER_SIZE]", "buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "bufferPointer = bytesRead = 0", "bufferPointer", "bytesRead = 0", "bytesRead", "0", "String file_name", "file_name", "public String readLine() throws IOException {\n byte[] buf = new byte[64];\n int cnt = 0, c;\n while ((c = read()) != -1) {\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];\n int cnt = 0, c;\n while ((c = read()) != -1) {\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 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 String next() throws IOException{\n\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n \n StringBuilder builder = new StringBuilder();\n builder.append((char)c);\n c = read();\n while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }\n \n return builder.toString();\n }", "next", "{\n\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n \n StringBuilder builder = new StringBuilder();\n builder.append((char)c);\n c = read();\n while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }\n \n return builder.toString();\n }", "byte c = read();", "c", "read()", "read", "while(Character.isWhitespace(c)){\n c = read();\n }", "Character.isWhitespace(c)", "Character.isWhitespace", "Character", "c", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "StringBuilder builder = new StringBuilder();", "builder", "new StringBuilder()", "builder.append((char)c)", "builder.append", "builder", "(char)c", "c = read()", "c", "read()", "read", "while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }", "!Character.isWhitespace(c)", "Character.isWhitespace(c)", "Character.isWhitespace", "Character", "c", "{\n builder.append((char)c);\n c = read();\n }", "builder.append((char)c)", "builder.append", "builder", "(char)c", "c = read()", "c", "read()", "read", "return builder.toString();", "builder.toString()", "builder.toString", "builder", "public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }", "nextInt", "{\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }", "int ret = 0;", "ret", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "public int[] nextIntArray( int n) throws IOException {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }\n return arr;\n }", "nextIntArray", "{\n int arr[] = new int[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }\n return arr;\n }", "int arr[] = new int[n];", "arr", "new int[n]", "n", "for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n arr[i] = nextInt();\n }", "{\n arr[i] = nextInt();\n }", "arr[i] = nextInt()", "arr[i]", "arr", "i", "nextInt()", "nextInt", "return arr;", "arr", "int n", "n", "public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }", "nextLong", "{\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }", "long ret = 0;", "ret", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "public long[] nextLongArray( int n) throws IOException {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }\n return arr;\n }", "nextLongArray", "{\n long arr[] = new long[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }\n return arr;\n }", "long arr[] = new long[n];", "arr", "new long[n]", "n", "for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n arr[i] = nextLong();\n }", "{\n arr[i] = nextLong();\n }", "arr[i] = nextLong()", "arr[i]", "arr", "i", "nextLong()", "nextLong", "return arr;", "arr", "int n", "n", "public char nextChar() throws IOException{\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n return (char) c;\t\n }", "nextChar", "{\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n return (char) c;\t\n }", "byte c = read();", "c", "read()", "read", "while(Character.isWhitespace(c)){\n c = read();\n }", "Character.isWhitespace(c)", "Character.isWhitespace", "Character", "c", "{\n c = read();\n }", "c = read()", "c", "read()", "read", "return (char) c;", "(char) c", "public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\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 } while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\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 } while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }", "c == '.'", "c", "'.'", "{\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }", "while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret += (c - '0') / (div *= 10);\n }", "ret += (c - '0') / (div *= 10)", "ret", "(c - '0') / (div *= 10)", "(c - '0')", "c", "'0'", "(div *= 10)", "div", "10", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "public double[] nextDoubleArray( int n) throws IOException {\n double arr[] = new double[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }\n return arr;\n }", "nextDoubleArray", "{\n double arr[] = new double[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }\n return arr;\n }", "double arr[] = new double[n];", "arr", "new double[n]", "n", "for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n arr[i] = nextDouble();\n }", "{\n arr[i] = nextDouble();\n }", "arr[i] = nextDouble()", "arr[i]", "arr", "i", "nextDouble()", "nextDouble", "return arr;", "arr", "int n", "n", "private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }", "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 if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }", "read", "{\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }", "if (bufferPointer == bytesRead)\n fillBuffer();", "bufferPointer == bytesRead", "bufferPointer", "bytesRead", "fillBuffer()", "fillBuffer", "return buffer[bufferPointer++];", "buffer[bufferPointer++]", "buffer", "bufferPointer++", "bufferPointer", "public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }", "close", "{\n if (din == null)\n return;\n din.close();\n }", "if (din == null)\n return;", "din == null", "din", "null", "return;", "din.close()", "din.close", "din", "public class Main {\n static Set<Integer> [] al;\n\n public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n int n=sc.nextInt();\n int [] a=sc.nextIntArray(n-1);\n al=new HashSet[n];\n\n for(int i=0;i<n;i++)al[i]=new HashSet<>();\n\n for(int i=0;i<a.length;i++){\n int ind=i+1;\n int boss=a[i]-1;\n al[ind].add(boss);\n al[boss].add(ind);\n }\n\n StringBuilder sb=new StringBuilder(\"\");\n sb.append(al[0].size()+\"\\n\");\n for(int i=1;i<n;i++)sb.append((al[i].size()-1)+\"\\n\");\n System.out.println(sb.toString().trim());\n\n\n }\n\n}", "public class Main {\n static Set<Integer> [] al;\n\n public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n int n=sc.nextInt();\n int [] a=sc.nextIntArray(n-1);\n al=new HashSet[n];\n\n for(int i=0;i<n;i++)al[i]=new HashSet<>();\n\n for(int i=0;i<a.length;i++){\n int ind=i+1;\n int boss=a[i]-1;\n al[ind].add(boss);\n al[boss].add(ind);\n }\n\n StringBuilder sb=new StringBuilder(\"\");\n sb.append(al[0].size()+\"\\n\");\n for(int i=1;i<n;i++)sb.append((al[i].size()-1)+\"\\n\");\n System.out.println(sb.toString().trim());\n\n\n }\n\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { static Set<Integer> [] al; public static void main(String [] args) throws IOException{ FastScanner sc=new FastScanner(); int n=sc.nextInt(); int [] a=sc.nextIntArray(n-1); al=new HashSet[n]; for(int i=0;i<n;i++)al[i]=new HashSet<>(); for(int i=0;i<a.length;i++){ int ind=i+1; int boss=a[i]-1; al[ind].add(boss); al[boss].add(ind); } StringBuilder sb=new StringBuilder(""); sb.append(al[0].size()+"\n"); for(int i=1;i<n;i++)sb.append((al[i].size()-1)+"\n"); System.out.println(sb.toString().trim()); } } class FastScanner{ private int BUFFER_SIZE = 1 << 16; private DataInputStream din; private byte[] buffer; private int bufferPointer, bytesRead; public FastScanner() { din = new DataInputStream(System.in); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public FastScanner( String file_name) throws IOException { din = new DataInputStream(new FileInputStream(file_name)); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public String readLine() throws IOException { byte[] buf = new byte[64]; int cnt = 0, c; while ((c = read()) != -1) { if (c == '\n') break; buf[cnt++] = (byte) c; } return new String(buf, 0, cnt); } public String next() throws IOException{ byte c = read(); while(Character.isWhitespace(c)){ c = read(); } StringBuilder builder = new StringBuilder(); builder.append((char)c); c = read(); while(!Character.isWhitespace(c)){ builder.append((char)c); c = read(); } return builder.toString(); } public int nextInt() throws IOException { int ret = 0; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (neg) return -ret; return ret; } public int[] nextIntArray( int n) throws IOException { int arr[] = new int[n]; for(int i = 0; i < n; i++){ arr[i] = nextInt(); } return arr; } 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 long[] nextLongArray( int n) throws IOException { long arr[] = new long[n]; for(int i = 0; i < n; i++){ arr[i] = nextLong(); } return arr; } public char nextChar() throws IOException{ byte c = read(); while(Character.isWhitespace(c)){ c = read(); } return (char) c; } public double nextDouble() throws IOException { double ret = 0, div = 1; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (c == '.') { while ((c = read()) >= '0' && c <= '9') { ret += (c - '0') / (div *= 10); } } if (neg) return -ret; return ret; } public double[] nextDoubleArray( int n) throws IOException { double arr[] = new double[n]; for(int i = 0; i < n; i++){ arr[i] = nextDouble(); } return arr; } 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, 41, 13, 0, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 40, 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 ], [ 74, 5 ], [ 74, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 24, 25 ], [ 24, 26 ], [ 8, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 32, 33 ], [ 32, 34 ], [ 27, 35 ], [ 35, 36 ], [ 36, 37 ], [ 27, 38 ], [ 39, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 39, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 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 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 6, 71 ], [ 71, 72 ], [ 0, 73 ], [ 73, 74 ], [ 73, 75 ] ]
[ "import java.util.*;\npublic class Main{\n public static void main(String [] args){\n Scanner sc=new Scanner(System.in);\n int N,ai;\n N=sc.nextInt();\n int[] A=new int[N+1];\n for(int i=1;i<N;i++){\n ai=sc.nextInt();\n A[ai]++;\n }\n for(int j=1;j<N+1;j++)\n System.out.println(A[j]);\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,ai;\n N=sc.nextInt();\n int[] A=new int[N+1];\n for(int i=1;i<N;i++){\n ai=sc.nextInt();\n A[ai]++;\n }\n for(int j=1;j<N+1;j++)\n System.out.println(A[j]);\n }\n}", "Main", "public static void main(String [] args){\n Scanner sc=new Scanner(System.in);\n int N,ai;\n N=sc.nextInt();\n int[] A=new int[N+1];\n for(int i=1;i<N;i++){\n ai=sc.nextInt();\n A[ai]++;\n }\n for(int j=1;j<N+1;j++)\n System.out.println(A[j]);\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int N,ai;\n N=sc.nextInt();\n int[] A=new int[N+1];\n for(int i=1;i<N;i++){\n ai=sc.nextInt();\n A[ai]++;\n }\n for(int j=1;j<N+1;j++)\n System.out.println(A[j]);\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N", "N", "ai;", "ai", "N=sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] A=new int[N+1];", "A", "new int[N+1]", "N+1", "N", "1", "for(int i=1;i<N;i++){\n ai=sc.nextInt();\n A[ai]++;\n }", "int i=1;", "int i=1;", "i", "1", "i<N", "i", "N", "i++", "i++", "i", "{\n ai=sc.nextInt();\n A[ai]++;\n }", "{\n ai=sc.nextInt();\n A[ai]++;\n }", "ai=sc.nextInt()", "ai", "sc.nextInt()", "sc.nextInt", "sc", "A[ai]++", "A[ai]", "A", "ai", "for(int j=1;j<N+1;j++)\n System.out.println(A[j]);", "int j=1;", "int j=1;", "j", "1", "j<N+1", "j", "N+1", "N", "1", "j++", "j++", "j", "System.out.println(A[j]);", "System.out.println(A[j])", "System.out.println", "System.out", "System", "System.out", "A[j]", "A", "j", "String [] args", "args", "public class Main{\n public static void main(String [] args){\n Scanner sc=new Scanner(System.in);\n int N,ai;\n N=sc.nextInt();\n int[] A=new int[N+1];\n for(int i=1;i<N;i++){\n ai=sc.nextInt();\n A[ai]++;\n }\n for(int j=1;j<N+1;j++)\n System.out.println(A[j]);\n }\n}", "public class Main{\n public static void main(String [] args){\n Scanner sc=new Scanner(System.in);\n int N,ai;\n N=sc.nextInt();\n int[] A=new int[N+1];\n for(int i=1;i<N;i++){\n ai=sc.nextInt();\n A[ai]++;\n }\n for(int j=1;j<N+1;j++)\n System.out.println(A[j]);\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String [] args){ Scanner sc=new Scanner(System.in); int N,ai; N=sc.nextInt(); int[] A=new int[N+1]; for(int i=1;i<N;i++){ ai=sc.nextInt(); A[ai]++; } for(int j=1;j<N+1;j++) System.out.println(A[j]); } }
[ 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, 17, 41, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 98, 8 ], [ 98, 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 ], [ 11, 46 ], [ 46, 47 ], [ 11, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 48, 58 ], [ 58, 59 ], [ 59, 60 ], [ 48, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 62, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 11, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 72, 82 ], [ 82, 83 ], [ 83, 84 ], [ 72, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 92, 94 ], [ 9, 95 ], [ 95, 96 ], [ 0, 97 ], [ 97, 98 ], [ 97, 99 ] ]
[ "import java.lang.*;\nimport java.util.*;\npublic class Main \n{\n ///atcoder\n public static void main(final String args[]) \n {\n final Scanner s = new Scanner(System.in);\n int n=s.nextInt();\n int a[]=new int[n+1];\n for(int i=0;i<n+1;i++)\n {\n a[i]=0;\n }\n int k;\n for(int i=0;i<n-1;i++)\n {\n k=s.nextInt();\n a[k]++;\n }\n for(int i=1;i<n+1;i++)\n {\n System.out.println(a[i]);\n }\n }\n}", "import java.lang.*;", "lang.*", "java", "import java.util.*;", "util.*", "java", "public class Main \n{\n ///atcoder\n public static void main(final String args[]) \n {\n final Scanner s = new Scanner(System.in);\n int n=s.nextInt();\n int a[]=new int[n+1];\n for(int i=0;i<n+1;i++)\n {\n a[i]=0;\n }\n int k;\n for(int i=0;i<n-1;i++)\n {\n k=s.nextInt();\n a[k]++;\n }\n for(int i=1;i<n+1;i++)\n {\n System.out.println(a[i]);\n }\n }\n}", "Main", "///atcoder\n public static void main(final String args[]) \n {\n final Scanner s = new Scanner(System.in);\n int n=s.nextInt();\n int a[]=new int[n+1];\n for(int i=0;i<n+1;i++)\n {\n a[i]=0;\n }\n int k;\n for(int i=0;i<n-1;i++)\n {\n k=s.nextInt();\n a[k]++;\n }\n for(int i=1;i<n+1;i++)\n {\n System.out.println(a[i]);\n }\n }", "main", "{\n final Scanner s = new Scanner(System.in);\n int n=s.nextInt();\n int a[]=new int[n+1];\n for(int i=0;i<n+1;i++)\n {\n a[i]=0;\n }\n int k;\n for(int i=0;i<n-1;i++)\n {\n k=s.nextInt();\n a[k]++;\n }\n for(int i=1;i<n+1;i++)\n {\n System.out.println(a[i]);\n }\n }", "final Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "int n=s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "int a[]=new int[n+1];", "a", "new int[n+1]", "n+1", "n", "1", "for(int i=0;i<n+1;i++)\n {\n a[i]=0;\n }", "int i=0;", "int i=0;", "i", "0", "i<n+1", "i", "n+1", "n", "1", "i++", "i++", "i", "{\n a[i]=0;\n }", "{\n a[i]=0;\n }", "a[i]=0", "a[i]", "a", "i", "0", "int k;", "k", "for(int i=0;i<n-1;i++)\n {\n k=s.nextInt();\n a[k]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n k=s.nextInt();\n a[k]++;\n }", "{\n k=s.nextInt();\n a[k]++;\n }", "k=s.nextInt()", "k", "s.nextInt()", "s.nextInt", "s", "a[k]++", "a[k]", "a", "k", "for(int i=1;i<n+1;i++)\n {\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", "final String args[]", "args", "public class Main \n{\n ///atcoder\n public static void main(final String args[]) \n {\n final Scanner s = new Scanner(System.in);\n int n=s.nextInt();\n int a[]=new int[n+1];\n for(int i=0;i<n+1;i++)\n {\n a[i]=0;\n }\n int k;\n for(int i=0;i<n-1;i++)\n {\n k=s.nextInt();\n a[k]++;\n }\n for(int i=1;i<n+1;i++)\n {\n System.out.println(a[i]);\n }\n }\n}", "public class Main \n{\n ///atcoder\n public static void main(final String args[]) \n {\n final Scanner s = new Scanner(System.in);\n int n=s.nextInt();\n int a[]=new int[n+1];\n for(int i=0;i<n+1;i++)\n {\n a[i]=0;\n }\n int k;\n for(int i=0;i<n-1;i++)\n {\n k=s.nextInt();\n a[k]++;\n }\n for(int i=1;i<n+1;i++)\n {\n System.out.println(a[i]);\n }\n }\n}", "Main" ]
import java.lang.*; import java.util.*; public class Main { ///atcoder public static void main(final String args[]) { final Scanner s = new Scanner(System.in); int n=s.nextInt(); int a[]=new int[n+1]; for(int i=0;i<n+1;i++) { a[i]=0; } int k; for(int i=0;i<n-1;i++) { k=s.nextInt(); a[k]++; } for(int i=1;i<n+1;i++) { System.out.println(a[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, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 17, 40, 18, 13, 13, 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 ], [ 70, 14 ], [ 70, 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 ], [ 17, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 30, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 37, 39 ], [ 30, 40 ], [ 40, 41 ], [ 41, 42 ], [ 30, 43 ], [ 44, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 47, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 17, 56 ], [ 56, 57 ], [ 56, 58 ], [ 56, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 15, 67 ], [ 67, 68 ], [ 0, 69 ], [ 69, 70 ], [ 69, 71 ] ]
[ "import java.io.File;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int[] array = new int[num];\n\n for (int i=0; i<num-1; i++) {\n int bossNum = sc.nextInt() - 1;\n array[bossNum]++;\n }\n\n for (int i: array) {\n System.out.println(i);\n }\n }\n}", "import java.io.File;", "File", "java.io", "import java.io.FileInputStream;", "FileInputStream", "java.io", "import java.io.FileNotFoundException;", "FileNotFoundException", "java.io", "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 num = sc.nextInt();\n int[] array = new int[num];\n\n for (int i=0; i<num-1; i++) {\n int bossNum = sc.nextInt() - 1;\n array[bossNum]++;\n }\n\n for (int i: array) {\n System.out.println(i);\n }\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int[] array = new int[num];\n\n for (int i=0; i<num-1; i++) {\n int bossNum = sc.nextInt() - 1;\n array[bossNum]++;\n }\n\n for (int i: array) {\n System.out.println(i);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int[] array = new int[num];\n\n for (int i=0; i<num-1; i++) {\n int bossNum = sc.nextInt() - 1;\n array[bossNum]++;\n }\n\n for (int i: array) {\n System.out.println(i);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int num = sc.nextInt();", "num", "sc.nextInt()", "sc.nextInt", "sc", "int[] array = new int[num];", "array", "new int[num]", "num", "for (int i=0; i<num-1; i++) {\n int bossNum = sc.nextInt() - 1;\n array[bossNum]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<num-1", "i", "num-1", "num", "1", "i++", "i++", "i", "{\n int bossNum = sc.nextInt() - 1;\n array[bossNum]++;\n }", "{\n int bossNum = sc.nextInt() - 1;\n array[bossNum]++;\n }", "int bossNum = sc.nextInt() - 1;", "bossNum", "sc.nextInt() - 1", "sc.nextInt()", "sc.nextInt", "sc", "1", "array[bossNum]++", "array[bossNum]", "array", "bossNum", "for (int i: array) {\n System.out.println(i);\n }", "int i", "array", "{\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) throws Exception {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n int[] array = new int[num];\n\n for (int i=0; i<num-1; i++) {\n int bossNum = sc.nextInt() - 1;\n array[bossNum]++;\n }\n\n for (int i: array) {\n System.out.println(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 num = sc.nextInt();\n int[] array = new int[num];\n\n for (int i=0; i<num-1; i++) {\n int bossNum = sc.nextInt() - 1;\n array[bossNum]++;\n }\n\n for (int i: array) {\n System.out.println(i);\n }\n }\n}", "Main" ]
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int[] array = new int[num]; for (int i=0; i<num-1; i++) { int bossNum = sc.nextInt() - 1; array[bossNum]++; } for (int i: array) { System.out.println(i); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 4, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 2, 13, 17, 41, 13, 20, 13, 28, 13, 13, 30, 30, 40, 18, 13, 2, 13, 17, 28, 13, 13, 30, 30, 4, 18, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 41, 13, 2, 17, 17, 41, 13, 20, 13, 41, 13, 17, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 20, 23, 13, 23, 13, 12, 13, 30, 4, 18, 13, 4, 18, 13, 12, 13, 30, 14, 2, 13, 13, 30, 0, 13, 17, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 29, 40, 17, 29, 18, 13, 40, 13, 12, 13, 30, 41, 13, 11, 1, 0, 13, 4, 13, 2, 13, 17, 1, 0, 13, 4, 13, 30, 41, 13, 20, 11, 1, 2, 13, 17, 1, 0, 13, 4, 13, 30, 4, 18, 13, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 41, 13, 17, 11, 1, 0, 13, 4, 13, 2, 13, 17, 1, 0, 13, 4, 13, 30, 41, 13, 2, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 4, 13, 11, 1, 2, 2, 13, 17, 2, 13, 17, 1, 0, 13, 4, 13, 30, 0, 13, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 29, 8, 13, 40, 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, 41, 13, 17, 11, 1, 0, 13, 4, 13, 2, 13, 17, 1, 0, 13, 4, 13, 30, 41, 13, 2, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 4, 13, 11, 1, 2, 2, 13, 17, 2, 13, 17, 1, 0, 13, 4, 13, 30, 0, 13, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 29, 8, 13, 40, 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, 4, 18, 13, 4, 18, 4, 18, 13, 23, 13, 12, 13, 30, 4, 18, 13, 4, 18, 4, 18, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 13, 12, 13, 30, 4, 18, 13, 4, 18, 4, 18, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 468, 14 ], [ 468, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 19, 23 ], [ 23, 24 ], [ 23, 25 ], [ 15, 26 ], [ 26, 27 ], [ 468, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 30, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 41, 42 ], [ 41, 43 ], [ 30, 44 ], [ 44, 45 ], [ 44, 46 ], [ 30, 48 ], [ 48, 49 ], [ 48, 50 ], [ 48, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 30, 59 ], [ 59, 60 ], [ 59, 61 ], [ 59, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 28, 68 ], [ 68, 69 ], [ 468, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 70, 74 ], [ 74, 75 ], [ 70, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 70, 81 ], [ 81, 82 ], [ 81, 83 ], [ 70, 85 ], [ 85, 86 ], [ 85, 87 ], [ 70, 88 ], [ 88, 89 ], [ 88, 90 ], [ 70, 91 ], [ 91, 92 ], [ 91, 93 ], [ 70, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 70, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 103, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 101, 114 ], [ 114, 115 ], [ 101, 116 ], [ 116, 117 ], [ 70, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 120, 124 ], [ 124, 125 ], [ 125, 126 ], [ 70, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 134, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 134, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 144, 148 ], [ 148, 149 ], [ 149, 150 ], [ 129, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 70, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 159, 160 ], [ 158, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 161, 167 ], [ 167, 168 ], [ 167, 169 ], [ 161, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 161, 175 ], [ 158, 176 ], [ 176, 177 ], [ 176, 178 ], [ 158, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 181, 183 ], [ 179, 184 ], [ 184, 185 ], [ 185, 186 ], [ 185, 187 ], [ 187, 188 ], [ 179, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 190, 193 ], [ 158, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 70, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 201, 202 ], [ 200, 203 ], [ 203, 204 ], [ 203, 205 ], [ 200, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 208, 210 ], [ 210, 211 ], [ 206, 212 ], [ 212, 213 ], [ 212, 214 ], [ 206, 215 ], [ 215, 216 ], [ 216, 217 ], [ 216, 218 ], [ 218, 219 ], [ 206, 220 ], [ 200, 221 ], [ 221, 222 ], [ 221, 223 ], [ 223, 224 ], [ 223, 225 ], [ 200, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 228, 230 ], [ 227, 231 ], [ 231, 232 ], [ 231, 233 ], [ 226, 234 ], [ 234, 235 ], [ 234, 236 ], [ 236, 237 ], [ 200, 238 ], [ 238, 239 ], [ 238, 240 ], [ 240, 241 ], [ 241, 242 ], [ 241, 243 ], [ 240, 244 ], [ 244, 245 ], [ 244, 246 ], [ 238, 247 ], [ 247, 248 ], [ 248, 249 ], [ 248, 250 ], [ 250, 251 ], [ 238, 252 ], [ 252, 253 ], [ 253, 254 ], [ 253, 255 ], [ 256, 256 ], [ 256, 257 ], [ 257, 258 ], [ 257, 259 ], [ 256, 260 ], [ 260, 261 ], [ 260, 262 ], [ 256, 263 ], [ 263, 264 ], [ 263, 265 ], [ 200, 266 ], [ 266, 267 ], [ 267, 268 ], [ 267, 269 ], [ 269, 270 ], [ 267, 271 ], [ 70, 272 ], [ 272, 273 ], [ 272, 274 ], [ 274, 275 ], [ 275, 276 ], [ 275, 277 ], [ 274, 279 ], [ 279, 280 ], [ 280, 281 ], [ 281, 282 ], [ 281, 283 ], [ 279, 284 ], [ 284, 285 ], [ 284, 286 ], [ 279, 287 ], [ 287, 288 ], [ 288, 289 ], [ 279, 290 ], [ 291, 291 ], [ 291, 292 ], [ 292, 293 ], [ 293, 294 ], [ 293, 295 ], [ 292, 296 ], [ 296, 297 ], [ 274, 298 ], [ 298, 299 ], [ 272, 300 ], [ 300, 301 ], [ 70, 302 ], [ 302, 303 ], [ 302, 304 ], [ 304, 305 ], [ 305, 306 ], [ 304, 307 ], [ 307, 308 ], [ 307, 309 ], [ 304, 310 ], [ 310, 311 ], [ 311, 312 ], [ 312, 313 ], [ 312, 314 ], [ 314, 315 ], [ 310, 316 ], [ 316, 317 ], [ 316, 318 ], [ 310, 319 ], [ 319, 320 ], [ 320, 321 ], [ 320, 322 ], [ 322, 323 ], [ 310, 324 ], [ 304, 325 ], [ 325, 326 ], [ 325, 327 ], [ 327, 328 ], [ 327, 329 ], [ 304, 330 ], [ 330, 331 ], [ 331, 332 ], [ 332, 333 ], [ 332, 334 ], [ 331, 335 ], [ 335, 336 ], [ 335, 337 ], [ 330, 338 ], [ 338, 339 ], [ 338, 340 ], [ 340, 341 ], [ 304, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 345, 346 ], [ 345, 347 ], [ 344, 348 ], [ 348, 349 ], [ 348, 350 ], [ 342, 351 ], [ 351, 352 ], [ 352, 353 ], [ 352, 354 ], [ 354, 355 ], [ 342, 356 ], [ 356, 357 ], [ 357, 358 ], [ 357, 359 ], [ 360, 360 ], [ 360, 361 ], [ 361, 362 ], [ 361, 363 ], [ 360, 364 ], [ 364, 365 ], [ 364, 366 ], [ 360, 367 ], [ 367, 368 ], [ 367, 369 ], [ 304, 370 ], [ 370, 371 ], [ 371, 372 ], [ 371, 373 ], [ 373, 374 ], [ 371, 375 ], [ 70, 376 ], [ 376, 377 ], [ 376, 378 ], [ 378, 379 ], [ 379, 380 ], [ 379, 381 ], [ 378, 383 ], [ 383, 384 ], [ 384, 385 ], [ 385, 386 ], [ 385, 387 ], [ 383, 388 ], [ 388, 389 ], [ 388, 390 ], [ 383, 391 ], [ 391, 392 ], [ 392, 393 ], [ 383, 394 ], [ 395, 395 ], [ 395, 396 ], [ 396, 397 ], [ 397, 398 ], [ 397, 399 ], [ 396, 400 ], [ 400, 401 ], [ 378, 402 ], [ 402, 403 ], [ 376, 404 ], [ 404, 405 ], [ 70, 406 ], [ 406, 407 ], [ 406, 408 ], [ 408, 409 ], [ 409, 410 ], [ 410, 411 ], [ 409, 412 ], [ 412, 413 ], [ 413, 414 ], [ 414, 415 ], [ 415, 416 ], [ 406, 417 ], [ 417, 418 ], [ 70, 419 ], [ 419, 420 ], [ 419, 421 ], [ 421, 422 ], [ 422, 423 ], [ 423, 424 ], [ 422, 425 ], [ 425, 426 ], [ 426, 427 ], [ 427, 428 ], [ 428, 429 ], [ 421, 430 ], [ 430, 431 ], [ 431, 432 ], [ 430, 433 ], [ 419, 434 ], [ 434, 435 ], [ 70, 436 ], [ 436, 437 ], [ 436, 438 ], [ 438, 439 ], [ 439, 440 ], [ 440, 441 ], [ 439, 442 ], [ 70, 443 ], [ 443, 444 ], [ 443, 445 ], [ 445, 446 ], [ 446, 447 ], [ 447, 448 ], [ 446, 449 ], [ 449, 450 ], [ 450, 451 ], [ 451, 452 ], [ 452, 453 ], [ 445, 454 ], [ 454, 455 ], [ 455, 456 ], [ 454, 457 ], [ 443, 458 ], [ 458, 459 ], [ 70, 460 ], [ 460, 461 ], [ 460, 462 ], [ 462, 463 ], [ 463, 464 ], [ 464, 465 ], [ 70, 466 ], [ 0, 467 ], [ 467, 468 ], [ 467, 469 ] ]
[ "import java.io.BufferedOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintStream;\n\npublic final class Main {\n public static void main(final String[] args) throws Exception {\n try (IO io = new IO(System.in, System.out)) {\n execute(io);\n }\n }\n\n private static void execute(final IO io) throws Exception {\n int n = io.nextInt();\n int[] a = io.nextInt(n - 1); // A_2 ... A_N\n int[] r = new int[n];\n for (int an : a) {\n r[an - 1]++;\n }\n for (int rn : r) {\n io.println(rn);\n }\n }\n\n public static final class IO implements AutoCloseable {\n private final InputStream in;\n private final BufferedOutputStream out;\n private static final int BUFSIZE = 1 << 20;\n private final byte[] buf = new byte[BUFSIZE];\n private int index = 0;\n private int total = 0;\n public IO(final InputStream in, final PrintStream out) throws IOException {\n this.in = in;\n this.out = new BufferedOutputStream(out);\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n private int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0)\n return -1;\n }\n return buf[index++];\n }\n\n public String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan());\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan())\n sb.append((char) c);\n return sb.toString();\n }\n\n public int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public int[] nextInt(final int n) throws IOException {\n final int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n\n public long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public long[] nextLong(final int n) throws IOException {\n final long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n\n public void print(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n }\n\n private static final byte[] SP = new byte[] { 0x20 };\n public void printsp(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(SP);\n }\n\n private static final byte[] CRLF = System.lineSeparator().getBytes();\n public void println() throws IOException {\n out.write(CRLF);\n }\n\n public void println(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(CRLF);\n }\n\n public void flush() throws IOException {\n out.flush();\n }\n }\n}", "import java.io.BufferedOutputStream;", "BufferedOutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintStream;", "PrintStream", "java.io", "public final class Main {\n public static void main(final String[] args) throws Exception {\n try (IO io = new IO(System.in, System.out)) {\n execute(io);\n }\n }\n\n private static void execute(final IO io) throws Exception {\n int n = io.nextInt();\n int[] a = io.nextInt(n - 1); // A_2 ... A_N\n int[] r = new int[n];\n for (int an : a) {\n r[an - 1]++;\n }\n for (int rn : r) {\n io.println(rn);\n }\n }\n\n public static final class IO implements AutoCloseable {\n private final InputStream in;\n private final BufferedOutputStream out;\n private static final int BUFSIZE = 1 << 20;\n private final byte[] buf = new byte[BUFSIZE];\n private int index = 0;\n private int total = 0;\n public IO(final InputStream in, final PrintStream out) throws IOException {\n this.in = in;\n this.out = new BufferedOutputStream(out);\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n private int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0)\n return -1;\n }\n return buf[index++];\n }\n\n public String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan());\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan())\n sb.append((char) c);\n return sb.toString();\n }\n\n public int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public int[] nextInt(final int n) throws IOException {\n final int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n\n public long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public long[] nextLong(final int n) throws IOException {\n final long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n\n public void print(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n }\n\n private static final byte[] SP = new byte[] { 0x20 };\n public void printsp(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(SP);\n }\n\n private static final byte[] CRLF = System.lineSeparator().getBytes();\n public void println() throws IOException {\n out.write(CRLF);\n }\n\n public void println(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(CRLF);\n }\n\n public void flush() throws IOException {\n out.flush();\n }\n }\n}", "Main", "public static void main(final String[] args) throws Exception {\n try (IO io = new IO(System.in, System.out)) {\n execute(io);\n }\n }", "main", "{\n try (IO io = new IO(System.in, System.out)) {\n execute(io);\n }\n }", "try (IO io = new IO(System.in, System.out)) {\n execute(io);\n }", "{\n execute(io);\n }", "IO io = new IO(System.in, System.out)", "IO io = new IO(System.in, System.out)", "new IO(System.in, System.out)", "execute(io)", "execute", "io", "final String[] args", "args", "private static void execute(final IO io) throws Exception {\n int n = io.nextInt();\n int[] a = io.nextInt(n - 1); // A_2 ... A_N\n int[] r = new int[n];\n for (int an : a) {\n r[an - 1]++;\n }\n for (int rn : r) {\n io.println(rn);\n }\n }", "execute", "{\n int n = io.nextInt();\n int[] a = io.nextInt(n - 1); // A_2 ... A_N\n int[] r = new int[n];\n for (int an : a) {\n r[an - 1]++;\n }\n for (int rn : r) {\n io.println(rn);\n }\n }", "int n = io.nextInt();", "n", "io.nextInt()", "io.nextInt", "io", "int[] a = io.nextInt(n - 1);", "a", "io.nextInt(n - 1)", "io.nextInt", "io", "n - 1", "n", "1", "int[] r = new int[n];", "r", "new int[n]", "n", "for (int an : a) {\n r[an - 1]++;\n }", "int an", "a", "{\n r[an - 1]++;\n }", "{\n r[an - 1]++;\n }", "r[an - 1]++", "r[an - 1]", "r", "an - 1", "an", "1", "for (int rn : r) {\n io.println(rn);\n }", "int rn", "r", "{\n io.println(rn);\n }", "{\n io.println(rn);\n }", "io.println(rn)", "io.println", "io", "rn", "final IO io", "io", "public static final class IO implements AutoCloseable {\n private final InputStream in;\n private final BufferedOutputStream out;\n private static final int BUFSIZE = 1 << 20;\n private final byte[] buf = new byte[BUFSIZE];\n private int index = 0;\n private int total = 0;\n public IO(final InputStream in, final PrintStream out) throws IOException {\n this.in = in;\n this.out = new BufferedOutputStream(out);\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n private int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0)\n return -1;\n }\n return buf[index++];\n }\n\n public String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan());\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan())\n sb.append((char) c);\n return sb.toString();\n }\n\n public int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public int[] nextInt(final int n) throws IOException {\n final int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n\n public long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public long[] nextLong(final int n) throws IOException {\n final long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n\n public void print(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n }\n\n private static final byte[] SP = new byte[] { 0x20 };\n public void printsp(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(SP);\n }\n\n private static final byte[] CRLF = System.lineSeparator().getBytes();\n public void println() throws IOException {\n out.write(CRLF);\n }\n\n public void println(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(CRLF);\n }\n\n public void flush() throws IOException {\n out.flush();\n }\n }", "IO", "private final InputStream in;", "in", "private final BufferedOutputStream out;", "out", "private static final int BUFSIZE = 1 << 20;", "BUFSIZE", "1 << 20", "1", "20", "private final byte[] buf = new byte[BUFSIZE];", "buf", "new byte[BUFSIZE]", "BUFSIZE", "private int index = 0;", "index", "0", "private int total = 0;", "total", "0", "private static final byte[] SP = new byte[] { 0x20 };", "SP", "new byte[] { 0x20 }", "private static final byte[] CRLF = System.lineSeparator().getBytes();", "CRLF", "System.lineSeparator().getBytes()", "System.lineSeparator().getBytes", "System.lineSeparator()", "System.lineSeparator", "System", "public IO(final InputStream in, final PrintStream out) throws IOException {\n this.in = in;\n this.out = new BufferedOutputStream(out);\n }", "IO", "{\n this.in = in;\n this.out = new BufferedOutputStream(out);\n }", "this.in = in", "this.in", "this", "this.in", "in", "this.out = new BufferedOutputStream(out)", "this.out", "this", "this.out", "new BufferedOutputStream(out)", "final InputStream in", "in", "final PrintStream out", "out", "@Override\n public void close() throws IOException {\n in.close();\n out.close();\n }", "close", "{\n in.close();\n out.close();\n }", "in.close()", "in.close", "in", "out.close()", "out.close", "out", "private int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0)\n return -1;\n }\n return buf[index++];\n }", "scan", "{\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0)\n return -1;\n }\n return buf[index++];\n }", "if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0)\n return -1;\n }", "index >= total", "index", "total", "{\n index = 0;\n total = in.read(buf);\n if (total <= 0)\n return -1;\n }", "index = 0", "index", "0", "total = in.read(buf)", "total", "in.read(buf)", "in.read", "in", "buf", "if (total <= 0)\n return -1;", "total <= 0", "total", "0", "return -1;", "-1", "1", "return buf[index++];", "buf[index++]", "buf", "index++", "index", "public String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan());\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan())\n sb.append((char) c);\n return sb.toString();\n }", "next", "{\n int c;\n for (c = scan(); c <= 32; c = scan());\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan())\n sb.append((char) c);\n return sb.toString();\n }", "int c;", "c", "for (c = scan(); c <= 32; c = scan());", "c = scan();", "c = scan()", "c", "scan()", "scan", "c <= 32", "c", "32", "c = scan()", "c = scan()", "c", "scan()", "scan", ";", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "for (; c > 32; c = scan())\n sb.append((char) c);", ";", "c > 32", "c", "32", "c = scan()", "c = scan()", "c", "scan()", "scan", "sb.append((char) c);", "sb.append((char) c)", "sb.append", "sb", "(char) c", "return sb.toString();", "sb.toString()", "sb.toString", "sb", "public int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }", "nextInt", "{\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }", "int c", "c", "val = 0;", "val", "0", "for (c = scan(); c <= 32; c = scan());", "c = scan();", "c = scan()", "c", "scan()", "scan", "c <= 32", "c", "32", "c = scan()", "c = scan()", "c", "scan()", "scan", ";", "boolean neg = c == '-';", "neg", "c == '-'", "c", "'-'", "if (c == '-' || c == '+')\n c = scan();", "c == '-' || c == '+'", "c == '-'", "c", "'-'", "c == '+'", "c", "'+'", "c = scan()", "c", "scan()", "scan", "for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);", ";", "c >= '0' && c <= '9'", "c >= '0'", "c", "'0'", "c <= '9'", "c", "'9'", "c = scan()", "c = scan()", "c", "scan()", "scan", "val = (val << 3) + (val << 1) + (c & 15);", "val = (val << 3) + (val << 1) + (c & 15)", "val", "(val << 3) + (val << 1) + (c & 15)", "(val << 3) + (val << 1) + (c & 15)", "(val << 3)", "val", "3", "(val << 1)", "val", "1", "(c & 15)", "c", "15", "return neg ? -val : val;", "neg ? -val : val", "neg", "-val", "val", "val", "public int[] nextInt(final int n) throws IOException {\n final int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }", "nextInt", "{\n final int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }", "final int[] result = new int[n];", "result", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n result[i] = nextInt();\n }", "{\n result[i] = nextInt();\n }", "result[i] = nextInt()", "result[i]", "result", "i", "nextInt()", "nextInt", "return result;", "result", "final int n", "n", "public long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }", "nextLong", "{\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }", "int c;", "c", "long val = 0;", "val", "0", "for (c = scan(); c <= 32; c = scan());", "c = scan();", "c = scan()", "c", "scan()", "scan", "c <= 32", "c", "32", "c = scan()", "c = scan()", "c", "scan()", "scan", ";", "boolean neg = c == '-';", "neg", "c == '-'", "c", "'-'", "if (c == '-' || c == '+')\n c = scan();", "c == '-' || c == '+'", "c == '-'", "c", "'-'", "c == '+'", "c", "'+'", "c = scan()", "c", "scan()", "scan", "for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);", ";", "c >= '0' && c <= '9'", "c >= '0'", "c", "'0'", "c <= '9'", "c", "'9'", "c = scan()", "c = scan()", "c", "scan()", "scan", "val = (val << 3) + (val << 1) + (c & 15);", "val = (val << 3) + (val << 1) + (c & 15)", "val", "(val << 3) + (val << 1) + (c & 15)", "(val << 3) + (val << 1) + (c & 15)", "(val << 3)", "val", "3", "(val << 1)", "val", "1", "(c & 15)", "c", "15", "return neg ? -val : val;", "neg ? -val : val", "neg", "-val", "val", "val", "public long[] nextLong(final int n) throws IOException {\n final long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }", "nextLong", "{\n final long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }", "final long[] result = new long[n];", "result", "new long[n]", "n", "for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n result[i] = nextLong();\n }", "{\n result[i] = nextLong();\n }", "result[i] = nextLong()", "result[i]", "result", "i", "nextLong()", "nextLong", "return result;", "result", "final int n", "n", "public void print(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n }", "print", "{\n out.write(a.toString().getBytes());\n }", "out.write(a.toString().getBytes())", "out.write", "out", "a.toString().getBytes()", "a.toString().getBytes", "a.toString()", "a.toString", "a", "final Object a", "a", "public void printsp(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(SP);\n }", "printsp", "{\n out.write(a.toString().getBytes());\n out.write(SP);\n }", "out.write(a.toString().getBytes())", "out.write", "out", "a.toString().getBytes()", "a.toString().getBytes", "a.toString()", "a.toString", "a", "out.write(SP)", "out.write", "out", "SP", "final Object a", "a", "public void println() throws IOException {\n out.write(CRLF);\n }", "println", "{\n out.write(CRLF);\n }", "out.write(CRLF)", "out.write", "out", "CRLF", "public void println(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(CRLF);\n }", "println", "{\n out.write(a.toString().getBytes());\n out.write(CRLF);\n }", "out.write(a.toString().getBytes())", "out.write", "out", "a.toString().getBytes()", "a.toString().getBytes", "a.toString()", "a.toString", "a", "out.write(CRLF)", "out.write", "out", "CRLF", "final Object a", "a", "public void flush() throws IOException {\n out.flush();\n }", "flush", "{\n out.flush();\n }", "out.flush()", "out.flush", "out", "AutoCloseable", "public final class Main {\n public static void main(final String[] args) throws Exception {\n try (IO io = new IO(System.in, System.out)) {\n execute(io);\n }\n }\n\n private static void execute(final IO io) throws Exception {\n int n = io.nextInt();\n int[] a = io.nextInt(n - 1); // A_2 ... A_N\n int[] r = new int[n];\n for (int an : a) {\n r[an - 1]++;\n }\n for (int rn : r) {\n io.println(rn);\n }\n }\n\n public static final class IO implements AutoCloseable {\n private final InputStream in;\n private final BufferedOutputStream out;\n private static final int BUFSIZE = 1 << 20;\n private final byte[] buf = new byte[BUFSIZE];\n private int index = 0;\n private int total = 0;\n public IO(final InputStream in, final PrintStream out) throws IOException {\n this.in = in;\n this.out = new BufferedOutputStream(out);\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n private int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0)\n return -1;\n }\n return buf[index++];\n }\n\n public String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan());\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan())\n sb.append((char) c);\n return sb.toString();\n }\n\n public int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public int[] nextInt(final int n) throws IOException {\n final int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n\n public long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public long[] nextLong(final int n) throws IOException {\n final long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n\n public void print(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n }\n\n private static final byte[] SP = new byte[] { 0x20 };\n public void printsp(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(SP);\n }\n\n private static final byte[] CRLF = System.lineSeparator().getBytes();\n public void println() throws IOException {\n out.write(CRLF);\n }\n\n public void println(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(CRLF);\n }\n\n public void flush() throws IOException {\n out.flush();\n }\n }\n}", "public final class Main {\n public static void main(final String[] args) throws Exception {\n try (IO io = new IO(System.in, System.out)) {\n execute(io);\n }\n }\n\n private static void execute(final IO io) throws Exception {\n int n = io.nextInt();\n int[] a = io.nextInt(n - 1); // A_2 ... A_N\n int[] r = new int[n];\n for (int an : a) {\n r[an - 1]++;\n }\n for (int rn : r) {\n io.println(rn);\n }\n }\n\n public static final class IO implements AutoCloseable {\n private final InputStream in;\n private final BufferedOutputStream out;\n private static final int BUFSIZE = 1 << 20;\n private final byte[] buf = new byte[BUFSIZE];\n private int index = 0;\n private int total = 0;\n public IO(final InputStream in, final PrintStream out) throws IOException {\n this.in = in;\n this.out = new BufferedOutputStream(out);\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n private int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0)\n return -1;\n }\n return buf[index++];\n }\n\n public String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan());\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan())\n sb.append((char) c);\n return sb.toString();\n }\n\n public int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public int[] nextInt(final int n) throws IOException {\n final int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextInt();\n }\n return result;\n }\n\n public long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan());\n boolean neg = c == '-';\n if (c == '-' || c == '+')\n c = scan();\n for (; c >= '0' && c <= '9'; c = scan())\n val = (val << 3) + (val << 1) + (c & 15);\n return neg ? -val : val;\n }\n\n public long[] nextLong(final int n) throws IOException {\n final long[] result = new long[n];\n for (int i = 0; i < n; i++) {\n result[i] = nextLong();\n }\n return result;\n }\n\n public void print(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n }\n\n private static final byte[] SP = new byte[] { 0x20 };\n public void printsp(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(SP);\n }\n\n private static final byte[] CRLF = System.lineSeparator().getBytes();\n public void println() throws IOException {\n out.write(CRLF);\n }\n\n public void println(final Object a) throws IOException {\n out.write(a.toString().getBytes());\n out.write(CRLF);\n }\n\n public void flush() throws IOException {\n out.flush();\n }\n }\n}", "Main" ]
import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; public final class Main { public static void main(final String[] args) throws Exception { try (IO io = new IO(System.in, System.out)) { execute(io); } } private static void execute(final IO io) throws Exception { int n = io.nextInt(); int[] a = io.nextInt(n - 1); // A_2 ... A_N int[] r = new int[n]; for (int an : a) { r[an - 1]++; } for (int rn : r) { io.println(rn); } } public static final class IO implements AutoCloseable { private final InputStream in; private final BufferedOutputStream out; private static final int BUFSIZE = 1 << 20; private final byte[] buf = new byte[BUFSIZE]; private int index = 0; private int total = 0; public IO(final InputStream in, final PrintStream out) throws IOException { this.in = in; this.out = new BufferedOutputStream(out); } @Override public void close() throws IOException { in.close(); out.close(); } private int scan() throws IOException { if (index >= total) { index = 0; total = in.read(buf); if (total <= 0) return -1; } return buf[index++]; } public String next() throws IOException { int c; for (c = scan(); c <= 32; c = scan()); StringBuilder sb = new StringBuilder(); for (; c > 32; c = scan()) sb.append((char) c); return sb.toString(); } public int nextInt() throws IOException { int c, val = 0; for (c = scan(); c <= 32; c = scan()); boolean neg = c == '-'; if (c == '-' || c == '+') c = scan(); for (; c >= '0' && c <= '9'; c = scan()) val = (val << 3) + (val << 1) + (c & 15); return neg ? -val : val; } public int[] nextInt(final int n) throws IOException { final int[] result = new int[n]; for (int i = 0; i < n; i++) { result[i] = nextInt(); } return result; } public long nextLong() throws IOException { int c; long val = 0; for (c = scan(); c <= 32; c = scan()); boolean neg = c == '-'; if (c == '-' || c == '+') c = scan(); for (; c >= '0' && c <= '9'; c = scan()) val = (val << 3) + (val << 1) + (c & 15); return neg ? -val : val; } public long[] nextLong(final int n) throws IOException { final long[] result = new long[n]; for (int i = 0; i < n; i++) { result[i] = nextLong(); } return result; } public void print(final Object a) throws IOException { out.write(a.toString().getBytes()); } private static final byte[] SP = new byte[] { 0x20 }; public void printsp(final Object a) throws IOException { out.write(a.toString().getBytes()); out.write(SP); } private static final byte[] CRLF = System.lineSeparator().getBytes(); public void println() throws IOException { out.write(CRLF); } public void println(final Object a) throws IOException { out.write(a.toString().getBytes()); out.write(CRLF); } public void flush() throws IOException { out.flush(); } } }
[ 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, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 104, 11 ], [ 104, 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 ], [ 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 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 38, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 44, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 50, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 54, 59 ], [ 44, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 61, 65 ], [ 14, 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 ], [ 79, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 85, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 79, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 12, 101 ], [ 101, 102 ], [ 0, 103 ], [ 103, 104 ], [ 103, 105 ] ]
[ "import java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n HashMap<Integer,Integer> num=new HashMap<>();\n Scanner sc=new Scanner(System.in);\n int loop=sc.nextInt();\n for(int i=1;i<loop;i++){\n int a=sc.nextInt();\n if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }\n }\n for (int i=1;i<=loop;i++){\n if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n }\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "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 HashMap<Integer,Integer> num=new HashMap<>();\n Scanner sc=new Scanner(System.in);\n int loop=sc.nextInt();\n for(int i=1;i<loop;i++){\n int a=sc.nextInt();\n if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }\n }\n for (int i=1;i<=loop;i++){\n if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n }\n}", "Main", "public static void main(String[] args){\n HashMap<Integer,Integer> num=new HashMap<>();\n Scanner sc=new Scanner(System.in);\n int loop=sc.nextInt();\n for(int i=1;i<loop;i++){\n int a=sc.nextInt();\n if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }\n }\n for (int i=1;i<=loop;i++){\n if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n }", "main", "{\n HashMap<Integer,Integer> num=new HashMap<>();\n Scanner sc=new Scanner(System.in);\n int loop=sc.nextInt();\n for(int i=1;i<loop;i++){\n int a=sc.nextInt();\n if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }\n }\n for (int i=1;i<=loop;i++){\n if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n }", "HashMap<Integer,Integer> num=new HashMap<>();", "num", "new HashMap<>()", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int loop=sc.nextInt();", "loop", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=1;i<loop;i++){\n int a=sc.nextInt();\n if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<loop", "i", "loop", "i++", "i++", "i", "{\n int a=sc.nextInt();\n if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }\n }", "{\n int a=sc.nextInt();\n if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }\n }", "int a=sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }", "num.containsKey(a)", "num.containsKey", "num", "a", "{\n num.put(a,num.get(a)+1);\n }", "num.put(a,num.get(a)+1)", "num.put", "num", "a", "num.get(a)+1", "num.get(a)", "num.get", "num", "a", "1", "{\n num.put(a,1);\n }", "num.put(a,1)", "num.put", "num", "a", "1", "for (int i=1;i<=loop;i++){\n if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=loop", "i", "loop", "i++", "i++", "i", "{\n if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }\n }", "{\n if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }\n }", "if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }", "num.containsKey(i)", "num.containsKey", "num", "i", "{\n System.out.println(num.get(i));\n }", "System.out.println(num.get(i))", "System.out.println", "System.out", "System", "System.out", "num.get(i)", "num.get", "num", "i", "{\n System.out.println(0);\n }", "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 HashMap<Integer,Integer> num=new HashMap<>();\n Scanner sc=new Scanner(System.in);\n int loop=sc.nextInt();\n for(int i=1;i<loop;i++){\n int a=sc.nextInt();\n if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }\n }\n for (int i=1;i<=loop;i++){\n if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n }\n}", "public class Main {\n public static void main(String[] args){\n HashMap<Integer,Integer> num=new HashMap<>();\n Scanner sc=new Scanner(System.in);\n int loop=sc.nextInt();\n for(int i=1;i<loop;i++){\n int a=sc.nextInt();\n if(num.containsKey(a)){\n num.put(a,num.get(a)+1);\n }\n else{\n num.put(a,1);\n }\n }\n for (int i=1;i<=loop;i++){\n if(num.containsKey(i)){\n System.out.println(num.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n }\n}", "Main" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.Scanner; public class Main { public static void main(String[] args){ HashMap<Integer,Integer> num=new HashMap<>(); Scanner sc=new Scanner(System.in); int loop=sc.nextInt(); for(int i=1;i<loop;i++){ int a=sc.nextInt(); if(num.containsKey(a)){ num.put(a,num.get(a)+1); } else{ num.put(a,1); } } for (int i=1;i<=loop;i++){ if(num.containsKey(i)){ System.out.println(num.get(i)); } else { System.out.println(0); } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 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, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 80, 5 ], [ 80, 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 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 8, 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 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 8, 74 ], [ 74, 75 ], [ 75, 76 ], [ 6, 77 ], [ 77, 78 ], [ 0, 79 ], [ 79, 80 ], [ 79, 81 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sca = new Scanner(System.in);\n\t\tint n = sca.nextInt();\n\t\tint[] ai = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tai[i] = sca.nextInt();\n\t\t\tans[ai[i]-1]++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t\t// 後始末\n\t\tsca.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 sca = new Scanner(System.in);\n\t\tint n = sca.nextInt();\n\t\tint[] ai = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tai[i] = sca.nextInt();\n\t\t\tans[ai[i]-1]++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t\t// 後始末\n\t\tsca.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sca = new Scanner(System.in);\n\t\tint n = sca.nextInt();\n\t\tint[] ai = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tai[i] = sca.nextInt();\n\t\t\tans[ai[i]-1]++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t\t// 後始末\n\t\tsca.close();\n\t}", "main", "{\n\t\tScanner sca = new Scanner(System.in);\n\t\tint n = sca.nextInt();\n\t\tint[] ai = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tai[i] = sca.nextInt();\n\t\t\tans[ai[i]-1]++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t\t// 後始末\n\t\tsca.close();\n\t}", "Scanner sca = new Scanner(System.in);", "sca", "new Scanner(System.in)", "int n = sca.nextInt();", "n", "sca.nextInt()", "sca.nextInt", "sca", "int[] ai = new int[n];", "ai", "new int[n]", "n", "int[] ans = new int[n];", "ans", "new int[n]", "n", "for(int i = 1; i < n; i++) {\n\t\t\tai[i] = sca.nextInt();\n\t\t\tans[ai[i]-1]++;\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tai[i] = sca.nextInt();\n\t\t\tans[ai[i]-1]++;\n\t\t}", "{\n\t\t\tai[i] = sca.nextInt();\n\t\t\tans[ai[i]-1]++;\n\t\t}", "ai[i] = sca.nextInt()", "ai[i]", "ai", "i", "sca.nextInt()", "sca.nextInt", "sca", "ans[ai[i]-1]++", "ans[ai[i]-1]", "ans", "ai[i]-1", "ai[i]", "ai", "i", "1", "for(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "System.out.println(ans[i])", "System.out.println", "System.out", "System", "System.out", "ans[i]", "ans", "i", "sca.close()", "sca.close", "sca", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sca = new Scanner(System.in);\n\t\tint n = sca.nextInt();\n\t\tint[] ai = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tai[i] = sca.nextInt();\n\t\t\tans[ai[i]-1]++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t\t// 後始末\n\t\tsca.close();\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sca = new Scanner(System.in);\n\t\tint n = sca.nextInt();\n\t\tint[] ai = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tai[i] = sca.nextInt();\n\t\t\tans[ai[i]-1]++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n\t\t// 後始末\n\t\tsca.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sca = new Scanner(System.in); int n = sca.nextInt(); int[] ai = new int[n]; int[] ans = new int[n]; for(int i = 1; i < n; i++) { ai[i] = sca.nextInt(); ans[ai[i]-1]++; } for(int i = 0; i < n; i++) { System.out.println(ans[i]); } // 後始末 sca.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 40, 18, 13, 2, 13, 17, 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 ], [ 77, 8 ], [ 77, 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 ], [ 24, 26 ], [ 11, 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 ], [ 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 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 9, 74 ], [ 74, 75 ], [ 0, 76 ], [ 76, 77 ], [ 76, 78 ] ]
[ "import java.util.*;\nimport java.lang.*;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] num = new int[n];\n\t\tint point = 0;\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tpoint = sc.nextInt();\n\t\t\tnum[point - 1]++;\n\t\t}\n\t\tfor(int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(num[j]);\n\t\t}\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 sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] num = new int[n];\n\t\tint point = 0;\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tpoint = sc.nextInt();\n\t\t\tnum[point - 1]++;\n\t\t}\n\t\tfor(int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(num[j]);\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[] num = new int[n];\n\t\tint point = 0;\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tpoint = sc.nextInt();\n\t\t\tnum[point - 1]++;\n\t\t}\n\t\tfor(int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(num[j]);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] num = new int[n];\n\t\tint point = 0;\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tpoint = sc.nextInt();\n\t\t\tnum[point - 1]++;\n\t\t}\n\t\tfor(int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(num[j]);\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[] num = new int[n];", "num", "new int[n]", "n", "int point = 0;", "point", "0", "for(int i = 0; i < n - 1; i++) {\n\t\t\tpoint = sc.nextInt();\n\t\t\tnum[point - 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\tpoint = sc.nextInt();\n\t\t\tnum[point - 1]++;\n\t\t}", "{\n\t\t\tpoint = sc.nextInt();\n\t\t\tnum[point - 1]++;\n\t\t}", "point = sc.nextInt()", "point", "sc.nextInt()", "sc.nextInt", "sc", "num[point - 1]++", "num[point - 1]", "num", "point - 1", "point", "1", "for(int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(num[j]);\n\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < n", "j", "n", "j++", "j++", "j", "{\n\t\t\tSystem.out.println(num[j]);\n\t\t}", "{\n\t\t\tSystem.out.println(num[j]);\n\t\t}", "System.out.println(num[j])", "System.out.println", "System.out", "System", "System.out", "num[j]", "num", "j", "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[] num = new int[n];\n\t\tint point = 0;\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tpoint = sc.nextInt();\n\t\t\tnum[point - 1]++;\n\t\t}\n\t\tfor(int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(num[j]);\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[] num = new int[n];\n\t\tint point = 0;\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tpoint = sc.nextInt();\n\t\t\tnum[point - 1]++;\n\t\t}\n\t\tfor(int j = 0; j < n; j++) {\n\t\t\tSystem.out.println(num[j]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; import java.lang.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] num = new int[n]; int point = 0; for(int i = 0; i < n - 1; i++) { point = sc.nextInt(); num[point - 1]++; } for(int j = 0; j < n; j++) { System.out.println(num[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, 4, 18, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 13, 4, 18, 13, 28, 13, 4, 18, 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 ], [ 110, 11 ], [ 110, 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 ], [ 26, 29 ], [ 26, 30 ], [ 14, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 40, 41 ], [ 31, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 43, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 50, 54 ], [ 14, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 55, 65 ], [ 65, 66 ], [ 66, 67 ], [ 55, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 69, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 77, 82 ], [ 69, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 83, 87 ], [ 14, 88 ], [ 88, 89 ], [ 89, 90 ], [ 14, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 91, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 12, 107 ], [ 107, 108 ], [ 0, 109 ], [ 109, 110 ], [ 109, 111 ] ]
[ "import java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<String,Integer> su = new LinkedHashMap<String,Integer>();\n su.put(\"1\",0);\n for(int i = 2; i <= n; i++){\n \tString num = String.valueOf(i);\n su.put(num,0);\n }\n for(int i = 0; i < n-1; i++){\n String j = sc.next();\n int temp = su.get(j) + 1;\n su.put(j,temp);\n }\n sc.close();\n for(String ans : su.keySet()){\n System.out.println(su.get(ans));\n }\n }\n}", "import java.util.LinkedHashMap;", "LinkedHashMap", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<String,Integer> su = new LinkedHashMap<String,Integer>();\n su.put(\"1\",0);\n for(int i = 2; i <= n; i++){\n \tString num = String.valueOf(i);\n su.put(num,0);\n }\n for(int i = 0; i < n-1; i++){\n String j = sc.next();\n int temp = su.get(j) + 1;\n su.put(j,temp);\n }\n sc.close();\n for(String ans : su.keySet()){\n System.out.println(su.get(ans));\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<String,Integer> su = new LinkedHashMap<String,Integer>();\n su.put(\"1\",0);\n for(int i = 2; i <= n; i++){\n \tString num = String.valueOf(i);\n su.put(num,0);\n }\n for(int i = 0; i < n-1; i++){\n String j = sc.next();\n int temp = su.get(j) + 1;\n su.put(j,temp);\n }\n sc.close();\n for(String ans : su.keySet()){\n System.out.println(su.get(ans));\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<String,Integer> su = new LinkedHashMap<String,Integer>();\n su.put(\"1\",0);\n for(int i = 2; i <= n; i++){\n \tString num = String.valueOf(i);\n su.put(num,0);\n }\n for(int i = 0; i < n-1; i++){\n String j = sc.next();\n int temp = su.get(j) + 1;\n su.put(j,temp);\n }\n sc.close();\n for(String ans : su.keySet()){\n System.out.println(su.get(ans));\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "Map<String,Integer> su = new LinkedHashMap<String,Integer>();", "su", "new LinkedHashMap<String,Integer>()", "su.put(\"1\",0)", "su.put", "su", "\"1\"", "0", "for(int i = 2; i <= n; i++){\n \tString num = String.valueOf(i);\n su.put(num,0);\n }", "int i = 2;", "int i = 2;", "i", "2", "i <= n", "i", "n", "i++", "i++", "i", "{\n \tString num = String.valueOf(i);\n su.put(num,0);\n }", "{\n \tString num = String.valueOf(i);\n su.put(num,0);\n }", "String num = String.valueOf(i);", "num", "String.valueOf(i)", "String.valueOf", "String", "i", "su.put(num,0)", "su.put", "su", "num", "0", "for(int i = 0; i < n-1; i++){\n String j = sc.next();\n int temp = su.get(j) + 1;\n su.put(j,temp);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n String j = sc.next();\n int temp = su.get(j) + 1;\n su.put(j,temp);\n }", "{\n String j = sc.next();\n int temp = su.get(j) + 1;\n su.put(j,temp);\n }", "String j = sc.next();", "j", "sc.next()", "sc.next", "sc", "int temp = su.get(j) + 1;", "temp", "su.get(j) + 1", "su.get(j)", "su.get", "su", "j", "1", "su.put(j,temp)", "su.put", "su", "j", "temp", "sc.close()", "sc.close", "sc", "for(String ans : su.keySet()){\n System.out.println(su.get(ans));\n }", "String ans", "su.keySet()", "su.keySet", "su", "{\n System.out.println(su.get(ans));\n }", "{\n System.out.println(su.get(ans));\n }", "System.out.println(su.get(ans))", "System.out.println", "System.out", "System", "System.out", "su.get(ans)", "su.get", "su", "ans", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<String,Integer> su = new LinkedHashMap<String,Integer>();\n su.put(\"1\",0);\n for(int i = 2; i <= n; i++){\n \tString num = String.valueOf(i);\n su.put(num,0);\n }\n for(int i = 0; i < n-1; i++){\n String j = sc.next();\n int temp = su.get(j) + 1;\n su.put(j,temp);\n }\n sc.close();\n for(String ans : su.keySet()){\n System.out.println(su.get(ans));\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<String,Integer> su = new LinkedHashMap<String,Integer>();\n su.put(\"1\",0);\n for(int i = 2; i <= n; i++){\n \tString num = String.valueOf(i);\n su.put(num,0);\n }\n for(int i = 0; i < n-1; i++){\n String j = sc.next();\n int temp = su.get(j) + 1;\n su.put(j,temp);\n }\n sc.close();\n for(String ans : su.keySet()){\n System.out.println(su.get(ans));\n }\n }\n}", "Main" ]
import java.util.LinkedHashMap; import java.util.Map; import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); Map<String,Integer> su = new LinkedHashMap<String,Integer>(); su.put("1",0); for(int i = 2; i <= n; i++){ String num = String.valueOf(i); su.put(num,0); } for(int i = 0; i < n-1; i++){ String j = sc.next(); int temp = su.get(j) + 1; su.put(j,temp); } sc.close(); for(String ans : su.keySet()){ System.out.println(su.get(ans)); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 13, 41, 13, 17, 41, 13, 41, 13, 12, 13, 30, 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, 2, 4, 18, 13, 17, 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, 12, 13, 30, 14, 2, 13, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 4, 18, 18, 13, 13, 17, 30, 0, 13, 18, 13, 13, 0, 13, 20, 0, 13, 20, 4, 13, 12, 13, 30, 4, 18, 20, 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, 29, 2, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 12, 13, 30, 29, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 40, 17, 23, 13, 12, 13, 30, 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, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 42, 4, 13, 13, 0, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 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, 4, 13, 42, 4, 13, 13, 0, 13, 4, 13, 41, 13, 20, 42, 40, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 20, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 18, 13, 13, 13, 4, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 632, 26 ], [ 632, 27 ], [ 27, 28 ], [ 632, 29 ], [ 29, 30 ], [ 29, 31 ], [ 632, 32 ], [ 32, 33 ], [ 32, 34 ], [ 632, 35 ], [ 35, 36 ], [ 35, 37 ], [ 632, 38 ], [ 38, 39 ], [ 38, 40 ], [ 632, 41 ], [ 41, 42 ], [ 632, 43 ], [ 43, 44 ], [ 632, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 47, 53 ], [ 53, 54 ], [ 53, 55 ], [ 47, 57 ], [ 57, 58 ], [ 57, 59 ], [ 47, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 61, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 78, 82 ], [ 73, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 86, 88 ], [ 47, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 89, 100 ], [ 101, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 632, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 118, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 117, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 129, 134 ], [ 113, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 138, 140 ], [ 112, 141 ], [ 141, 142 ], [ 141, 143 ], [ 112, 144 ], [ 144, 145 ], [ 144, 146 ], [ 112, 147 ], [ 147, 148 ], [ 632, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 149, 155 ], [ 155, 156 ], [ 0, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 157, 161 ], [ 161, 162 ], [ 161, 163 ], [ 157, 165 ], [ 165, 166 ], [ 157, 167 ], [ 167, 168 ], [ 157, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 172, 176 ], [ 169, 177 ], [ 177, 178 ], [ 157, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 185, 186 ], [ 182, 187 ], [ 187, 188 ], [ 181, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 189, 193 ], [ 193, 194 ], [ 194, 195 ], [ 194, 196 ], [ 193, 197 ], [ 197, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 201, 202 ], [ 197, 203 ], [ 203, 204 ], [ 204, 205 ], [ 204, 206 ], [ 206, 207 ], [ 207, 208 ], [ 206, 209 ], [ 193, 210 ], [ 210, 211 ], [ 211, 212 ], [ 211, 213 ], [ 210, 214 ], [ 214, 215 ], [ 215, 216 ], [ 181, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 220, 221 ], [ 157, 222 ], [ 222, 223 ], [ 222, 224 ], [ 224, 225 ], [ 225, 226 ], [ 229, 227 ], [ 239, 228 ], [ 236, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 229, 233 ], [ 233, 234 ], [ 233, 235 ], [ 236, 236 ], [ 236, 237 ], [ 236, 238 ], [ 239, 239 ], [ 239, 240 ], [ 239, 241 ], [ 229, 242 ], [ 242, 243 ], [ 242, 244 ], [ 244, 245 ], [ 222, 246 ], [ 246, 247 ], [ 157, 248 ], [ 248, 249 ], [ 248, 250 ], [ 250, 251 ], [ 251, 252 ], [ 253, 253 ], [ 253, 254 ], [ 254, 255 ], [ 254, 256 ], [ 253, 257 ], [ 257, 258 ], [ 257, 259 ], [ 253, 260 ], [ 260, 261 ], [ 260, 262 ], [ 262, 263 ], [ 248, 264 ], [ 264, 265 ], [ 157, 266 ], [ 266, 267 ], [ 266, 268 ], [ 268, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 270, 273 ], [ 273, 274 ], [ 157, 275 ], [ 275, 276 ], [ 275, 277 ], [ 277, 278 ], [ 278, 279 ], [ 278, 280 ], [ 277, 282 ], [ 282, 283 ], [ 283, 284 ], [ 284, 285 ], [ 284, 286 ], [ 282, 287 ], [ 287, 288 ], [ 287, 289 ], [ 282, 290 ], [ 290, 291 ], [ 291, 292 ], [ 282, 293 ], [ 293, 294 ], [ 294, 295 ], [ 295, 296 ], [ 295, 297 ], [ 294, 298 ], [ 298, 299 ], [ 277, 300 ], [ 300, 301 ], [ 275, 302 ], [ 302, 303 ], [ 157, 304 ], [ 304, 305 ], [ 304, 306 ], [ 306, 307 ], [ 307, 308 ], [ 307, 309 ], [ 306, 312 ], [ 312, 313 ], [ 313, 314 ], [ 314, 315 ], [ 314, 316 ], [ 312, 317 ], [ 317, 318 ], [ 317, 319 ], [ 312, 320 ], [ 320, 321 ], [ 321, 322 ], [ 312, 323 ], [ 324, 324 ], [ 324, 325 ], [ 325, 326 ], [ 326, 327 ], [ 326, 328 ], [ 325, 329 ], [ 329, 330 ], [ 329, 331 ], [ 306, 332 ], [ 332, 333 ], [ 304, 334 ], [ 334, 335 ], [ 304, 336 ], [ 336, 337 ], [ 157, 338 ], [ 338, 339 ], [ 338, 340 ], [ 340, 341 ], [ 341, 342 ], [ 342, 343 ], [ 343, 344 ], [ 342, 345 ], [ 345, 346 ], [ 157, 347 ], [ 347, 348 ], [ 347, 349 ], [ 349, 350 ], [ 350, 351 ], [ 350, 352 ], [ 349, 354 ], [ 354, 355 ], [ 355, 356 ], [ 356, 357 ], [ 356, 358 ], [ 354, 359 ], [ 359, 360 ], [ 359, 361 ], [ 354, 362 ], [ 362, 363 ], [ 363, 364 ], [ 354, 365 ], [ 365, 366 ], [ 366, 367 ], [ 367, 368 ], [ 367, 369 ], [ 366, 370 ], [ 370, 371 ], [ 349, 372 ], [ 372, 373 ], [ 347, 374 ], [ 374, 375 ], [ 157, 376 ], [ 376, 377 ], [ 376, 378 ], [ 378, 379 ], [ 379, 380 ], [ 379, 381 ], [ 378, 384 ], [ 384, 385 ], [ 385, 386 ], [ 386, 387 ], [ 386, 388 ], [ 384, 389 ], [ 389, 390 ], [ 389, 391 ], [ 384, 392 ], [ 392, 393 ], [ 393, 394 ], [ 384, 395 ], [ 396, 396 ], [ 396, 397 ], [ 397, 398 ], [ 398, 399 ], [ 398, 400 ], [ 397, 401 ], [ 401, 402 ], [ 401, 403 ], [ 378, 404 ], [ 404, 405 ], [ 376, 406 ], [ 406, 407 ], [ 376, 408 ], [ 408, 409 ], [ 157, 410 ], [ 410, 411 ], [ 410, 412 ], [ 412, 413 ], [ 413, 414 ], [ 414, 415 ], [ 415, 416 ], [ 414, 417 ], [ 417, 418 ], [ 157, 419 ], [ 419, 420 ], [ 419, 421 ], [ 421, 422 ], [ 422, 423 ], [ 422, 424 ], [ 421, 426 ], [ 426, 427 ], [ 427, 428 ], [ 428, 429 ], [ 428, 430 ], [ 426, 431 ], [ 431, 432 ], [ 431, 433 ], [ 426, 434 ], [ 434, 435 ], [ 435, 436 ], [ 426, 437 ], [ 437, 438 ], [ 438, 439 ], [ 439, 440 ], [ 439, 441 ], [ 438, 442 ], [ 442, 443 ], [ 421, 444 ], [ 444, 445 ], [ 419, 446 ], [ 446, 447 ], [ 157, 448 ], [ 448, 449 ], [ 448, 450 ], [ 450, 451 ], [ 451, 452 ], [ 451, 453 ], [ 450, 456 ], [ 456, 457 ], [ 457, 458 ], [ 458, 459 ], [ 458, 460 ], [ 456, 461 ], [ 461, 462 ], [ 461, 463 ], [ 456, 464 ], [ 464, 465 ], [ 465, 466 ], [ 456, 467 ], [ 468, 468 ], [ 468, 469 ], [ 469, 470 ], [ 470, 471 ], [ 470, 472 ], [ 469, 473 ], [ 473, 474 ], [ 473, 475 ], [ 450, 476 ], [ 476, 477 ], [ 448, 478 ], [ 478, 479 ], [ 448, 480 ], [ 480, 481 ], [ 157, 482 ], [ 482, 483 ], [ 482, 484 ], [ 484, 485 ], [ 485, 486 ], [ 485, 487 ], [ 487, 488 ], [ 484, 489 ], [ 489, 490 ], [ 490, 491 ], [ 490, 492 ], [ 489, 493 ], [ 493, 494 ], [ 493, 495 ], [ 495, 496 ], [ 484, 497 ], [ 497, 498 ], [ 497, 499 ], [ 484, 500 ], [ 500, 501 ], [ 501, 502 ], [ 502, 503 ], [ 502, 504 ], [ 500, 505 ], [ 505, 506 ], [ 506, 507 ], [ 507, 508 ], [ 506, 509 ], [ 505, 510 ], [ 510, 511 ], [ 510, 512 ], [ 512, 513 ], [ 484, 514 ], [ 514, 515 ], [ 515, 516 ], [ 516, 517 ], [ 157, 518 ], [ 518, 519 ], [ 518, 520 ], [ 520, 521 ], [ 521, 522 ], [ 521, 523 ], [ 520, 525 ], [ 525, 526 ], [ 526, 527 ], [ 527, 528 ], [ 527, 529 ], [ 525, 530 ], [ 530, 531 ], [ 530, 532 ], [ 525, 533 ], [ 533, 534 ], [ 534, 535 ], [ 525, 536 ], [ 536, 537 ], [ 537, 538 ], [ 538, 539 ], [ 538, 540 ], [ 537, 541 ], [ 541, 542 ], [ 520, 543 ], [ 543, 544 ], [ 518, 545 ], [ 545, 546 ], [ 157, 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 ], [ 157, 583 ], [ 583, 584 ], [ 583, 585 ], [ 585, 586 ], [ 586, 587 ], [ 586, 588 ], [ 585, 591 ], [ 591, 592 ], [ 592, 593 ], [ 593, 594 ], [ 593, 595 ], [ 591, 596 ], [ 596, 597 ], [ 596, 598 ], [ 591, 599 ], [ 599, 600 ], [ 600, 601 ], [ 591, 602 ], [ 603, 603 ], [ 603, 604 ], [ 604, 605 ], [ 605, 606 ], [ 606, 607 ], [ 606, 608 ], [ 604, 609 ], [ 609, 610 ], [ 609, 611 ], [ 604, 612 ], [ 612, 613 ], [ 613, 614 ], [ 604, 615 ], [ 616, 616 ], [ 616, 617 ], [ 617, 618 ], [ 618, 619 ], [ 619, 620 ], [ 619, 621 ], [ 618, 622 ], [ 617, 623 ], [ 623, 624 ], [ 585, 625 ], [ 625, 626 ], [ 583, 627 ], [ 627, 628 ], [ 583, 629 ], [ 629, 630 ], [ 0, 631 ], [ 631, 632 ], [ 631, 633 ] ]
[ "import java.io.FileInputStream;\nimport java.io.PrintWriter;\nimport java.io.FileNotFoundException;\nimport java.util.ArrayDeque;\nimport java.util.Queue;\nimport java.io.InputStream;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\n\npublic class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/F5\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int n = in.nextInt();\n int[] a = new int[n];\n int[] cnt = new int[n];\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n cnt[a[i]]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(cnt[i]);\n }\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}\n\n\nclass FastScanner {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public FastScanner(InputStream stream) {\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }\n\n 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 boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }\n\n public int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }\n\n public long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }\n\n public double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }\n\n public String next() {\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 String[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }\n\n public String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }\n\n public int[][] nextPackedIntArrays(int packN, int size) {\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }\n}", "import java.io.FileInputStream;", "FileInputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.io.FileNotFoundException;", "FileNotFoundException", "java.io", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Queue;", "Queue", "java.util", "import java.io.InputStream;", "InputStream", "java.io", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "import java.io.IOException;", "IOException", "java.io", "public class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/F5\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int n = in.nextInt();\n int[] a = new int[n];\n int[] cnt = new int[n];\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n cnt[a[i]]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(cnt[i]);\n }\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}", "Main", "InputStream is;", "is", "int __t__ = 1;", "__t__", "1", "int __f__ = 0;", "__f__", "0", "int __FILE_DEBUG_FLAG__ = __f__;", "__FILE_DEBUG_FLAG__", "__f__", "String __DEBUG_FILE_NAME__ = \"src/F5\";", "__DEBUG_FILE_NAME__", "\"src/F5\"", "FastScanner in;", "in", "PrintWriter out;", "out", "public void solve() {\n int n = in.nextInt();\n int[] a = new int[n];\n int[] cnt = new int[n];\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n cnt[a[i]]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(cnt[i]);\n }\n }", "solve", "{\n int n = in.nextInt();\n int[] a = new int[n];\n int[] cnt = new int[n];\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n cnt[a[i]]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(cnt[i]);\n }\n }", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] a = new int[n];", "a", "new int[n]", "n", "int[] cnt = new int[n];", "cnt", "new int[n]", "n", "for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n cnt[a[i]]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n a[i] = in.nextInt() - 1;\n cnt[a[i]]++;\n }", "{\n a[i] = in.nextInt() - 1;\n cnt[a[i]]++;\n }", "a[i] = in.nextInt() - 1", "a[i]", "a", "i", "in.nextInt() - 1", "in.nextInt()", "in.nextInt", "in", "1", "cnt[a[i]]++", "cnt[a[i]]", "cnt", "a[i]", "a", "i", "for (int i = 0; i < n; i++) {\n System.out.println(cnt[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "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", "public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }", "run", "{\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }", "if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }", "__FILE_DEBUG_FLAG__ == __t__", "__FILE_DEBUG_FLAG__", "__t__", "{\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n }", "try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }", "catch (FileNotFoundException e) {\n e.printStackTrace();\n }", "FileNotFoundException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n }", "is = new FileInputStream(__DEBUG_FILE_NAME__)", "is", "new FileInputStream(__DEBUG_FILE_NAME__)", "System.out.println(\"FILE_INPUT!\")", "System.out.println", "System.out", "System", "System.out", "\"FILE_INPUT!\"", "{\n is = System.in;\n }", "is = System.in", "is", "System.in", "System", "System.in", "in = new FastScanner(is)", "in", "new FastScanner(is)", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "solve()", "solve", "public static void main(final String[] args) {\n new Main().run();\n }", "main", "{\n new Main().run();\n }", "new Main().run()", "new Main().run", "new Main()", "final String[] args", "args", "class FastScanner {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public FastScanner(InputStream stream) {\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }\n\n 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 boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }\n\n public int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }\n\n public long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }\n\n public double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }\n\n public String next() {\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 String[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }\n\n public String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }\n\n public int[][] nextPackedIntArrays(int packN, int size) {\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }\n}", "FastScanner", "private InputStream stream;", "stream", "private byte[] buf = new byte[1024];", "buf", "new byte[1024]", "1024", "private int curChar;", "curChar", "private int numChars;", "numChars", "public FastScanner(InputStream stream) {\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }", "FastScanner", "{\n this.stream = stream;\n // stream = new FileInputStream(new File(\"dec.in\"));\n }", "this.stream = stream", "this.stream", "this", "this.stream", "stream", "InputStream stream", "stream", "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 boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "isSpaceChar", "{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }", "return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == '\\t'", "c == '\\r'", "c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1", "c == ' '", "c", "' '", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == '\\t'", "c", "'\\t'", "c == -1", "c", "-1", "1", "int c", "c", "public boolean isEndline(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }", "isEndline", "{\n return c == '\\n' || c == '\\r' || c == -1;\n }", "return c == '\\n' || c == '\\r' || c == -1;", "c == '\\n' || c == '\\r' || c == -1", "c == '\\n' || c == '\\r' || c == -1", "c == '\\n'", "c", "'\\n'", "c == '\\r'", "c", "'\\r'", "c == -1", "c", "-1", "1", "int c", "c", "public 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 int[] nextIntArray(int n) {\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }", "nextIntArray", "{\n int[] array = new int[n];\n for (int i = 0; i < n; i++)\n array[i] = nextInt();\n\n return array;\n }", "int[] array = new int[n];", "array", "new int[n]", "n", "for (int i = 0; i < n; i++)\n array[i] = nextInt();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "array[i] = nextInt();", "array[i] = nextInt()", "array[i]", "array", "i", "nextInt()", "nextInt", "return array;", "array", "int n", "n", "public int[][] nextIntMap(int n, int m) {\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }", "nextIntMap", "{\n int[][] map = new int[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }\n return map;\n }", "int[][] map = new int[n][m];", "map", "new int[n][m]", "n", "m", "for (int i = 0; i < n; i++) {\n map[i] = nextIntArray(m);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n map[i] = nextIntArray(m);\n }", "{\n map[i] = nextIntArray(m);\n }", "map[i] = nextIntArray(m)", "map[i]", "map", "i", "nextIntArray(m)", "nextIntArray", "m", "return map;", "map", "int n", "n", "int m", "m", "public long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public long[] nextLongArray(int n) {\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }", "nextLongArray", "{\n long[] array = new long[n];\n for (int i = 0; i < n; i++)\n array[i] = nextLong();\n\n return array;\n }", "long[] array = new long[n];", "array", "new long[n]", "n", "for (int i = 0; i < n; i++)\n array[i] = nextLong();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "array[i] = nextLong();", "array[i] = nextLong()", "array[i]", "array", "i", "nextLong()", "nextLong", "return array;", "array", "int n", "n", "public long[][] nextLongMap(int n, int m) {\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }", "nextLongMap", "{\n long[][] map = new long[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }\n return map;\n }", "long[][] map = new long[n][m];", "map", "new long[n][m]", "n", "m", "for (int i = 0; i < n; i++) {\n map[i] = nextLongArray(m);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n map[i] = nextLongArray(m);\n }", "{\n map[i] = nextLongArray(m);\n }", "map[i] = nextLongArray(m)", "map[i]", "map", "i", "nextLongArray(m)", "nextLongArray", "m", "return map;", "map", "int n", "n", "int m", "m", "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 double[] nextDoubleArray(int n) {\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }", "nextDoubleArray", "{\n double[] array = new double[n];\n for (int i = 0; i < n; i++)\n array[i] = nextDouble();\n\n return array;\n }", "double[] array = new double[n];", "array", "new double[n]", "n", "for (int i = 0; i < n; i++)\n array[i] = nextDouble();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "array[i] = nextDouble();", "array[i] = nextDouble()", "array[i]", "array", "i", "nextDouble()", "nextDouble", "return array;", "array", "int n", "n", "public double[][] nextDoubleMap(int n, int m) {\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }", "nextDoubleMap", "{\n double[][] map = new double[n][m];\n for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }\n return map;\n }", "double[][] map = new double[n][m];", "map", "new double[n][m]", "n", "m", "for (int i = 0; i < n; i++) {\n map[i] = nextDoubleArray(m);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n map[i] = nextDoubleArray(m);\n }", "{\n map[i] = nextDoubleArray(m);\n }", "map[i] = nextDoubleArray(m)", "map[i]", "map", "i", "nextDoubleArray(m)", "nextDoubleArray", "m", "return map;", "map", "int n", "n", "int m", "m", "public String next() {\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 }", "next", "{\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 String[] nextStringArray(int n) {\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }", "nextStringArray", "{\n String[] array = new String[n];\n for (int i = 0; i < n; i++)\n array[i] = next();\n\n return array;\n }", "String[] array = new String[n];", "array", "new String[n]", "n", "for (int i = 0; i < n; i++)\n array[i] = next();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "array[i] = next();", "array[i] = next()", "array[i]", "array", "i", "next()", "next", "return array;", "array", "int n", "n", "public String nextLine() {\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }", "nextLine", "{\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));\n return res.toString();\n }", "int c = read();", "c", "read()", "read", "while (isEndline(c))\n c = read();", "isEndline(c)", "isEndline", "c", "c = read()", "c", "read()", "read", "StringBuilder res = new StringBuilder();", "res", "new StringBuilder()", "do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndline(c));", "!isEndline(c)", "isEndline(c)", "isEndline", "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 int[][] nextPackedIntArrays(int packN, int size) {\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }", "nextPackedIntArrays", "{\n int[][] res = new int[packN][size];\n for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }\n return res;\n }", "int[][] res = new int[packN][size];", "res", "new int[packN][size]", "packN", "size", "for (int i = 0; i < size; i++) {\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < size", "i", "size", "i++", "i++", "i", "{\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }", "{\n for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }\n }", "for (int j = 0; j < packN; j++) {\n res[j][i] = nextInt();\n }", "int j = 0;", "int j = 0;", "j", "0", "j < packN", "j", "packN", "j++", "j++", "j", "{\n res[j][i] = nextInt();\n }", "{\n res[j][i] = nextInt();\n }", "res[j][i] = nextInt()", "res[j][i]", "res[j]", "res", "j", "i", "nextInt()", "nextInt", "return res;", "res", "int packN", "packN", "int size", "size", "public class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/F5\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int n = in.nextInt();\n int[] a = new int[n];\n int[] cnt = new int[n];\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n cnt[a[i]]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(cnt[i]);\n }\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}", "public class Main {\n InputStream is;\n\n int __t__ = 1;\n int __f__ = 0;\n int __FILE_DEBUG_FLAG__ = __f__;\n String __DEBUG_FILE_NAME__ = \"src/F5\";\n\n FastScanner in;\n PrintWriter out;\n\n public void solve() {\n int n = in.nextInt();\n int[] a = new int[n];\n int[] cnt = new int[n];\n for (int i = 1; i < n; i++) {\n a[i] = in.nextInt() - 1;\n cnt[a[i]]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(cnt[i]);\n }\n }\n\n public void run() {\n if (__FILE_DEBUG_FLAG__ == __t__) {\n try {\n is = new FileInputStream(__DEBUG_FILE_NAME__);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n System.out.println(\"FILE_INPUT!\");\n } else {\n is = System.in;\n }\n in = new FastScanner(is);\n out = new PrintWriter(System.out);\n\n solve();\n }\n\n public static void main(final String[] args) {\n new Main().run();\n }\n}", "Main" ]
import java.io.FileInputStream; import java.io.PrintWriter; import java.io.FileNotFoundException; import java.util.ArrayDeque; import java.util.Queue; import java.io.InputStream; import java.util.InputMismatchException; import java.io.IOException; public class Main { InputStream is; int __t__ = 1; int __f__ = 0; int __FILE_DEBUG_FLAG__ = __f__; String __DEBUG_FILE_NAME__ = "src/F5"; FastScanner in; PrintWriter out; public void solve() { int n = in.nextInt(); int[] a = new int[n]; int[] cnt = new int[n]; for (int i = 1; i < n; i++) { a[i] = in.nextInt() - 1; cnt[a[i]]++; } for (int i = 0; i < n; i++) { System.out.println(cnt[i]); } } public void run() { if (__FILE_DEBUG_FLAG__ == __t__) { try { is = new FileInputStream(__DEBUG_FILE_NAME__); } catch (FileNotFoundException e) { e.printStackTrace(); } System.out.println("FILE_INPUT!"); } else { is = System.in; } in = new FastScanner(is); out = new PrintWriter(System.out); solve(); } public static void main(final String[] args) { new Main().run(); } } class FastScanner { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; public FastScanner(InputStream stream) { this.stream = stream; // stream = new FileInputStream(new File("dec.in")); } 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 boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public boolean isEndline(int c) { return c == '\n' || c == '\r' || c == -1; } public int nextInt() { return Integer.parseInt(next()); } public int[] nextIntArray(int n) { int[] array = new int[n]; for (int i = 0; i < n; i++) array[i] = nextInt(); return array; } public int[][] nextIntMap(int n, int m) { int[][] map = new int[n][m]; for (int i = 0; i < n; i++) { map[i] = nextIntArray(m); } return map; } public long nextLong() { return Long.parseLong(next()); } public long[] nextLongArray(int n) { long[] array = new long[n]; for (int i = 0; i < n; i++) array[i] = nextLong(); return array; } public long[][] nextLongMap(int n, int m) { long[][] map = new long[n][m]; for (int i = 0; i < n; i++) { map[i] = nextLongArray(m); } return map; } public double nextDouble() { return Double.parseDouble(next()); } public double[] nextDoubleArray(int n) { double[] array = new double[n]; for (int i = 0; i < n; i++) array[i] = nextDouble(); return array; } public double[][] nextDoubleMap(int n, int m) { double[][] map = new double[n][m]; for (int i = 0; i < n; i++) { map[i] = nextDoubleArray(m); } return map; } public String next() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } public String[] nextStringArray(int n) { String[] array = new String[n]; for (int i = 0; i < n; i++) array[i] = next(); return array; } public String nextLine() { int c = read(); while (isEndline(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isEndline(c)); return res.toString(); } public int[][] nextPackedIntArrays(int packN, int size) { int[][] res = new int[packN][size]; for (int i = 0; i < size; i++) { for (int j = 0; j < packN; j++) { res[j][i] = nextInt(); } } return res; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 74, 11 ], [ 74, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 17, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 25, 27 ], [ 28, 29 ], [ 28, 30 ], [ 14, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 40, 41 ], [ 31, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 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 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 12, 71 ], [ 71, 72 ], [ 0, 73 ], [ 73, 74 ], [ 73, 75 ] ]
[ "import java.util.HashMap;\nimport java.util.Map;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n int N;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n int[] A = new int[N+1];\n for(int i = 1 ; i < N ; i++)\n {\n A[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= N ; i++)\n {\n System.out.println(A[i]);\n }\n\n\n }\n}", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n int N;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n int[] A = new int[N+1];\n for(int i = 1 ; i < N ; i++)\n {\n A[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= N ; i++)\n {\n System.out.println(A[i]);\n }\n\n\n }\n}", "Main", "public static void main(String[] args) {\n int N;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n int[] A = new int[N+1];\n for(int i = 1 ; i < N ; i++)\n {\n A[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= N ; i++)\n {\n System.out.println(A[i]);\n }\n\n\n }", "main", "{\n int N;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n int[] A = new int[N+1];\n for(int i = 1 ; i < N ; i++)\n {\n A[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= N ; i++)\n {\n System.out.println(A[i]);\n }\n\n\n }", "int N;", "N", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "N = sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] A = new int[N+1];", "A", "new int[N+1]", "N+1", "N", "1", "for(int i = 1 ; i < N ; i++)\n {\n A[sc.nextInt()]++;\n }", "int i = 1 ;", "int i = 1 ;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n A[sc.nextInt()]++;\n }", "{\n A[sc.nextInt()]++;\n }", "A[sc.nextInt()]++", "A[sc.nextInt()]", "A", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 1 ; i <= N ; i++)\n {\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 int N;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n int[] A = new int[N+1];\n for(int i = 1 ; i < N ; i++)\n {\n A[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= N ; i++)\n {\n System.out.println(A[i]);\n }\n\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n int N;\n Scanner sc = new Scanner(System.in);\n N = sc.nextInt();\n int[] A = new int[N+1];\n for(int i = 1 ; i < N ; i++)\n {\n A[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= N ; i++)\n {\n System.out.println(A[i]);\n }\n\n\n }\n}", "Main" ]
import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args) { int N; Scanner sc = new Scanner(System.in); 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, 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, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 40, 18, 13, 2, 18, 13, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 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 ], [ 111, 14 ], [ 111, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 23, 26 ], [ 26, 27 ], [ 27, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 32, 33 ], [ 32, 34 ], [ 17, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 37, 42 ], [ 17, 43 ], [ 43, 44 ], [ 44, 45 ], [ 17, 46 ], [ 46, 47 ], [ 46, 48 ], [ 17, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 72, 73 ], [ 72, 74 ], [ 64, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 17, 83 ], [ 83, 84 ], [ 83, 85 ], [ 17, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 91, 92 ], [ 91, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 86, 97 ], [ 98, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 17, 105 ], [ 105, 106 ], [ 106, 107 ], [ 15, 108 ], [ 108, 109 ], [ 0, 110 ], [ 110, 111 ], [ 110, 112 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\nimport java.io.PrintWriter;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n PrintWriter pw = new PrintWriter(System.out);\n for(int i=0; i<n; i++) {\n pw.println(boss[i]);\n }\n pw.flush();\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n PrintWriter pw = new PrintWriter(System.out);\n for(int i=0; i<n; i++) {\n pw.println(boss[i]);\n }\n pw.flush();\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n PrintWriter pw = new PrintWriter(System.out);\n for(int i=0; i<n; i++) {\n pw.println(boss[i]);\n }\n pw.flush();\n }", "main", "{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n PrintWriter pw = new PrintWriter(System.out);\n for(int i=0; i<n; i++) {\n pw.println(boss[i]);\n }\n pw.flush();\n }", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "int n = Integer.parseInt(in.readLine());", "n", "Integer.parseInt(in.readLine())", "Integer.parseInt", "Integer", "in.readLine()", "in.readLine", "in", "int[] a = new int[n-1];", "a", "new int[n-1]", "n-1", "n", "1", "String[] str = in.readLine().split(\" \");", "str", "in.readLine().split(\" \")", "in.readLine().split", "in.readLine()", "in.readLine", "in", "\" \"", "in.close()", "in.close", "in", "int[] boss = new int[n];", "boss", "new int[n]", "n", "for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[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] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }", "{\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }", "a[i] = Integer.parseInt(str[i])", "a[i]", "a", "i", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "boss[a[i]-1]++", "boss[a[i]-1]", "boss", "a[i]-1", "a[i]", "a", "i", "1", "PrintWriter pw = new PrintWriter(System.out);", "pw", "new PrintWriter(System.out)", "for(int i=0; i<n; i++) {\n pw.println(boss[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n pw.println(boss[i]);\n }", "{\n pw.println(boss[i]);\n }", "pw.println(boss[i])", "pw.println", "pw", "boss[i]", "boss", "i", "pw.flush()", "pw.flush", "pw", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n PrintWriter pw = new PrintWriter(System.out);\n for(int i=0; i<n; i++) {\n pw.println(boss[i]);\n }\n pw.flush();\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(in.readLine());\n int[] a = new int[n-1];\n String[] str = in.readLine().split(\" \");\n in.close();\n int[] boss = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = Integer.parseInt(str[i]); \n boss[a[i]-1]++;\n }\n PrintWriter pw = new PrintWriter(System.out);\n for(int i=0; i<n; i++) {\n pw.println(boss[i]);\n }\n pw.flush();\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.io.PrintWriter; public class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(in.readLine()); int[] a = new int[n-1]; String[] str = in.readLine().split(" "); in.close(); int[] boss = new int[n]; for(int i=0; i<n-1; i++) { a[i] = Integer.parseInt(str[i]); boss[a[i]-1]++; } PrintWriter pw = new PrintWriter(System.out); for(int i=0; i<n; i++) { pw.println(boss[i]); } pw.flush(); } }
[ 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\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\n\t\tfor (int i = 0; i < n -1; i++) {\n\t\t\ta[scan.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i : a) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\n\t\tfor (int i = 0; i < n -1; i++) {\n\t\t\ta[scan.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i : a) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\n\t\tfor (int i = 0; i < n -1; i++) {\n\t\t\ta[scan.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i : a) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\n\t\tfor (int i = 0; i < n -1; i++) {\n\t\t\ta[scan.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i : a) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int[] a = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n -1; i++) {\n\t\t\ta[scan.nextInt() - 1]++;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n -1", "i", "n -1", "n", "1", "i++", "i++", "i", "{\n\t\t\ta[scan.nextInt() - 1]++;\n\t\t}", "{\n\t\t\ta[scan.nextInt() - 1]++;\n\t\t}", "a[scan.nextInt() - 1]++", "a[scan.nextInt() - 1]", "a", "scan.nextInt() - 1", "scan.nextInt()", "scan.nextInt", "scan", "1", "for (int i : a) {\n\t\t\tSystem.out.println(i);\n\t\t}", "int i", "a", "{\n\t\t\tSystem.out.println(i);\n\t\t}", "{\n\t\t\tSystem.out.println(i);\n\t\t}", "System.out.println(i)", "System.out.println", "System.out", "System", "System.out", "i", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\n\t\tfor (int i = 0; i < n -1; i++) {\n\t\t\ta[scan.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i : a) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tint n = scan.nextInt();\n\t\tint[] a = new int[n];\n\n\t\tfor (int i = 0; i < n -1; i++) {\n\t\t\ta[scan.nextInt() - 1]++;\n\t\t}\n\t\tfor (int i : a) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int[] a = new int[n]; for (int i = 0; i < n -1; i++) { a[scan.nextInt() - 1]++; } for (int i : a) { System.out.println(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, 2, 13, 17, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 2, 13, 17, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 40, 18, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 93, 5 ], [ 93, 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 ], [ 29, 30 ], [ 29, 31 ], [ 28, 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 ], [ 49, 50 ], [ 49, 51 ], [ 48, 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 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 8, 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 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 87, 88 ], [ 87, 89 ], [ 6, 90 ], [ 90, 91 ], [ 0, 92 ], [ 92, 93 ], [ 92, 94 ] ]
[ "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\t//List<String> list=new ArrayList<String>(Arrays.asList(s.split(\"\")));\n\t\t//List<Integer> list=new ArrayList<Integer>();\n\t\t//int[] array = new int[n];\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n+1];\n\n\t\tfor(int i=0;n+1>i;i++) {\n\t\t\tarray[i]=0;\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\t//list.add(a);\n\t\t\tarray[a-1]++;\n\t\t}\n\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t\t/*\n\n\t\tint max = Collections.max(list);\n\t\tint[] answer = new int[n];\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tanswer[i]=0;\n\t\t}\n\t\tSystem.out.println(array[1]);\n\t\tloop :for(int i=1;max+1>i;i++) {\n\t\t\tfor(int j=0;n-1>j;j++) {\n\t\t\t\tif(list.get(j)==i) {\n\t\t\t\t\tanswer[j]=array[i+1];\n\t\t\t\t\tcontinue loop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\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\t//List<String> list=new ArrayList<String>(Arrays.asList(s.split(\"\")));\n\t\t//List<Integer> list=new ArrayList<Integer>();\n\t\t//int[] array = new int[n];\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n+1];\n\n\t\tfor(int i=0;n+1>i;i++) {\n\t\t\tarray[i]=0;\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\t//list.add(a);\n\t\t\tarray[a-1]++;\n\t\t}\n\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t\t/*\n\n\t\tint max = Collections.max(list);\n\t\tint[] answer = new int[n];\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tanswer[i]=0;\n\t\t}\n\t\tSystem.out.println(array[1]);\n\t\tloop :for(int i=1;max+1>i;i++) {\n\t\t\tfor(int j=0;n-1>j;j++) {\n\t\t\t\tif(list.get(j)==i) {\n\t\t\t\t\tanswer[j]=array[i+1];\n\t\t\t\t\tcontinue loop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\n\t\t*/\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t//List<String> list=new ArrayList<String>(Arrays.asList(s.split(\"\")));\n\t\t//List<Integer> list=new ArrayList<Integer>();\n\t\t//int[] array = new int[n];\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n+1];\n\n\t\tfor(int i=0;n+1>i;i++) {\n\t\t\tarray[i]=0;\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\t//list.add(a);\n\t\t\tarray[a-1]++;\n\t\t}\n\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t\t/*\n\n\t\tint max = Collections.max(list);\n\t\tint[] answer = new int[n];\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tanswer[i]=0;\n\t\t}\n\t\tSystem.out.println(array[1]);\n\t\tloop :for(int i=1;max+1>i;i++) {\n\t\t\tfor(int j=0;n-1>j;j++) {\n\t\t\t\tif(list.get(j)==i) {\n\t\t\t\t\tanswer[j]=array[i+1];\n\t\t\t\t\tcontinue loop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\n\t\t*/\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t//List<String> list=new ArrayList<String>(Arrays.asList(s.split(\"\")));\n\t\t//List<Integer> list=new ArrayList<Integer>();\n\t\t//int[] array = new int[n];\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n+1];\n\n\t\tfor(int i=0;n+1>i;i++) {\n\t\t\tarray[i]=0;\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\t//list.add(a);\n\t\t\tarray[a-1]++;\n\t\t}\n\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t\t/*\n\n\t\tint max = Collections.max(list);\n\t\tint[] answer = new int[n];\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tanswer[i]=0;\n\t\t}\n\t\tSystem.out.println(array[1]);\n\t\tloop :for(int i=1;max+1>i;i++) {\n\t\t\tfor(int j=0;n-1>j;j++) {\n\t\t\t\tif(list.get(j)==i) {\n\t\t\t\t\tanswer[j]=array[i+1];\n\t\t\t\t\tcontinue loop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\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+1];", "array", "new int[n+1]", "n+1", "n", "1", "for(int i=0;n+1>i;i++) {\n\t\t\tarray[i]=0;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "n+1>i", "n+1", "n", "1", "i", "i++", "i++", "i", "{\n\t\t\tarray[i]=0;\n\t\t}", "{\n\t\t\tarray[i]=0;\n\t\t}", "array[i]=0", "array[i]", "array", "i", "0", "for(int i=0;n-1>i;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\t//list.add(a);\n\t\t\tarray[a-1]++;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "n-1>i", "n-1", "n", "1", "i", "i++", "i++", "i", "{\n\t\t\tint a = sc.nextInt();\n\t\t\t//list.add(a);\n\t\t\tarray[a-1]++;\n\t\t}", "{\n\t\t\tint a = sc.nextInt();\n\t\t\t//list.add(a);\n\t\t\tarray[a-1]++;\n\t\t}", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "array[a-1]++", "array[a-1]", "array", "a-1", "a", "1", "for(int i=0;n>i;i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "n>i", "n", "i", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(array[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(array[i]);\n\t\t}", "System.out.println(array[i])", "System.out.println", "System.out", "System", "System.out", "array[i]", "array", "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//List<String> list=new ArrayList<String>(Arrays.asList(s.split(\"\")));\n\t\t//List<Integer> list=new ArrayList<Integer>();\n\t\t//int[] array = new int[n];\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n+1];\n\n\t\tfor(int i=0;n+1>i;i++) {\n\t\t\tarray[i]=0;\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\t//list.add(a);\n\t\t\tarray[a-1]++;\n\t\t}\n\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t\t/*\n\n\t\tint max = Collections.max(list);\n\t\tint[] answer = new int[n];\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tanswer[i]=0;\n\t\t}\n\t\tSystem.out.println(array[1]);\n\t\tloop :for(int i=1;max+1>i;i++) {\n\t\t\tfor(int j=0;n-1>j;j++) {\n\t\t\t\tif(list.get(j)==i) {\n\t\t\t\t\tanswer[j]=array[i+1];\n\t\t\t\t\tcontinue loop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\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\t//List<String> list=new ArrayList<String>(Arrays.asList(s.split(\"\")));\n\t\t//List<Integer> list=new ArrayList<Integer>();\n\t\t//int[] array = new int[n];\n\t\tint n = sc.nextInt();\n\t\tint[] array = new int[n+1];\n\n\t\tfor(int i=0;n+1>i;i++) {\n\t\t\tarray[i]=0;\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\t//list.add(a);\n\t\t\tarray[a-1]++;\n\t\t}\n\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t\t/*\n\n\t\tint max = Collections.max(list);\n\t\tint[] answer = new int[n];\n\t\tfor(int i=0;n>i;i++) {\n\t\t\tanswer[i]=0;\n\t\t}\n\t\tSystem.out.println(array[1]);\n\t\tloop :for(int i=1;max+1>i;i++) {\n\t\t\tfor(int j=0;n-1>j;j++) {\n\t\t\t\tif(list.get(j)==i) {\n\t\t\t\t\tanswer[j]=array[i+1];\n\t\t\t\t\tcontinue loop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;n-1>i;i++) {\n\t\t\tSystem.out.println(answer[i]);\n\t\t}\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); //List<String> list=new ArrayList<String>(Arrays.asList(s.split(""))); //List<Integer> list=new ArrayList<Integer>(); //int[] array = new int[n]; int n = sc.nextInt(); int[] array = new int[n+1]; for(int i=0;n+1>i;i++) { array[i]=0; } for(int i=0;n-1>i;i++) { int a = sc.nextInt(); //list.add(a); array[a-1]++; } for(int i=0;n>i;i++) { System.out.println(array[i]); } /* int max = Collections.max(list); int[] answer = new int[n]; for(int i=0;n>i;i++) { answer[i]=0; } System.out.println(array[1]); loop :for(int i=1;max+1>i;i++) { for(int j=0;n-1>j;j++) { if(list.get(j)==i) { answer[j]=array[i+1]; continue loop; } } } for(int i=0;n-1>i;i++) { System.out.println(answer[i]); } */ } }
[ 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, 13, 0, 18, 13, 2, 13, 17, 17, 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, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 18, 13, 13, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 91, 8 ], [ 91, 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 ], [ 11, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 27, 33 ], [ 11, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 41, 43 ], [ 34, 44 ], [ 44, 45 ], [ 45, 46 ], [ 34, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 56, 57 ], [ 57, 58 ], [ 52, 59 ], [ 11, 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 ], [ 76, 79 ], [ 79, 80 ], [ 79, 81 ], [ 75, 82 ], [ 82, 83 ], [ 83, 84 ], [ 11, 85 ], [ 85, 86 ], [ 86, 87 ], [ 9, 88 ], [ 88, 89 ], [ 0, 90 ], [ 90, 91 ], [ 90, 92 ] ]
[ "import java.io.PrintWriter;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = Integer.parseInt(sc.next());\n int[] B = new int[N];\n B[N - 2] = 0;\n\n for (int i = 0; i < N - 1; i++) {\n B[Integer.parseInt(sc.next()) - 1]++;\n }\n\n PrintWriter out = new PrintWriter(System.out);\n for (int i = 0; i < N; i++) {\n out.println(B[i]);\n out.flush();\n }\n\n sc.close();\n }\n}", "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 Scanner sc = new Scanner(System.in);\n int N = Integer.parseInt(sc.next());\n int[] B = new int[N];\n B[N - 2] = 0;\n\n for (int i = 0; i < N - 1; i++) {\n B[Integer.parseInt(sc.next()) - 1]++;\n }\n\n PrintWriter out = new PrintWriter(System.out);\n for (int i = 0; i < N; i++) {\n out.println(B[i]);\n out.flush();\n }\n\n sc.close();\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[] B = new int[N];\n B[N - 2] = 0;\n\n for (int i = 0; i < N - 1; i++) {\n B[Integer.parseInt(sc.next()) - 1]++;\n }\n\n PrintWriter out = new PrintWriter(System.out);\n for (int i = 0; i < N; i++) {\n out.println(B[i]);\n out.flush();\n }\n\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = Integer.parseInt(sc.next());\n int[] B = new int[N];\n B[N - 2] = 0;\n\n for (int i = 0; i < N - 1; i++) {\n B[Integer.parseInt(sc.next()) - 1]++;\n }\n\n PrintWriter out = new PrintWriter(System.out);\n for (int i = 0; i < N; i++) {\n out.println(B[i]);\n out.flush();\n }\n\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = Integer.parseInt(sc.next());", "N", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int[] B = new int[N];", "B", "new int[N]", "N", "B[N - 2] = 0", "B[N - 2]", "B", "N - 2", "N", "2", "0", "for (int i = 0; i < N - 1; i++) {\n B[Integer.parseInt(sc.next()) - 1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N - 1", "i", "N - 1", "N", "1", "i++", "i++", "i", "{\n B[Integer.parseInt(sc.next()) - 1]++;\n }", "{\n B[Integer.parseInt(sc.next()) - 1]++;\n }", "B[Integer.parseInt(sc.next()) - 1]++", "B[Integer.parseInt(sc.next()) - 1]", "B", "Integer.parseInt(sc.next()) - 1", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "1", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "for (int i = 0; i < N; i++) {\n out.println(B[i]);\n out.flush();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n out.println(B[i]);\n out.flush();\n }", "{\n out.println(B[i]);\n out.flush();\n }", "out.println(B[i])", "out.println", "out", "B[i]", "B", "i", "out.flush()", "out.flush", "out", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = Integer.parseInt(sc.next());\n int[] B = new int[N];\n B[N - 2] = 0;\n\n for (int i = 0; i < N - 1; i++) {\n B[Integer.parseInt(sc.next()) - 1]++;\n }\n\n PrintWriter out = new PrintWriter(System.out);\n for (int i = 0; i < N; i++) {\n out.println(B[i]);\n out.flush();\n }\n\n sc.close();\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = Integer.parseInt(sc.next());\n int[] B = new int[N];\n B[N - 2] = 0;\n\n for (int i = 0; i < N - 1; i++) {\n B[Integer.parseInt(sc.next()) - 1]++;\n }\n\n PrintWriter out = new PrintWriter(System.out);\n for (int i = 0; i < N; i++) {\n out.println(B[i]);\n out.flush();\n }\n\n sc.close();\n }\n}", "Main" ]
import java.io.PrintWriter; 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[] B = new int[N]; B[N - 2] = 0; for (int i = 0; i < N - 1; i++) { B[Integer.parseInt(sc.next()) - 1]++; } PrintWriter out = new PrintWriter(System.out); for (int i = 0; i < N; i++) { out.println(B[i]); out.flush(); } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 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, 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, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 14, 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, 14, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 29, 4, 18, 13, 29, 4, 18, 13, 17, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 278, 23 ], [ 278, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 26, 35 ], [ 35, 36 ], [ 35, 37 ], [ 26, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 38, 48 ], [ 48, 49 ], [ 49, 50 ], [ 38, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 52, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 58, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 64, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 68, 73 ], [ 58, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 75, 79 ], [ 26, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 80, 88 ], [ 88, 89 ], [ 89, 90 ], [ 80, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 93, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 93, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 109, 114 ], [ 24, 115 ], [ 115, 116 ], [ 278, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 119, 121 ], [ 117, 122 ], [ 122, 123 ], [ 122, 124 ], [ 117, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 127, 131 ], [ 131, 132 ], [ 131, 133 ], [ 125, 134 ], [ 134, 135 ], [ 117, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 140, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 139, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 149, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 138, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 117, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 168, 170 ], [ 167, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 166, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 179, 180 ], [ 180, 181 ], [ 176, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 165, 187 ], [ 187, 188 ], [ 188, 189 ], [ 189, 190 ], [ 188, 191 ], [ 117, 192 ], [ 192, 193 ], [ 192, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 196, 199 ], [ 199, 200 ], [ 117, 201 ], [ 201, 202 ], [ 201, 203 ], [ 203, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 205, 208 ], [ 208, 209 ], [ 117, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 213, 214 ], [ 214, 215 ], [ 215, 216 ], [ 214, 217 ], [ 217, 218 ], [ 117, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 221, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 228, 230 ], [ 226, 231 ], [ 231, 232 ], [ 231, 233 ], [ 226, 234 ], [ 234, 235 ], [ 235, 236 ], [ 226, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 238, 242 ], [ 242, 243 ], [ 221, 244 ], [ 244, 245 ], [ 219, 246 ], [ 246, 247 ], [ 117, 248 ], [ 248, 249 ], [ 248, 250 ], [ 250, 251 ], [ 251, 252 ], [ 251, 253 ], [ 250, 255 ], [ 255, 256 ], [ 256, 257 ], [ 257, 258 ], [ 257, 259 ], [ 255, 260 ], [ 260, 261 ], [ 260, 262 ], [ 255, 263 ], [ 263, 264 ], [ 264, 265 ], [ 255, 266 ], [ 266, 267 ], [ 267, 268 ], [ 268, 269 ], [ 268, 270 ], [ 267, 271 ], [ 271, 272 ], [ 250, 273 ], [ 273, 274 ], [ 248, 275 ], [ 275, 276 ], [ 0, 277 ], [ 277, 278 ], [ 277, 279 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tMap<Integer,Integer> map = new HashMap<>();\n\t\tfor(int i = 0; i < n-1; 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\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\t\n\tstatic class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tMap<Integer,Integer> map = new HashMap<>();\n\t\tfor(int i = 0; i < n-1; 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\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\t\n\tstatic class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tMap<Integer,Integer> map = new HashMap<>();\n\t\tfor(int i = 0; i < n-1; 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\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\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tMap<Integer,Integer> map = new HashMap<>();\n\t\tfor(int i = 0; i < n-1; 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\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}", "FastScanner sc = new FastScanner(System.in);", "sc", "new FastScanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "Map<Integer,Integer> map = new HashMap<>();", "map", "new HashMap<>()", "for(int i = 0; i < n-1; 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 = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "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", "static class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}", "FastScanner", "private BufferedReader reader = null;", "reader", "null", "private StringTokenizer tokenizer = null;", "tokenizer", "null", "public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }", "FastScanner", "{\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }", "reader = new BufferedReader(new InputStreamReader(in))", "reader", "new BufferedReader(new InputStreamReader(in))", "tokenizer = null", "tokenizer", "null", "InputStream in", "in", "public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }", "next", "{\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }", "if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }", "try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }", "catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }", "IOException e", "{\n\t throw new RuntimeException(e);\n\t }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t }", "tokenizer = new StringTokenizer(reader.readLine())", "tokenizer", "new StringTokenizer(reader.readLine())", "return tokenizer.nextToken();", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }", "nextLine", "{\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }", "if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }", "try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }", "catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }", "IOException e", "{\n\t throw new RuntimeException(e);\n\t }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t return reader.readLine();\n\t }", "return reader.readLine();", "reader.readLine()", "reader.readLine", "reader", "return tokenizer.nextToken(\"\\n\");", "tokenizer.nextToken(\"\\n\")", "tokenizer.nextToken", "tokenizer", "\"\\n\"", "public long nextLong() {\n\t return Long.parseLong(next());\n\t }", "nextLong", "{\n\t return Long.parseLong(next());\n\t }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public int nextInt() {\n\t return Integer.parseInt(next());\n\t }", "nextInt", "{\n\t return Integer.parseInt(next());\n\t }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }", "nextDouble", "{\n\t return Double.parseDouble(next());\n\t }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }", "nextIntArray", "{\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }", "int[] a = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++)\n\t a[i] = nextInt();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = nextInt();", "a[i] = nextInt()", "a[i]", "a", "i", "nextInt()", "nextInt", "return a;", "a", "int n", "n", "public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }", "nextLongArray", "{\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }", "long[] a = new long[n];", "a", "new long[n]", "n", "for (int i = 0; i < n; i++)\n\t a[i] = nextLong();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = nextLong();", "a[i] = nextLong()", "a[i]", "a", "i", "nextLong()", "nextLong", "return a;", "a", "int n", "n", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tMap<Integer,Integer> map = new HashMap<>();\n\t\tfor(int i = 0; i < n-1; 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\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\t\n\tstatic class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tMap<Integer,Integer> map = new HashMap<>();\n\t\tfor(int i = 0; i < n-1; 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\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\t\n\tstatic class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { FastScanner sc = new FastScanner(System.in); int n = sc.nextInt(); Map<Integer,Integer> map = new HashMap<>(); for(int i = 0; i < n-1; 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); } } } static class FastScanner { private BufferedReader reader = null; private StringTokenizer tokenizer = null; public FastScanner(InputStream in) { reader = new BufferedReader(new InputStreamReader(in)); tokenizer = null; } public String next() { if (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public String nextLine() { if (tokenizer == null || !tokenizer.hasMoreTokens()) { try { return reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken("\n"); } public long nextLong() { return Long.parseLong(next()); } public int nextInt() { return Integer.parseInt(next()); } public double nextDouble() { return Double.parseDouble(next()); } public int[] nextIntArray(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = nextInt(); return a; } public long[] nextLongArray(int n) { long[] a = new long[n]; for (int i = 0; i < n; i++) a[i] = nextLong(); return a; } } }
[ 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, 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, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 90, 8 ], [ 90, 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 ], [ 36, 40 ], [ 11, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 41, 51 ], [ 51, 52 ], [ 52, 53 ], [ 41, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 55, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 61, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 65, 70 ], [ 11, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 71, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 9, 87 ], [ 87, 88 ], [ 0, 89 ], [ 89, 90 ], [ 89, 91 ] ]
[ "import java.util.Scanner;\nimport java.util.TreeMap;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tTreeMap<Integer, Integer> a = new TreeMap<>();\n\t\t\n\t\tfor(int i =1; i <= n; i++) {\n\t\t\ta.put(i, 0);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tint key = sc.nextInt();\n\t\t\ta.put(key,a.get(key)+1);\n\t\t}\n\n\t\tfor (Integer key : a.keySet()) {\n\t\t\tSystem.out.println(a.get(key));\n\t\t}\n\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.TreeMap;", "TreeMap", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tTreeMap<Integer, Integer> a = new TreeMap<>();\n\t\t\n\t\tfor(int i =1; i <= n; i++) {\n\t\t\ta.put(i, 0);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tint key = sc.nextInt();\n\t\t\ta.put(key,a.get(key)+1);\n\t\t}\n\n\t\tfor (Integer key : a.keySet()) {\n\t\t\tSystem.out.println(a.get(key));\n\t\t}\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tTreeMap<Integer, Integer> a = new TreeMap<>();\n\t\t\n\t\tfor(int i =1; i <= n; i++) {\n\t\t\ta.put(i, 0);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tint key = sc.nextInt();\n\t\t\ta.put(key,a.get(key)+1);\n\t\t}\n\n\t\tfor (Integer key : a.keySet()) {\n\t\t\tSystem.out.println(a.get(key));\n\t\t}\n\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tTreeMap<Integer, Integer> a = new TreeMap<>();\n\t\t\n\t\tfor(int i =1; i <= n; i++) {\n\t\t\ta.put(i, 0);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tint key = sc.nextInt();\n\t\t\ta.put(key,a.get(key)+1);\n\t\t}\n\n\t\tfor (Integer key : a.keySet()) {\n\t\t\tSystem.out.println(a.get(key));\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", "TreeMap<Integer, Integer> a = new TreeMap<>();", "a", "new TreeMap<>()", "for(int i =1; i <= n; i++) {\n\t\t\ta.put(i, 0);\n\t\t}", "int i =1;", "int i =1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\ta.put(i, 0);\n\t\t}", "{\n\t\t\ta.put(i, 0);\n\t\t}", "a.put(i, 0)", "a.put", "a", "i", "0", "for(int i = 0; i < n - 1; i++) {\n\t\t\tint key = sc.nextInt();\n\t\t\ta.put(key,a.get(key)+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 key = sc.nextInt();\n\t\t\ta.put(key,a.get(key)+1);\n\t\t}", "{\n\t\t\tint key = sc.nextInt();\n\t\t\ta.put(key,a.get(key)+1);\n\t\t}", "int key = sc.nextInt();", "key", "sc.nextInt()", "sc.nextInt", "sc", "a.put(key,a.get(key)+1)", "a.put", "a", "key", "a.get(key)+1", "a.get(key)", "a.get", "a", "key", "1", "for (Integer key : a.keySet()) {\n\t\t\tSystem.out.println(a.get(key));\n\t\t}", "Integer key", "a.keySet()", "a.keySet", "a", "{\n\t\t\tSystem.out.println(a.get(key));\n\t\t}", "{\n\t\t\tSystem.out.println(a.get(key));\n\t\t}", "System.out.println(a.get(key))", "System.out.println", "System.out", "System", "System.out", "a.get(key)", "a.get", "a", "key", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tTreeMap<Integer, Integer> a = new TreeMap<>();\n\t\t\n\t\tfor(int i =1; i <= n; i++) {\n\t\t\ta.put(i, 0);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tint key = sc.nextInt();\n\t\t\ta.put(key,a.get(key)+1);\n\t\t}\n\n\t\tfor (Integer key : a.keySet()) {\n\t\t\tSystem.out.println(a.get(key));\n\t\t}\n\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\t\n\t\tTreeMap<Integer, Integer> a = new TreeMap<>();\n\t\t\n\t\tfor(int i =1; i <= n; i++) {\n\t\t\ta.put(i, 0);\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < n - 1; i++) {\n\t\t\tint key = sc.nextInt();\n\t\t\ta.put(key,a.get(key)+1);\n\t\t}\n\n\t\tfor (Integer key : a.keySet()) {\n\t\t\tSystem.out.println(a.get(key));\n\t\t}\n\n\t}\n}", "Main" ]
import java.util.Scanner; import java.util.TreeMap; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); TreeMap<Integer, Integer> a = new TreeMap<>(); for(int i =1; i <= n; i++) { a.put(i, 0); } for(int i = 0; i < n - 1; i++) { int key = sc.nextInt(); a.put(key,a.get(key)+1); } for (Integer key : a.keySet()) { System.out.println(a.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, 13, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 17, 40, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 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 ], [ 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 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 57, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 6, 66 ], [ 66, 67 ], [ 0, 68 ], [ 68, 69 ], [ 68, 70 ] ]
[ "\nimport java.util.*;\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[] ans = new int[n];\n for(int i = 1; i < n; i++) { \n int a = sc.nextInt() - 1;\n ans[a]++;\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 sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] ans = new int[n];\n for(int i = 1; i < n; i++) { \n int a = sc.nextInt() - 1;\n ans[a]++;\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 sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] ans = new int[n];\n for(int i = 1; i < n; i++) { \n int a = sc.nextInt() - 1;\n ans[a]++;\n }\n for(int i = 0; i < n; i++) {\n System.out.println(ans[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] ans = new int[n];\n for(int i = 1; i < n; i++) { \n int a = sc.nextInt() - 1;\n ans[a]++;\n }\n for(int i = 0; i < n; i++) {\n System.out.println(ans[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[] ans = new int[n];", "ans", "new int[n]", "n", "for(int i = 1; i < n; i++) { \n int a = sc.nextInt() - 1;\n ans[a]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{ \n int a = sc.nextInt() - 1;\n ans[a]++;\n }", "{ \n int a = sc.nextInt() - 1;\n ans[a]++;\n }", "int a = sc.nextInt() - 1;", "a", "sc.nextInt() - 1", "sc.nextInt()", "sc.nextInt", "sc", "1", "ans[a]++", "ans[a]", "ans", "a", "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 sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] ans = new int[n];\n for(int i = 1; i < n; i++) { \n int a = sc.nextInt() - 1;\n ans[a]++;\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 sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] ans = new int[n];\n for(int i = 1; i < n; i++) { \n int a = sc.nextInt() - 1;\n ans[a]++;\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 sc = new Scanner(System.in); int n = sc.nextInt(); int[] ans = new int[n]; for(int i = 1; i < n; i++) { int a = sc.nextInt() - 1; ans[a]++; } for(int i = 0; i < n; i++) { System.out.println(ans[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 41, 13, 20, 2, 18, 13, 13, 17, 41, 13, 20, 2, 13, 17, 41, 13, 17, 28, 13, 13, 30, 30, 40, 18, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 2, 18, 13, 13, 17, 4, 18, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 103, 5 ], [ 103, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 37 ], [ 37, 38 ], [ 37, 39 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 8, 45 ], [ 45, 46 ], [ 45, 47 ], [ 48, 49 ], [ 48, 50 ], [ 8, 51 ], [ 51, 52 ], [ 51, 53 ], [ 8, 54 ], [ 54, 55 ], [ 54, 56 ], [ 54, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 66, 76 ], [ 76, 77 ], [ 77, 78 ], [ 66, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 8, 89 ], [ 89, 90 ], [ 90, 91 ], [ 8, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 97, 98 ], [ 98, 99 ], [ 6, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tInteger N = Integer.valueOf(l);\n\t\tl = sc.nextLine();\n\t\tString[] arr = l.split(\" \");\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint[] boss = new int[arr.length + 1];\n\t\tint[] result = new int[N+1];\n\t\t\n\t\tint count = 1;\n\t\tfor(String s : arr) {\n\t\t\tresult[Integer.valueOf(s)]++;\n\t\t\t\n\t\t}\n\t\tfor (int i = 1; i < result.length; i++) {\n\t\t\tsb.append(result[i]+\"\\n\");\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(sb.toString());\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tInteger N = Integer.valueOf(l);\n\t\tl = sc.nextLine();\n\t\tString[] arr = l.split(\" \");\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint[] boss = new int[arr.length + 1];\n\t\tint[] result = new int[N+1];\n\t\t\n\t\tint count = 1;\n\t\tfor(String s : arr) {\n\t\t\tresult[Integer.valueOf(s)]++;\n\t\t\t\n\t\t}\n\t\tfor (int i = 1; i < result.length; i++) {\n\t\t\tsb.append(result[i]+\"\\n\");\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(sb.toString());\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tInteger N = Integer.valueOf(l);\n\t\tl = sc.nextLine();\n\t\tString[] arr = l.split(\" \");\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint[] boss = new int[arr.length + 1];\n\t\tint[] result = new int[N+1];\n\t\t\n\t\tint count = 1;\n\t\tfor(String s : arr) {\n\t\t\tresult[Integer.valueOf(s)]++;\n\t\t\t\n\t\t}\n\t\tfor (int i = 1; i < result.length; i++) {\n\t\t\tsb.append(result[i]+\"\\n\");\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(sb.toString());\n\t}", "main", "{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tInteger N = Integer.valueOf(l);\n\t\tl = sc.nextLine();\n\t\tString[] arr = l.split(\" \");\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint[] boss = new int[arr.length + 1];\n\t\tint[] result = new int[N+1];\n\t\t\n\t\tint count = 1;\n\t\tfor(String s : arr) {\n\t\t\tresult[Integer.valueOf(s)]++;\n\t\t\t\n\t\t}\n\t\tfor (int i = 1; i < result.length; i++) {\n\t\t\tsb.append(result[i]+\"\\n\");\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(sb.toString());\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String l = sc.nextLine();", "l", "sc.nextLine()", "sc.nextLine", "sc", "Integer N = Integer.valueOf(l);", "N", "Integer.valueOf(l)", "Integer.valueOf", "Integer", "l", "l = sc.nextLine()", "l", "sc.nextLine()", "sc.nextLine", "sc", "String[] arr = l.split(\" \");", "arr", "l.split(\" \")", "l.split", "l", "\" \"", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "int[] boss = new int[arr.length + 1];", "boss", "new int[arr.length + 1]", "arr.length + 1", "arr.length", "arr", "arr.length", "1", "int[] result = new int[N+1];", "result", "new int[N+1]", "N+1", "N", "1", "int count = 1;", "count", "1", "for(String s : arr) {\n\t\t\tresult[Integer.valueOf(s)]++;\n\t\t\t\n\t\t}", "String s", "arr", "{\n\t\t\tresult[Integer.valueOf(s)]++;\n\t\t\t\n\t\t}", "{\n\t\t\tresult[Integer.valueOf(s)]++;\n\t\t\t\n\t\t}", "result[Integer.valueOf(s)]++", "result[Integer.valueOf(s)]", "result", "Integer.valueOf(s)", "Integer.valueOf", "Integer", "s", "for (int i = 1; i < result.length; i++) {\n\t\t\tsb.append(result[i]+\"\\n\");\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < result.length", "i", "result.length", "result", "result.length", "i++", "i++", "i", "{\n\t\t\tsb.append(result[i]+\"\\n\");\n\t\t}", "{\n\t\t\tsb.append(result[i]+\"\\n\");\n\t\t}", "sb.append(result[i]+\"\\n\")", "sb.append", "sb", "result[i]+\"\\n\"", "result[i]", "result", "i", "\"\\n\"", "sc.close()", "sc.close", "sc", "System.out.println(sb.toString())", "System.out.println", "System.out", "System", "System.out", "sb.toString()", "sb.toString", "sb", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tInteger N = Integer.valueOf(l);\n\t\tl = sc.nextLine();\n\t\tString[] arr = l.split(\" \");\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint[] boss = new int[arr.length + 1];\n\t\tint[] result = new int[N+1];\n\t\t\n\t\tint count = 1;\n\t\tfor(String s : arr) {\n\t\t\tresult[Integer.valueOf(s)]++;\n\t\t\t\n\t\t}\n\t\tfor (int i = 1; i < result.length; i++) {\n\t\t\tsb.append(result[i]+\"\\n\");\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(sb.toString());\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString l = sc.nextLine();\n\t\tInteger N = Integer.valueOf(l);\n\t\tl = sc.nextLine();\n\t\tString[] arr = l.split(\" \");\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint[] boss = new int[arr.length + 1];\n\t\tint[] result = new int[N+1];\n\t\t\n\t\tint count = 1;\n\t\tfor(String s : arr) {\n\t\t\tresult[Integer.valueOf(s)]++;\n\t\t\t\n\t\t}\n\t\tfor (int i = 1; i < result.length; i++) {\n\t\t\tsb.append(result[i]+\"\\n\");\n\t\t}\n\t\tsc.close();\n\t\tSystem.out.println(sb.toString());\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String l = sc.nextLine(); Integer N = Integer.valueOf(l); l = sc.nextLine(); String[] arr = l.split(" "); StringBuilder sb = new StringBuilder(); int[] boss = new int[arr.length + 1]; int[] result = new int[N+1]; int count = 1; for(String s : arr) { result[Integer.valueOf(s)]++; } for (int i = 1; i < result.length; i++) { sb.append(result[i]+"\n"); } sc.close(); System.out.println(sb.toString()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 17, 40, 18, 13, 13, 28, 13, 13, 30, 30, 4, 18, 13, 13, 12, 13, 30, 0, 13, 20, 0, 13, 20, 4, 18, 20, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 143, 8 ], [ 143, 9 ], [ 9, 10 ], [ 143, 11 ], [ 11, 12 ], [ 143, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 15, 21 ], [ 21, 22 ], [ 21, 23 ], [ 15, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 40, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 15, 49 ], [ 49, 50 ], [ 49, 51 ], [ 49, 52 ], [ 53, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 143, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 64, 65 ], [ 64, 66 ], [ 60, 67 ], [ 67, 68 ], [ 68, 69 ], [ 60, 70 ], [ 70, 71 ], [ 71, 72 ], [ 58, 73 ], [ 73, 74 ], [ 143, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 75, 79 ], [ 79, 80 ], [ 75, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 75, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 90, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 100, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 89, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 75, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 122, 123 ], [ 75, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 131, 132 ], [ 75, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 137, 140 ], [ 140, 141 ], [ 0, 142 ], [ 142, 143 ], [ 142, 144 ] ]
[ "\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n private void solve() {\n int n = sc.nextInt();\n int[] ans = new int[n];\n\n for (int i = 1; i < n; i++) {\n int p = sc.nextInt() - 1;\n ++ans[p];\n }\n\n for (int x : ans) {\n out.println(x);\n }\n }\n\n private static PrintWriter out;\n private static MyScanner sc;\n\n private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n private void solve() {\n int n = sc.nextInt();\n int[] ans = new int[n];\n\n for (int i = 1; i < n; i++) {\n int p = sc.nextInt() - 1;\n ++ans[p];\n }\n\n for (int x : ans) {\n out.println(x);\n }\n }\n\n private static PrintWriter out;\n private static MyScanner sc;\n\n private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }\n}", "Main", "private static PrintWriter out;", "out", "private static MyScanner sc;", "sc", "private void solve() {\n int n = sc.nextInt();\n int[] ans = new int[n];\n\n for (int i = 1; i < n; i++) {\n int p = sc.nextInt() - 1;\n ++ans[p];\n }\n\n for (int x : ans) {\n out.println(x);\n }\n }", "solve", "{\n int n = sc.nextInt();\n int[] ans = new int[n];\n\n for (int i = 1; i < n; i++) {\n int p = sc.nextInt() - 1;\n ++ans[p];\n }\n\n for (int x : ans) {\n out.println(x);\n }\n }", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] ans = new int[n];", "ans", "new int[n]", "n", "for (int i = 1; i < n; i++) {\n int p = sc.nextInt() - 1;\n ++ans[p];\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n int p = sc.nextInt() - 1;\n ++ans[p];\n }", "{\n int p = sc.nextInt() - 1;\n ++ans[p];\n }", "int p = sc.nextInt() - 1;", "p", "sc.nextInt() - 1", "sc.nextInt()", "sc.nextInt", "sc", "1", "++ans[p]", "ans[p]", "ans", "p", "for (int x : ans) {\n out.println(x);\n }", "int x", "ans", "{\n out.println(x);\n }", "{\n out.println(x);\n }", "out.println(x)", "out.println", "out", "x", "public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }", "main", "{\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }", "out = new PrintWriter(new BufferedOutputStream(System.out))", "out", "new PrintWriter(new BufferedOutputStream(System.out))", "sc = new MyScanner()", "sc", "new MyScanner()", "new Main().solve()", "new Main().solve", "new Main()", "out.close()", "out.close", "out", "String[] args", "args", "private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }", "MyScanner", "BufferedReader br;", "br", "StringTokenizer st;", "st", "private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "MyScanner", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public class Main {\n private void solve() {\n int n = sc.nextInt();\n int[] ans = new int[n];\n\n for (int i = 1; i < n; i++) {\n int p = sc.nextInt() - 1;\n ++ans[p];\n }\n\n for (int x : ans) {\n out.println(x);\n }\n }\n\n private static PrintWriter out;\n private static MyScanner sc;\n\n private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }\n}", "public class Main {\n private void solve() {\n int n = sc.nextInt();\n int[] ans = new int[n];\n\n for (int i = 1; i < n; i++) {\n int p = sc.nextInt() - 1;\n ++ans[p];\n }\n\n for (int x : ans) {\n out.println(x);\n }\n }\n\n private static PrintWriter out;\n private static MyScanner sc;\n\n private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { private void solve() { int n = sc.nextInt(); int[] ans = new int[n]; for (int i = 1; i < n; i++) { int p = sc.nextInt() - 1; ++ans[p]; } for (int x : ans) { out.println(x); } } private static PrintWriter out; private static MyScanner sc; private static class MyScanner { BufferedReader br; StringTokenizer st; private MyScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } } public static void main(String[] args) { out = new PrintWriter(new BufferedOutputStream(System.out)); sc = new MyScanner(); new Main().solve(); out.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 61, 8 ], [ 61, 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 ], [ 11, 47 ], [ 47, 48 ], [ 47, 49 ], [ 47, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 9, 58 ], [ 58, 59 ], [ 0, 60 ], [ 60, 61 ], [ 60, 62 ] ]
[ "import java.io.*;\nimport 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[] ary=new int[n];\n for(int i=0;i<n-1;i++){\n ary[sc.nextInt()-1]++;\n }\n for(int e : ary){\n System.out.println(e);\n }\n }\n}", "import java.io.*;", "io.*", "java", "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[] ary=new int[n];\n for(int i=0;i<n-1;i++){\n ary[sc.nextInt()-1]++;\n }\n for(int e : ary){\n System.out.println(e);\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[] ary=new int[n];\n for(int i=0;i<n-1;i++){\n ary[sc.nextInt()-1]++;\n }\n for(int e : ary){\n System.out.println(e);\n }\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int[] ary=new int[n];\n for(int i=0;i<n-1;i++){\n ary[sc.nextInt()-1]++;\n }\n for(int e : ary){\n System.out.println(e);\n }\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] ary=new int[n];", "ary", "new int[n]", "n", "for(int i=0;i<n-1;i++){\n ary[sc.nextInt()-1]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n ary[sc.nextInt()-1]++;\n }", "{\n ary[sc.nextInt()-1]++;\n }", "ary[sc.nextInt()-1]++", "ary[sc.nextInt()-1]", "ary", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "for(int e : ary){\n System.out.println(e);\n }", "int e", "ary", "{\n System.out.println(e);\n }", "{\n System.out.println(e);\n }", "System.out.println(e)", "System.out.println", "System.out", "System", "System.out", "e", "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[] ary=new int[n];\n for(int i=0;i<n-1;i++){\n ary[sc.nextInt()-1]++;\n }\n for(int e : ary){\n System.out.println(e);\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[] ary=new int[n];\n for(int i=0;i<n-1;i++){\n ary[sc.nextInt()-1]++;\n }\n for(int e : ary){\n System.out.println(e);\n }\n }\n}", "Main" ]
import java.io.*; 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[] ary=new int[n]; for(int i=0;i<n-1;i++){ ary[sc.nextInt()-1]++; } for(int e : ary){ System.out.println(e); } } }
[ 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, 40, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13 ]
[ [ 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 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 11, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 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 ], [ 9, 70 ], [ 70, 71 ] ]
[ "import java.util.*;\nimport java.lang.*;\nclass Main {\n\tpublic static void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint t=sc.nextInt();\n\t\tint[] count=new int[t+1];\n\t\tfor (int i=2;i<t+1;i++) {\n\t\t\tcount[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i=1;i<t+1 ;i++ ) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "class Main {\n\tpublic static void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint t=sc.nextInt();\n\t\tint[] count=new int[t+1];\n\t\tfor (int i=2;i<t+1;i++) {\n\t\t\tcount[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i=1;i<t+1 ;i++ ) {\n\t\t\tSystem.out.println(count[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 t=sc.nextInt();\n\t\tint[] count=new int[t+1];\n\t\tfor (int i=2;i<t+1;i++) {\n\t\t\tcount[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i=1;i<t+1 ;i++ ) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint t=sc.nextInt();\n\t\tint[] count=new int[t+1];\n\t\tfor (int i=2;i<t+1;i++) {\n\t\t\tcount[sc.nextInt()]++;\n\t\t}\n\t\tfor (int i=1;i<t+1 ;i++ ) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}\n\t}", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int t=sc.nextInt();", "t", "sc.nextInt()", "sc.nextInt", "sc", "int[] count=new int[t+1];", "count", "new int[t+1]", "t+1", "t", "1", "for (int i=2;i<t+1;i++) {\n\t\t\tcount[sc.nextInt()]++;\n\t\t}", "int i=2;", "int i=2;", "i", "2", "i<t+1", "i", "t+1", "t", "1", "i++", "i++", "i", "{\n\t\t\tcount[sc.nextInt()]++;\n\t\t}", "{\n\t\t\tcount[sc.nextInt()]++;\n\t\t}", "count[sc.nextInt()]++", "count[sc.nextInt()]", "count", "sc.nextInt()", "sc.nextInt", "sc", "for (int i=1;i<t+1 ;i++ ) {\n\t\t\tSystem.out.println(count[i]);\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<t+1", "i", "t+1", "t", "1", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(count[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(count[i]);\n\t\t}", "System.out.println(count[i])", "System.out.println", "System.out", "System", "System.out", "count[i]", "count", "i", "String args[]", "args" ]
import java.util.*; import java.lang.*; class Main { public static void main(String args[]){ Scanner sc=new Scanner(System.in); int t=sc.nextInt(); int[] count=new int[t+1]; for (int i=2;i<t+1;i++) { count[sc.nextInt()]++; } for (int i=1;i<t+1 ;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, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 18, 13, 13, 17, 4, 18, 13, 18, 13, 13, 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 ], [ 123, 5 ], [ 123, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 23, 33 ], [ 33, 34 ], [ 34, 35 ], [ 23, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 8, 45 ], [ 45, 46 ], [ 45, 47 ], [ 8, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 48, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 61, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 66, 76 ], [ 76, 77 ], [ 77, 78 ], [ 66, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 83, 90 ], [ 80, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 91, 97 ], [ 8, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 103, 104 ], [ 103, 105 ], [ 98, 106 ], [ 106, 107 ], [ 107, 108 ], [ 98, 109 ], [ 110, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 6, 120 ], [ 120, 121 ], [ 0, 122 ], [ 122, 123 ], [ 122, 124 ] ]
[ "//package atcoder;\n \nimport java.util.*;\n \npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n int old = map.get(A[j])+1;\n\t\t\tmap.put(A[j],old);\n\t\t}\n\t\tfor(int i=1;i<=N;i++){\n System.out.println(map.get(i));\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n int old = map.get(A[j])+1;\n\t\t\tmap.put(A[j],old);\n\t\t}\n\t\tfor(int i=1;i<=N;i++){\n System.out.println(map.get(i));\n }\n }\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n int old = map.get(A[j])+1;\n\t\t\tmap.put(A[j],old);\n\t\t}\n\t\tfor(int i=1;i<=N;i++){\n System.out.println(map.get(i));\n }\n }", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n int old = map.get(A[j])+1;\n\t\t\tmap.put(A[j],old);\n\t\t}\n\t\tfor(int i=1;i<=N;i++){\n System.out.println(map.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", "int A[] = new int [N-1];", "A", "new int [N-1]", "N-1", "N", "1", "for(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n\t\t\tA[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tA[i] = sc.nextInt();\n\t\t}", "A[i] = sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "Map<Integer,Integer> map = new HashMap<Integer,Integer>();", "map", "new HashMap<Integer,Integer>()", "for(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=N", "i", "N", "i++", "i++", "i", "{\n\t\t\tmap.put(i,0);\n\t\t}", "{\n\t\t\tmap.put(i,0);\n\t\t}", "map.put(i,0)", "map.put", "map", "i", "0", "for(int j=0;j<N-1;j++) {\n int old = map.get(A[j])+1;\n\t\t\tmap.put(A[j],old);\n\t\t}", "int j=0;", "int j=0;", "j", "0", "j<N-1", "j", "N-1", "N", "1", "j++", "j++", "j", "{\n int old = map.get(A[j])+1;\n\t\t\tmap.put(A[j],old);\n\t\t}", "{\n int old = map.get(A[j])+1;\n\t\t\tmap.put(A[j],old);\n\t\t}", "int old = map.get(A[j])+1;", "old", "map.get(A[j])+1", "map.get(A[j])", "map.get", "map", "A[j]", "A", "j", "1", "map.put(A[j],old)", "map.put", "map", "A[j]", "A", "j", "old", "for(int i=1;i<=N;i++){\n System.out.println(map.get(i));\n }", "int i=1;", "int i=1;", "i", "1", "i<=N", "i", "N", "i++", "i++", "i", "{\n System.out.println(map.get(i));\n }", "{\n System.out.println(map.get(i));\n }", "System.out.println(map.get(i))", "System.out.println", "System.out", "System", "System.out", "map.get(i)", "map.get", "map", "i", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n int old = map.get(A[j])+1;\n\t\t\tmap.put(A[j],old);\n\t\t}\n\t\tfor(int i=1;i<=N;i++){\n System.out.println(map.get(i));\n }\n }\n}", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A[] = new int [N-1];\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tMap<Integer,Integer> map = new HashMap<Integer,Integer>();\n\t\tfor(int i=1;i<=N;i++) {\n\t\t\tmap.put(i,0);\n\t\t}\n\t\tfor(int j=0;j<N-1;j++) {\n int old = map.get(A[j])+1;\n\t\t\tmap.put(A[j],old);\n\t\t}\n\t\tfor(int i=1;i<=N;i++){\n System.out.println(map.get(i));\n }\n }\n}", "Main" ]
//package atcoder; import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int A[] = new int [N-1]; for(int i=0;i<N-1;i++) { A[i] = sc.nextInt(); } Map<Integer,Integer> map = new HashMap<Integer,Integer>(); for(int i=1;i<=N;i++) { map.put(i,0); } for(int j=0;j<N-1;j++) { int old = map.get(A[j])+1; map.put(A[j],old); } for(int i=1;i<=N;i++){ System.out.println(map.get(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, 40, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 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 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 6, 65 ], [ 65, 66 ], [ 0, 67 ], [ 67, 68 ], [ 67, 69 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] bossInfo = new int[n +1];\n\t\tfor(int i =0;i <n-1;i++) {\n\t\t\tbossInfo[sc.nextInt()]++;\n\t\t}\n\t\tfor(int i =1;i <=n;i++) {\n\t\t\tSystem.out.println(bossInfo[i]);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] bossInfo = new int[n +1];\n\t\tfor(int i =0;i <n-1;i++) {\n\t\t\tbossInfo[sc.nextInt()]++;\n\t\t}\n\t\tfor(int i =1;i <=n;i++) {\n\t\t\tSystem.out.println(bossInfo[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[] bossInfo = new int[n +1];\n\t\tfor(int i =0;i <n-1;i++) {\n\t\t\tbossInfo[sc.nextInt()]++;\n\t\t}\n\t\tfor(int i =1;i <=n;i++) {\n\t\t\tSystem.out.println(bossInfo[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] bossInfo = new int[n +1];\n\t\tfor(int i =0;i <n-1;i++) {\n\t\t\tbossInfo[sc.nextInt()]++;\n\t\t}\n\t\tfor(int i =1;i <=n;i++) {\n\t\t\tSystem.out.println(bossInfo[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[] bossInfo = new int[n +1];", "bossInfo", "new int[n +1]", "n +1", "n", "1", "for(int i =0;i <n-1;i++) {\n\t\t\tbossInfo[sc.nextInt()]++;\n\t\t}", "int i =0;", "int i =0;", "i", "0", "i <n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n\t\t\tbossInfo[sc.nextInt()]++;\n\t\t}", "{\n\t\t\tbossInfo[sc.nextInt()]++;\n\t\t}", "bossInfo[sc.nextInt()]++", "bossInfo[sc.nextInt()]", "bossInfo", "sc.nextInt()", "sc.nextInt", "sc", "for(int i =1;i <=n;i++) {\n\t\t\tSystem.out.println(bossInfo[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(bossInfo[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(bossInfo[i]);\n\t\t}", "System.out.println(bossInfo[i])", "System.out.println", "System.out", "System", "System.out", "bossInfo[i]", "bossInfo", "i", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] bossInfo = new int[n +1];\n\t\tfor(int i =0;i <n-1;i++) {\n\t\t\tbossInfo[sc.nextInt()]++;\n\t\t}\n\t\tfor(int i =1;i <=n;i++) {\n\t\t\tSystem.out.println(bossInfo[i]);\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] bossInfo = new int[n +1];\n\t\tfor(int i =0;i <n-1;i++) {\n\t\t\tbossInfo[sc.nextInt()]++;\n\t\t}\n\t\tfor(int i =1;i <=n;i++) {\n\t\t\tSystem.out.println(bossInfo[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] bossInfo = new int[n +1]; for(int i =0;i <n-1;i++) { bossInfo[sc.nextInt()]++; } for(int i =1;i <=n;i++) { System.out.println(bossInfo[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 0, 13, 4, 18, 13, 41, 13, 20, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 17, 0, 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 ], [ 80, 5 ], [ 80, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 24 ], [ 24, 25 ], [ 25, 26 ], [ 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 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 41, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 8, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 6, 77 ], [ 77, 78 ], [ 0, 79 ], [ 79, 80 ], [ 79, 81 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = 0;\n\t\tn = sc.nextInt();\n\t\tint [] array = new int [n];\n\n\t\tsc.nextLine();\n for (int i = 0; i < n-1; i++) {\n \tint tmp = 0;\n \ttmp = sc.nextInt();\n \tarray[tmp-1]++;\n }\n for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(array[i]);\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 n = 0;\n\t\tn = sc.nextInt();\n\t\tint [] array = new int [n];\n\n\t\tsc.nextLine();\n for (int i = 0; i < n-1; i++) {\n \tint tmp = 0;\n \ttmp = sc.nextInt();\n \tarray[tmp-1]++;\n }\n for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(array[i]);\n }\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = 0;\n\t\tn = sc.nextInt();\n\t\tint [] array = new int [n];\n\n\t\tsc.nextLine();\n for (int i = 0; i < n-1; i++) {\n \tint tmp = 0;\n \ttmp = sc.nextInt();\n \tarray[tmp-1]++;\n }\n for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(array[i]);\n }\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = 0;\n\t\tn = sc.nextInt();\n\t\tint [] array = new int [n];\n\n\t\tsc.nextLine();\n for (int i = 0; i < n-1; i++) {\n \tint tmp = 0;\n \ttmp = sc.nextInt();\n \tarray[tmp-1]++;\n }\n for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(array[i]);\n }\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = 0;", "n", "0", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "int [] array = new int [n];", "array", "new int [n]", "n", "sc.nextLine()", "sc.nextLine", "sc", "for (int i = 0; i < n-1; i++) {\n \tint tmp = 0;\n \ttmp = sc.nextInt();\n \tarray[tmp-1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n \tint tmp = 0;\n \ttmp = sc.nextInt();\n \tarray[tmp-1]++;\n }", "{\n \tint tmp = 0;\n \ttmp = sc.nextInt();\n \tarray[tmp-1]++;\n }", "int tmp = 0;", "tmp", "0", "tmp = sc.nextInt()", "tmp", "sc.nextInt()", "sc.nextInt", "sc", "array[tmp-1]++", "array[tmp-1]", "array", "tmp-1", "tmp", "1", "for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(array[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(array[i]);\n }", "{\n\t\t\tSystem.out.println(array[i]);\n }", "System.out.println(array[i])", "System.out.println", "System.out", "System", "System.out", "array[i]", "array", "i", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = 0;\n\t\tn = sc.nextInt();\n\t\tint [] array = new int [n];\n\n\t\tsc.nextLine();\n for (int i = 0; i < n-1; i++) {\n \tint tmp = 0;\n \ttmp = sc.nextInt();\n \tarray[tmp-1]++;\n }\n for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(array[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\tint n = 0;\n\t\tn = sc.nextInt();\n\t\tint [] array = new int [n];\n\n\t\tsc.nextLine();\n for (int i = 0; i < n-1; i++) {\n \tint tmp = 0;\n \ttmp = sc.nextInt();\n \tarray[tmp-1]++;\n }\n for (int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(array[i]);\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 n = 0; n = sc.nextInt(); int [] array = new int [n]; sc.nextLine(); for (int i = 0; i < n-1; i++) { int tmp = 0; tmp = sc.nextInt(); array[tmp-1]++; } for (int i = 0; i < n; 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, 17, 41, 13, 20, 2, 13, 17, 42, 4, 18, 13, 30, 40, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 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, 20 ], [ 20, 21 ], [ 20, 22 ], [ 23, 24 ], [ 23, 25 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 26, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 8, 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 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 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 ) throws Exception {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int No = 0;\n int[] buka = new int[N+1];\n while(sc.hasNext()){\n buka[sc.nextInt()]++;\n }\n for(int i = 1;i <= N;i++){\n System.out.println(buka[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 No = 0;\n int[] buka = new int[N+1];\n while(sc.hasNext()){\n buka[sc.nextInt()]++;\n }\n for(int i = 1;i <= N;i++){\n System.out.println(buka[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 No = 0;\n int[] buka = new int[N+1];\n while(sc.hasNext()){\n buka[sc.nextInt()]++;\n }\n for(int i = 1;i <= N;i++){\n System.out.println(buka[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int No = 0;\n int[] buka = new int[N+1];\n while(sc.hasNext()){\n buka[sc.nextInt()]++;\n }\n for(int i = 1;i <= N;i++){\n System.out.println(buka[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 No = 0;", "No", "0", "int[] buka = new int[N+1];", "buka", "new int[N+1]", "N+1", "N", "1", "while(sc.hasNext()){\n buka[sc.nextInt()]++;\n }", "sc.hasNext()", "sc.hasNext", "sc", "{\n buka[sc.nextInt()]++;\n }", "buka[sc.nextInt()]++", "buka[sc.nextInt()]", "buka", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 1;i <= N;i++){\n System.out.println(buka[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= N", "i", "N", "i++", "i++", "i", "{\n System.out.println(buka[i]);\n }", "{\n System.out.println(buka[i]);\n }", "System.out.println(buka[i])", "System.out.println", "System.out", "System", "System.out", "buka[i]", "buka", "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 No = 0;\n int[] buka = new int[N+1];\n while(sc.hasNext()){\n buka[sc.nextInt()]++;\n }\n for(int i = 1;i <= N;i++){\n System.out.println(buka[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 No = 0;\n int[] buka = new int[N+1];\n while(sc.hasNext()){\n buka[sc.nextInt()]++;\n }\n for(int i = 1;i <= N;i++){\n System.out.println(buka[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 No = 0; int[] buka = new int[N+1]; while(sc.hasNext()){ buka[sc.nextInt()]++; } for(int i = 1;i <= N;i++){ System.out.println(buka[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, 20, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 28, 13, 13, 30, 30, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 8, 2, 13, 17, 17, 2, 13, 17, 41, 13, 20, 13, 4, 18, 13, 13, 17, 28, 13, 4, 18, 13, 30, 30, 0, 18, 13, 2, 13, 17, 4, 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 ], [ 137, 11 ], [ 137, 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 ], [ 14, 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 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 56, 57 ], [ 57, 58 ], [ 14, 59 ], [ 59, 60 ], [ 59, 61 ], [ 14, 62 ], [ 62, 63 ], [ 62, 64 ], [ 62, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 66, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 73, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 84 ], [ 14, 85 ], [ 85, 86 ], [ 85, 87 ], [ 14, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 89, 93 ], [ 14, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 94, 99 ], [ 100, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 101, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 14, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 118, 120 ], [ 111, 121 ], [ 121, 122 ], [ 122, 123 ], [ 111, 124 ], [ 125, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 131, 132 ], [ 131, 133 ], [ 12, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "import java.util.*;\nimport java.lang.*;\nimport java.util.stream.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer[] a = new Integer[n - 1];\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n - 1; i++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n for (Integer temp : list) {\n Integer count = map.get(temp);\n map.put(temp, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[n];\n Arrays.fill(total, 0);\n for (Integer nKey : map.keySet())\n {\n total[nKey-1] = map.get(nKey);\n }\n\n for(int i = 0; i < total.length; i++) {\n System.out.println(total[i]);\n }\n }\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "import java.util.stream.*;", "stream.*", "java.util", "public class Main {\n\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer[] a = new Integer[n - 1];\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n - 1; i++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n for (Integer temp : list) {\n Integer count = map.get(temp);\n map.put(temp, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[n];\n Arrays.fill(total, 0);\n for (Integer nKey : map.keySet())\n {\n total[nKey-1] = map.get(nKey);\n }\n\n for(int i = 0; i < total.length; i++) {\n System.out.println(total[i]);\n }\n }\n}", "Main", "public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer[] a = new Integer[n - 1];\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n - 1; i++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n for (Integer temp : list) {\n Integer count = map.get(temp);\n map.put(temp, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[n];\n Arrays.fill(total, 0);\n for (Integer nKey : map.keySet())\n {\n total[nKey-1] = map.get(nKey);\n }\n\n for(int i = 0; i < total.length; i++) {\n System.out.println(total[i]);\n }\n }", "main", "{\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer[] a = new Integer[n - 1];\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n - 1; i++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n for (Integer temp : list) {\n Integer count = map.get(temp);\n map.put(temp, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[n];\n Arrays.fill(total, 0);\n for (Integer nKey : map.keySet())\n {\n total[nKey-1] = map.get(nKey);\n }\n\n for(int i = 0; i < total.length; i++) {\n System.out.println(total[i]);\n }\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "Integer n = Integer.parseInt(scanner.next());", "n", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "Integer[] a = new Integer[n - 1];", "a", "new Integer[n - 1]", "n - 1", "n", "1", "List<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "for (int i = 0; i < n - 1; i++) {\n list.add(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 list.add(Integer.parseInt(scanner.next()));\n }", "{\n list.add(Integer.parseInt(scanner.next()));\n }", "list.add(Integer.parseInt(scanner.next()))", "list.add", "list", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "Map<Integer, Integer> map = new HashMap<Integer, Integer>();", "map", "new HashMap<Integer, Integer>()", "for (Integer temp : list) {\n Integer count = map.get(temp);\n map.put(temp, (count == null) ? 1 : count + 1);\n }", "Integer temp", "list", "{\n Integer count = map.get(temp);\n map.put(temp, (count == null) ? 1 : count + 1);\n }", "{\n Integer count = map.get(temp);\n map.put(temp, (count == null) ? 1 : count + 1);\n }", "Integer count = map.get(temp);", "count", "map.get(temp)", "map.get", "map", "temp", "map.put(temp, (count == null) ? 1 : count + 1)", "map.put", "map", "temp", "(count == null) ? 1 : count + 1", "(count == null)", "count", "null", "1", "count + 1", "count", "1", "Integer[] total = new Integer[n];", "total", "new Integer[n]", "n", "Arrays.fill(total, 0)", "Arrays.fill", "Arrays", "total", "0", "for (Integer nKey : map.keySet())\n {\n total[nKey-1] = map.get(nKey);\n }", "Integer nKey", "map.keySet()", "map.keySet", "map", "{\n total[nKey-1] = map.get(nKey);\n }", "{\n total[nKey-1] = map.get(nKey);\n }", "total[nKey-1] = map.get(nKey)", "total[nKey-1]", "total", "nKey-1", "nKey", "1", "map.get(nKey)", "map.get", "map", "nKey", "for(int i = 0; i < total.length; i++) {\n System.out.println(total[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < total.length", "i", "total.length", "total", "total.length", "i++", "i++", "i", "{\n System.out.println(total[i]);\n }", "{\n System.out.println(total[i]);\n }", "System.out.println(total[i])", "System.out.println", "System.out", "System", "System.out", "total[i]", "total", "i", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer[] a = new Integer[n - 1];\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n - 1; i++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n for (Integer temp : list) {\n Integer count = map.get(temp);\n map.put(temp, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[n];\n Arrays.fill(total, 0);\n for (Integer nKey : map.keySet())\n {\n total[nKey-1] = map.get(nKey);\n }\n\n for(int i = 0; i < total.length; i++) {\n System.out.println(total[i]);\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer n = Integer.parseInt(scanner.next());\n Integer[] a = new Integer[n - 1];\n List<Integer> list = new ArrayList<Integer>();\n\n for (int i = 0; i < n - 1; i++) {\n list.add(Integer.parseInt(scanner.next()));\n }\n\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n for (Integer temp : list) {\n Integer count = map.get(temp);\n map.put(temp, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[n];\n Arrays.fill(total, 0);\n for (Integer nKey : map.keySet())\n {\n total[nKey-1] = map.get(nKey);\n }\n\n for(int i = 0; i < total.length; i++) {\n System.out.println(total[i]);\n }\n }\n}", "Main" ]
import java.util.*; import java.lang.*; import java.util.stream.*; public class Main { public static void main(String[] args) { //コード Scanner scanner = new Scanner(System.in); Integer n = Integer.parseInt(scanner.next()); Integer[] a = new Integer[n - 1]; List<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < n - 1; i++) { list.add(Integer.parseInt(scanner.next())); } Map<Integer, Integer> map = new HashMap<Integer, Integer>(); for (Integer temp : list) { Integer count = map.get(temp); map.put(temp, (count == null) ? 1 : count + 1); } Integer[] total = new Integer[n]; Arrays.fill(total, 0); for (Integer nKey : map.keySet()) { total[nKey-1] = map.get(nKey); } for(int i = 0; i < total.length; i++) { System.out.println(total[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, 40, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 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 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 6, 65 ], [ 65, 66 ], [ 0, 67 ], [ 67, 68 ], [ 67, 69 ] ]
[ "\nimport java.util.*;\n\npublic class Main {// Main\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] dp = new int[n+1];\n for(int i = 0 ; i < n-1 ; i++) {\n \t dp[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= n ; i++) {\n \tSystem.out.println(dp[i]);\n }\n\t}\n\n\t\n}", "import java.util.*;", "util.*", "java", "public class Main {// Main\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] dp = new int[n+1];\n for(int i = 0 ; i < n-1 ; i++) {\n \t dp[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= n ; i++) {\n \tSystem.out.println(dp[i]);\n }\n\t}\n\n\t\n}", "Main", "public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] dp = new int[n+1];\n for(int i = 0 ; i < n-1 ; i++) {\n \t dp[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= n ; i++) {\n \tSystem.out.println(dp[i]);\n }\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] dp = new int[n+1];\n for(int i = 0 ; i < n-1 ; i++) {\n \t dp[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= n ; i++) {\n \tSystem.out.println(dp[i]);\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[] dp = new int[n+1];", "dp", "new int[n+1]", "n+1", "n", "1", "for(int i = 0 ; i < n-1 ; i++) {\n \t dp[sc.nextInt()]++;\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n \t dp[sc.nextInt()]++;\n }", "{\n \t dp[sc.nextInt()]++;\n }", "dp[sc.nextInt()]++", "dp[sc.nextInt()]", "dp", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 1 ; i <= n ; i++) {\n \tSystem.out.println(dp[i]);\n }", "int i = 1 ;", "int i = 1 ;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n \tSystem.out.println(dp[i]);\n }", "{\n \tSystem.out.println(dp[i]);\n }", "System.out.println(dp[i])", "System.out.println", "System.out", "System", "System.out", "dp[i]", "dp", "i", "String[] args", "args", "public class Main {// Main\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] dp = new int[n+1];\n for(int i = 0 ; i < n-1 ; i++) {\n \t dp[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= n ; i++) {\n \tSystem.out.println(dp[i]);\n }\n\t}\n\n\t\n}", "public class Main {// Main\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] dp = new int[n+1];\n for(int i = 0 ; i < n-1 ; i++) {\n \t dp[sc.nextInt()]++;\n }\n for(int i = 1 ; i <= n ; i++) {\n \tSystem.out.println(dp[i]);\n }\n\t}\n\n\t\n}", "Main" ]
import java.util.*; public class Main {// Main public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] dp = new int[n+1]; for(int i = 0 ; i < n-1 ; i++) { dp[sc.nextInt()]++; } for(int i = 1 ; i <= n ; i++) { System.out.println(dp[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, 28, 13, 13, 30, 30, 4, 18, 18, 13, 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 ], [ 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 ], [ 72, 74 ], [ 72, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 6, 83 ], [ 83, 84 ], [ 0, 85 ], [ 85, 86 ], [ 85, 87 ] ]
[ "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 cnt = sc.nextInt();\n\n\t\tint[] josi = new int[cnt-1];\n\n\t\tfor(int i= 0; i< cnt-1; i++) {\n\t\t\tjosi[i] = sc.nextInt();\n\t\t}\n\n\t\tint[] bukas = new int[cnt];\n\t\tfor(int i = 0; i< cnt-1; i++) {\n\t\t\tbukas[josi[i]-1]++;\n\t\t}\n\n\t\tfor(int buka : bukas) {\n\t\t\tSystem.out.println(buka);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cnt = sc.nextInt();\n\n\t\tint[] josi = new int[cnt-1];\n\n\t\tfor(int i= 0; i< cnt-1; i++) {\n\t\t\tjosi[i] = sc.nextInt();\n\t\t}\n\n\t\tint[] bukas = new int[cnt];\n\t\tfor(int i = 0; i< cnt-1; i++) {\n\t\t\tbukas[josi[i]-1]++;\n\t\t}\n\n\t\tfor(int buka : bukas) {\n\t\t\tSystem.out.println(buka);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cnt = sc.nextInt();\n\n\t\tint[] josi = new int[cnt-1];\n\n\t\tfor(int i= 0; i< cnt-1; i++) {\n\t\t\tjosi[i] = sc.nextInt();\n\t\t}\n\n\t\tint[] bukas = new int[cnt];\n\t\tfor(int i = 0; i< cnt-1; i++) {\n\t\t\tbukas[josi[i]-1]++;\n\t\t}\n\n\t\tfor(int buka : bukas) {\n\t\t\tSystem.out.println(buka);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cnt = sc.nextInt();\n\n\t\tint[] josi = new int[cnt-1];\n\n\t\tfor(int i= 0; i< cnt-1; i++) {\n\t\t\tjosi[i] = sc.nextInt();\n\t\t}\n\n\t\tint[] bukas = new int[cnt];\n\t\tfor(int i = 0; i< cnt-1; i++) {\n\t\t\tbukas[josi[i]-1]++;\n\t\t}\n\n\t\tfor(int buka : bukas) {\n\t\t\tSystem.out.println(buka);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int cnt = sc.nextInt();", "cnt", "sc.nextInt()", "sc.nextInt", "sc", "int[] josi = new int[cnt-1];", "josi", "new int[cnt-1]", "cnt-1", "cnt", "1", "for(int i= 0; i< cnt-1; i++) {\n\t\t\tjosi[i] = sc.nextInt();\n\t\t}", "int i= 0;", "int i= 0;", "i", "0", "i< cnt-1", "i", "cnt-1", "cnt", "1", "i++", "i++", "i", "{\n\t\t\tjosi[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tjosi[i] = sc.nextInt();\n\t\t}", "josi[i] = sc.nextInt()", "josi[i]", "josi", "i", "sc.nextInt()", "sc.nextInt", "sc", "int[] bukas = new int[cnt];", "bukas", "new int[cnt]", "cnt", "for(int i = 0; i< cnt-1; i++) {\n\t\t\tbukas[josi[i]-1]++;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i< cnt-1", "i", "cnt-1", "cnt", "1", "i++", "i++", "i", "{\n\t\t\tbukas[josi[i]-1]++;\n\t\t}", "{\n\t\t\tbukas[josi[i]-1]++;\n\t\t}", "bukas[josi[i]-1]++", "bukas[josi[i]-1]", "bukas", "josi[i]-1", "josi[i]", "josi", "i", "1", "for(int buka : bukas) {\n\t\t\tSystem.out.println(buka);\n\t\t}", "int buka", "bukas", "{\n\t\t\tSystem.out.println(buka);\n\t\t}", "{\n\t\t\tSystem.out.println(buka);\n\t\t}", "System.out.println(buka)", "System.out.println", "System.out", "System", "System.out", "buka", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cnt = sc.nextInt();\n\n\t\tint[] josi = new int[cnt-1];\n\n\t\tfor(int i= 0; i< cnt-1; i++) {\n\t\t\tjosi[i] = sc.nextInt();\n\t\t}\n\n\t\tint[] bukas = new int[cnt];\n\t\tfor(int i = 0; i< cnt-1; i++) {\n\t\t\tbukas[josi[i]-1]++;\n\t\t}\n\n\t\tfor(int buka : bukas) {\n\t\t\tSystem.out.println(buka);\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 cnt = sc.nextInt();\n\n\t\tint[] josi = new int[cnt-1];\n\n\t\tfor(int i= 0; i< cnt-1; i++) {\n\t\t\tjosi[i] = sc.nextInt();\n\t\t}\n\n\t\tint[] bukas = new int[cnt];\n\t\tfor(int i = 0; i< cnt-1; i++) {\n\t\t\tbukas[josi[i]-1]++;\n\t\t}\n\n\t\tfor(int buka : bukas) {\n\t\t\tSystem.out.println(buka);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int cnt = sc.nextInt(); int[] josi = new int[cnt-1]; for(int i= 0; i< cnt-1; i++) { josi[i] = sc.nextInt(); } int[] bukas = new int[cnt]; for(int i = 0; i< cnt-1; i++) { bukas[josi[i]-1]++; } for(int buka : bukas) { System.out.println(buka); } } }
[ 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, 0, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 76, 5 ], [ 76, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 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 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 6, 73 ], [ 73, 74 ], [ 0, 75 ], [ 75, 76 ], [ 75, 77 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint A = 0;\n\t\tint[] B = new int[N+1];\n\t\tfor (int i = 2; i < N+1; i++) {\n\t\t\tA = scan.nextInt();\n\t\t\tB[A]++;\n\t\t}\n\n\t\tfor (int i = 1; i < N+1; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint A = 0;\n\t\tint[] B = new int[N+1];\n\t\tfor (int i = 2; i < N+1; i++) {\n\t\t\tA = scan.nextInt();\n\t\t\tB[A]++;\n\t\t}\n\n\t\tfor (int i = 1; i < N+1; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint A = 0;\n\t\tint[] B = new int[N+1];\n\t\tfor (int i = 2; i < N+1; i++) {\n\t\t\tA = scan.nextInt();\n\t\t\tB[A]++;\n\t\t}\n\n\t\tfor (int i = 1; i < N+1; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\n\t}", "main", "{\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint A = 0;\n\t\tint[] B = new int[N+1];\n\t\tfor (int i = 2; i < N+1; i++) {\n\t\t\tA = scan.nextInt();\n\t\t\tB[A]++;\n\t\t}\n\n\t\tfor (int i = 1; i < N+1; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\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 = 0;", "A", "0", "int[] B = new int[N+1];", "B", "new int[N+1]", "N+1", "N", "1", "for (int i = 2; i < N+1; i++) {\n\t\t\tA = scan.nextInt();\n\t\t\tB[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 = scan.nextInt();\n\t\t\tB[A]++;\n\t\t}", "{\n\t\t\tA = scan.nextInt();\n\t\t\tB[A]++;\n\t\t}", "A = scan.nextInt()", "A", "scan.nextInt()", "scan.nextInt", "scan", "B[A]++", "B[A]", "B", "A", "for (int i = 1; i < N+1; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < N+1", "i", "N+1", "N", "1", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(B[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(B[i]);\n\t\t}", "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\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint A = 0;\n\t\tint[] B = new int[N+1];\n\t\tfor (int i = 2; i < N+1; i++) {\n\t\t\tA = scan.nextInt();\n\t\t\tB[A]++;\n\t\t}\n\n\t\tfor (int i = 1; i < N+1; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint N = scan.nextInt();\n\t\tint A = 0;\n\t\tint[] B = new int[N+1];\n\t\tfor (int i = 2; i < N+1; i++) {\n\t\t\tA = scan.nextInt();\n\t\t\tB[A]++;\n\t\t}\n\n\t\tfor (int i = 1; i < N+1; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int A = 0; int[] B = new int[N+1]; for (int i = 2; i < N+1; i++) { A = scan.nextInt(); B[A]++; } for (int i = 1; i < N+1; 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, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 18, 13, 2, 18, 13, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 78, 5 ], [ 78, 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 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 45, 53 ], [ 8, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 6, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint[] AArray = new int[N];\n\t\tint[] array = new int[N];\n\t\t\n\t\t\tfor(int j = 1; j < N; j++) {\n\t\t\t\tAArray[j] = a.nextInt();\n\t\t\t\tarray[AArray[j] - 1] += 1;\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t\t\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 a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint[] AArray = new int[N];\n\t\tint[] array = new int[N];\n\t\t\n\t\t\tfor(int j = 1; j < N; j++) {\n\t\t\t\tAArray[j] = a.nextInt();\n\t\t\t\tarray[AArray[j] - 1] += 1;\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t\t\n\t\t}\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint[] AArray = new int[N];\n\t\tint[] array = new int[N];\n\t\t\n\t\t\tfor(int j = 1; j < N; j++) {\n\t\t\t\tAArray[j] = a.nextInt();\n\t\t\t\tarray[AArray[j] - 1] += 1;\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t\t\n\t\t}\n\n\t}", "main", "{\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint[] AArray = new int[N];\n\t\tint[] array = new int[N];\n\t\t\n\t\t\tfor(int j = 1; j < N; j++) {\n\t\t\t\tAArray[j] = a.nextInt();\n\t\t\t\tarray[AArray[j] - 1] += 1;\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t\t\n\t\t}\n\n\t}", "Scanner a = new Scanner(System.in);", "a", "new Scanner(System.in)", "int N = a.nextInt();", "N", "a.nextInt()", "a.nextInt", "a", "int[] AArray = new int[N];", "AArray", "new int[N]", "N", "int[] array = new int[N];", "array", "new int[N]", "N", "for(int j = 1; j < N; j++) {\n\t\t\t\tAArray[j] = a.nextInt();\n\t\t\t\tarray[AArray[j] - 1] += 1;\n\t\t\t\t\n\t\t\t\n\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j < N", "j", "N", "j++", "j++", "j", "{\n\t\t\t\tAArray[j] = a.nextInt();\n\t\t\t\tarray[AArray[j] - 1] += 1;\n\t\t\t\t\n\t\t\t\n\t\t\t}", "{\n\t\t\t\tAArray[j] = a.nextInt();\n\t\t\t\tarray[AArray[j] - 1] += 1;\n\t\t\t\t\n\t\t\t\n\t\t\t}", "AArray[j] = a.nextInt()", "AArray[j]", "AArray", "j", "a.nextInt()", "a.nextInt", "a", "array[AArray[j] - 1] += 1", "array[AArray[j] - 1]", "array", "AArray[j] - 1", "AArray[j]", "AArray", "j", "1", "1", "for(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t\t\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(array[i]);\n\t\t\t\n\t\t}", "{\n\t\t\tSystem.out.println(array[i]);\n\t\t\t\n\t\t}", "System.out.println(array[i])", "System.out.println", "System.out", "System", "System.out", "array[i]", "array", "i", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint[] AArray = new int[N];\n\t\tint[] array = new int[N];\n\t\t\n\t\t\tfor(int j = 1; j < N; j++) {\n\t\t\t\tAArray[j] = a.nextInt();\n\t\t\t\tarray[AArray[j] - 1] += 1;\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t\t\n\t\t}\n\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner a = new Scanner(System.in);\t\t\n\t\tint N = a.nextInt();\n\t\tint[] AArray = new int[N];\n\t\tint[] array = new int[N];\n\t\t\n\t\t\tfor(int j = 1; j < N; j++) {\n\t\t\t\tAArray[j] = a.nextInt();\n\t\t\t\tarray[AArray[j] - 1] += 1;\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0; i < N; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t\t\n\t\t}\n\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner a = new Scanner(System.in); int N = a.nextInt(); int[] AArray = new int[N]; int[] array = new int[N]; for(int j = 1; j < N; j++) { AArray[j] = a.nextInt(); array[AArray[j] - 1] += 1; } for(int i = 0; i < N; i++) { System.out.println(array[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, 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 ], [ 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 ], [ 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 ], [ 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 scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] B = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int An = scanner.nextInt();\n B[An - 1]++;\n }\n\n for (int b: B) {\n System.out.println(b);\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 scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] B = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int An = scanner.nextInt();\n B[An - 1]++;\n }\n\n for (int b: B) {\n System.out.println(b);\n }\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\n for (int i = 0; i < N - 1; i++) {\n int An = scanner.nextInt();\n B[An - 1]++;\n }\n\n for (int b: B) {\n System.out.println(b);\n }\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int[] B = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int An = scanner.nextInt();\n B[An - 1]++;\n }\n\n for (int b: B) {\n System.out.println(b);\n }\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 An = scanner.nextInt();\n B[An - 1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N - 1", "i", "N - 1", "N", "1", "i++", "i++", "i", "{\n int An = scanner.nextInt();\n B[An - 1]++;\n }", "{\n int An = scanner.nextInt();\n B[An - 1]++;\n }", "int An = scanner.nextInt();", "An", "scanner.nextInt()", "scanner.nextInt", "scanner", "B[An - 1]++", "B[An - 1]", "B", "An - 1", "An", "1", "for (int b: B) {\n System.out.println(b);\n }", "int b", "B", "{\n System.out.println(b);\n }", "{\n System.out.println(b);\n }", "System.out.println(b)", "System.out.println", "System.out", "System", "System.out", "b", "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\n for (int i = 0; i < N - 1; i++) {\n int An = scanner.nextInt();\n B[An - 1]++;\n }\n\n for (int b: B) {\n System.out.println(b);\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[] B = new int[N];\n\n for (int i = 0; i < N - 1; i++) {\n int An = scanner.nextInt();\n B[An - 1]++;\n }\n\n for (int b: B) {\n System.out.println(b);\n }\n }\n}", "Main" ]
import java.util.Arrays; 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 An = scanner.nextInt(); B[An - 1]++; } for (int b: B) { System.out.println(b); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 0, 13, 4, 18, 13, 0, 13, 20, 2, 13, 17, 0, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 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 ], [ 105, 5 ], [ 105, 6 ], [ 6, 7 ], [ 105, 8 ], [ 8, 9 ], [ 105, 10 ], [ 10, 11 ], [ 105, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 29, 31 ], [ 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 ], [ 47, 49 ], [ 46, 50 ], [ 14, 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 ], [ 66, 70 ], [ 70, 71 ], [ 71, 72 ], [ 65, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 14, 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 ], [ 12, 102 ], [ 102, 103 ], [ 0, 104 ], [ 104, 105 ], [ 104, 106 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\tstatic int N;\n\tstatic int[] A;\n\tstatic int[] num;\n\t\n\tpublic static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tA=new int[N-1];\n\t\tnum=new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tnum[i]=0;\n\t\t}\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t\tnum[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tstatic int N;\n\tstatic int[] A;\n\tstatic int[] num;\n\t\n\tpublic static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tA=new int[N-1];\n\t\tnum=new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tnum[i]=0;\n\t\t}\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t\tnum[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}\n}", "Main", "static int N;", "N", "static int[] A;", "A", "static int[] num;", "num", "public static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tA=new int[N-1];\n\t\tnum=new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tnum[i]=0;\n\t\t}\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t\tnum[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tA=new int[N-1];\n\t\tnum=new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tnum[i]=0;\n\t\t}\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t\tnum[A[i]-1]++;\n\t\t}\n\t\tfor(int 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)", "N=sc.nextInt()", "N", "sc.nextInt()", "sc.nextInt", "sc", "A=new int[N-1]", "A", "new int[N-1]", "N-1", "N", "1", "num=new int[N]", "num", "new int[N]", "N", "for(int i=0;i<N;i++) {\n\t\t\tnum[i]=0;\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<N", "i", "N", "i++", "i++", "i", "{\n\t\t\tnum[i]=0;\n\t\t}", "{\n\t\t\tnum[i]=0;\n\t\t}", "num[i]=0", "num[i]", "num", "i", "0", "for(int i=0;i<N-1;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t\tnum[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\tA[i]=sc.nextInt();\n\t\t\tnum[A[i]-1]++;\n\t\t}", "{\n\t\t\tA[i]=sc.nextInt();\n\t\t\tnum[A[i]-1]++;\n\t\t}", "A[i]=sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "num[A[i]-1]++", "num[A[i]-1]", "num", "A[i]-1", "A[i]", "A", "i", "1", "for(int i=0;i<N;i++) {\n\t\t\tSystem.out.println(num[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(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\tstatic int N;\n\tstatic int[] A;\n\tstatic int[] num;\n\t\n\tpublic static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tA=new int[N-1];\n\t\tnum=new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tnum[i]=0;\n\t\t}\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t\tnum[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}\n}", "public class Main {\n\tstatic int N;\n\tstatic int[] A;\n\tstatic int[] num;\n\t\n\tpublic static void main(String args[]) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tN=sc.nextInt();\n\t\tA=new int[N-1];\n\t\tnum=new int[N];\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tnum[i]=0;\n\t\t}\n\t\tfor(int i=0;i<N-1;i++) {\n\t\t\tA[i]=sc.nextInt();\n\t\t\tnum[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0;i<N;i++) {\n\t\t\tSystem.out.println(num[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { static int N; static int[] A; static int[] num; public static void main(String args[]) { Scanner sc=new Scanner(System.in); N=sc.nextInt(); A=new int[N-1]; num=new int[N]; for(int i=0;i<N;i++) { num[i]=0; } for(int i=0;i<N-1;i++) { A[i]=sc.nextInt(); num[A[i]-1]++; } for(int i=0;i<N;i++) { System.out.println(num[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 2, 17, 4, 18, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 4, 18, 13, 18, 13, 13, 17, 0, 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, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 18, 13, 13, 17, 17, 30, 40, 13, 14, 2, 13, 17, 30, 29, 17, 29, 17, 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 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 24, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 48, 49 ], [ 38, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 52, 57 ], [ 38, 58 ], [ 58, 59 ], [ 58, 60 ], [ 38, 62 ], [ 62, 63 ], [ 62, 64 ], [ 38, 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 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 85, 92 ], [ 80, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 93, 99 ], [ 38, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 100, 105 ], [ 105, 106 ], [ 105, 107 ], [ 100, 108 ], [ 108, 109 ], [ 109, 110 ], [ 100, 111 ], [ 112, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 118, 119 ], [ 118, 120 ], [ 21, 121 ], [ 121, 122 ], [ 19, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 125, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 129, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 136, 138 ], [ 129, 139 ], [ 139, 140 ], [ 140, 141 ], [ 129, 142 ], [ 143, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 146, 150 ], [ 145, 151 ], [ 144, 152 ], [ 152, 153 ], [ 153, 154 ], [ 125, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 159 ], [ 159, 160 ], [ 160, 161 ], [ 125, 162 ], [ 162, 163 ], [ 123, 164 ], [ 164, 165 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.List;\n\nclass Main {\n public static void main(String[] args){\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\n int n=Integer.parseInt(br.readLine());\n String[] ss=br.readLine().split(\" \");\n int[] arr=new int[n];\n int[] c=new int[n];\n //System.out.println(n);\n for(int j=0;j<n-1;j++){\n arr[j]=Integer.parseInt(ss[j])-1;\n //System.out.println(arr[j]);\n c[arr[j]]+=1;\n\n }\n for(int j=0;j<n;j++){\n System.out.println(c[j]);\n }\n\n\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }\n static boolean check(int[] arr){\n int odd=0;\n for(int i=0;i<arr.length;i++){\n if(arr[i]%2!=0){\n odd++;\n }\n }\n if(odd<=1){\n return true;\n }\n return false;\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.HashSet;", "HashSet", "java.util", "import java.util.List;", "List", "java.util", "class Main {\n public static void main(String[] args){\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\n int n=Integer.parseInt(br.readLine());\n String[] ss=br.readLine().split(\" \");\n int[] arr=new int[n];\n int[] c=new int[n];\n //System.out.println(n);\n for(int j=0;j<n-1;j++){\n arr[j]=Integer.parseInt(ss[j])-1;\n //System.out.println(arr[j]);\n c[arr[j]]+=1;\n\n }\n for(int j=0;j<n;j++){\n System.out.println(c[j]);\n }\n\n\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }\n static boolean check(int[] arr){\n int odd=0;\n for(int i=0;i<arr.length;i++){\n if(arr[i]%2!=0){\n odd++;\n }\n }\n if(odd<=1){\n return true;\n }\n return false;\n }\n}", "Main", "public static void main(String[] args){\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\n int n=Integer.parseInt(br.readLine());\n String[] ss=br.readLine().split(\" \");\n int[] arr=new int[n];\n int[] c=new int[n];\n //System.out.println(n);\n for(int j=0;j<n-1;j++){\n arr[j]=Integer.parseInt(ss[j])-1;\n //System.out.println(arr[j]);\n c[arr[j]]+=1;\n\n }\n for(int j=0;j<n;j++){\n System.out.println(c[j]);\n }\n\n\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }", "main", "{\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\n int n=Integer.parseInt(br.readLine());\n String[] ss=br.readLine().split(\" \");\n int[] arr=new int[n];\n int[] c=new int[n];\n //System.out.println(n);\n for(int j=0;j<n-1;j++){\n arr[j]=Integer.parseInt(ss[j])-1;\n //System.out.println(arr[j]);\n c[arr[j]]+=1;\n\n }\n for(int j=0;j<n;j++){\n System.out.println(c[j]);\n }\n\n\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }", "try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\n int n=Integer.parseInt(br.readLine());\n String[] ss=br.readLine().split(\" \");\n int[] arr=new int[n];\n int[] c=new int[n];\n //System.out.println(n);\n for(int j=0;j<n-1;j++){\n arr[j]=Integer.parseInt(ss[j])-1;\n //System.out.println(arr[j]);\n c[arr[j]]+=1;\n\n }\n for(int j=0;j<n;j++){\n System.out.println(c[j]);\n }\n\n\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }", "catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }", "Exception e", "{\n System.out.println(\"KKKK \"+e.getMessage());\n }", "System.out.println(\"KKKK \"+e.getMessage())", "System.out.println", "System.out", "System", "System.out", "\"KKKK \"+e.getMessage()", "\"KKKK \"", "e.getMessage()", "e.getMessage", "e", "{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\n int n=Integer.parseInt(br.readLine());\n String[] ss=br.readLine().split(\" \");\n int[] arr=new int[n];\n int[] c=new int[n];\n //System.out.println(n);\n for(int j=0;j<n-1;j++){\n arr[j]=Integer.parseInt(ss[j])-1;\n //System.out.println(arr[j]);\n c[arr[j]]+=1;\n\n }\n for(int j=0;j<n;j++){\n System.out.println(c[j]);\n }\n\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[] ss=br.readLine().split(\" \");", "ss", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int[] arr=new int[n];", "arr", "new int[n]", "n", "int[] c=new int[n];", "c", "new int[n]", "n", "for(int j=0;j<n-1;j++){\n arr[j]=Integer.parseInt(ss[j])-1;\n //System.out.println(arr[j]);\n c[arr[j]]+=1;\n\n }", "int j=0;", "int j=0;", "j", "0", "j<n-1", "j", "n-1", "n", "1", "j++", "j++", "j", "{\n arr[j]=Integer.parseInt(ss[j])-1;\n //System.out.println(arr[j]);\n c[arr[j]]+=1;\n\n }", "{\n arr[j]=Integer.parseInt(ss[j])-1;\n //System.out.println(arr[j]);\n c[arr[j]]+=1;\n\n }", "arr[j]=Integer.parseInt(ss[j])-1", "arr[j]", "arr", "j", "Integer.parseInt(ss[j])-1", "Integer.parseInt(ss[j])", "Integer.parseInt", "Integer", "ss[j]", "ss", "j", "1", "c[arr[j]]+=1", "c[arr[j]]", "c", "arr[j]", "arr", "j", "1", "for(int j=0;j<n;j++){\n System.out.println(c[j]);\n }", "int j=0;", "int j=0;", "j", "0", "j<n", "j", "n", "j++", "j++", "j", "{\n System.out.println(c[j]);\n }", "{\n System.out.println(c[j]);\n }", "System.out.println(c[j])", "System.out.println", "System.out", "System", "System.out", "c[j]", "c", "j", "String[] args", "args", "static boolean check(int[] arr){\n int odd=0;\n for(int i=0;i<arr.length;i++){\n if(arr[i]%2!=0){\n odd++;\n }\n }\n if(odd<=1){\n return true;\n }\n return false;\n }", "check", "{\n int odd=0;\n for(int i=0;i<arr.length;i++){\n if(arr[i]%2!=0){\n odd++;\n }\n }\n if(odd<=1){\n return true;\n }\n return false;\n }", "int odd=0;", "odd", "0", "for(int i=0;i<arr.length;i++){\n if(arr[i]%2!=0){\n odd++;\n }\n }", "int i=0;", "int i=0;", "i", "0", "i<arr.length", "i", "arr.length", "arr", "arr.length", "i++", "i++", "i", "{\n if(arr[i]%2!=0){\n odd++;\n }\n }", "{\n if(arr[i]%2!=0){\n odd++;\n }\n }", "if(arr[i]%2!=0){\n odd++;\n }", "arr[i]%2!=0", "arr[i]%2", "arr[i]", "arr", "i", "2", "0", "{\n odd++;\n }", "odd++", "odd", "if(odd<=1){\n return true;\n }", "odd<=1", "odd", "1", "{\n return true;\n }", "return true;", "true", "return false;", "false", "int[] arr", "arr" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; class Main { public static void main(String[] args){ try{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(br.readLine()); String[] ss=br.readLine().split(" "); int[] arr=new int[n]; int[] c=new int[n]; //System.out.println(n); for(int j=0;j<n-1;j++){ arr[j]=Integer.parseInt(ss[j])-1; //System.out.println(arr[j]); c[arr[j]]+=1; } for(int j=0;j<n;j++){ System.out.println(c[j]); } }catch(Exception e){ System.out.println("KKKK "+e.getMessage()); } } static boolean check(int[] arr){ int odd=0; for(int i=0;i<arr.length;i++){ if(arr[i]%2!=0){ odd++; } } if(odd<=1){ return true; } return false; } }
[ 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, 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 ], [ 99, 5 ], [ 99, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 23, 33 ], [ 33, 34 ], [ 34, 35 ], [ 23, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 8, 48 ], [ 48, 49 ], [ 48, 50 ], [ 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 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 8, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 75, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 88, 93 ], [ 93, 94 ], [ 93, 95 ], [ 6, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "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 A[i] = scan.nextInt();\n }\n scan.close();\n\n int[] count = new int[N];\n for(int i=0; i<N-1; i++) {\n count[A[i]-1]++;\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 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 A[i] = scan.nextInt();\n }\n scan.close();\n\n int[] count = new int[N];\n for(int i=0; i<N-1; i++) {\n count[A[i]-1]++;\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 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 A[i] = scan.nextInt();\n }\n scan.close();\n\n int[] count = new int[N];\n for(int i=0; i<N-1; i++) {\n count[A[i]-1]++;\n }\n for(int i=0; i<N; i++) {\n System.out.println(count[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 A[i] = scan.nextInt();\n }\n scan.close();\n\n int[] count = new int[N];\n for(int i=0; i<N-1; i++) {\n count[A[i]-1]++;\n }\n for(int i=0; i<N; i++) {\n System.out.println(count[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 A[i] = scan.nextInt();\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 }", "{\n A[i] = scan.nextInt();\n }", "A[i] = scan.nextInt()", "A[i]", "A", "i", "scan.nextInt()", "scan.nextInt", "scan", "scan.close()", "scan.close", "scan", "int[] count = new int[N];", "count", "new int[N]", "N", "for(int i=0; i<N-1; i++) {\n 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 count[A[i]-1]++;\n }", "{\n count[A[i]-1]++;\n }", "count[A[i]-1]++", "count[A[i]-1]", "count", "A[i]-1", "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 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 A[i] = scan.nextInt();\n }\n scan.close();\n\n int[] count = new int[N];\n for(int i=0; i<N-1; i++) {\n count[A[i]-1]++;\n }\n for(int i=0; i<N; i++) {\n System.out.println(count[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 A[i] = scan.nextInt();\n }\n scan.close();\n\n int[] count = new int[N];\n for(int i=0; i<N-1; i++) {\n count[A[i]-1]++;\n }\n for(int i=0; i<N; i++) {\n System.out.println(count[i]);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner 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(); } scan.close(); int[] count = new int[N]; for(int i=0; i<N-1; i++) { count[A[i]-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, 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.*;\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];\n for (int i=0; i<n-1;i++){\n int g =scan.nextInt();\n a[g-1] += 1;\n }\n\n for (int m=0; m<n; m++){\n System.out.println(a[m]);\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 int n = scan.nextInt();\n int [] a = new int[n];\n for (int i=0; i<n-1;i++){\n int g =scan.nextInt();\n a[g-1] += 1;\n }\n\n for (int m=0; m<n; m++){\n System.out.println(a[m]);\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];\n for (int i=0; i<n-1;i++){\n int g =scan.nextInt();\n a[g-1] += 1;\n }\n\n for (int m=0; m<n; m++){\n System.out.println(a[m]);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int [] a = new int[n];\n for (int i=0; i<n-1;i++){\n int g =scan.nextInt();\n a[g-1] += 1;\n }\n\n for (int m=0; m<n; m++){\n System.out.println(a[m]);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int [] a = new int[n];", "a", "new int[n]", "n", "for (int i=0; i<n-1;i++){\n int g =scan.nextInt();\n a[g-1] += 1;\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n int g =scan.nextInt();\n a[g-1] += 1;\n }", "{\n int g =scan.nextInt();\n a[g-1] += 1;\n }", "int g =scan.nextInt();", "g", "scan.nextInt()", "scan.nextInt", "scan", "a[g-1] += 1", "a[g-1]", "a", "g-1", "g", "1", "1", "for (int m=0; m<n; m++){\n System.out.println(a[m]);\n }", "int m=0;", "int m=0;", "m", "0", "m<n", "m", "n", "m++", "m++", "m", "{\n System.out.println(a[m]);\n }", "{\n System.out.println(a[m]);\n }", "System.out.println(a[m])", "System.out.println", "System.out", "System", "System.out", "a[m]", "a", "m", "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];\n for (int i=0; i<n-1;i++){\n int g =scan.nextInt();\n a[g-1] += 1;\n }\n\n for (int m=0; m<n; m++){\n System.out.println(a[m]);\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];\n for (int i=0; i<n-1;i++){\n int g =scan.nextInt();\n a[g-1] += 1;\n }\n\n for (int m=0; m<n; m++){\n System.out.println(a[m]);\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 [] a = new int[n]; for (int i=0; i<n-1;i++){ int g =scan.nextInt(); a[g-1] += 1; } for (int m=0; m<n; m++){ System.out.println(a[m]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 4, 18, 13, 4, 18, 13, 23, 13, 12, 13, 30, 0, 13, 4, 18, 13, 0, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 42, 2, 4, 18, 13, 17, 30, 40, 18, 13, 2, 4, 18, 13, 17, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 7, 11 ], [ 11, 12 ], [ 7, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 19, 21 ], [ 15, 22 ], [ 22, 23 ], [ 23, 24 ], [ 15, 25 ], [ 25, 26 ], [ 26, 27 ], [ 13, 28 ], [ 28, 29 ], [ 7, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 32, 38 ], [ 38, 39 ], [ 38, 40 ], [ 32, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 52 ], [ 53, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 58, 59 ], [ 30, 60 ], [ 60, 61 ], [ 7, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 64, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 70, 74 ], [ 69, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 79, 83 ], [ 64, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ] ]
[ "import java.util.LinkedList;\nimport java.util.Scanner;\n\nclass Main {\n\tint n;\n\tLinkedList<Integer> a;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tMain m = new Main(sc);\n\t\tm.solve();\n\t\tsc.close();\n\t}\n\n\tMain(Scanner sc) {\n\t\tn = sc.nextInt();\n\t\ta = new LinkedList<Integer>();\n\t\tfor(int i=1;i<n;i++){\n\t\t\ta.add(sc.nextInt());\n\t\t}\n\t}\n\n\tvoid solve() {\n\t\tint[] bukaCnt = new int[n];\n\t\twhile(a.size()>0){\n\t\t\tbukaCnt[a.pollFirst()-1]++;\n\t\t}\n\t\tfor(int i:bukaCnt){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}", "import java.util.LinkedList;", "LinkedList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n\tint n;\n\tLinkedList<Integer> a;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tMain m = new Main(sc);\n\t\tm.solve();\n\t\tsc.close();\n\t}\n\n\tMain(Scanner sc) {\n\t\tn = sc.nextInt();\n\t\ta = new LinkedList<Integer>();\n\t\tfor(int i=1;i<n;i++){\n\t\t\ta.add(sc.nextInt());\n\t\t}\n\t}\n\n\tvoid solve() {\n\t\tint[] bukaCnt = new int[n];\n\t\twhile(a.size()>0){\n\t\t\tbukaCnt[a.pollFirst()-1]++;\n\t\t}\n\t\tfor(int i:bukaCnt){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}\n}", "Main", "int n;", "n", "LinkedList<Integer> a;", "a", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tMain m = new Main(sc);\n\t\tm.solve();\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tMain m = new Main(sc);\n\t\tm.solve();\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "Main m = new Main(sc);", "m", "new Main(sc)", "m.solve()", "m.solve", "m", "sc.close()", "sc.close", "sc", "String[] args", "args", "Main(Scanner sc) {\n\t\tn = sc.nextInt();\n\t\ta = new LinkedList<Integer>();\n\t\tfor(int i=1;i<n;i++){\n\t\t\ta.add(sc.nextInt());\n\t\t}\n\t}", "Main", "{\n\t\tn = sc.nextInt();\n\t\ta = new LinkedList<Integer>();\n\t\tfor(int i=1;i<n;i++){\n\t\t\ta.add(sc.nextInt());\n\t\t}\n\t}", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "a = new LinkedList<Integer>()", "a", "new LinkedList<Integer>()", "for(int i=1;i<n;i++){\n\t\t\ta.add(sc.nextInt());\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\ta.add(sc.nextInt());\n\t\t}", "{\n\t\t\ta.add(sc.nextInt());\n\t\t}", "a.add(sc.nextInt())", "a.add", "a", "sc.nextInt()", "sc.nextInt", "sc", "Scanner sc", "sc", "void solve() {\n\t\tint[] bukaCnt = new int[n];\n\t\twhile(a.size()>0){\n\t\t\tbukaCnt[a.pollFirst()-1]++;\n\t\t}\n\t\tfor(int i:bukaCnt){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "solve", "{\n\t\tint[] bukaCnt = new int[n];\n\t\twhile(a.size()>0){\n\t\t\tbukaCnt[a.pollFirst()-1]++;\n\t\t}\n\t\tfor(int i:bukaCnt){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "int[] bukaCnt = new int[n];", "bukaCnt", "new int[n]", "n", "while(a.size()>0){\n\t\t\tbukaCnt[a.pollFirst()-1]++;\n\t\t}", "a.size()>0", "a.size()", "a.size", "a", "0", "{\n\t\t\tbukaCnt[a.pollFirst()-1]++;\n\t\t}", "bukaCnt[a.pollFirst()-1]++", "bukaCnt[a.pollFirst()-1]", "bukaCnt", "a.pollFirst()-1", "a.pollFirst()", "a.pollFirst", "a", "1", "for(int i:bukaCnt){\n\t\t\tSystem.out.println(i);\n\t\t}", "int i", "bukaCnt", "{\n\t\t\tSystem.out.println(i);\n\t\t}", "{\n\t\t\tSystem.out.println(i);\n\t\t}", "System.out.println(i)", "System.out.println", "System.out", "System", "System.out", "i" ]
import java.util.LinkedList; import java.util.Scanner; class Main { int n; LinkedList<Integer> a; public static void main(String[] args) { Scanner sc = new Scanner(System.in); Main m = new Main(sc); m.solve(); sc.close(); } Main(Scanner sc) { n = sc.nextInt(); a = new LinkedList<Integer>(); for(int i=1;i<n;i++){ a.add(sc.nextInt()); } } void solve() { int[] bukaCnt = new int[n]; while(a.size()>0){ bukaCnt[a.pollFirst()-1]++; } for(int i:bukaCnt){ System.out.println(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, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 4, 18, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 18, 13, 13, 17, 0, 18, 13, 13, 2, 18, 13, 13, 17, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 13, 29, 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 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 26, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 26, 38 ], [ 38, 39 ], [ 38, 40 ], [ 26, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 47, 49 ], [ 26, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 64, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 26, 81 ], [ 81, 82 ], [ 81, 83 ], [ 81, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 24, 92 ], [ 92, 93 ], [ 22, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 94, 98 ], [ 98, 99 ], [ 94, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 102, 106 ], [ 106, 107 ], [ 106, 108 ], [ 100, 109 ], [ 109, 110 ], [ 94, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 114, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 128, 129 ], [ 124, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 113, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 94, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 142, 145 ], [ 145, 146 ], [ 94, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 154, 159 ], [ 159, 160 ], [ 159, 161 ], [ 154, 162 ], [ 162, 163 ], [ 163, 164 ], [ 154, 165 ], [ 166, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 168, 170 ], [ 167, 171 ], [ 171, 172 ], [ 172, 173 ], [ 171, 174 ], [ 174, 175 ], [ 149, 176 ], [ 176, 177 ], [ 147, 178 ], [ 178, 179 ] ]
[ "\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.StringTokenizer;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n\nclass Main{\n public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n int N = in.nextInt();\n int[] sub = new int[N];\n int[] arr = in.nextIntArray(N-1);\n\n for (int i = 0; i < N - 1; i++) {\n int x = arr[i] - 1;\n sub[x] = sub[x] + 1;\n }\n for (int x : sub) {\n System.out.println(x);\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 public int[] nextIntArray(int size){\n int arr[] =new int[size];\n for (int i = 0; i < size; i++) {\n arr[i] = Integer.parseInt(next());\n// sum = sum + in.nextInt();\n }\n return arr;\n }\n\n }\n}\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.Arrays;", "Arrays", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "class Main{\n public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n int N = in.nextInt();\n int[] sub = new int[N];\n int[] arr = in.nextIntArray(N-1);\n\n for (int i = 0; i < N - 1; i++) {\n int x = arr[i] - 1;\n sub[x] = sub[x] + 1;\n }\n for (int x : sub) {\n System.out.println(x);\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 public int[] nextIntArray(int size){\n int arr[] =new int[size];\n for (int i = 0; i < size; i++) {\n arr[i] = Integer.parseInt(next());\n// sum = sum + in.nextInt();\n }\n return arr;\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n int N = in.nextInt();\n int[] sub = new int[N];\n int[] arr = in.nextIntArray(N-1);\n\n for (int i = 0; i < N - 1; i++) {\n int x = arr[i] - 1;\n sub[x] = sub[x] + 1;\n }\n for (int x : sub) {\n System.out.println(x);\n }\n\n }", "main", "{\n InputReader in = new InputReader(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n int N = in.nextInt();\n int[] sub = new int[N];\n int[] arr = in.nextIntArray(N-1);\n\n for (int i = 0; i < N - 1; i++) {\n int x = arr[i] - 1;\n sub[x] = sub[x] + 1;\n }\n for (int x : sub) {\n System.out.println(x);\n }\n\n }", "InputReader in = new InputReader(System.in);", "in", "new InputReader(System.in)", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "int N = in.nextInt();", "N", "in.nextInt()", "in.nextInt", "in", "int[] sub = new int[N];", "sub", "new int[N]", "N", "int[] arr = in.nextIntArray(N-1);", "arr", "in.nextIntArray(N-1)", "in.nextIntArray", "in", "N-1", "N", "1", "for (int i = 0; i < N - 1; i++) {\n int x = arr[i] - 1;\n sub[x] = sub[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 = arr[i] - 1;\n sub[x] = sub[x] + 1;\n }", "{\n int x = arr[i] - 1;\n sub[x] = sub[x] + 1;\n }", "int x = arr[i] - 1;", "x", "arr[i] - 1", "arr[i]", "arr", "i", "1", "sub[x] = sub[x] + 1", "sub[x]", "sub", "x", "sub[x] + 1", "sub[x]", "sub", "x", "1", "for (int x : sub) {\n System.out.println(x);\n }", "int x", "sub", "{\n System.out.println(x);\n }", "{\n System.out.println(x);\n }", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "String[] args", "args", "static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] nextIntArray(int size){\n int arr[] =new int[size];\n for (int i = 0; i < size; i++) {\n arr[i] = Integer.parseInt(next());\n// sum = sum + in.nextInt();\n }\n return arr;\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 int[] nextIntArray(int size){\n int arr[] =new int[size];\n for (int i = 0; i < size; i++) {\n arr[i] = Integer.parseInt(next());\n// sum = sum + in.nextInt();\n }\n return arr;\n }", "nextIntArray", "{\n int arr[] =new int[size];\n for (int i = 0; i < size; i++) {\n arr[i] = Integer.parseInt(next());\n// sum = sum + in.nextInt();\n }\n return arr;\n }", "int arr[] =new int[size];", "arr", "new int[size]", "size", "for (int i = 0; i < size; i++) {\n arr[i] = Integer.parseInt(next());\n// sum = sum + in.nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < size", "i", "size", "i++", "i++", "i", "{\n arr[i] = Integer.parseInt(next());\n// sum = sum + in.nextInt();\n }", "{\n arr[i] = Integer.parseInt(next());\n// sum = sum + in.nextInt();\n }", "arr[i] = Integer.parseInt(next())", "arr[i]", "arr", "i", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "return arr;", "arr", "int size", "size" ]
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.StringTokenizer; import java.io.BufferedReader; import java.io.InputStreamReader; class Main{ public static void main(String[] args) { InputReader in = new InputReader(System.in); PrintWriter out = new PrintWriter(System.out); int N = in.nextInt(); int[] sub = new int[N]; int[] arr = in.nextIntArray(N-1); for (int i = 0; i < N - 1; i++) { int x = arr[i] - 1; sub[x] = sub[x] + 1; } for (int x : sub) { System.out.println(x); } } 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()); } public int[] nextIntArray(int size){ int arr[] =new int[size]; for (int i = 0; i < size; i++) { arr[i] = Integer.parseInt(next()); // sum = sum + in.nextInt(); } return arr; } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 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 ], [ 97, 11 ], [ 97, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 14, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 14, 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 ], [ 91, 92 ], [ 91, 93 ], [ 12, 94 ], [ 94, 95 ], [ 0, 96 ], [ 96, 97 ], [ 96, 98 ] ]
[ "\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n //Solution sol = new Solution();\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> adj[] = new List[n+1];\n for(int i=0; i<=n; i++) {\n adj[i] = new ArrayList();\n }\n for(int i=1; i<n; i++) {\n int boss = sc.nextInt();\n adj[boss].add(i);\n }\n\n for(int i=1; i<=n; i++) {\n System.out.println(adj[i].size());\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\n public static void main(String[] args) {\n //Solution sol = new Solution();\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> adj[] = new List[n+1];\n for(int i=0; i<=n; i++) {\n adj[i] = new ArrayList();\n }\n for(int i=1; i<n; i++) {\n int boss = sc.nextInt();\n adj[boss].add(i);\n }\n\n for(int i=1; i<=n; i++) {\n System.out.println(adj[i].size());\n }\n }\n}", "Main", "public static void main(String[] args) {\n //Solution sol = new Solution();\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> adj[] = new List[n+1];\n for(int i=0; i<=n; i++) {\n adj[i] = new ArrayList();\n }\n for(int i=1; i<n; i++) {\n int boss = sc.nextInt();\n adj[boss].add(i);\n }\n\n for(int i=1; i<=n; i++) {\n System.out.println(adj[i].size());\n }\n }", "main", "{\n //Solution sol = new Solution();\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> adj[] = new List[n+1];\n for(int i=0; i<=n; i++) {\n adj[i] = new ArrayList();\n }\n for(int i=1; i<n; i++) {\n int boss = sc.nextInt();\n adj[boss].add(i);\n }\n\n for(int i=1; i<=n; i++) {\n System.out.println(adj[i].size());\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> adj[] = new List[n+1];", "adj", "new List[n+1]", "n+1", "n", "1", "for(int i=0; i<=n; i++) {\n adj[i] = new ArrayList();\n }", "int i=0;", "int i=0;", "i", "0", "i<=n", "i", "n", "i++", "i++", "i", "{\n adj[i] = new ArrayList();\n }", "{\n adj[i] = new ArrayList();\n }", "adj[i] = new ArrayList()", "adj[i]", "adj", "i", "new ArrayList()", "for(int i=1; i<n; i++) {\n int boss = sc.nextInt();\n adj[boss].add(i);\n }", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n int boss = sc.nextInt();\n adj[boss].add(i);\n }", "{\n int boss = sc.nextInt();\n adj[boss].add(i);\n }", "int boss = sc.nextInt();", "boss", "sc.nextInt()", "sc.nextInt", "sc", "adj[boss].add(i)", "adj[boss].add", "adj[boss]", "adj", "boss", "i", "for(int i=1; i<=n; i++) {\n System.out.println(adj[i].size());\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n System.out.println(adj[i].size());\n }", "{\n System.out.println(adj[i].size());\n }", "System.out.println(adj[i].size())", "System.out.println", "System.out", "System", "System.out", "adj[i].size()", "adj[i].size", "adj[i]", "adj", "i", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n //Solution sol = new Solution();\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> adj[] = new List[n+1];\n for(int i=0; i<=n; i++) {\n adj[i] = new ArrayList();\n }\n for(int i=1; i<n; i++) {\n int boss = sc.nextInt();\n adj[boss].add(i);\n }\n\n for(int i=1; i<=n; i++) {\n System.out.println(adj[i].size());\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n //Solution sol = new Solution();\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n List<Integer> adj[] = new List[n+1];\n for(int i=0; i<=n; i++) {\n adj[i] = new ArrayList();\n }\n for(int i=1; i<n; i++) {\n int boss = sc.nextInt();\n adj[boss].add(i);\n }\n\n for(int i=1; i<=n; i++) {\n System.out.println(adj[i].size());\n }\n }\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { //Solution sol = new Solution(); Scanner sc = new Scanner(System.in); int n = sc.nextInt(); List<Integer> adj[] = new List[n+1]; for(int i=0; i<=n; i++) { adj[i] = new ArrayList(); } for(int i=1; i<n; i++) { int boss = sc.nextInt(); adj[boss].add(i); } for(int i=1; i<=n; i++) { System.out.println(adj[i].size()); } } }
[ 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, 18, 13, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 18, 13, 2, 13, 17, 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 ], [ 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, 21 ], [ 21, 22 ], [ 21, 23 ], [ 8, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 24, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 24, 36 ], [ 36, 37 ], [ 37, 38 ], [ 24, 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 ], [ 46, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 53, 63 ], [ 63, 64 ], [ 64, 65 ], [ 53, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 6, 76 ], [ 76, 77 ], [ 0, 78 ], [ 78, 79 ], [ 78, 80 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b[] = new int[a];\n\t\tint c = 0;\n\t\tfor (int i = 0; i < b.length -1 ;i++) {\n\t\t\tc = s.nextInt();\n\t\t\tb[c - 1] += 1;\n\t\t}\n\t\tfor(int j = 0; j < b.length; j++) {\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b[] = new int[a];\n\t\tint c = 0;\n\t\tfor (int i = 0; i < b.length -1 ;i++) {\n\t\t\tc = s.nextInt();\n\t\t\tb[c - 1] += 1;\n\t\t}\n\t\tfor(int j = 0; j < b.length; j++) {\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b[] = new int[a];\n\t\tint c = 0;\n\t\tfor (int i = 0; i < b.length -1 ;i++) {\n\t\t\tc = s.nextInt();\n\t\t\tb[c - 1] += 1;\n\t\t}\n\t\tfor(int j = 0; j < b.length; j++) {\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\n\t}", "main", "{\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b[] = new int[a];\n\t\tint c = 0;\n\t\tfor (int i = 0; i < b.length -1 ;i++) {\n\t\t\tc = s.nextInt();\n\t\t\tb[c - 1] += 1;\n\t\t}\n\t\tfor(int j = 0; j < b.length; j++) {\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\n\t}", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "int a = s.nextInt();", "a", "s.nextInt()", "s.nextInt", "s", "int b[] = new int[a];", "b", "new int[a]", "a", "int c = 0;", "c", "0", "for (int i = 0; i < b.length -1 ;i++) {\n\t\t\tc = s.nextInt();\n\t\t\tb[c - 1] += 1;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < b.length -1", "i", "b.length -1", "b.length", "b", "b.length", "1", "i++", "i++", "i", "{\n\t\t\tc = s.nextInt();\n\t\t\tb[c - 1] += 1;\n\t\t}", "{\n\t\t\tc = s.nextInt();\n\t\t\tb[c - 1] += 1;\n\t\t}", "c = s.nextInt()", "c", "s.nextInt()", "s.nextInt", "s", "b[c - 1] += 1", "b[c - 1]", "b", "c - 1", "c", "1", "1", "for(int j = 0; j < b.length; j++) {\n\t\t\tSystem.out.println(b[j]);\n\t\t}", "int j = 0;", "int j = 0;", "j", "0", "j < b.length", "j", "b.length", "b", "b.length", "j++", "j++", "j", "{\n\t\t\tSystem.out.println(b[j]);\n\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", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b[] = new int[a];\n\t\tint c = 0;\n\t\tfor (int i = 0; i < b.length -1 ;i++) {\n\t\t\tc = s.nextInt();\n\t\t\tb[c - 1] += 1;\n\t\t}\n\t\tfor(int j = 0; j < b.length; j++) {\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b[] = new int[a];\n\t\tint c = 0;\n\t\tfor (int i = 0; i < b.length -1 ;i++) {\n\t\t\tc = s.nextInt();\n\t\t\tb[c - 1] += 1;\n\t\t}\n\t\tfor(int j = 0; j < b.length; j++) {\n\t\t\tSystem.out.println(b[j]);\n\t\t}\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int a = s.nextInt(); int b[] = new int[a]; int c = 0; for (int i = 0; i < b.length -1 ;i++) { c = s.nextInt(); b[c - 1] += 1; } for(int j = 0; j < b.length; j++) { System.out.println(b[j]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 40, 18, 13, 2, 4, 18, 13, 17, 4, 18, 4, 18, 13, 13, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 4, 13, 20, 23, 13, 12, 13, 30, 38, 5, 13, 30, 37, 20, 30, 4, 18, 13, 13, 0, 13, 17, 29, 36, 23, 13, 12, 13, 30, 38, 5, 13, 30, 37, 20, 30, 4, 18, 13, 13, 17, 4, 18, 13, 0, 13, 17, 29, 36, 23, 13, 12, 13, 30, 14, 40, 13, 30, 4, 13, 17, 29, 4, 13, 13, 23, 13, 12, 13, 30, 29, 4, 13, 4, 18, 13, 13, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 13, 13, 29, 36, 23, 13, 12, 13, 30, 4, 13, 4, 18, 13, 0, 13, 17, 14, 13, 30, 38, 5, 13, 30, 37, 20, 30, 4, 18, 13, 29, 36, 12, 13, 30, 38, 5, 13, 30, 37, 20, 30, 4, 18, 13, 13, 6, 13, 41, 13, 17, 41, 13, 17, 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, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 38, 5, 13, 30, 37, 20, 30, 4, 18, 18, 36, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 25, 26 ], [ 25, 27 ], [ 0, 28 ], [ 28, 29 ], [ 28, 30 ], [ 0, 31 ], [ 31, 32 ], [ 31, 33 ], [ 0, 34 ], [ 34, 35 ], [ 34, 36 ], [ 0, 37 ], [ 37, 38 ], [ 37, 39 ], [ 0, 40 ], [ 40, 41 ], [ 40, 42 ], [ 0, 43 ], [ 350, 44 ], [ 350, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 47, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 47, 58 ], [ 58, 59 ], [ 58, 60 ], [ 47, 61 ], [ 61, 62 ], [ 61, 63 ], [ 47, 64 ], [ 64, 65 ], [ 64, 66 ], [ 47, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 67, 71 ], [ 67, 72 ], [ 47, 73 ], [ 73, 74 ], [ 74, 75 ], [ 45, 76 ], [ 76, 77 ], [ 350, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 82, 88 ], [ 88, 89 ], [ 88, 90 ], [ 82, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 97, 98 ], [ 97, 99 ], [ 92, 100 ], [ 100, 101 ], [ 101, 102 ], [ 92, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 107, 111 ], [ 82, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 80, 118 ], [ 118, 119 ], [ 80, 120 ], [ 120, 121 ], [ 80, 122 ], [ 122, 123 ], [ 350, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 124, 128 ], [ 128, 129 ], [ 128, 130 ], [ 124, 131 ], [ 131, 132 ], [ 131, 133 ], [ 124, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 137, 141 ], [ 134, 142 ], [ 142, 143 ], [ 124, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 144, 150 ], [ 150, 151 ], [ 124, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 159, 160 ], [ 155, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 161, 166 ], [ 166, 167 ], [ 166, 168 ], [ 154, 169 ], [ 169, 170 ], [ 152, 171 ], [ 171, 172 ], [ 124, 173 ], [ 173, 174 ], [ 173, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 179, 180 ], [ 180, 181 ], [ 176, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 183, 186 ], [ 183, 187 ], [ 183, 188 ], [ 188, 189 ], [ 189, 190 ], [ 182, 191 ], [ 191, 192 ], [ 191, 193 ], [ 175, 194 ], [ 194, 195 ], [ 173, 196 ], [ 196, 197 ], [ 124, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 201, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 200, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 198, 212 ], [ 212, 213 ], [ 124, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 220, 221 ], [ 221, 222 ], [ 220, 223 ], [ 214, 224 ], [ 224, 225 ], [ 124, 226 ], [ 226, 227 ], [ 226, 228 ], [ 228, 229 ], [ 229, 230 ], [ 229, 231 ], [ 229, 232 ], [ 233, 233 ], [ 233, 234 ], [ 234, 235 ], [ 234, 236 ], [ 228, 237 ], [ 237, 238 ], [ 226, 239 ], [ 239, 240 ], [ 124, 241 ], [ 241, 242 ], [ 241, 243 ], [ 243, 244 ], [ 244, 245 ], [ 244, 246 ], [ 246, 247 ], [ 247, 248 ], [ 243, 249 ], [ 249, 250 ], [ 249, 251 ], [ 243, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 255, 256 ], [ 256, 257 ], [ 256, 258 ], [ 258, 259 ], [ 259, 260 ], [ 255, 261 ], [ 261, 262 ], [ 262, 263 ], [ 263, 264 ], [ 243, 265 ], [ 265, 266 ], [ 124, 267 ], [ 267, 268 ], [ 267, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 271, 273 ], [ 273, 274 ], [ 274, 275 ], [ 270, 276 ], [ 276, 277 ], [ 277, 278 ], [ 278, 279 ], [ 124, 280 ], [ 350, 281 ], [ 281, 282 ], [ 281, 283 ], [ 283, 284 ], [ 283, 285 ], [ 281, 286 ], [ 286, 287 ], [ 286, 288 ], [ 281, 289 ], [ 289, 290 ], [ 289, 291 ], [ 291, 292 ], [ 292, 293 ], [ 292, 294 ], [ 289, 295 ], [ 295, 296 ], [ 281, 297 ], [ 297, 298 ], [ 297, 299 ], [ 299, 300 ], [ 300, 301 ], [ 301, 302 ], [ 302, 303 ], [ 302, 304 ], [ 301, 305 ], [ 305, 306 ], [ 306, 307 ], [ 307, 308 ], [ 300, 309 ], [ 309, 310 ], [ 310, 311 ], [ 311, 312 ], [ 311, 313 ], [ 313, 314 ], [ 314, 315 ], [ 310, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 299, 320 ], [ 320, 321 ], [ 321, 322 ], [ 322, 323 ], [ 281, 324 ], [ 324, 325 ], [ 324, 326 ], [ 326, 327 ], [ 327, 328 ], [ 328, 329 ], [ 329, 330 ], [ 328, 331 ], [ 331, 332 ], [ 281, 333 ], [ 333, 334 ], [ 333, 335 ], [ 335, 336 ], [ 336, 337 ], [ 337, 338 ], [ 337, 339 ], [ 339, 340 ], [ 340, 341 ], [ 336, 342 ], [ 342, 343 ], [ 343, 344 ], [ 344, 345 ], [ 345, 346 ], [ 345, 347 ], [ 281, 348 ], [ 0, 349 ], [ 349, 350 ], [ 349, 351 ] ]
[ "import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.BufferedOutputStream;\nimport java.io.UncheckedIOException;\nimport java.nio.charset.Charset;\nimport java.util.StringTokenizer;\nimport java.io.Writer;\nimport java.io.OutputStreamWriter;\nimport java.io.BufferedReader;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author mikit\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n LightScanner in = new LightScanner(inputStream);\n LightWriter out = new LightWriter(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, LightScanner in, LightWriter out) {\n int n = in.ints();\n int[] ans = new int[n];\n for (int i = 1; i < n; i++) ans[in.ints() - 1]++;\n out.ans(ans).ln();\n }\n\n }\n\n static class LightWriter implements AutoCloseable {\n private final Writer out;\n private boolean autoflush = false;\n private boolean breaked = true;\n\n public LightWriter(Writer out) {\n this.out = out;\n }\n\n public LightWriter(OutputStream out) {\n this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset()));\n }\n\n public LightWriter print(char c) {\n try {\n out.write(c);\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter print(String s) {\n try {\n out.write(s, 0, s.length());\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter ans(String s) {\n if (!breaked) {\n print(' ');\n }\n return print(s);\n }\n\n public LightWriter ans(int i) {\n return ans(Integer.toString(i));\n }\n\n public LightWriter ans(int... n) {\n for (int n1 : n) {\n ans(n1);\n }\n return this;\n }\n\n public LightWriter ln() {\n print(System.lineSeparator());\n breaked = true;\n if (autoflush) {\n try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n return this;\n }\n\n public void close() {\n try {\n out.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }\n\n static class LightScanner implements AutoCloseable {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public LightScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public String string() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ints() {\n return Integer.parseInt(string());\n }\n\n public void close() {\n try {\n this.reader.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }\n}\n", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.BufferedOutputStream;", "BufferedOutputStream", "java.io", "import java.io.UncheckedIOException;", "UncheckedIOException", "java.io", "import java.nio.charset.Charset;", "Charset", "java.nio.charset", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.io.Writer;", "Writer", "java.io", "import java.io.OutputStreamWriter;", "OutputStreamWriter", "java.io", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n LightScanner in = new LightScanner(inputStream);\n LightWriter out = new LightWriter(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, LightScanner in, LightWriter out) {\n int n = in.ints();\n int[] ans = new int[n];\n for (int i = 1; i < n; i++) ans[in.ints() - 1]++;\n out.ans(ans).ln();\n }\n\n }\n\n static class LightWriter implements AutoCloseable {\n private final Writer out;\n private boolean autoflush = false;\n private boolean breaked = true;\n\n public LightWriter(Writer out) {\n this.out = out;\n }\n\n public LightWriter(OutputStream out) {\n this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset()));\n }\n\n public LightWriter print(char c) {\n try {\n out.write(c);\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter print(String s) {\n try {\n out.write(s, 0, s.length());\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter ans(String s) {\n if (!breaked) {\n print(' ');\n }\n return print(s);\n }\n\n public LightWriter ans(int i) {\n return ans(Integer.toString(i));\n }\n\n public LightWriter ans(int... n) {\n for (int n1 : n) {\n ans(n1);\n }\n return this;\n }\n\n public LightWriter ln() {\n print(System.lineSeparator());\n breaked = true;\n if (autoflush) {\n try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n return this;\n }\n\n public void close() {\n try {\n out.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }\n\n static class LightScanner implements AutoCloseable {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public LightScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public String string() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ints() {\n return Integer.parseInt(string());\n }\n\n public void close() {\n try {\n this.reader.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n LightScanner in = new LightScanner(inputStream);\n LightWriter out = new LightWriter(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 LightScanner in = new LightScanner(inputStream);\n LightWriter out = new LightWriter(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", "LightScanner in = new LightScanner(inputStream);", "in", "new LightScanner(inputStream)", "LightWriter out = new LightWriter(outputStream);", "out", "new LightWriter(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, LightScanner in, LightWriter out) {\n int n = in.ints();\n int[] ans = new int[n];\n for (int i = 1; i < n; i++) ans[in.ints() - 1]++;\n out.ans(ans).ln();\n }\n\n }", "CManagement", "public void solve(int testNumber, LightScanner in, LightWriter out) {\n int n = in.ints();\n int[] ans = new int[n];\n for (int i = 1; i < n; i++) ans[in.ints() - 1]++;\n out.ans(ans).ln();\n }", "solve", "{\n int n = in.ints();\n int[] ans = new int[n];\n for (int i = 1; i < n; i++) ans[in.ints() - 1]++;\n out.ans(ans).ln();\n }", "int n = in.ints();", "n", "in.ints()", "in.ints", "in", "int[] ans = new int[n];", "ans", "new int[n]", "n", "for (int i = 1; i < n; i++) ans[in.ints() - 1]++;", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "ans[in.ints() - 1]++;", "ans[in.ints() - 1]++", "ans[in.ints() - 1]", "ans", "in.ints() - 1", "in.ints()", "in.ints", "in", "1", "out.ans(ans).ln()", "out.ans(ans).ln", "out.ans(ans)", "out.ans", "out", "ans", "int testNumber", "testNumber", "LightScanner in", "in", "LightWriter out", "out", "static class LightWriter implements AutoCloseable {\n private final Writer out;\n private boolean autoflush = false;\n private boolean breaked = true;\n\n public LightWriter(Writer out) {\n this.out = out;\n }\n\n public LightWriter(OutputStream out) {\n this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset()));\n }\n\n public LightWriter print(char c) {\n try {\n out.write(c);\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter print(String s) {\n try {\n out.write(s, 0, s.length());\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter ans(String s) {\n if (!breaked) {\n print(' ');\n }\n return print(s);\n }\n\n public LightWriter ans(int i) {\n return ans(Integer.toString(i));\n }\n\n public LightWriter ans(int... n) {\n for (int n1 : n) {\n ans(n1);\n }\n return this;\n }\n\n public LightWriter ln() {\n print(System.lineSeparator());\n breaked = true;\n if (autoflush) {\n try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n return this;\n }\n\n public void close() {\n try {\n out.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }", "LightWriter", "private final Writer out;", "out", "private boolean autoflush = false;", "autoflush", "false", "private boolean breaked = true;", "breaked", "true", "public LightWriter(Writer out) {\n this.out = out;\n }", "LightWriter", "{\n this.out = out;\n }", "this.out = out", "this.out", "this", "this.out", "out", "Writer out", "out", "public LightWriter(OutputStream out) {\n this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset()));\n }", "LightWriter", "{\n this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset()));\n }", "this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset()))", "this", "new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset())", "OutputStream out", "out", "public LightWriter print(char c) {\n try {\n out.write(c);\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }", "print", "{\n try {\n out.write(c);\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }", "try {\n out.write(c);\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "IOException ex", "{\n throw new UncheckedIOException(ex);\n }", "throw new UncheckedIOException(ex);", "new UncheckedIOException(ex)", "{\n out.write(c);\n breaked = false;\n }", "out.write(c)", "out.write", "out", "c", "breaked = false", "breaked", "false", "return this;", "this", "char c", "c", "public LightWriter print(String s) {\n try {\n out.write(s, 0, s.length());\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }", "print", "{\n try {\n out.write(s, 0, s.length());\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }", "try {\n out.write(s, 0, s.length());\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "IOException ex", "{\n throw new UncheckedIOException(ex);\n }", "throw new UncheckedIOException(ex);", "new UncheckedIOException(ex)", "{\n out.write(s, 0, s.length());\n breaked = false;\n }", "out.write(s, 0, s.length())", "out.write", "out", "s", "0", "s.length()", "s.length", "s", "breaked = false", "breaked", "false", "return this;", "this", "String s", "s", "public LightWriter ans(String s) {\n if (!breaked) {\n print(' ');\n }\n return print(s);\n }", "ans", "{\n if (!breaked) {\n print(' ');\n }\n return print(s);\n }", "if (!breaked) {\n print(' ');\n }", "!breaked", "breaked", "{\n print(' ');\n }", "print(' ')", "print", "' '", "return print(s);", "print(s)", "print", "s", "String s", "s", "public LightWriter ans(int i) {\n return ans(Integer.toString(i));\n }", "ans", "{\n return ans(Integer.toString(i));\n }", "return ans(Integer.toString(i));", "ans(Integer.toString(i))", "ans", "Integer.toString(i)", "Integer.toString", "Integer", "i", "int i", "i", "public LightWriter ans(int... n) {\n for (int n1 : n) {\n ans(n1);\n }\n return this;\n }", "ans", "{\n for (int n1 : n) {\n ans(n1);\n }\n return this;\n }", "for (int n1 : n) {\n ans(n1);\n }", "int n1", "n", "{\n ans(n1);\n }", "{\n ans(n1);\n }", "ans(n1)", "ans", "n1", "return this;", "this", "int... n", "n", "public LightWriter ln() {\n print(System.lineSeparator());\n breaked = true;\n if (autoflush) {\n try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n return this;\n }", "ln", "{\n print(System.lineSeparator());\n breaked = true;\n if (autoflush) {\n try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n return this;\n }", "print(System.lineSeparator())", "print", "System.lineSeparator()", "System.lineSeparator", "System", "breaked = true", "breaked", "true", "if (autoflush) {\n try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }", "autoflush", "{\n try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }", "try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "IOException ex", "{\n throw new UncheckedIOException(ex);\n }", "throw new UncheckedIOException(ex);", "new UncheckedIOException(ex)", "{\n out.flush();\n }", "out.flush()", "out.flush", "out", "return this;", "this", "public void close() {\n try {\n out.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }", "close", "{\n try {\n out.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }", "try {\n out.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "IOException ex", "{\n throw new UncheckedIOException(ex);\n }", "throw new UncheckedIOException(ex);", "new UncheckedIOException(ex)", "{\n out.close();\n }", "out.close()", "out.close", "out", "AutoCloseable", "static class LightScanner implements AutoCloseable {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public LightScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public String string() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ints() {\n return Integer.parseInt(string());\n }\n\n public void close() {\n try {\n this.reader.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }", "LightScanner", "private BufferedReader reader = null;", "reader", "null", "private StringTokenizer tokenizer = null;", "tokenizer", "null", "public LightScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n }", "LightScanner", "{\n reader = new BufferedReader(new InputStreamReader(in));\n }", "reader = new BufferedReader(new InputStreamReader(in))", "reader", "new BufferedReader(new InputStreamReader(in))", "InputStream in", "in", "public String string() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }\n return tokenizer.nextToken();\n }", "string", "{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new UncheckedIOException(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 UncheckedIOException(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 UncheckedIOException(e);\n }\n }", "try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }", "catch (IOException e) {\n throw new UncheckedIOException(e);\n }", "IOException e", "{\n throw new UncheckedIOException(e);\n }", "throw new UncheckedIOException(e);", "new UncheckedIOException(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 ints() {\n return Integer.parseInt(string());\n }", "ints", "{\n return Integer.parseInt(string());\n }", "return Integer.parseInt(string());", "Integer.parseInt(string())", "Integer.parseInt", "Integer", "string()", "string", "public void close() {\n try {\n this.reader.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }", "close", "{\n try {\n this.reader.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }", "try {\n this.reader.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }", "IOException ex", "{\n throw new UncheckedIOException(ex);\n }", "throw new UncheckedIOException(ex);", "new UncheckedIOException(ex)", "{\n this.reader.close();\n }", "this.reader.close()", "this.reader.close", "this.reader", "this", "this.reader", "AutoCloseable", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n LightScanner in = new LightScanner(inputStream);\n LightWriter out = new LightWriter(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, LightScanner in, LightWriter out) {\n int n = in.ints();\n int[] ans = new int[n];\n for (int i = 1; i < n; i++) ans[in.ints() - 1]++;\n out.ans(ans).ln();\n }\n\n }\n\n static class LightWriter implements AutoCloseable {\n private final Writer out;\n private boolean autoflush = false;\n private boolean breaked = true;\n\n public LightWriter(Writer out) {\n this.out = out;\n }\n\n public LightWriter(OutputStream out) {\n this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset()));\n }\n\n public LightWriter print(char c) {\n try {\n out.write(c);\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter print(String s) {\n try {\n out.write(s, 0, s.length());\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter ans(String s) {\n if (!breaked) {\n print(' ');\n }\n return print(s);\n }\n\n public LightWriter ans(int i) {\n return ans(Integer.toString(i));\n }\n\n public LightWriter ans(int... n) {\n for (int n1 : n) {\n ans(n1);\n }\n return this;\n }\n\n public LightWriter ln() {\n print(System.lineSeparator());\n breaked = true;\n if (autoflush) {\n try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n return this;\n }\n\n public void close() {\n try {\n out.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }\n\n static class LightScanner implements AutoCloseable {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public LightScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public String string() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ints() {\n return Integer.parseInt(string());\n }\n\n public void close() {\n try {\n this.reader.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n LightScanner in = new LightScanner(inputStream);\n LightWriter out = new LightWriter(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, LightScanner in, LightWriter out) {\n int n = in.ints();\n int[] ans = new int[n];\n for (int i = 1; i < n; i++) ans[in.ints() - 1]++;\n out.ans(ans).ln();\n }\n\n }\n\n static class LightWriter implements AutoCloseable {\n private final Writer out;\n private boolean autoflush = false;\n private boolean breaked = true;\n\n public LightWriter(Writer out) {\n this.out = out;\n }\n\n public LightWriter(OutputStream out) {\n this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset()));\n }\n\n public LightWriter print(char c) {\n try {\n out.write(c);\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter print(String s) {\n try {\n out.write(s, 0, s.length());\n breaked = false;\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n return this;\n }\n\n public LightWriter ans(String s) {\n if (!breaked) {\n print(' ');\n }\n return print(s);\n }\n\n public LightWriter ans(int i) {\n return ans(Integer.toString(i));\n }\n\n public LightWriter ans(int... n) {\n for (int n1 : n) {\n ans(n1);\n }\n return this;\n }\n\n public LightWriter ln() {\n print(System.lineSeparator());\n breaked = true;\n if (autoflush) {\n try {\n out.flush();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n return this;\n }\n\n public void close() {\n try {\n out.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }\n\n static class LightScanner implements AutoCloseable {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public LightScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public String string() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ints() {\n return Integer.parseInt(string());\n }\n\n public void close() {\n try {\n this.reader.close();\n } catch (IOException ex) {\n throw new UncheckedIOException(ex);\n }\n }\n\n }\n}", "Main" ]
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.BufferedOutputStream; import java.io.UncheckedIOException; import java.nio.charset.Charset; import java.util.StringTokenizer; import java.io.Writer; import java.io.OutputStreamWriter; import java.io.BufferedReader; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top * * @author mikit */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; LightScanner in = new LightScanner(inputStream); LightWriter out = new LightWriter(outputStream); CManagement solver = new CManagement(); solver.solve(1, in, out); out.close(); } static class CManagement { public void solve(int testNumber, LightScanner in, LightWriter out) { int n = in.ints(); int[] ans = new int[n]; for (int i = 1; i < n; i++) ans[in.ints() - 1]++; out.ans(ans).ln(); } } static class LightWriter implements AutoCloseable { private final Writer out; private boolean autoflush = false; private boolean breaked = true; public LightWriter(Writer out) { this.out = out; } public LightWriter(OutputStream out) { this(new OutputStreamWriter(new BufferedOutputStream(out), Charset.defaultCharset())); } public LightWriter print(char c) { try { out.write(c); breaked = false; } catch (IOException ex) { throw new UncheckedIOException(ex); } return this; } public LightWriter print(String s) { try { out.write(s, 0, s.length()); breaked = false; } catch (IOException ex) { throw new UncheckedIOException(ex); } return this; } public LightWriter ans(String s) { if (!breaked) { print(' '); } return print(s); } public LightWriter ans(int i) { return ans(Integer.toString(i)); } public LightWriter ans(int... n) { for (int n1 : n) { ans(n1); } return this; } public LightWriter ln() { print(System.lineSeparator()); breaked = true; if (autoflush) { try { out.flush(); } catch (IOException ex) { throw new UncheckedIOException(ex); } } return this; } public void close() { try { out.close(); } catch (IOException ex) { throw new UncheckedIOException(ex); } } } static class LightScanner implements AutoCloseable { private BufferedReader reader = null; private StringTokenizer tokenizer = null; public LightScanner(InputStream in) { reader = new BufferedReader(new InputStreamReader(in)); } public String string() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new UncheckedIOException(e); } } return tokenizer.nextToken(); } public int ints() { return Integer.parseInt(string()); } public void close() { try { this.reader.close(); } catch (IOException ex) { throw new UncheckedIOException(ex); } } } }
[ 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, 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 ], [ 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 ], [ 6, 66 ], [ 66, 67 ], [ 0, 68 ], [ 68, 69 ], [ 68, 70 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint N = scan.nextInt();\n\tint shine[] = new int[N];\n\tfor(int i = 1;i != N; i++) {\n\t\tint A = scan.nextInt();\n\t\tshine[A-1]++;\n\t}\n\t\n\tfor(int j = 0;j != N; j++) {\n\t\tSystem.out.println(shine[j]);\n\t}\n\t\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint N = scan.nextInt();\n\tint shine[] = new int[N];\n\tfor(int i = 1;i != N; i++) {\n\t\tint A = scan.nextInt();\n\t\tshine[A-1]++;\n\t}\n\t\n\tfor(int j = 0;j != N; j++) {\n\t\tSystem.out.println(shine[j]);\n\t}\n\t\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint N = scan.nextInt();\n\tint shine[] = new int[N];\n\tfor(int i = 1;i != N; i++) {\n\t\tint A = scan.nextInt();\n\t\tshine[A-1]++;\n\t}\n\t\n\tfor(int j = 0;j != N; j++) {\n\t\tSystem.out.println(shine[j]);\n\t}\n\t\n\t}", "main", "{\n\tScanner scan = new Scanner(System.in);\n\tint N = scan.nextInt();\n\tint shine[] = new int[N];\n\tfor(int i = 1;i != N; i++) {\n\t\tint A = scan.nextInt();\n\t\tshine[A-1]++;\n\t}\n\t\n\tfor(int j = 0;j != N; j++) {\n\t\tSystem.out.println(shine[j]);\n\t}\n\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 shine[] = new int[N];", "shine", "new int[N]", "N", "for(int i = 1;i != N; i++) {\n\t\tint A = scan.nextInt();\n\t\tshine[A-1]++;\n\t}", "int i = 1;", "int i = 1;", "i", "1", "i != N", "i", "N", "i++", "i++", "i", "{\n\t\tint A = scan.nextInt();\n\t\tshine[A-1]++;\n\t}", "{\n\t\tint A = scan.nextInt();\n\t\tshine[A-1]++;\n\t}", "int A = scan.nextInt();", "A", "scan.nextInt()", "scan.nextInt", "scan", "shine[A-1]++", "shine[A-1]", "shine", "A-1", "A", "1", "for(int j = 0;j != N; j++) {\n\t\tSystem.out.println(shine[j]);\n\t}", "int j = 0;", "int j = 0;", "j", "0", "j != N", "j", "N", "j++", "j++", "j", "{\n\t\tSystem.out.println(shine[j]);\n\t}", "{\n\t\tSystem.out.println(shine[j]);\n\t}", "System.out.println(shine[j])", "System.out.println", "System.out", "System", "System.out", "shine[j]", "shine", "j", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint N = scan.nextInt();\n\tint shine[] = new int[N];\n\tfor(int i = 1;i != N; i++) {\n\t\tint A = scan.nextInt();\n\t\tshine[A-1]++;\n\t}\n\t\n\tfor(int j = 0;j != N; j++) {\n\t\tSystem.out.println(shine[j]);\n\t}\n\t\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tint N = scan.nextInt();\n\tint shine[] = new int[N];\n\tfor(int i = 1;i != N; i++) {\n\t\tint A = scan.nextInt();\n\t\tshine[A-1]++;\n\t}\n\t\n\tfor(int j = 0;j != N; j++) {\n\t\tSystem.out.println(shine[j]);\n\t}\n\t\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int shine[] = new int[N]; for(int i = 1;i != N; i++) { int A = scan.nextInt(); shine[A-1]++; } for(int j = 0;j != N; j++) { System.out.println(shine[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, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 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 ], [ 105, 11 ], [ 105, 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 ], [ 39, 43 ], [ 14, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 44, 54 ], [ 54, 55 ], [ 55, 56 ], [ 44, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 58, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 58, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 70, 74 ], [ 74, 75 ], [ 74, 76 ], [ 14, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 84 ], [ 77, 85 ], [ 85, 86 ], [ 86, 87 ], [ 77, 88 ], [ 89, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 14, 99 ], [ 99, 100 ], [ 100, 101 ], [ 12, 102 ], [ 102, 103 ], [ 0, 104 ], [ 104, 105 ], [ 104, 106 ] ]
[ "import java.util.HashMap;\nimport java.util.Map;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<Integer, Integer> map = new HashMap<>();\n for(int i=1;i<=n;i++){\n map.put(i,0);\n }\n for(int i=0;i<n-1;i++){\n int an = sc.nextInt();\n int va = map.get(an);\n map.replace(an, va + 1);\n }\n for(int i=1;i<=n;i++){\n System.out.println(map.get(i));\n }\n sc.close();\n }\n}", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<Integer, Integer> map = new HashMap<>();\n for(int i=1;i<=n;i++){\n map.put(i,0);\n }\n for(int i=0;i<n-1;i++){\n int an = sc.nextInt();\n int va = map.get(an);\n map.replace(an, va + 1);\n }\n for(int i=1;i<=n;i++){\n System.out.println(map.get(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 Map<Integer, Integer> map = new HashMap<>();\n for(int i=1;i<=n;i++){\n map.put(i,0);\n }\n for(int i=0;i<n-1;i++){\n int an = sc.nextInt();\n int va = map.get(an);\n map.replace(an, va + 1);\n }\n for(int i=1;i<=n;i++){\n System.out.println(map.get(i));\n }\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<Integer, Integer> map = new HashMap<>();\n for(int i=1;i<=n;i++){\n map.put(i,0);\n }\n for(int i=0;i<n-1;i++){\n int an = sc.nextInt();\n int va = map.get(an);\n map.replace(an, va + 1);\n }\n for(int i=1;i<=n;i++){\n System.out.println(map.get(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", "Map<Integer, Integer> map = new HashMap<>();", "map", "new HashMap<>()", "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 i=0;i<n-1;i++){\n int an = sc.nextInt();\n int va = map.get(an);\n map.replace(an, va + 1);\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n int an = sc.nextInt();\n int va = map.get(an);\n map.replace(an, va + 1);\n }", "{\n int an = sc.nextInt();\n int va = map.get(an);\n map.replace(an, va + 1);\n }", "int an = sc.nextInt();", "an", "sc.nextInt()", "sc.nextInt", "sc", "int va = map.get(an);", "va", "map.get(an)", "map.get", "map", "an", "map.replace(an, va + 1)", "map.replace", "map", "an", "va + 1", "va", "1", "for(int i=1;i<=n;i++){\n System.out.println(map.get(i));\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n System.out.println(map.get(i));\n }", "{\n System.out.println(map.get(i));\n }", "System.out.println(map.get(i))", "System.out.println", "System.out", "System", "System.out", "map.get(i)", "map.get", "map", "i", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<Integer, Integer> map = new HashMap<>();\n for(int i=1;i<=n;i++){\n map.put(i,0);\n }\n for(int i=0;i<n-1;i++){\n int an = sc.nextInt();\n int va = map.get(an);\n map.replace(an, va + 1);\n }\n for(int i=1;i<=n;i++){\n System.out.println(map.get(i));\n }\n sc.close();\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n Map<Integer, Integer> map = new HashMap<>();\n for(int i=1;i<=n;i++){\n map.put(i,0);\n }\n for(int i=0;i<n-1;i++){\n int an = sc.nextInt();\n int va = map.get(an);\n map.replace(an, va + 1);\n }\n for(int i=1;i<=n;i++){\n System.out.println(map.get(i));\n }\n sc.close();\n }\n}", "Main" ]
import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); Map<Integer, Integer> map = new HashMap<>(); for(int i=1;i<=n;i++){ map.put(i,0); } for(int i=0;i<n-1;i++){ int an = sc.nextInt(); int va = map.get(an); map.replace(an, va + 1); } for(int i=1;i<=n;i++){ System.out.println(map.get(i)); } sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 8, 2, 13, 17, 17, 2, 13, 17, 41, 13, 20, 13, 4, 18, 13, 13, 17, 28, 13, 4, 18, 13, 30, 30, 0, 18, 13, 13, 4, 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, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 113, 5 ], [ 113, 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, 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 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 40, 47 ], [ 37, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 37, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 54, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 8, 66 ], [ 66, 67 ], [ 66, 68 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 70, 74 ], [ 8, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 75, 80 ], [ 81, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 8, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 95, 96 ], [ 95, 97 ], [ 90, 98 ], [ 98, 99 ], [ 99, 100 ], [ 90, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 6, 110 ], [ 110, 111 ], [ 0, 112 ], [ 112, 113 ], [ 112, 114 ] ]
[ "\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer N = Integer.parseInt(scanner.next());\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n\n for (int i = 0; i < N-1; i++) {\n Integer A = Integer.parseInt(scanner.next()) -1;\n Integer count = map.get(A);\n map.put(A, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[N];\n Arrays.fill(total, 0);\n\n for (Integer nKey: map.keySet()) {\n total[nKey] = map.get(nKey);\n }\n\n for (int i = 0; i < N; i++) System.out.println(total[i]);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer N = Integer.parseInt(scanner.next());\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n\n for (int i = 0; i < N-1; i++) {\n Integer A = Integer.parseInt(scanner.next()) -1;\n Integer count = map.get(A);\n map.put(A, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[N];\n Arrays.fill(total, 0);\n\n for (Integer nKey: map.keySet()) {\n total[nKey] = map.get(nKey);\n }\n\n for (int i = 0; i < N; i++) System.out.println(total[i]);\n }\n}", "Main", "public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer N = Integer.parseInt(scanner.next());\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n\n for (int i = 0; i < N-1; i++) {\n Integer A = Integer.parseInt(scanner.next()) -1;\n Integer count = map.get(A);\n map.put(A, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[N];\n Arrays.fill(total, 0);\n\n for (Integer nKey: map.keySet()) {\n total[nKey] = map.get(nKey);\n }\n\n for (int i = 0; i < N; i++) System.out.println(total[i]);\n }", "main", "{\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer N = Integer.parseInt(scanner.next());\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n\n for (int i = 0; i < N-1; i++) {\n Integer A = Integer.parseInt(scanner.next()) -1;\n Integer count = map.get(A);\n map.put(A, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[N];\n Arrays.fill(total, 0);\n\n for (Integer nKey: map.keySet()) {\n total[nKey] = map.get(nKey);\n }\n\n for (int i = 0; i < N; i++) System.out.println(total[i]);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "Integer N = Integer.parseInt(scanner.next());", "N", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "Map<Integer, Integer> map = new HashMap<Integer, Integer>();", "map", "new HashMap<Integer, Integer>()", "for (int i = 0; i < N-1; i++) {\n Integer A = Integer.parseInt(scanner.next()) -1;\n Integer count = map.get(A);\n map.put(A, (count == null) ? 1 : count + 1);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n Integer A = Integer.parseInt(scanner.next()) -1;\n Integer count = map.get(A);\n map.put(A, (count == null) ? 1 : count + 1);\n }", "{\n Integer A = Integer.parseInt(scanner.next()) -1;\n Integer count = map.get(A);\n map.put(A, (count == null) ? 1 : count + 1);\n }", "Integer A = Integer.parseInt(scanner.next()) -1;", "A", "Integer.parseInt(scanner.next()) -1", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "1", "Integer count = map.get(A);", "count", "map.get(A)", "map.get", "map", "A", "map.put(A, (count == null) ? 1 : count + 1)", "map.put", "map", "A", "(count == null) ? 1 : count + 1", "(count == null)", "count", "null", "1", "count + 1", "count", "1", "Integer[] total = new Integer[N];", "total", "new Integer[N]", "N", "Arrays.fill(total, 0)", "Arrays.fill", "Arrays", "total", "0", "for (Integer nKey: map.keySet()) {\n total[nKey] = map.get(nKey);\n }", "Integer nKey", "map.keySet()", "map.keySet", "map", "{\n total[nKey] = map.get(nKey);\n }", "{\n total[nKey] = map.get(nKey);\n }", "total[nKey] = map.get(nKey)", "total[nKey]", "total", "nKey", "map.get(nKey)", "map.get", "map", "nKey", "for (int i = 0; i < N; i++) System.out.println(total[i]);", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "System.out.println(total[i]);", "System.out.println(total[i])", "System.out.println", "System.out", "System", "System.out", "total[i]", "total", "i", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer N = Integer.parseInt(scanner.next());\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n\n for (int i = 0; i < N-1; i++) {\n Integer A = Integer.parseInt(scanner.next()) -1;\n Integer count = map.get(A);\n map.put(A, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[N];\n Arrays.fill(total, 0);\n\n for (Integer nKey: map.keySet()) {\n total[nKey] = map.get(nKey);\n }\n\n for (int i = 0; i < N; i++) System.out.println(total[i]);\n }\n}", "public class Main {\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer N = Integer.parseInt(scanner.next());\n Map<Integer, Integer> map = new HashMap<Integer, Integer>();\n\n for (int i = 0; i < N-1; i++) {\n Integer A = Integer.parseInt(scanner.next()) -1;\n Integer count = map.get(A);\n map.put(A, (count == null) ? 1 : count + 1);\n }\n\n Integer[] total = new Integer[N];\n Arrays.fill(total, 0);\n\n for (Integer nKey: map.keySet()) {\n total[nKey] = map.get(nKey);\n }\n\n for (int i = 0; i < N; i++) System.out.println(total[i]);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { //コード Scanner scanner = new Scanner(System.in); Integer N = Integer.parseInt(scanner.next()); Map<Integer, Integer> map = new HashMap<Integer, Integer>(); for (int i = 0; i < N-1; i++) { Integer A = Integer.parseInt(scanner.next()) -1; Integer count = map.get(A); map.put(A, (count == null) ? 1 : count + 1); } Integer[] total = new Integer[N]; Arrays.fill(total, 0); for (Integer nKey: map.keySet()) { total[nKey] = map.get(nKey); } for (int i = 0; i < N; i++) System.out.println(total[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, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 2, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 90, 5 ], [ 90, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 57, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 66, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 84, 85 ], [ 84, 86 ], [ 6, 87 ], [ 87, 88 ], [ 0, 89 ], [ 89, 90 ], [ 89, 91 ] ]
[ "import java.util.*;\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[] As = new int[N];\n int[] Bossz = new int [N];\n for (int n = 1; n < N; n++) {\n As[n] = sc.nextInt();\n }\n\n for (int n = 1; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]);\n Bossz[As[n] - 1]++;\n }\n\n for (int n = 0; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]+\" \"+Bossz[n]);\n System.out.println(Bossz[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 int[] As = new int[N];\n int[] Bossz = new int [N];\n for (int n = 1; n < N; n++) {\n As[n] = sc.nextInt();\n }\n\n for (int n = 1; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]);\n Bossz[As[n] - 1]++;\n }\n\n for (int n = 0; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]+\" \"+Bossz[n]);\n System.out.println(Bossz[n]);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] As = new int[N];\n int[] Bossz = new int [N];\n for (int n = 1; n < N; n++) {\n As[n] = sc.nextInt();\n }\n\n for (int n = 1; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]);\n Bossz[As[n] - 1]++;\n }\n\n for (int n = 0; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]+\" \"+Bossz[n]);\n System.out.println(Bossz[n]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[] As = new int[N];\n int[] Bossz = new int [N];\n for (int n = 1; n < N; n++) {\n As[n] = sc.nextInt();\n }\n\n for (int n = 1; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]);\n Bossz[As[n] - 1]++;\n }\n\n for (int n = 0; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]+\" \"+Bossz[n]);\n System.out.println(Bossz[n]);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] As = new int[N];", "As", "new int[N]", "N", "int[] Bossz = new int [N];", "Bossz", "new int [N]", "N", "for (int n = 1; n < N; n++) {\n As[n] = sc.nextInt();\n }", "int n = 1;", "int n = 1;", "n", "1", "n < N", "n", "N", "n++", "n++", "n", "{\n As[n] = sc.nextInt();\n }", "{\n As[n] = sc.nextInt();\n }", "As[n] = sc.nextInt()", "As[n]", "As", "n", "sc.nextInt()", "sc.nextInt", "sc", "for (int n = 1; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]);\n Bossz[As[n] - 1]++;\n }", "int n = 1;", "int n = 1;", "n", "1", "n < N", "n", "N", "n++", "n++", "n", "{\n// System.out.println(\" \"+n+\" \"+As[n]);\n Bossz[As[n] - 1]++;\n }", "{\n// System.out.println(\" \"+n+\" \"+As[n]);\n Bossz[As[n] - 1]++;\n }", "Bossz[As[n] - 1]++", "Bossz[As[n] - 1]", "Bossz", "As[n] - 1", "As[n]", "As", "n", "1", "for (int n = 0; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]+\" \"+Bossz[n]);\n System.out.println(Bossz[n]);\n }", "int n = 0;", "int n = 0;", "n", "0", "n < N", "n", "N", "n++", "n++", "n", "{\n// System.out.println(\" \"+n+\" \"+As[n]+\" \"+Bossz[n]);\n System.out.println(Bossz[n]);\n }", "{\n// System.out.println(\" \"+n+\" \"+As[n]+\" \"+Bossz[n]);\n System.out.println(Bossz[n]);\n }", "System.out.println(Bossz[n])", "System.out.println", "System.out", "System", "System.out", "Bossz[n]", "Bossz", "n", "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[] As = new int[N];\n int[] Bossz = new int [N];\n for (int n = 1; n < N; n++) {\n As[n] = sc.nextInt();\n }\n\n for (int n = 1; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]);\n Bossz[As[n] - 1]++;\n }\n\n for (int n = 0; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]+\" \"+Bossz[n]);\n System.out.println(Bossz[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 int[] As = new int[N];\n int[] Bossz = new int [N];\n for (int n = 1; n < N; n++) {\n As[n] = sc.nextInt();\n }\n\n for (int n = 1; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]);\n Bossz[As[n] - 1]++;\n }\n\n for (int n = 0; n < N; n++) {\n// System.out.println(\" \"+n+\" \"+As[n]+\" \"+Bossz[n]);\n System.out.println(Bossz[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[] As = new int[N]; int[] Bossz = new int [N]; for (int n = 1; n < N; n++) { As[n] = sc.nextInt(); } for (int n = 1; n < N; n++) { // System.out.println(" "+n+" "+As[n]); Bossz[As[n] - 1]++; } for (int n = 0; n < N; n++) { // System.out.println(" "+n+" "+As[n]+" "+Bossz[n]); System.out.println(Bossz[n]); } } }
[ 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\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n //int x = sc.nextInt();\n int n = sc.nextInt();\n int[] id = new int[n-1];\n int[] times = new int[n+1];\n //int[] d = new int[102];\n \n for(int i = 0; i<n-1;i++) {\n \tid[i] = sc.nextInt();\n \ttimes[id[i]]++;\n }\n \n for(int i = 1; i<=n; i++) {\n \tSystem.out.println(times[i]);\n }\n \n \n \n \n \n \n \n //System.out.print(ans);\n \n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n //int x = sc.nextInt();\n int n = sc.nextInt();\n int[] id = new int[n-1];\n int[] times = new int[n+1];\n //int[] d = new int[102];\n \n for(int i = 0; i<n-1;i++) {\n \tid[i] = sc.nextInt();\n \ttimes[id[i]]++;\n }\n \n for(int i = 1; i<=n; i++) {\n \tSystem.out.println(times[i]);\n }\n \n \n \n \n \n \n \n //System.out.print(ans);\n \n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n //int x = sc.nextInt();\n int n = sc.nextInt();\n int[] id = new int[n-1];\n int[] times = new int[n+1];\n //int[] d = new int[102];\n \n for(int i = 0; i<n-1;i++) {\n \tid[i] = sc.nextInt();\n \ttimes[id[i]]++;\n }\n \n for(int i = 1; i<=n; i++) {\n \tSystem.out.println(times[i]);\n }\n \n \n \n \n \n \n \n //System.out.print(ans);\n \n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n //int x = sc.nextInt();\n int n = sc.nextInt();\n int[] id = new int[n-1];\n int[] times = new int[n+1];\n //int[] d = new int[102];\n \n for(int i = 0; i<n-1;i++) {\n \tid[i] = sc.nextInt();\n \ttimes[id[i]]++;\n }\n \n for(int i = 1; i<=n; i++) {\n \tSystem.out.println(times[i]);\n }\n \n \n \n \n \n \n \n //System.out.print(ans);\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[] id = new int[n-1];", "id", "new int[n-1]", "n-1", "n", "1", "int[] times = new int[n+1];", "times", "new int[n+1]", "n+1", "n", "1", "for(int i = 0; i<n-1;i++) {\n \tid[i] = sc.nextInt();\n \ttimes[id[i]]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n \tid[i] = sc.nextInt();\n \ttimes[id[i]]++;\n }", "{\n \tid[i] = sc.nextInt();\n \ttimes[id[i]]++;\n }", "id[i] = sc.nextInt()", "id[i]", "id", "i", "sc.nextInt()", "sc.nextInt", "sc", "times[id[i]]++", "times[id[i]]", "times", "id[i]", "id", "i", "for(int i = 1; i<=n; i++) {\n \tSystem.out.println(times[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n \tSystem.out.println(times[i]);\n }", "{\n \tSystem.out.println(times[i]);\n }", "System.out.println(times[i])", "System.out.println", "System.out", "System", "System.out", "times[i]", "times", "i", "String[] args", "args", "public class Main {\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n //int x = sc.nextInt();\n int n = sc.nextInt();\n int[] id = new int[n-1];\n int[] times = new int[n+1];\n //int[] d = new int[102];\n \n for(int i = 0; i<n-1;i++) {\n \tid[i] = sc.nextInt();\n \ttimes[id[i]]++;\n }\n \n for(int i = 1; i<=n; i++) {\n \tSystem.out.println(times[i]);\n }\n \n \n \n \n \n \n \n //System.out.print(ans);\n \n\t}\n}", "public class Main {\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n //int x = sc.nextInt();\n int n = sc.nextInt();\n int[] id = new int[n-1];\n int[] times = new int[n+1];\n //int[] d = new int[102];\n \n for(int i = 0; i<n-1;i++) {\n \tid[i] = sc.nextInt();\n \ttimes[id[i]]++;\n }\n \n for(int i = 1; i<=n; i++) {\n \tSystem.out.println(times[i]);\n }\n \n \n \n \n \n \n \n //System.out.print(ans);\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 n = sc.nextInt(); int[] id = new int[n-1]; int[] times = new int[n+1]; //int[] d = new int[102]; for(int i = 0; i<n-1;i++) { id[i] = sc.nextInt(); times[id[i]]++; } for(int i = 1; i<=n; i++) { System.out.println(times[i]); } //System.out.print(ans); } }
[ 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\n/**\n * C - management\n */\npublic class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner( System.in );\n // 社員数\n int n = sc.nextInt();\n // 社員番号\n int[] a = new int[n];\n for( int i = 1; i < n; i++ ) {\n int member = sc.nextInt();\n a[member - 1]++;\n }\n\n // 結果:それぞれの直属の部下の人数\n for( int i = 0; i < n; i++ ) {\n System.out.println( a[i] );\n }\n\n sc.close();\n }\n}", "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 // 社員数\n int n = sc.nextInt();\n // 社員番号\n int[] a = new int[n];\n for( int i = 1; i < n; i++ ) {\n int member = sc.nextInt();\n a[member - 1]++;\n }\n\n // 結果:それぞれの直属の部下の人数\n for( int i = 0; i < n; i++ ) {\n System.out.println( a[i] );\n }\n\n sc.close();\n }\n}", "Main", "public static void main(String[] args) {\n\n Scanner sc = new Scanner( System.in );\n // 社員数\n int n = sc.nextInt();\n // 社員番号\n int[] a = new int[n];\n for( int i = 1; i < n; i++ ) {\n int member = sc.nextInt();\n a[member - 1]++;\n }\n\n // 結果:それぞれの直属の部下の人数\n for( int i = 0; i < n; i++ ) {\n System.out.println( a[i] );\n }\n\n sc.close();\n }", "main", "{\n\n Scanner sc = new Scanner( System.in );\n // 社員数\n int n = sc.nextInt();\n // 社員番号\n int[] a = new int[n];\n for( int i = 1; i < n; i++ ) {\n int member = sc.nextInt();\n a[member - 1]++;\n }\n\n // 結果:それぞれの直属の部下の人数\n for( int i = 0; i < n; i++ ) {\n System.out.println( a[i] );\n }\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[] a = new int[n];", "a", "new int[n]", "n", "for( int i = 1; i < n; i++ ) {\n int member = sc.nextInt();\n a[member - 1]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n int member = sc.nextInt();\n a[member - 1]++;\n }", "{\n int member = sc.nextInt();\n a[member - 1]++;\n }", "int member = sc.nextInt();", "member", "sc.nextInt()", "sc.nextInt", "sc", "a[member - 1]++", "a[member - 1]", "a", "member - 1", "member", "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", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner( System.in );\n // 社員数\n int n = sc.nextInt();\n // 社員番号\n int[] a = new int[n];\n for( int i = 1; i < n; i++ ) {\n int member = sc.nextInt();\n a[member - 1]++;\n }\n\n // 結果:それぞれの直属の部下の人数\n for( int i = 0; i < n; i++ ) {\n System.out.println( a[i] );\n }\n\n sc.close();\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner( System.in );\n // 社員数\n int n = sc.nextInt();\n // 社員番号\n int[] a = new int[n];\n for( int i = 1; i < n; i++ ) {\n int member = sc.nextInt();\n a[member - 1]++;\n }\n\n // 結果:それぞれの直属の部下の人数\n for( int i = 0; i < n; i++ ) {\n System.out.println( a[i] );\n }\n\n sc.close();\n }\n}", "Main" ]
import java.util.Scanner; /** * C - management */ 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 member = sc.nextInt(); a[member - 1]++; } // 結果:それぞれの直属の部下の人数 for( int i = 0; i < n; i++ ) { System.out.println( a[i] ); } sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 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, 2, 18, 13, 13, 17, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 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 ], [ 21, 23 ], [ 24, 25 ], [ 24, 26 ], [ 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 ], [ 8, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 65, 67 ], [ 60, 68 ], [ 68, 69 ], [ 69, 70 ], [ 60, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 78, 79 ], [ 78, 80 ], [ 6, 81 ], [ 81, 82 ], [ 0, 83 ], [ 83, 84 ], [ 83, 85 ] ]
[ "import java.util.*;\n \npublic class Main {\n \n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt(); \n int[] vote = new int[N];\n int[] A = new int[N - 1]; \n for (int i = 0; i < N - 1; i++) {\n A[i] = stdIn.nextInt();\n vote[A[i] - 1]++;\n }\n stdIn.close();\n for (int i = 0; i < N; i++) {\n System.out.println(vote[i]);\n }\n\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n \n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt(); \n int[] vote = new int[N];\n int[] A = new int[N - 1]; \n for (int i = 0; i < N - 1; i++) {\n A[i] = stdIn.nextInt();\n vote[A[i] - 1]++;\n }\n stdIn.close();\n for (int i = 0; i < N; i++) {\n System.out.println(vote[i]);\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt(); \n int[] vote = new int[N];\n int[] A = new int[N - 1]; \n for (int i = 0; i < N - 1; i++) {\n A[i] = stdIn.nextInt();\n vote[A[i] - 1]++;\n }\n stdIn.close();\n for (int i = 0; i < N; i++) {\n System.out.println(vote[i]);\n }\n\n }", "main", "{\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt(); \n int[] vote = new int[N];\n int[] A = new int[N - 1]; \n for (int i = 0; i < N - 1; i++) {\n A[i] = stdIn.nextInt();\n vote[A[i] - 1]++;\n }\n stdIn.close();\n for (int i = 0; i < N; i++) {\n System.out.println(vote[i]);\n }\n\n }", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "int N = stdIn.nextInt();", "N", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "int[] vote = new int[N];", "vote", "new int[N]", "N", "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] = stdIn.nextInt();\n vote[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] = stdIn.nextInt();\n vote[A[i] - 1]++;\n }", "{\n A[i] = stdIn.nextInt();\n vote[A[i] - 1]++;\n }", "A[i] = stdIn.nextInt()", "A[i]", "A", "i", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "vote[A[i] - 1]++", "vote[A[i] - 1]", "vote", "A[i] - 1", "A[i]", "A", "i", "1", "stdIn.close()", "stdIn.close", "stdIn", "for (int i = 0; i < N; i++) {\n System.out.println(vote[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n System.out.println(vote[i]);\n }", "{\n System.out.println(vote[i]);\n }", "System.out.println(vote[i])", "System.out.println", "System.out", "System", "System.out", "vote[i]", "vote", "i", "String[] args", "args", "public class Main {\n \n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt(); \n int[] vote = new int[N];\n int[] A = new int[N - 1]; \n for (int i = 0; i < N - 1; i++) {\n A[i] = stdIn.nextInt();\n vote[A[i] - 1]++;\n }\n stdIn.close();\n for (int i = 0; i < N; i++) {\n System.out.println(vote[i]);\n }\n\n }\n}", "public class Main {\n \n public static void main(String[] args) {\n Scanner stdIn = new Scanner(System.in);\n int N = stdIn.nextInt(); \n int[] vote = new int[N];\n int[] A = new int[N - 1]; \n for (int i = 0; i < N - 1; i++) {\n A[i] = stdIn.nextInt();\n vote[A[i] - 1]++;\n }\n stdIn.close();\n for (int i = 0; i < N; i++) {\n System.out.println(vote[i]);\n }\n\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int N = stdIn.nextInt(); int[] vote = new int[N]; int[] A = new int[N - 1]; for (int i = 0; i < N - 1; i++) { A[i] = stdIn.nextInt(); vote[A[i] - 1]++; } stdIn.close(); for (int i = 0; i < N; i++) { System.out.println(vote[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 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, 4, 18, 13, 0, 18, 13, 13, 17, 0, 18, 13, 2, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 17, 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, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 116, 5 ], [ 116, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 24 ], [ 24, 25 ], [ 24, 26 ], [ 8, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 35, 37 ], [ 28, 38 ], [ 38, 39 ], [ 39, 40 ], [ 28, 41 ], [ 42, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 8, 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 ], [ 76, 80 ], [ 75, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 8, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 89, 100 ], [ 101, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 8, 110 ], [ 110, 111 ], [ 111, 112 ], [ 6, 113 ], [ 113, 114 ], [ 0, 115 ], [ 115, 116 ], [ 115, 117 ] ]
[ "import java.util.Scanner;\n\n\npublic class Main {\n\n\n\t//final int MOD = 1000000007;\n\n\n\tpublic static void main(String[] args) {\n\n//\t\tlong ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tboolean f = false;\n\n\t\tint n = sc.nextInt();\n//\t\tint m = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor (int i = 0; i < n-1; i++) {\n\t\t\ta[i]= sc.nextInt();\n\t\t\tans[i] = 0;\n\t\t}\n\t\tans[n-1] = 0;\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;\n\t\t}\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n//\t\tif(f) {\n//\t\t\tSystem.out.println(\"Yes\");\n//\t\t} else {\n//\t\t\tSystem.out.println(\"No\");\n//\t\t}\n\n\t\t//System.out.println(ans);\n\n\t\tsc.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\n\t//final int MOD = 1000000007;\n\n\n\tpublic static void main(String[] args) {\n\n//\t\tlong ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tboolean f = false;\n\n\t\tint n = sc.nextInt();\n//\t\tint m = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor (int i = 0; i < n-1; i++) {\n\t\t\ta[i]= sc.nextInt();\n\t\t\tans[i] = 0;\n\t\t}\n\t\tans[n-1] = 0;\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;\n\t\t}\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n//\t\tif(f) {\n//\t\t\tSystem.out.println(\"Yes\");\n//\t\t} else {\n//\t\t\tSystem.out.println(\"No\");\n//\t\t}\n\n\t\t//System.out.println(ans);\n\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\n//\t\tlong ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tboolean f = false;\n\n\t\tint n = sc.nextInt();\n//\t\tint m = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor (int i = 0; i < n-1; i++) {\n\t\t\ta[i]= sc.nextInt();\n\t\t\tans[i] = 0;\n\t\t}\n\t\tans[n-1] = 0;\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;\n\t\t}\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n//\t\tif(f) {\n//\t\t\tSystem.out.println(\"Yes\");\n//\t\t} else {\n//\t\t\tSystem.out.println(\"No\");\n//\t\t}\n\n\t\t//System.out.println(ans);\n\n\t\tsc.close();\n\t}", "main", "{\n\n//\t\tlong ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tboolean f = false;\n\n\t\tint n = sc.nextInt();\n//\t\tint m = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor (int i = 0; i < n-1; i++) {\n\t\t\ta[i]= sc.nextInt();\n\t\t\tans[i] = 0;\n\t\t}\n\t\tans[n-1] = 0;\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;\n\t\t}\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n//\t\tif(f) {\n//\t\t\tSystem.out.println(\"Yes\");\n//\t\t} else {\n//\t\t\tSystem.out.println(\"No\");\n//\t\t}\n\n\t\t//System.out.println(ans);\n\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "boolean f = false;", "f", "false", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] a = new int[n];", "a", "new int[n]", "n", "int[] ans = new int[n];", "ans", "new int[n]", "n", "for (int i = 0; i < n-1; i++) {\n\t\t\ta[i]= sc.nextInt();\n\t\t\tans[i] = 0;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n\t\t\ta[i]= sc.nextInt();\n\t\t\tans[i] = 0;\n\t\t}", "{\n\t\t\ta[i]= sc.nextInt();\n\t\t\tans[i] = 0;\n\t\t}", "a[i]= sc.nextInt()", "a[i]", "a", "i", "sc.nextInt()", "sc.nextInt", "sc", "ans[i] = 0", "ans[i]", "ans", "i", "0", "ans[n-1] = 0", "ans[n-1]", "ans", "n-1", "n", "1", "0", "for(int i = 0; i < n; i++) {\n\t\t\tif(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tif(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;\n\t\t}", "{\n\t\t\tif(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;\n\t\t}", "if(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;", "a[i] != 0", "a[i]", "a", "i", "0", "ans[a[i]-1]++", "ans[a[i]-1]", "ans", "a[i]-1", "a[i]", "a", "i", "1", "for(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "System.out.println(ans[i])", "System.out.println", "System.out", "System", "System.out", "ans[i]", "ans", "i", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\n\n\t//final int MOD = 1000000007;\n\n\n\tpublic static void main(String[] args) {\n\n//\t\tlong ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tboolean f = false;\n\n\t\tint n = sc.nextInt();\n//\t\tint m = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor (int i = 0; i < n-1; i++) {\n\t\t\ta[i]= sc.nextInt();\n\t\t\tans[i] = 0;\n\t\t}\n\t\tans[n-1] = 0;\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;\n\t\t}\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n//\t\tif(f) {\n//\t\t\tSystem.out.println(\"Yes\");\n//\t\t} else {\n//\t\t\tSystem.out.println(\"No\");\n//\t\t}\n\n\t\t//System.out.println(ans);\n\n\t\tsc.close();\n\t}\n}", "public class Main {\n\n\n\t//final int MOD = 1000000007;\n\n\n\tpublic static void main(String[] args) {\n\n//\t\tlong ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tboolean f = false;\n\n\t\tint n = sc.nextInt();\n//\t\tint m = sc.nextInt();\n\n\t\tint[] a = new int[n];\n\t\tint[] ans = new int[n];\n\t\tfor (int i = 0; i < n-1; i++) {\n\t\t\ta[i]= sc.nextInt();\n\t\t\tans[i] = 0;\n\t\t}\n\t\tans[n-1] = 0;\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(a[i] != 0)\n\t\t\t\tans[a[i]-1]++;\n\t\t}\n\n\t\t//-------------------------------------------------------------------------------------\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\n//\t\tif(f) {\n//\t\t\tSystem.out.println(\"Yes\");\n//\t\t} else {\n//\t\t\tSystem.out.println(\"No\");\n//\t\t}\n\n\t\t//System.out.println(ans);\n\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { //final int MOD = 1000000007; public static void main(String[] args) { // long ans = 0; Scanner sc = new Scanner(System.in); boolean f = false; int n = sc.nextInt(); // int m = sc.nextInt(); int[] a = new int[n]; int[] ans = new int[n]; for (int i = 0; i < n-1; i++) { a[i]= sc.nextInt(); ans[i] = 0; } ans[n-1] = 0; //------------------------------------------------------------------------------------- for(int i = 0; i < n; i++) { if(a[i] != 0) ans[a[i]-1]++; } //------------------------------------------------------------------------------------- for(int i = 0; i < n; i++) { System.out.println(ans[i]); } // if(f) { // System.out.println("Yes"); // } else { // System.out.println("No"); // } //System.out.println(ans); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 40, 18, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 18, 13, 13, 18, 13, 13, 4, 18, 18, 13, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 91, 5 ], [ 91, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 8, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 25, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 37, 41 ], [ 41, 42 ], [ 42, 43 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 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 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 8, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 6, 88 ], [ 88, 89 ], [ 0, 90 ], [ 90, 91 ], [ 90, 92 ] ]
[ "import java.util.*;\npublic class Main\n{\npublic static void main(String[] args) {\nScanner sc=new Scanner(System.in);\n\nint n =sc.nextInt();\nint a[]=new int[n];\nint ans[]=new int[200000];\nfor(int i=1;i<n;i++)\na[i]=sc.nextInt();\nfor(int i=1;i<n;i++)\nans[a[i]]++;\nfor(int i=1;i<n;i++)\nSystem.out.println(ans[i]);\nSystem.out.println(0);\n\n\n\n}\n}", "import java.util.*;", "util.*", "java", "public class Main\n{\npublic static void main(String[] args) {\nScanner sc=new Scanner(System.in);\n\nint n =sc.nextInt();\nint a[]=new int[n];\nint ans[]=new int[200000];\nfor(int i=1;i<n;i++)\na[i]=sc.nextInt();\nfor(int i=1;i<n;i++)\nans[a[i]]++;\nfor(int i=1;i<n;i++)\nSystem.out.println(ans[i]);\nSystem.out.println(0);\n\n\n\n}\n}", "Main", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\n\nint n =sc.nextInt();\nint a[]=new int[n];\nint ans[]=new int[200000];\nfor(int i=1;i<n;i++)\na[i]=sc.nextInt();\nfor(int i=1;i<n;i++)\nans[a[i]]++;\nfor(int i=1;i<n;i++)\nSystem.out.println(ans[i]);\nSystem.out.println(0);\n\n\n\n}", "main", "{\nScanner sc=new Scanner(System.in);\n\nint n =sc.nextInt();\nint a[]=new int[n];\nint ans[]=new int[200000];\nfor(int i=1;i<n;i++)\na[i]=sc.nextInt();\nfor(int i=1;i<n;i++)\nans[a[i]]++;\nfor(int i=1;i<n;i++)\nSystem.out.println(ans[i]);\nSystem.out.println(0);\n\n\n\n}", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n =sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int a[]=new int[n];", "a", "new int[n]", "n", "int ans[]=new int[200000];", "ans", "new int[200000]", "200000", "for(int i=1;i<n;i++)\na[i]=sc.nextInt();", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "a[i]=sc.nextInt();", "a[i]=sc.nextInt()", "a[i]", "a", "i", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=1;i<n;i++)\nans[a[i]]++;", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "ans[a[i]]++;", "ans[a[i]]++", "ans[a[i]]", "ans", "a[i]", "a", "i", "for(int i=1;i<n;i++)\nSystem.out.println(ans[i]);", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "System.out.println(ans[i]);", "System.out.println(ans[i])", "System.out.println", "System.out", "System", "System.out", "ans[i]", "ans", "i", "System.out.println(0)", "System.out.println", "System.out", "System", "System.out", "0", "String[] args", "args", "public class Main\n{\npublic static void main(String[] args) {\nScanner sc=new Scanner(System.in);\n\nint n =sc.nextInt();\nint a[]=new int[n];\nint ans[]=new int[200000];\nfor(int i=1;i<n;i++)\na[i]=sc.nextInt();\nfor(int i=1;i<n;i++)\nans[a[i]]++;\nfor(int i=1;i<n;i++)\nSystem.out.println(ans[i]);\nSystem.out.println(0);\n\n\n\n}\n}", "public class Main\n{\npublic static void main(String[] args) {\nScanner sc=new Scanner(System.in);\n\nint n =sc.nextInt();\nint a[]=new int[n];\nint ans[]=new int[200000];\nfor(int i=1;i<n;i++)\na[i]=sc.nextInt();\nfor(int i=1;i<n;i++)\nans[a[i]]++;\nfor(int i=1;i<n;i++)\nSystem.out.println(ans[i]);\nSystem.out.println(0);\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 n =sc.nextInt(); int a[]=new int[n]; int ans[]=new int[200000]; for(int i=1;i<n;i++) a[i]=sc.nextInt(); for(int i=1;i<n;i++) ans[a[i]]++; for(int i=1;i<n;i++) System.out.println(ans[i]); System.out.println(0); } }
[ 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, 40, 18, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 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 ], [ 84, 8 ], [ 84, 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 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 56, 57 ], [ 57, 58 ], [ 11, 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 ], [ 75, 77 ], [ 11, 78 ], [ 78, 79 ], [ 79, 80 ], [ 9, 81 ], [ 81, 82 ], [ 0, 83 ], [ 83, 84 ], [ 83, 85 ] ]
[ "import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int n = Integer.parseInt(f.readLine());\n int[] freq = new int[n+1];\n StringTokenizer st = new StringTokenizer(f.readLine());\n for(int i = 0; i < n-1; i++){\n freq[Integer.parseInt(st.nextToken())]++;\n }\n for(int i = 1; i <= n; i++){\n out.println(freq[i]);\n }\n\n\n out.close();\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int n = Integer.parseInt(f.readLine());\n int[] freq = new int[n+1];\n StringTokenizer st = new StringTokenizer(f.readLine());\n for(int i = 0; i < n-1; i++){\n freq[Integer.parseInt(st.nextToken())]++;\n }\n for(int i = 1; i <= n; i++){\n out.println(freq[i]);\n }\n\n\n out.close();\n }\n}", "Main", "public static void main(String[] args) throws IOException{\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int n = Integer.parseInt(f.readLine());\n int[] freq = new int[n+1];\n StringTokenizer st = new StringTokenizer(f.readLine());\n for(int i = 0; i < n-1; i++){\n freq[Integer.parseInt(st.nextToken())]++;\n }\n for(int i = 1; i <= n; i++){\n out.println(freq[i]);\n }\n\n\n out.close();\n }", "main", "{\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int n = Integer.parseInt(f.readLine());\n int[] freq = new int[n+1];\n StringTokenizer st = new StringTokenizer(f.readLine());\n for(int i = 0; i < n-1; i++){\n freq[Integer.parseInt(st.nextToken())]++;\n }\n for(int i = 1; i <= n; i++){\n out.println(freq[i]);\n }\n\n\n out.close();\n }", "BufferedReader f = new BufferedReader(new InputStreamReader(System.in));", "f", "new BufferedReader(new InputStreamReader(System.in))", "PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));", "out", "new PrintWriter(new OutputStreamWriter(System.out))", "int n = Integer.parseInt(f.readLine());", "n", "Integer.parseInt(f.readLine())", "Integer.parseInt", "Integer", "f.readLine()", "f.readLine", "f", "int[] freq = new int[n+1];", "freq", "new int[n+1]", "n+1", "n", "1", "StringTokenizer st = new StringTokenizer(f.readLine());", "st", "new StringTokenizer(f.readLine())", "for(int i = 0; i < n-1; i++){\n freq[Integer.parseInt(st.nextToken())]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n freq[Integer.parseInt(st.nextToken())]++;\n }", "{\n freq[Integer.parseInt(st.nextToken())]++;\n }", "freq[Integer.parseInt(st.nextToken())]++", "freq[Integer.parseInt(st.nextToken())]", "freq", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "for(int i = 1; i <= n; i++){\n out.println(freq[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n out.println(freq[i]);\n }", "{\n out.println(freq[i]);\n }", "out.println(freq[i])", "out.println", "out", "freq[i]", "freq", "i", "out.close()", "out.close", "out", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int n = Integer.parseInt(f.readLine());\n int[] freq = new int[n+1];\n StringTokenizer st = new StringTokenizer(f.readLine());\n for(int i = 0; i < n-1; i++){\n freq[Integer.parseInt(st.nextToken())]++;\n }\n for(int i = 1; i <= n; i++){\n out.println(freq[i]);\n }\n\n\n out.close();\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int n = Integer.parseInt(f.readLine());\n int[] freq = new int[n+1];\n StringTokenizer st = new StringTokenizer(f.readLine());\n for(int i = 0; i < n-1; i++){\n freq[Integer.parseInt(st.nextToken())]++;\n }\n for(int i = 1; i <= n; i++){\n out.println(freq[i]);\n }\n\n\n out.close();\n }\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws IOException{ BufferedReader f = new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); int n = Integer.parseInt(f.readLine()); int[] freq = new int[n+1]; StringTokenizer st = new StringTokenizer(f.readLine()); for(int i = 0; i < n-1; i++){ freq[Integer.parseInt(st.nextToken())]++; } for(int i = 1; i <= n; i++){ out.println(freq[i]); } out.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 40, 18, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 12, 13, 30, 41, 13, 17, 42, 2, 13, 17, 30, 4, 13, 40, 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 ], [ 117, 11 ], [ 117, 12 ], [ 12, 13 ], [ 12, 14 ], [ 117, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 17, 23 ], [ 23, 24 ], [ 23, 25 ], [ 26, 27 ], [ 26, 28 ], [ 17, 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 ], [ 17, 51 ], [ 51, 52 ], [ 51, 53 ], [ 54, 55 ], [ 54, 56 ], [ 17, 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 ], [ 75, 77 ], [ 17, 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 ], [ 117, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 99, 114 ], [ 114, 115 ], [ 0, 116 ], [ 116, 117 ], [ 116, 118 ] ]
[ "/* package codechef; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n\n\n/* Name of the class has to be \"Main\" only if the class is public. */\npublic class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n int n=in.nextInt();\n int[] a = new int[n-1];\n for(int i=0;i<n-1;i++)\n {\n a[i]=in.nextInt();\n }\n \n int[] ans= new int[n+1];\n \n for(int i=0;i<n-1;i++)\n {\n ans[a[i]]++;\n }\n \n for(int i=1;i<=n;i++)\n {\n System.out.println(ans[i]);\n }\n \n \n \n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "import java.io.*;", "io.*", "java", "public class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n int n=in.nextInt();\n int[] a = new int[n-1];\n for(int i=0;i<n-1;i++)\n {\n a[i]=in.nextInt();\n }\n \n int[] ans= new int[n+1];\n \n for(int i=0;i<n-1;i++)\n {\n ans[a[i]]++;\n }\n \n for(int i=1;i<=n;i++)\n {\n System.out.println(ans[i]);\n }\n \n \n \n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}", "Main", "static Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "public static void solve()\n {\n int n=in.nextInt();\n int[] a = new int[n-1];\n for(int i=0;i<n-1;i++)\n {\n a[i]=in.nextInt();\n }\n \n int[] ans= new int[n+1];\n \n for(int i=0;i<n-1;i++)\n {\n ans[a[i]]++;\n }\n \n for(int i=1;i<=n;i++)\n {\n System.out.println(ans[i]);\n }\n \n \n \n }", "solve", "{\n int n=in.nextInt();\n int[] a = new int[n-1];\n for(int i=0;i<n-1;i++)\n {\n a[i]=in.nextInt();\n }\n \n int[] ans= new int[n+1];\n \n for(int i=0;i<n-1;i++)\n {\n ans[a[i]]++;\n }\n \n for(int i=1;i<=n;i++)\n {\n System.out.println(ans[i]);\n }\n \n \n \n }", "int n=in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] a = new int[n-1];", "a", "new int[n-1]", "n-1", "n", "1", "for(int i=0;i<n-1;i++)\n {\n a[i]=in.nextInt();\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n a[i]=in.nextInt();\n }", "{\n a[i]=in.nextInt();\n }", "a[i]=in.nextInt()", "a[i]", "a", "i", "in.nextInt()", "in.nextInt", "in", "int[] ans= new int[n+1];", "ans", "new int[n+1]", "n+1", "n", "1", "for(int i=0;i<n-1;i++)\n {\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 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 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", "public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}", "main", "{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}", "int t=1;", "t", "1", "while(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}", "t>0", "t", "0", "{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}", "solve()", "solve", "t--", "t", "String[] args", "args", "public class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n int n=in.nextInt();\n int[] a = new int[n-1];\n for(int i=0;i<n-1;i++)\n {\n a[i]=in.nextInt();\n }\n \n int[] ans= new int[n+1];\n \n for(int i=0;i<n-1;i++)\n {\n ans[a[i]]++;\n }\n \n for(int i=1;i<=n;i++)\n {\n System.out.println(ans[i]);\n }\n \n \n \n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}", "public class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n int n=in.nextInt();\n int[] a = new int[n-1];\n for(int i=0;i<n-1;i++)\n {\n a[i]=in.nextInt();\n }\n \n int[] ans= new int[n+1];\n \n for(int i=0;i<n-1;i++)\n {\n ans[a[i]]++;\n }\n \n for(int i=1;i<=n;i++)\n {\n System.out.println(ans[i]);\n }\n \n \n \n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}", "Main" ]
/* package codechef; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ public class Main { static Scanner in = new Scanner(System.in); public static void solve() { int n=in.nextInt(); int[] a = new int[n-1]; for(int i=0;i<n-1;i++) { a[i]=in.nextInt(); } int[] ans= new int[n+1]; for(int i=0;i<n-1;i++) { ans[a[i]]++; } for(int i=1;i<=n;i++) { System.out.println(ans[i]); } } public static void main (String[] args) throws java.lang.Exception { // your code goes here int t=1; //in.nextLine(); while(t>0) { solve(); t--; } // System.out.println(x); } }
[ 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 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, 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 ], [ 82, 8 ], [ 82, 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 ], [ 32, 33 ], [ 32, 34 ], [ 30, 35 ], [ 35, 36 ], [ 35, 37 ], [ 30, 38 ], [ 38, 39 ], [ 39, 40 ], [ 30, 41 ], [ 42, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 48, 49 ], [ 49, 50 ], [ 42, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 11, 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 ], [ 11, 76 ], [ 76, 77 ], [ 77, 78 ], [ 9, 79 ], [ 79, 80 ], [ 0, 81 ], [ 81, 82 ], [ 81, 83 ] ]
[ "import java.io.*;\nimport java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n// DecimalFormat df = new DecimalFormat(\"0.00000000\");\n\n final int N = Integer.parseInt(sc.next());\n int[] ar = new int[N];\n for (int i = 1; i < N; i++) {\n int index = Integer.parseInt(sc.next());\n ar[index - 1]++;\n }\n for (int i = 0; i < N; i++) {\n out.println(ar[i]);\n }\n \n out.flush();\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n// DecimalFormat df = new DecimalFormat(\"0.00000000\");\n\n final int N = Integer.parseInt(sc.next());\n int[] ar = new int[N];\n for (int i = 1; i < N; i++) {\n int index = Integer.parseInt(sc.next());\n ar[index - 1]++;\n }\n for (int i = 0; i < N; i++) {\n out.println(ar[i]);\n }\n \n out.flush();\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n// DecimalFormat df = new DecimalFormat(\"0.00000000\");\n\n final int N = Integer.parseInt(sc.next());\n int[] ar = new int[N];\n for (int i = 1; i < N; i++) {\n int index = Integer.parseInt(sc.next());\n ar[index - 1]++;\n }\n for (int i = 0; i < N; i++) {\n out.println(ar[i]);\n }\n \n out.flush();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n// DecimalFormat df = new DecimalFormat(\"0.00000000\");\n\n final int N = Integer.parseInt(sc.next());\n int[] ar = new int[N];\n for (int i = 1; i < N; i++) {\n int index = Integer.parseInt(sc.next());\n ar[index - 1]++;\n }\n for (int i = 0; i < N; i++) {\n out.println(ar[i]);\n }\n \n out.flush();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "final int N = Integer.parseInt(sc.next());", "N", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int[] ar = new int[N];", "ar", "new int[N]", "N", "for (int i = 1; i < N; i++) {\n int index = Integer.parseInt(sc.next());\n ar[index - 1]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n int index = Integer.parseInt(sc.next());\n ar[index - 1]++;\n }", "{\n int index = Integer.parseInt(sc.next());\n ar[index - 1]++;\n }", "int index = Integer.parseInt(sc.next());", "index", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "ar[index - 1]++", "ar[index - 1]", "ar", "index - 1", "index", "1", "for (int i = 0; i < N; i++) {\n out.println(ar[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n out.println(ar[i]);\n }", "{\n out.println(ar[i]);\n }", "out.println(ar[i])", "out.println", "out", "ar[i]", "ar", "i", "out.flush()", "out.flush", "out", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n// DecimalFormat df = new DecimalFormat(\"0.00000000\");\n\n final int N = Integer.parseInt(sc.next());\n int[] ar = new int[N];\n for (int i = 1; i < N; i++) {\n int index = Integer.parseInt(sc.next());\n ar[index - 1]++;\n }\n for (int i = 0; i < N; i++) {\n out.println(ar[i]);\n }\n \n out.flush();\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n// DecimalFormat df = new DecimalFormat(\"0.00000000\");\n\n final int N = Integer.parseInt(sc.next());\n int[] ar = new int[N];\n for (int i = 1; i < N; i++) {\n int index = Integer.parseInt(sc.next());\n ar[index - 1]++;\n }\n for (int i = 0; i < N; i++) {\n out.println(ar[i]);\n }\n \n out.flush();\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); // DecimalFormat df = new DecimalFormat("0.00000000"); final int N = Integer.parseInt(sc.next()); int[] ar = new int[N]; for (int i = 1; i < N; i++) { int index = Integer.parseInt(sc.next()); ar[index - 1]++; } for (int i = 0; i < N; i++) { out.println(ar[i]); } out.flush(); } }
[ 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, 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, 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 ], [ 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 ], [ 44, 47 ], [ 43, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 48, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 52, 57 ], [ 43, 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.*;\nimport java.io.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n \n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int N = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc.\n HashMap<Integer,Integer> map = new HashMap();\n //System.out.println(N);\n \n for(int i = 1; i <= N-1; i++) {\n int n = in.nextInt();\n if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);\n }\n \n for(int i = 1; i <= N; i++){\n if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n \n }\n \n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n\n public static void main(String[] args) {\n \n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int N = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc.\n HashMap<Integer,Integer> map = new HashMap();\n //System.out.println(N);\n \n for(int i = 1; i <= N-1; i++) {\n int n = in.nextInt();\n if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);\n }\n \n for(int i = 1; i <= N; i++){\n if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n \n }\n \n}", "Main", "public static void main(String[] args) {\n \n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int N = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc.\n HashMap<Integer,Integer> map = new HashMap();\n //System.out.println(N);\n \n for(int i = 1; i <= N-1; i++) {\n int n = in.nextInt();\n if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);\n }\n \n for(int i = 1; i <= N; i++){\n if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n \n }", "main", "{\n \n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int N = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc.\n HashMap<Integer,Integer> map = new HashMap();\n //System.out.println(N);\n \n for(int i = 1; i <= N-1; i++) {\n int n = in.nextInt();\n if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);\n }\n \n for(int i = 1; i <= N; i++){\n if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }\n }\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", "HashMap<Integer,Integer> map = new HashMap();", "map", "new HashMap()", "for(int i = 1; i <= N-1; i++) {\n int n = in.nextInt();\n if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n int n = in.nextInt();\n if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);\n }", "{\n int n = in.nextInt();\n if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);\n }", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);", "map.containsKey(n)", "map.containsKey", "map", "n", "map.put(n, map.get(n)+1)", "map.put", "map", "n", "map.get(n)+1", "map.get(n)", "map.get", "map", "n", "1", "map.put(n, 1)", "map.put", "map", "n", "1", "for(int i = 1; i <= N; i++){\n if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= N", "i", "N", "i++", "i++", "i", "{\n if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }\n }", "{\n if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }\n }", "if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }", "map.containsKey(i)", "map.containsKey", "map", "i", "{\n System.out.println(map.get(i));\n }", "System.out.println(map.get(i))", "System.out.println", "System.out", "System", "System.out", "map.get(i)", "map.get", "map", "i", "{\n System.out.println(0);\n }", "System.out.println(0)", "System.out.println", "System.out", "System", "System.out", "0", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n \n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int N = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc.\n HashMap<Integer,Integer> map = new HashMap();\n //System.out.println(N);\n \n for(int i = 1; i <= N-1; i++) {\n int n = in.nextInt();\n if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);\n }\n \n for(int i = 1; i <= N; i++){\n if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n \n }\n \n}", "public class Main {\n\n public static void main(String[] args) {\n \n Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n int N = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc.\n HashMap<Integer,Integer> map = new HashMap();\n //System.out.println(N);\n \n for(int i = 1; i <= N-1; i++) {\n int n = in.nextInt();\n if(map.containsKey(n)) map.put(n, map.get(n)+1);\n else map.put(n, 1);\n }\n \n for(int i = 1; i <= N; i++){\n if(map.containsKey(i)) {\n System.out.println(map.get(i));\n }\n else {\n System.out.println(0);\n }\n }\n \n }\n \n}", "Main" ]
import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); int N = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc. HashMap<Integer,Integer> map = new HashMap(); //System.out.println(N); for(int i = 1; i <= N-1; i++) { int n = in.nextInt(); if(map.containsKey(n)) map.put(n, map.get(n)+1); else map.put(n, 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, 41, 13, 20, 41, 13, 20, 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, 13, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 4, 13, 18, 13, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 29, 17, 0, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 29, 17, 29, 17, 12, 13, 30, 14, 4, 13, 29, 18, 13, 40, 13, 29, 40, 17, 12, 13, 30, 29, 2, 2, 17, 13, 2, 13, 17, 23, 13, 12, 13, 30, 42, 2, 4, 13, 40, 4, 13, 18, 13, 13, 40, 13, 12, 13, 30, 4, 13, 29, 4, 13, 12, 13, 30, 14, 40, 4, 13, 37, 20, 41, 13, 20, 41, 13, 4, 13, 42, 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, 4, 13, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 2, 17, 13, 30, 37, 20, 30, 0, 13, 17, 42, 17, 30, 41, 13, 4, 13, 14, 2, 2, 17, 13, 2, 13, 17, 0, 13, 2, 2, 13, 17, 2, 13, 17, 14, 2, 2, 13, 40, 17, 40, 4, 13, 13, 29, 8, 13, 40, 13, 13, 37, 20, 12, 13, 30, 41, 13, 4, 13, 14, 2, 2, 13, 18, 13, 13, 2, 18, 13, 13, 13, 37, 20, 29, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 14, 40, 4, 13, 37, 20, 29, 4, 13, 12, 13, 30, 42, 2, 4, 13, 2, 2, 18, 13, 13, 17, 2, 18, 13, 13, 17, 40, 13, 14, 40, 4, 13, 37, 20, 41, 13, 20, 41, 13, 4, 13, 42, 2, 2, 13, 17, 2, 13, 17, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 474, 8 ], [ 474, 9 ], [ 9, 10 ], [ 9, 11 ], [ 474, 12 ], [ 12, 13 ], [ 12, 14 ], [ 474, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 17, 23 ], [ 23, 24 ], [ 23, 25 ], [ 17, 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 ], [ 45, 49 ], [ 17, 50 ], [ 50, 51 ], [ 50, 52 ], [ 50, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 17, 59 ], [ 59, 60 ], [ 60, 61 ], [ 17, 62 ], [ 62, 63 ], [ 63, 64 ], [ 17, 65 ], [ 65, 66 ], [ 66, 67 ], [ 15, 68 ], [ 68, 69 ], [ 0, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 70, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 78 ], [ 78, 79 ], [ 78, 80 ], [ 70, 81 ], [ 81, 82 ], [ 81, 83 ], [ 70, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 70, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 92, 100 ], [ 100, 101 ], [ 70, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 109, 110 ], [ 104, 111 ], [ 111, 112 ], [ 111, 113 ], [ 104, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 114, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 104, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 132, 133 ], [ 104, 134 ], [ 134, 135 ], [ 70, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 139, 147 ], [ 147, 148 ], [ 148, 149 ], [ 70, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 158, 159 ], [ 158, 160 ], [ 150, 161 ], [ 161, 162 ], [ 70, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 167, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 173, 175 ], [ 166, 176 ], [ 176, 177 ], [ 70, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 181, 182 ], [ 180, 183 ], [ 183, 184 ], [ 184, 185 ], [ 70, 186 ], [ 186, 187 ], [ 186, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 189, 193 ], [ 193, 194 ], [ 188, 195 ], [ 195, 196 ], [ 195, 197 ], [ 188, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 188, 202 ], [ 202, 203 ], [ 203, 204 ], [ 203, 205 ], [ 202, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 207, 210 ], [ 206, 211 ], [ 211, 212 ], [ 211, 213 ], [ 213, 214 ], [ 188, 215 ], [ 215, 216 ], [ 216, 217 ], [ 217, 218 ], [ 70, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 222, 223 ], [ 223, 224 ], [ 224, 225 ], [ 222, 226 ], [ 226, 227 ], [ 221, 228 ], [ 228, 229 ], [ 228, 230 ], [ 221, 231 ], [ 231, 232 ], [ 231, 233 ], [ 233, 234 ], [ 221, 235 ], [ 235, 236 ], [ 236, 237 ], [ 236, 238 ], [ 235, 239 ], [ 239, 240 ], [ 240, 241 ], [ 240, 242 ], [ 239, 243 ], [ 243, 244 ], [ 243, 245 ], [ 235, 246 ], [ 246, 247 ], [ 247, 248 ], [ 248, 249 ], [ 248, 250 ], [ 247, 251 ], [ 251, 252 ], [ 251, 253 ], [ 246, 254 ], [ 254, 255 ], [ 255, 256 ], [ 246, 257 ], [ 257, 258 ], [ 258, 259 ], [ 258, 260 ], [ 221, 261 ], [ 261, 262 ], [ 261, 263 ], [ 263, 264 ], [ 264, 265 ], [ 264, 266 ], [ 266, 267 ], [ 263, 268 ], [ 268, 269 ], [ 269, 270 ], [ 270, 271 ], [ 270, 272 ], [ 269, 273 ], [ 273, 274 ], [ 273, 275 ], [ 268, 276 ], [ 276, 277 ], [ 276, 278 ], [ 278, 279 ], [ 279, 280 ], [ 279, 281 ], [ 278, 282 ], [ 282, 283 ], [ 282, 284 ], [ 268, 285 ], [ 285, 286 ], [ 286, 287 ], [ 287, 288 ], [ 287, 289 ], [ 289, 290 ], [ 286, 291 ], [ 291, 292 ], [ 292, 293 ], [ 292, 294 ], [ 285, 295 ], [ 295, 296 ], [ 296, 297 ], [ 296, 298 ], [ 298, 299 ], [ 296, 300 ], [ 285, 301 ], [ 301, 302 ], [ 70, 303 ], [ 303, 304 ], [ 303, 305 ], [ 305, 306 ], [ 306, 307 ], [ 306, 308 ], [ 308, 309 ], [ 305, 310 ], [ 310, 311 ], [ 311, 312 ], [ 312, 313 ], [ 312, 314 ], [ 314, 315 ], [ 314, 316 ], [ 311, 317 ], [ 317, 318 ], [ 318, 319 ], [ 318, 320 ], [ 317, 321 ], [ 310, 322 ], [ 322, 323 ], [ 305, 324 ], [ 324, 325 ], [ 70, 326 ], [ 326, 327 ], [ 326, 328 ], [ 328, 329 ], [ 329, 330 ], [ 330, 331 ], [ 331, 332 ], [ 330, 333 ], [ 333, 334 ], [ 70, 335 ], [ 335, 336 ], [ 335, 337 ], [ 337, 338 ], [ 338, 339 ], [ 339, 340 ], [ 340, 341 ], [ 338, 342 ], [ 342, 343 ], [ 337, 344 ], [ 344, 345 ], [ 345, 346 ], [ 70, 347 ], [ 347, 348 ], [ 347, 349 ], [ 349, 350 ], [ 350, 351 ], [ 351, 352 ], [ 352, 353 ], [ 351, 354 ], [ 354, 355 ], [ 355, 356 ], [ 356, 357 ], [ 356, 358 ], [ 355, 359 ], [ 354, 360 ], [ 360, 361 ], [ 361, 362 ], [ 361, 363 ], [ 360, 364 ], [ 350, 365 ], [ 365, 366 ], [ 349, 367 ], [ 367, 368 ], [ 368, 369 ], [ 369, 370 ], [ 367, 371 ], [ 371, 372 ], [ 349, 373 ], [ 373, 374 ], [ 373, 375 ], [ 349, 376 ], [ 376, 377 ], [ 376, 378 ], [ 378, 379 ], [ 349, 380 ], [ 380, 381 ], [ 381, 382 ], [ 382, 383 ], [ 382, 384 ], [ 381, 385 ], [ 385, 386 ], [ 385, 387 ], [ 380, 388 ], [ 388, 389 ], [ 389, 390 ], [ 390, 391 ], [ 389, 392 ], [ 388, 393 ], [ 393, 394 ], [ 393, 395 ], [ 395, 396 ], [ 349, 397 ], [ 397, 398 ], [ 398, 399 ], [ 399, 400 ], [ 70, 401 ], [ 401, 402 ], [ 401, 403 ], [ 403, 404 ], [ 404, 405 ], [ 404, 406 ], [ 403, 408 ], [ 408, 409 ], [ 409, 410 ], [ 410, 411 ], [ 410, 412 ], [ 408, 413 ], [ 413, 414 ], [ 413, 415 ], [ 408, 416 ], [ 416, 417 ], [ 417, 418 ], [ 408, 419 ], [ 419, 420 ], [ 420, 421 ], [ 421, 422 ], [ 421, 423 ], [ 420, 424 ], [ 424, 425 ], [ 403, 426 ], [ 426, 427 ], [ 401, 428 ], [ 428, 429 ], [ 70, 430 ], [ 430, 431 ], [ 430, 432 ], [ 432, 433 ], [ 433, 434 ], [ 433, 435 ], [ 432, 437 ], [ 437, 438 ], [ 438, 439 ], [ 439, 440 ], [ 439, 441 ], [ 437, 442 ], [ 442, 443 ], [ 442, 444 ], [ 437, 445 ], [ 445, 446 ], [ 446, 447 ], [ 437, 448 ], [ 448, 449 ], [ 449, 450 ], [ 450, 451 ], [ 450, 452 ], [ 449, 453 ], [ 453, 454 ], [ 432, 455 ], [ 455, 456 ], [ 430, 457 ], [ 457, 458 ], [ 70, 459 ], [ 459, 460 ], [ 459, 461 ], [ 461, 462 ], [ 462, 463 ], [ 463, 464 ], [ 463, 465 ], [ 465, 466 ], [ 466, 467 ], [ 467, 468 ], [ 462, 469 ], [ 469, 470 ], [ 470, 471 ], [ 471, 472 ], [ 0, 473 ], [ 473, 474 ], [ 473, 475 ] ]
[ "import java.util.*;\nimport java.io.*;\n\npublic class Main {\n\n static final Reader sc = new Reader();\n static final PrintWriter out = new PrintWriter(System.out,false);\n static public void main(String args[]) {\n int n = sc.nextInt();\n int[] a = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n a[sc.nextInt() - 1]++; \n }\n for (int b: a) {\n out.println(b);\n }\n out.flush();\n sc.close();\n out.close();\n }\n}\n\nclass Reader {\n \n private final InputStream in;\n private final byte[] buf = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n \n public Reader() { this(System.in);}\n public Reader(InputStream source) { this.in = source;}\n \n private boolean hasNextByte() {\n if (ptr < buflen) return true;\n ptr = 0;\n try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}\n if (buflen <= 0) return false;\n return true;\n }\n \n private int readByte() { if (hasNextByte()) return buf[ptr++]; else return -1;}\n \n private boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n \n private void skip() { while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;}\n \n public boolean hasNext() {skip(); return hasNextByte();}\n \n public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n \n public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n boolean minus = false;\n long num = readByte();\n \n if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }\n \n while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }\n }\n \n public int nextInt() {\n long num = nextLong();\n if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();\n return (int)num;\n }\n \n public double nextDouble() {\n return Double.parseDouble(next());\n }\n \n public char nextChar() {\n if (!hasNext()) throw new NoSuchElementException();\n return (char)readByte();\n }\n \n public String nextLine() {\n while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;\n if (!hasNextByte()) throw new NoSuchElementException();\n \n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }\n \n return sb.toString();\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i=0; i<n; i++) res[i] = nextInt();\n return res;\n }\n \n public char[] nextCharArray(int n) {\n char[] res = new char[n];\n for (int i=0; i<n; i++) res[i] = nextChar();\n return res;\n }\n \n public void close() {try{ in.close();}catch(IOException e){ e.printStackTrace();}};\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n\n static final Reader sc = new Reader();\n static final PrintWriter out = new PrintWriter(System.out,false);\n static public void main(String args[]) {\n int n = sc.nextInt();\n int[] a = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n a[sc.nextInt() - 1]++; \n }\n for (int b: a) {\n out.println(b);\n }\n out.flush();\n sc.close();\n out.close();\n }\n}", "Main", "static final Reader sc = new Reader();", "sc", "new Reader()", "static final PrintWriter out = new PrintWriter(System.out,false);", "out", "new PrintWriter(System.out,false)", "static public void main(String args[]) {\n int n = sc.nextInt();\n int[] a = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n a[sc.nextInt() - 1]++; \n }\n for (int b: a) {\n out.println(b);\n }\n out.flush();\n sc.close();\n out.close();\n }", "main", "{\n int n = sc.nextInt();\n int[] a = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n a[sc.nextInt() - 1]++; \n }\n for (int b: a) {\n out.println(b);\n }\n out.flush();\n sc.close();\n out.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 b: a) {\n out.println(b);\n }", "int b", "a", "{\n out.println(b);\n }", "{\n out.println(b);\n }", "out.println(b)", "out.println", "out", "b", "out.flush()", "out.flush", "out", "sc.close()", "sc.close", "sc", "out.close()", "out.close", "out", "String args[]", "args", "class Reader {\n \n private final InputStream in;\n private final byte[] buf = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n \n public Reader() { this(System.in);}\n public Reader(InputStream source) { this.in = source;}\n \n private boolean hasNextByte() {\n if (ptr < buflen) return true;\n ptr = 0;\n try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}\n if (buflen <= 0) return false;\n return true;\n }\n \n private int readByte() { if (hasNextByte()) return buf[ptr++]; else return -1;}\n \n private boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n \n private void skip() { while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;}\n \n public boolean hasNext() {skip(); return hasNextByte();}\n \n public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n \n public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n boolean minus = false;\n long num = readByte();\n \n if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }\n \n while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }\n }\n \n public int nextInt() {\n long num = nextLong();\n if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();\n return (int)num;\n }\n \n public double nextDouble() {\n return Double.parseDouble(next());\n }\n \n public char nextChar() {\n if (!hasNext()) throw new NoSuchElementException();\n return (char)readByte();\n }\n \n public String nextLine() {\n while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;\n if (!hasNextByte()) throw new NoSuchElementException();\n \n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }\n \n return sb.toString();\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i=0; i<n; i++) res[i] = nextInt();\n return res;\n }\n \n public char[] nextCharArray(int n) {\n char[] res = new char[n];\n for (int i=0; i<n; i++) res[i] = nextChar();\n return res;\n }\n \n public void close() {try{ in.close();}catch(IOException e){ e.printStackTrace();}};\n}", "Reader", "private final InputStream in;", "in", "private final byte[] buf = new byte[1024];", "buf", "new byte[1024]", "1024", "private int ptr = 0;", "ptr", "0", "private int buflen = 0;", "buflen", "0", "public Reader() { this(System.in);}", "Reader", "{ this(System.in);}", "this(System.in)", "this", "System.in", "System", "System.in", "public Reader(InputStream source) { this.in = source;}", "Reader", "{ this.in = source;}", "this.in = source", "this.in", "this", "this.in", "source", "InputStream source", "source", "private boolean hasNextByte() {\n if (ptr < buflen) return true;\n ptr = 0;\n try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}\n if (buflen <= 0) return false;\n return true;\n }", "hasNextByte", "{\n if (ptr < buflen) return true;\n ptr = 0;\n try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}\n if (buflen <= 0) return false;\n return true;\n }", "if (ptr < buflen) return true;", "ptr < buflen", "ptr", "buflen", "return true;", "true", "ptr = 0", "ptr", "0", "try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}", "catch (IOException e) {e.printStackTrace();}", "IOException e", "{e.printStackTrace();}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n buflen = in.read(buf);\n }", "buflen = in.read(buf)", "buflen", "in.read(buf)", "in.read", "in", "buf", "if (buflen <= 0) return false;", "buflen <= 0", "buflen", "0", "return false;", "false", "return true;", "true", "private int readByte() { if (hasNextByte()) return buf[ptr++]; else return -1;}", "readByte", "{ if (hasNextByte()) return buf[ptr++]; else return -1;}", "if (hasNextByte()) return buf[ptr++]; else return -1;", "hasNextByte()", "hasNextByte", "return buf[ptr++];", "buf[ptr++]", "buf", "ptr++", "ptr", "return -1;", "-1", "1", "private boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}", "isPrintableChar", "{ return 33 <= c && c <= 126;}", "return 33 <= c && c <= 126;", "33 <= c && c <= 126", "33 <= c", "33", "c", "c <= 126", "c", "126", "int c", "c", "private void skip() { while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;}", "skip", "{ while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;}", "while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;", "hasNextByte() && !isPrintableChar(buf[ptr])", "hasNextByte()", "hasNextByte", "!isPrintableChar(buf[ptr])", "isPrintableChar(buf[ptr])", "isPrintableChar", "buf[ptr]", "buf", "ptr", "ptr++", "ptr", "public boolean hasNext() {skip(); return hasNextByte();}", "hasNext", "{skip(); return hasNextByte();}", "skip()", "skip", "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 boolean minus = false;\n long num = readByte();\n \n if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }\n \n while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }\n }", "nextLong", "{\n if (!hasNext()) throw new NoSuchElementException();\n boolean minus = false;\n long num = readByte();\n \n if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }\n \n while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }\n }", "if (!hasNext()) throw new NoSuchElementException();", "!hasNext()", "hasNext()", "hasNext", "throw new NoSuchElementException();", "new NoSuchElementException()", "boolean minus = false;", "minus", "false", "long num = readByte();", "num", "readByte()", "readByte", "if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }", "num == '-'", "num", "'-'", "{\n num = 0;\n minus = true;\n }", "num = 0", "num", "0", "minus = true", "minus", "true", "if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }", "num < '0' || '9' < num", "num < '0'", "num", "'0'", "'9' < num", "'9'", "num", "{\n throw new NumberFormatException();\n }", "throw new NumberFormatException();", "new NumberFormatException()", "{\n num -= '0';\n }", "num -= '0'", "num", "'0'", "while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }", "true", "{\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }", "int b = readByte();", "b", "readByte()", "readByte", "if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();", "'0' <= b && b <= '9'", "'0' <= b", "'0'", "b", "b <= '9'", "b", "'9'", "num = num * 10 + (b - '0')", "num", "num * 10 + (b - '0')", "num * 10", "num", "10", "(b - '0')", "b", "'0'", "if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();", "b == -1 || !isPrintableChar(b)", "b == -1", "b", "-1", "1", "!isPrintableChar(b)", "isPrintableChar(b)", "isPrintableChar", "b", "return minus ? -num : num;", "minus ? -num : num", "minus", "-num", "num", "num", "throw new NoSuchElementException();", "new NoSuchElementException()", "public int nextInt() {\n long num = nextLong();\n if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();\n return (int)num;\n }", "nextInt", "{\n long num = nextLong();\n if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();\n return (int)num;\n }", "long num = nextLong();", "num", "nextLong()", "nextLong", "if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();", "num < Integer.MIN_VALUE || Integer.MAX_VALUE < num", "num < Integer.MIN_VALUE", "num", "Integer.MIN_VALUE", "Integer", "Integer.MIN_VALUE", "Integer.MAX_VALUE < num", "Integer.MAX_VALUE", "Integer", "Integer.MAX_VALUE", "num", "throw new NumberFormatException();", "new NumberFormatException()", "return (int)num;", "(int)num", "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 char nextChar() {\n if (!hasNext()) throw new NoSuchElementException();\n return (char)readByte();\n }", "nextChar", "{\n if (!hasNext()) throw new NoSuchElementException();\n return (char)readByte();\n }", "if (!hasNext()) throw new NoSuchElementException();", "!hasNext()", "hasNext()", "hasNext", "throw new NoSuchElementException();", "new NoSuchElementException()", "return (char)readByte();", "(char)readByte()", "readByte", "public String nextLine() {\n while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;\n if (!hasNextByte()) throw new NoSuchElementException();\n \n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }\n \n return sb.toString();\n }", "nextLine", "{\n while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;\n if (!hasNextByte()) throw new NoSuchElementException();\n \n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }\n \n return sb.toString();\n }", "while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;", "hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')", "hasNextByte()", "hasNextByte", "(buf[ptr] == '\\n' || buf[ptr] == '\\r')", "buf[ptr] == '\\n'", "buf[ptr]", "buf", "ptr", "'\\n'", "buf[ptr] == '\\r'", "buf[ptr]", "buf", "ptr", "'\\r'", "ptr++", "ptr", "if (!hasNextByte()) throw new NoSuchElementException();", "!hasNextByte()", "hasNextByte()", "hasNextByte", "throw new NoSuchElementException();", "new NoSuchElementException()", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "int b = readByte();", "b", "readByte()", "readByte", "while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }", "b != '\\n' && b != '\\r'", "b != '\\n'", "b", "'\\n'", "b != '\\r'", "b", "'\\r'", "{\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 int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i=0; i<n; i++) res[i] = nextInt();\n return res;\n }", "nextIntArray", "{\n int[] res = new int[n];\n for (int i=0; i<n; i++) res[i] = nextInt();\n return res;\n }", "int[] res = new int[n];", "res", "new int[n]", "n", "for (int i=0; i<n; i++) res[i] = nextInt();", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "res[i] = nextInt();", "res[i] = nextInt()", "res[i]", "res", "i", "nextInt()", "nextInt", "return res;", "res", "int n", "n", "public char[] nextCharArray(int n) {\n char[] res = new char[n];\n for (int i=0; i<n; i++) res[i] = nextChar();\n return res;\n }", "nextCharArray", "{\n char[] res = new char[n];\n for (int i=0; i<n; i++) res[i] = nextChar();\n return res;\n }", "char[] res = new char[n];", "res", "new char[n]", "n", "for (int i=0; i<n; i++) res[i] = nextChar();", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "res[i] = nextChar();", "res[i] = nextChar()", "res[i]", "res", "i", "nextChar()", "nextChar", "return res;", "res", "int n", "n", "public void close() {try{ in.close();}catch(IOException e){ e.printStackTrace();}}", "close", "{try{ in.close();}catch(IOException e){ e.printStackTrace();}}", "try{ in.close();}catch(IOException e){ e.printStackTrace();}", "catch(IOException e){ e.printStackTrace();}", "IOException e", "{ e.printStackTrace();}", "e.printStackTrace()", "e.printStackTrace", "e", "{ in.close();}", "in.close()", "in.close", "in", "public class Main {\n\n static final Reader sc = new Reader();\n static final PrintWriter out = new PrintWriter(System.out,false);\n static public void main(String args[]) {\n int n = sc.nextInt();\n int[] a = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n a[sc.nextInt() - 1]++; \n }\n for (int b: a) {\n out.println(b);\n }\n out.flush();\n sc.close();\n out.close();\n }\n}", "public class Main {\n\n static final Reader sc = new Reader();\n static final PrintWriter out = new PrintWriter(System.out,false);\n static public void main(String args[]) {\n int n = sc.nextInt();\n int[] a = new int[n];\n\n for (int i = 0; i < n - 1; i++) {\n a[sc.nextInt() - 1]++; \n }\n for (int b: a) {\n out.println(b);\n }\n out.flush();\n sc.close();\n out.close();\n }\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { static final Reader sc = new Reader(); static final PrintWriter out = new PrintWriter(System.out,false); static public void main(String args[]) { int n = sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n - 1; i++) { a[sc.nextInt() - 1]++; } for (int b: a) { out.println(b); } out.flush(); sc.close(); out.close(); } } class Reader { private final InputStream in; private final byte[] buf = new byte[1024]; private int ptr = 0; private int buflen = 0; public Reader() { this(System.in);} public Reader(InputStream source) { this.in = source;} private boolean hasNextByte() { if (ptr < buflen) return true; ptr = 0; try{ buflen = in.read(buf); }catch (IOException e) {e.printStackTrace();} if (buflen <= 0) return false; return true; } private int readByte() { if (hasNextByte()) return buf[ptr++]; else return -1;} private boolean isPrintableChar(int c) { return 33 <= c && c <= 126;} private void skip() { while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;} public boolean hasNext() {skip(); 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(); boolean minus = false; long num = readByte(); if(num == '-'){ num = 0; minus = true; }else if (num < '0' || '9' < num){ throw new NumberFormatException(); }else{ num -= '0'; } while(true){ int b = readByte(); if('0' <= b && b <= '9') num = num * 10 + (b - '0'); else if(b == -1 || !isPrintableChar(b)) return minus ? -num : num; else throw new NoSuchElementException(); } } public int nextInt() { long num = nextLong(); if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num) throw new NumberFormatException(); return (int)num; } public double nextDouble() { return Double.parseDouble(next()); } public char nextChar() { if (!hasNext()) throw new NoSuchElementException(); return (char)readByte(); } public String nextLine() { while (hasNextByte() && (buf[ptr] == '\n' || buf[ptr] == '\r')) ptr++; if (!hasNextByte()) throw new NoSuchElementException(); StringBuilder sb = new StringBuilder(); int b = readByte(); while (b != '\n' && b != '\r') { sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } public int[] nextIntArray(int n) { int[] res = new int[n]; for (int i=0; i<n; i++) res[i] = nextInt(); return res; } public char[] nextCharArray(int n) { char[] res = new char[n]; for (int i=0; i<n; i++) res[i] = nextChar(); return res; } public void close() {try{ in.close();}catch(IOException e){ e.printStackTrace();}}; }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 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, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 68, 5 ], [ 68, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 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 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 6, 65 ], [ 65, 66 ], [ 0, 67 ], [ 67, 68 ], [ 67, 69 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args) {\n Scanner kbd = new Scanner(System.in);\n int n=kbd.nextInt();\n int[] A= new int[n+1];\n for(int i=0;i<n-1;i++){\n A[kbd.nextInt()]++;\n}\nfor(int t=1;t<=n;t++){\n System.out.println(A[t]);\n}\n}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args) {\n Scanner kbd = new Scanner(System.in);\n int n=kbd.nextInt();\n int[] A= new int[n+1];\n for(int i=0;i<n-1;i++){\n A[kbd.nextInt()]++;\n}\nfor(int t=1;t<=n;t++){\n System.out.println(A[t]);\n}\n}\n}", "Main", "public static void main(String[] args) {\n Scanner kbd = new Scanner(System.in);\n int n=kbd.nextInt();\n int[] A= new int[n+1];\n for(int i=0;i<n-1;i++){\n A[kbd.nextInt()]++;\n}\nfor(int t=1;t<=n;t++){\n System.out.println(A[t]);\n}\n}", "main", "{\n Scanner kbd = new Scanner(System.in);\n int n=kbd.nextInt();\n int[] A= new int[n+1];\n for(int i=0;i<n-1;i++){\n A[kbd.nextInt()]++;\n}\nfor(int t=1;t<=n;t++){\n System.out.println(A[t]);\n}\n}", "Scanner kbd = new Scanner(System.in);", "kbd", "new Scanner(System.in)", "int n=kbd.nextInt();", "n", "kbd.nextInt()", "kbd.nextInt", "kbd", "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[kbd.nextInt()]++;\n}", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n A[kbd.nextInt()]++;\n}", "{\n A[kbd.nextInt()]++;\n}", "A[kbd.nextInt()]++", "A[kbd.nextInt()]", "A", "kbd.nextInt()", "kbd.nextInt", "kbd", "for(int t=1;t<=n;t++){\n System.out.println(A[t]);\n}", "int t=1;", "int t=1;", "t", "1", "t<=n", "t", "n", "t++", "t++", "t", "{\n System.out.println(A[t]);\n}", "{\n System.out.println(A[t]);\n}", "System.out.println(A[t])", "System.out.println", "System.out", "System", "System.out", "A[t]", "A", "t", "String[] args", "args", "public class Main{\n public static void main(String[] args) {\n Scanner kbd = new Scanner(System.in);\n int n=kbd.nextInt();\n int[] A= new int[n+1];\n for(int i=0;i<n-1;i++){\n A[kbd.nextInt()]++;\n}\nfor(int t=1;t<=n;t++){\n System.out.println(A[t]);\n}\n}\n}", "public class Main{\n public static void main(String[] args) {\n Scanner kbd = new Scanner(System.in);\n int n=kbd.nextInt();\n int[] A= new int[n+1];\n for(int i=0;i<n-1;i++){\n A[kbd.nextInt()]++;\n}\nfor(int t=1;t<=n;t++){\n System.out.println(A[t]);\n}\n}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner kbd = new Scanner(System.in); int n=kbd.nextInt(); int[] A= new int[n+1]; for(int i=0;i<n-1;i++){ A[kbd.nextInt()]++; } for(int t=1;t<=n;t++){ System.out.println(A[t]); } } }
[ 7, 15, 13, 17, 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, 4, 18, 13, 4, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 40, 13, 4, 18, 13, 13, 13, 4, 13, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 13, 17, 23, 13, 12, 13, 30, 28, 13, 4, 18, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 117, 14 ], [ 117, 15 ], [ 15, 16 ], [ 15, 17 ], [ 117, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 29, 30 ], [ 30, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 20, 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 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 49, 64 ], [ 64, 65 ], [ 49, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 66, 70 ], [ 20, 71 ], [ 71, 72 ], [ 18, 73 ], [ 73, 74 ], [ 117, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 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 ], [ 91, 94 ], [ 91, 95 ], [ 75, 96 ], [ 96, 97 ], [ 117, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 101, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 113, 114 ], [ 114, 115 ], [ 0, 116 ], [ 116, 117 ], [ 116, 118 ] ]
[ "import java.util.LinkedHashMap;\nimport java.util.Map;\nimport java.util.Scanner;\nimport java.util.Map.Entry;\n\npublic class Main {\n\n private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();\n\n public static void main(String[] args) throws Exception {\n\n Scanner sc = new Scanner(System.in);\n final int iEmployeeNum = Integer.parseInt(sc.next());\n initBossId(iEmployeeNum);\n\n // 社員番号1が固定でいるため。\n for (int i = 1; i <= iEmployeeNum - 1; i++) {\n final int iBossId = Integer.parseInt(sc.next());\n int iSub = m_mapBossId.get(iBossId);\n iSub++;\n m_mapBossId.put(iBossId, iSub);\n }\n output();\n }\n\n private static void initBossId(final int iEmploy) {\n for (int id = 1; id <= iEmploy; id++) {\n m_mapBossId.put(id, 0);\n }\n }\n\n private static void output() {\n for (Entry entry : m_mapBossId.entrySet()) {\n System.out.println(entry.getValue());\n }\n }\n}", "import java.util.LinkedHashMap;", "LinkedHashMap", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Map.Entry;", "Entry", "java.util.Map", "public class Main {\n\n private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();\n\n public static void main(String[] args) throws Exception {\n\n Scanner sc = new Scanner(System.in);\n final int iEmployeeNum = Integer.parseInt(sc.next());\n initBossId(iEmployeeNum);\n\n // 社員番号1が固定でいるため。\n for (int i = 1; i <= iEmployeeNum - 1; i++) {\n final int iBossId = Integer.parseInt(sc.next());\n int iSub = m_mapBossId.get(iBossId);\n iSub++;\n m_mapBossId.put(iBossId, iSub);\n }\n output();\n }\n\n private static void initBossId(final int iEmploy) {\n for (int id = 1; id <= iEmploy; id++) {\n m_mapBossId.put(id, 0);\n }\n }\n\n private static void output() {\n for (Entry entry : m_mapBossId.entrySet()) {\n System.out.println(entry.getValue());\n }\n }\n}", "Main", "private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();", "m_mapBossId", "new LinkedHashMap<Integer, Integer>()", "public static void main(String[] args) throws Exception {\n\n Scanner sc = new Scanner(System.in);\n final int iEmployeeNum = Integer.parseInt(sc.next());\n initBossId(iEmployeeNum);\n\n // 社員番号1が固定でいるため。\n for (int i = 1; i <= iEmployeeNum - 1; i++) {\n final int iBossId = Integer.parseInt(sc.next());\n int iSub = m_mapBossId.get(iBossId);\n iSub++;\n m_mapBossId.put(iBossId, iSub);\n }\n output();\n }", "main", "{\n\n Scanner sc = new Scanner(System.in);\n final int iEmployeeNum = Integer.parseInt(sc.next());\n initBossId(iEmployeeNum);\n\n // 社員番号1が固定でいるため。\n for (int i = 1; i <= iEmployeeNum - 1; i++) {\n final int iBossId = Integer.parseInt(sc.next());\n int iSub = m_mapBossId.get(iBossId);\n iSub++;\n m_mapBossId.put(iBossId, iSub);\n }\n output();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "final int iEmployeeNum = Integer.parseInt(sc.next());", "iEmployeeNum", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "initBossId(iEmployeeNum)", "initBossId", "iEmployeeNum", "for (int i = 1; i <= iEmployeeNum - 1; i++) {\n final int iBossId = Integer.parseInt(sc.next());\n int iSub = m_mapBossId.get(iBossId);\n iSub++;\n m_mapBossId.put(iBossId, iSub);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= iEmployeeNum - 1", "i", "iEmployeeNum - 1", "iEmployeeNum", "1", "i++", "i++", "i", "{\n final int iBossId = Integer.parseInt(sc.next());\n int iSub = m_mapBossId.get(iBossId);\n iSub++;\n m_mapBossId.put(iBossId, iSub);\n }", "{\n final int iBossId = Integer.parseInt(sc.next());\n int iSub = m_mapBossId.get(iBossId);\n iSub++;\n m_mapBossId.put(iBossId, iSub);\n }", "final int iBossId = Integer.parseInt(sc.next());", "iBossId", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "int iSub = m_mapBossId.get(iBossId);", "iSub", "m_mapBossId.get(iBossId)", "m_mapBossId.get", "m_mapBossId", "iBossId", "iSub++", "iSub", "m_mapBossId.put(iBossId, iSub)", "m_mapBossId.put", "m_mapBossId", "iBossId", "iSub", "output()", "output", "String[] args", "args", "private static void initBossId(final int iEmploy) {\n for (int id = 1; id <= iEmploy; id++) {\n m_mapBossId.put(id, 0);\n }\n }", "initBossId", "{\n for (int id = 1; id <= iEmploy; id++) {\n m_mapBossId.put(id, 0);\n }\n }", "for (int id = 1; id <= iEmploy; id++) {\n m_mapBossId.put(id, 0);\n }", "int id = 1;", "int id = 1;", "id", "1", "id <= iEmploy", "id", "iEmploy", "id++", "id++", "id", "{\n m_mapBossId.put(id, 0);\n }", "{\n m_mapBossId.put(id, 0);\n }", "m_mapBossId.put(id, 0)", "m_mapBossId.put", "m_mapBossId", "id", "0", "final int iEmploy", "iEmploy", "private static void output() {\n for (Entry entry : m_mapBossId.entrySet()) {\n System.out.println(entry.getValue());\n }\n }", "output", "{\n for (Entry entry : m_mapBossId.entrySet()) {\n System.out.println(entry.getValue());\n }\n }", "for (Entry entry : m_mapBossId.entrySet()) {\n System.out.println(entry.getValue());\n }", "Entry entry", "m_mapBossId.entrySet()", "m_mapBossId.entrySet", "m_mapBossId", "{\n System.out.println(entry.getValue());\n }", "{\n System.out.println(entry.getValue());\n }", "System.out.println(entry.getValue())", "System.out.println", "System.out", "System", "System.out", "entry.getValue()", "entry.getValue", "entry", "public class Main {\n\n private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();\n\n public static void main(String[] args) throws Exception {\n\n Scanner sc = new Scanner(System.in);\n final int iEmployeeNum = Integer.parseInt(sc.next());\n initBossId(iEmployeeNum);\n\n // 社員番号1が固定でいるため。\n for (int i = 1; i <= iEmployeeNum - 1; i++) {\n final int iBossId = Integer.parseInt(sc.next());\n int iSub = m_mapBossId.get(iBossId);\n iSub++;\n m_mapBossId.put(iBossId, iSub);\n }\n output();\n }\n\n private static void initBossId(final int iEmploy) {\n for (int id = 1; id <= iEmploy; id++) {\n m_mapBossId.put(id, 0);\n }\n }\n\n private static void output() {\n for (Entry entry : m_mapBossId.entrySet()) {\n System.out.println(entry.getValue());\n }\n }\n}", "public class Main {\n\n private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>();\n\n public static void main(String[] args) throws Exception {\n\n Scanner sc = new Scanner(System.in);\n final int iEmployeeNum = Integer.parseInt(sc.next());\n initBossId(iEmployeeNum);\n\n // 社員番号1が固定でいるため。\n for (int i = 1; i <= iEmployeeNum - 1; i++) {\n final int iBossId = Integer.parseInt(sc.next());\n int iSub = m_mapBossId.get(iBossId);\n iSub++;\n m_mapBossId.put(iBossId, iSub);\n }\n output();\n }\n\n private static void initBossId(final int iEmploy) {\n for (int id = 1; id <= iEmploy; id++) {\n m_mapBossId.put(id, 0);\n }\n }\n\n private static void output() {\n for (Entry entry : m_mapBossId.entrySet()) {\n System.out.println(entry.getValue());\n }\n }\n}", "Main" ]
import java.util.LinkedHashMap; import java.util.Map; import java.util.Scanner; import java.util.Map.Entry; public class Main { private static Map<Integer, Integer> m_mapBossId = new LinkedHashMap<Integer, Integer>(); public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); final int iEmployeeNum = Integer.parseInt(sc.next()); initBossId(iEmployeeNum); // 社員番号1が固定でいるため。 for (int i = 1; i <= iEmployeeNum - 1; i++) { final int iBossId = Integer.parseInt(sc.next()); int iSub = m_mapBossId.get(iBossId); iSub++; m_mapBossId.put(iBossId, iSub); } output(); } private static void initBossId(final int iEmploy) { for (int id = 1; id <= iEmploy; id++) { m_mapBossId.put(id, 0); } } private static void output() { for (Entry entry : m_mapBossId.entrySet()) { System.out.println(entry.getValue()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 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, 2, 4, 18, 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, 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, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 109, 5 ], [ 109, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 10, 19 ], [ 19, 20 ], [ 19, 21 ], [ 10, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 10, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 45, 49 ], [ 10, 50 ], [ 50, 51 ], [ 50, 52 ], [ 10, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 10, 73 ], [ 73, 74 ], [ 73, 75 ], [ 10, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 76, 84 ], [ 84, 85 ], [ 85, 86 ], [ 76, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 89, 97 ], [ 10, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 103, 104 ], [ 104, 105 ], [ 6, 106 ], [ 106, 107 ], [ 0, 108 ], [ 108, 109 ], [ 108, 110 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int[] A = new int[N];\n A[0] = 1;\n for (int i = 1; i < N; i++) {\n A[i] = sc.nextInt() - 1;\n }\n\n int[] counts = new int[N];\n for (int i = 1; i < N; i++) {\n counts[A[i]]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(counts[i]).append(\"\\n\");\n }\n System.out.println(sb.toString());\n\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int[] A = new int[N];\n A[0] = 1;\n for (int i = 1; i < N; i++) {\n A[i] = sc.nextInt() - 1;\n }\n\n int[] counts = new int[N];\n for (int i = 1; i < N; i++) {\n counts[A[i]]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(counts[i]).append(\"\\n\");\n }\n System.out.println(sb.toString());\n\n }\n }\n}", "Main", "public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int[] A = new int[N];\n A[0] = 1;\n for (int i = 1; i < N; i++) {\n A[i] = sc.nextInt() - 1;\n }\n\n int[] counts = new int[N];\n for (int i = 1; i < N; i++) {\n counts[A[i]]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(counts[i]).append(\"\\n\");\n }\n System.out.println(sb.toString());\n\n }\n }", "main", "{\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int[] A = new int[N];\n A[0] = 1;\n for (int i = 1; i < N; i++) {\n A[i] = sc.nextInt() - 1;\n }\n\n int[] counts = new int[N];\n for (int i = 1; i < N; i++) {\n counts[A[i]]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(counts[i]).append(\"\\n\");\n }\n System.out.println(sb.toString());\n\n }\n }", "try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int[] A = new int[N];\n A[0] = 1;\n for (int i = 1; i < N; i++) {\n A[i] = sc.nextInt() - 1;\n }\n\n int[] counts = new int[N];\n for (int i = 1; i < N; i++) {\n counts[A[i]]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(counts[i]).append(\"\\n\");\n }\n System.out.println(sb.toString());\n\n }", "{\n int N = sc.nextInt();\n int[] A = new int[N];\n A[0] = 1;\n for (int i = 1; i < N; i++) {\n A[i] = sc.nextInt() - 1;\n }\n\n int[] counts = new int[N];\n for (int i = 1; i < N; i++) {\n counts[A[i]]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(counts[i]).append(\"\\n\");\n }\n System.out.println(sb.toString());\n\n }", "Scanner sc = new Scanner(System.in)", "Scanner sc = new Scanner(System.in)", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] A = new int[N];", "A", "new int[N]", "N", "A[0] = 1", "A[0]", "A", "0", "1", "for (int i = 1; i < N; i++) {\n A[i] = sc.nextInt() - 1;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n A[i] = sc.nextInt() - 1;\n }", "{\n A[i] = sc.nextInt() - 1;\n }", "A[i] = sc.nextInt() - 1", "A[i]", "A", "i", "sc.nextInt() - 1", "sc.nextInt()", "sc.nextInt", "sc", "1", "int[] counts = new int[N];", "counts", "new int[N]", "N", "for (int i = 1; i < N; i++) {\n counts[A[i]]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < N", "i", "N", "i++", "i++", "i", "{\n counts[A[i]]++;\n }", "{\n counts[A[i]]++;\n }", "counts[A[i]]++", "counts[A[i]]", "counts", "A[i]", "A", "i", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "for (int i = 0; i < N; i++) {\n sb.append(counts[i]).append(\"\\n\");\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "{\n sb.append(counts[i]).append(\"\\n\");\n }", "{\n sb.append(counts[i]).append(\"\\n\");\n }", "sb.append(counts[i]).append(\"\\n\")", "sb.append(counts[i]).append", "sb.append(counts[i])", "sb.append", "sb", "counts[i]", "counts", "i", "\"\\n\"", "System.out.println(sb.toString())", "System.out.println", "System.out", "System", "System.out", "sb.toString()", "sb.toString", "sb", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int[] A = new int[N];\n A[0] = 1;\n for (int i = 1; i < N; i++) {\n A[i] = sc.nextInt() - 1;\n }\n\n int[] counts = new int[N];\n for (int i = 1; i < N; i++) {\n counts[A[i]]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(counts[i]).append(\"\\n\");\n }\n System.out.println(sb.toString());\n\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = sc.nextInt();\n int[] A = new int[N];\n A[0] = 1;\n for (int i = 1; i < N; i++) {\n A[i] = sc.nextInt() - 1;\n }\n\n int[] counts = new int[N];\n for (int i = 1; i < N; i++) {\n counts[A[i]]++;\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < N; i++) {\n sb.append(counts[i]).append(\"\\n\");\n }\n System.out.println(sb.toString());\n\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner sc = new Scanner(System.in)) { int N = sc.nextInt(); int[] A = new int[N]; A[0] = 1; for (int i = 1; i < N; i++) { A[i] = sc.nextInt() - 1; } int[] counts = new int[N]; for (int i = 1; i < N; i++) { counts[A[i]]++; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < N; i++) { sb.append(counts[i]).append("\n"); } System.out.println(sb.toString()); } } }
[ 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, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 89, 5 ], [ 89, 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 ], [ 72, 74 ], [ 72, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 8, 83 ], [ 83, 84 ], [ 84, 85 ], [ 6, 86 ], [ 86, 87 ], [ 0, 88 ], [ 88, 89 ], [ 88, 90 ] ]
[ "import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N=sc.nextInt();\n int[] A=new int[N-1];\n for (int i = 0; i < (N-1); i++) {\n A[i]=sc.nextInt();\n }\n int[] numBuka=new int[N];\n for (int i = 0; i < (N-1); i++) {\n numBuka[A[i]-1]++;\n }\n for (int n : numBuka) {\n System.out.println(n);\n }\n sc.close();\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 A[i]=sc.nextInt();\n }\n int[] numBuka=new int[N];\n for (int i = 0; i < (N-1); i++) {\n numBuka[A[i]-1]++;\n }\n for (int n : numBuka) {\n System.out.println(n);\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[] A=new int[N-1];\n for (int i = 0; i < (N-1); i++) {\n A[i]=sc.nextInt();\n }\n int[] numBuka=new int[N];\n for (int i = 0; i < (N-1); i++) {\n numBuka[A[i]-1]++;\n }\n for (int n : numBuka) {\n System.out.println(n);\n }\n sc.close();\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 A[i]=sc.nextInt();\n }\n int[] numBuka=new int[N];\n for (int i = 0; i < (N-1); i++) {\n numBuka[A[i]-1]++;\n }\n for (int n : numBuka) {\n System.out.println(n);\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[] A=new int[N-1];", "A", "new int[N-1]", "N-1", "N", "1", "for (int i = 0; i < (N-1); i++) {\n A[i]=sc.nextInt();\n }", "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", "int[] numBuka=new int[N];", "numBuka", "new int[N]", "N", "for (int i = 0; i < (N-1); i++) {\n numBuka[A[i]-1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < (N-1)", "i", "(N-1)", "N", "1", "i++", "i++", "i", "{\n numBuka[A[i]-1]++;\n }", "{\n numBuka[A[i]-1]++;\n }", "numBuka[A[i]-1]++", "numBuka[A[i]-1]", "numBuka", "A[i]-1", "A[i]", "A", "i", "1", "for (int n : numBuka) {\n System.out.println(n);\n }", "int n", "numBuka", "{\n System.out.println(n);\n }", "{\n System.out.println(n);\n }", "System.out.println(n)", "System.out.println", "System.out", "System", "System.out", "n", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N=sc.nextInt();\n int[] A=new int[N-1];\n for (int i = 0; i < (N-1); i++) {\n A[i]=sc.nextInt();\n }\n int[] numBuka=new int[N];\n for (int i = 0; i < (N-1); i++) {\n numBuka[A[i]-1]++;\n }\n for (int n : numBuka) {\n System.out.println(n);\n }\n sc.close();\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N=sc.nextInt();\n int[] A=new int[N-1];\n for (int i = 0; i < (N-1); i++) {\n A[i]=sc.nextInt();\n }\n int[] numBuka=new int[N];\n for (int i = 0; i < (N-1); i++) {\n numBuka[A[i]-1]++;\n }\n for (int n : numBuka) {\n System.out.println(n);\n }\n sc.close();\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++) { A[i]=sc.nextInt(); } int[] numBuka=new int[N]; for (int i = 0; i < (N-1); i++) { numBuka[A[i]-1]++; } for (int n : numBuka) { System.out.println(n); } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 40, 18, 13, 2, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 4, 18, 13, 18, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 86, 11 ], [ 86, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 17, 19 ], [ 15, 20 ], [ 20, 21 ], [ 20, 22 ], [ 12, 23 ], [ 23, 24 ], [ 86, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 27, 36 ], [ 36, 37 ], [ 36, 38 ], [ 27, 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 ], [ 60, 61 ], [ 58, 62 ], [ 27, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 78, 80 ], [ 25, 81 ], [ 81, 82 ], [ 25, 83 ], [ 83, 84 ], [ 0, 85 ], [ 85, 86 ], [ 85, 87 ] ]
[ "\nimport java.io.InputStream;\nimport java.io.PrintStream;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n int sub[] = new int[N];\n for (int i = 0; i < N-1; i++) {\n sub[scan.nextInt()-1]++;\n }\n\n for (int i = 0; i < N; i++)\n os.println(sub[i]);\n\n }\n}", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintStream;", "PrintStream", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n int sub[] = new int[N];\n for (int i = 0; i < N-1; i++) {\n sub[scan.nextInt()-1]++;\n }\n\n for (int i = 0; i < N; i++)\n os.println(sub[i]);\n\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }", "main", "{\n solve(System.in, System.out);\n }", "solve(System.in, System.out)", "solve", "System.in", "System", "System.in", "System.out", "System", "System.out", "String[] args", "args", "static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n int sub[] = new int[N];\n for (int i = 0; i < N-1; i++) {\n sub[scan.nextInt()-1]++;\n }\n\n for (int i = 0; i < N; i++)\n os.println(sub[i]);\n\n }", "solve", "{\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n int sub[] = new int[N];\n for (int i = 0; i < N-1; i++) {\n sub[scan.nextInt()-1]++;\n }\n\n for (int i = 0; i < N; i++)\n os.println(sub[i]);\n\n }", "Scanner scan = new Scanner(is);", "scan", "new Scanner(is)", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "int sub[] = new int[N];", "sub", "new int[N]", "N", "for (int i = 0; i < N-1; i++) {\n sub[scan.nextInt()-1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n sub[scan.nextInt()-1]++;\n }", "{\n sub[scan.nextInt()-1]++;\n }", "sub[scan.nextInt()-1]++", "sub[scan.nextInt()-1]", "sub", "scan.nextInt()-1", "scan.nextInt()", "scan.nextInt", "scan", "1", "for (int i = 0; i < N; i++)\n os.println(sub[i]);", "int i = 0;", "int i = 0;", "i", "0", "i < N", "i", "N", "i++", "i++", "i", "os.println(sub[i]);", "os.println(sub[i])", "os.println", "os", "sub[i]", "sub", "i", "InputStream is", "is", "PrintStream os", "os", "public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n int sub[] = new int[N];\n for (int i = 0; i < N-1; i++) {\n sub[scan.nextInt()-1]++;\n }\n\n for (int i = 0; i < N; i++)\n os.println(sub[i]);\n\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n int sub[] = new int[N];\n for (int i = 0; i < N-1; i++) {\n sub[scan.nextInt()-1]++;\n }\n\n for (int i = 0; i < N; i++)\n os.println(sub[i]);\n\n }\n}", "Main" ]
import java.io.InputStream; import java.io.PrintStream; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { solve(System.in, System.out); } static void solve(InputStream is, PrintStream os) { // Your code here! Scanner scan = new Scanner(is); int N = scan.nextInt(); int sub[] = new int[N]; for (int i = 0; i < N-1; i++) { sub[scan.nextInt()-1]++; } for (int i = 0; i < N; i++) os.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, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 40, 18, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 21 ], [ 21, 22 ], [ 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 ], [ 46, 47 ], [ 46, 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 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] nums = new int[n];\n int x; \n for (int i = 0; i < n-1; i++) {\n x = sc.nextInt();\n nums[x-1]++;\n }\n for (int i=0; i < n; i++) {\n System.out.println(nums[i]);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] nums = new int[n];\n int x; \n for (int i = 0; i < n-1; i++) {\n x = sc.nextInt();\n nums[x-1]++;\n }\n for (int i=0; i < n; i++) {\n System.out.println(nums[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[] nums = new int[n];\n int x; \n for (int i = 0; i < n-1; i++) {\n x = sc.nextInt();\n nums[x-1]++;\n }\n for (int i=0; i < n; i++) {\n System.out.println(nums[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] nums = new int[n];\n int x; \n for (int i = 0; i < n-1; i++) {\n x = sc.nextInt();\n nums[x-1]++;\n }\n for (int i=0; i < n; i++) {\n System.out.println(nums[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[] nums = new int[n];", "nums", "new int[n]", "n", "int x;", "x", "for (int i = 0; i < n-1; i++) {\n x = sc.nextInt();\n nums[x-1]++;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n x = sc.nextInt();\n nums[x-1]++;\n }", "{\n x = sc.nextInt();\n nums[x-1]++;\n }", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "nums[x-1]++", "nums[x-1]", "nums", "x-1", "x", "1", "for (int i=0; i < n; i++) {\n System.out.println(nums[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n System.out.println(nums[i]);\n }", "{\n System.out.println(nums[i]);\n }", "System.out.println(nums[i])", "System.out.println", "System.out", "System", "System.out", "nums[i]", "nums", "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[] nums = new int[n]; int x; for (int i = 0; i < n-1; i++) { x = sc.nextInt(); nums[x-1]++; } for (int i=0; i < n; i++) { System.out.println(nums[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, 13, 1, 40, 13, 30, 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, 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 ], [ 162, 14 ], [ 162, 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 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 44, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 17, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 15, 71 ], [ 71, 72 ], [ 162, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 73, 77 ], [ 77, 78 ], [ 73, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 73, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 88, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 98, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 87, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 73, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 73, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 129, 130 ], [ 73, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 138, 139 ], [ 73, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 142, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 146, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 142, 159 ], [ 159, 160 ], [ 0, 161 ], [ 161, 162 ], [ 161, 163 ] ]
[ "\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint n = sc.nextInt();\n\t\tint ar[] = new int[n + 1];\n\t\t\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tar[sc.nextInt()]++;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= n; i++)\n\t\t\tSystem.out.println(ar[i]);\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint n = sc.nextInt();\n\t\tint ar[] = new int[n + 1];\n\t\t\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tar[sc.nextInt()]++;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= n; i++)\n\t\t\tSystem.out.println(ar[i]);\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}", "Main", "public static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint n = sc.nextInt();\n\t\tint ar[] = new int[n + 1];\n\t\t\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tar[sc.nextInt()]++;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= n; i++)\n\t\t\tSystem.out.println(ar[i]);\n\t}", "main", "{\n\t\tMyScanner sc = new MyScanner();\n\t\tint n = sc.nextInt();\n\t\tint ar[] = new int[n + 1];\n\t\t\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tar[sc.nextInt()]++;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= n; i++)\n\t\t\tSystem.out.println(ar[i]);\n\t}", "MyScanner sc = new MyScanner();", "sc", "new MyScanner()", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int ar[] = new int[n + 1];", "ar", "new int[n + 1]", "n + 1", "n", "1", "for(int i = 2; i <= n; i++) {\n\t\t\tar[sc.nextInt()]++;\n\t\t}", "int i = 2;", "int i = 2;", "i", "2", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\tar[sc.nextInt()]++;\n\t\t}", "{\n\t\t\tar[sc.nextInt()]++;\n\t\t}", "ar[sc.nextInt()]++", "ar[sc.nextInt()]", "ar", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 1; i <= n; i++)\n\t\t\tSystem.out.println(ar[i]);", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "System.out.println(ar[i]);", "System.out.println(ar[i])", "System.out.println", "System.out", "System", "System.out", "ar[i]", "ar", "i", "String args[]", "args", "public static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}", "MyScanner", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}", "MyScanner", "{\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}", "next", "{\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}", "while (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "try {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}", "catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}", "IOException e", "{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "nextInt", "{\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}", "nextLong", "{\n\t\t\treturn Long.parseLong(next());\n\t\t}", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}", "nextDouble", "{\n\t\t\treturn Double.parseDouble(next());\n\t\t}", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}", "nextLine", "{\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}", "String str = \"\";", "str", "\"\"", "try {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}", "catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}", "IOException e", "{\n\t\t\t\te.printStackTrace();\n\t\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\t\t\t\tstr = br.readLine();\n\t\t\t}", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint n = sc.nextInt();\n\t\tint ar[] = new int[n + 1];\n\t\t\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tar[sc.nextInt()]++;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= n; i++)\n\t\t\tSystem.out.println(ar[i]);\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint n = sc.nextInt();\n\t\tint ar[] = new int[n + 1];\n\t\t\n\t\tfor(int i = 2; i <= n; i++) {\n\t\t\tar[sc.nextInt()]++;\n\t\t}\n\t\t\n\t\tfor(int i = 1; i <= n; i++)\n\t\t\tSystem.out.println(ar[i]);\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws Exception { MyScanner sc = new MyScanner(); int n = sc.nextInt(); int ar[] = new int[n + 1]; for(int i = 2; i <= n; i++) { ar[sc.nextInt()]++; } for(int i = 1; i <= n; i++) System.out.println(ar[i]); } public static class MyScanner { BufferedReader br; StringTokenizer st; public MyScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ 7, 15, 13, 17, 15, 13, 17, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 74, 8 ], [ 74, 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 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 40, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 11, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 9, 71 ], [ 71, 72 ], [ 0, 73 ], [ 73, 74 ], [ 73, 75 ] ]
[ "import java.io.IOException;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tA[a]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}\n\t}\n}", "import java.io.IOException;", "IOException", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tA[a]++;\n\t\t}\n\n\t\tfor (int i = 1; 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\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tA[a]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tA[a]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int[] A = new int[N + 1];", "A", "new int[N + 1]", "N + 1", "N", "1", "for (int i = 0; i < N-1; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tA[a]++;\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n\t\t\tint a = sc.nextInt();\n\t\t\tA[a]++;\n\t\t}", "{\n\t\t\tint a = sc.nextInt();\n\t\t\tA[a]++;\n\t\t}", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "A[a]++", "A[a]", "A", "a", "for (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(A[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(A[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(A[i]);\n\t\t}", "System.out.println(A[i])", "System.out.println", "System.out", "System", "System.out", "A[i]", "A", "i", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tA[a]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[] A = new int[N + 1];\n\n\t\tfor (int i = 0; i < N-1; i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tA[a]++;\n\t\t}\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tSystem.out.println(A[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { 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 a = sc.nextInt(); A[a]++; } for (int i = 1; i <= N; i++) { System.out.println(A[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, 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, 29, 17, 30, 0, 13, 20, 29, 17, 12, 13, 30, 14, 4, 13, 29, 4, 18, 13, 29, 17, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 20, 12, 13, 30, 29, 20, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 0, 18, 13, 17, 40, 17, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 18, 13, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 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 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 22, 26 ], [ 26, 27 ], [ 22, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 22, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 37, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 47, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 36, 57 ], [ 57, 58 ], [ 22, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 61, 69 ], [ 69, 70 ], [ 22, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 22, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 22, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 22, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 22, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 0, 108 ], [ 194, 109 ], [ 194, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 116, 117 ], [ 116, 118 ], [ 112, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 112, 124 ], [ 124, 125 ], [ 124, 126 ], [ 127, 128 ], [ 127, 129 ], [ 112, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 134, 135 ], [ 112, 136 ], [ 136, 137 ], [ 136, 138 ], [ 139, 140 ], [ 139, 141 ], [ 112, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 147, 148 ], [ 147, 149 ], [ 142, 150 ], [ 150, 151 ], [ 151, 152 ], [ 142, 153 ], [ 154, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 159 ], [ 159, 160 ], [ 160, 161 ], [ 154, 162 ], [ 162, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 165, 167 ], [ 162, 168 ], [ 112, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 169, 174 ], [ 174, 175 ], [ 174, 176 ], [ 169, 177 ], [ 177, 178 ], [ 178, 179 ], [ 169, 180 ], [ 181, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 182, 185 ], [ 185, 186 ], [ 185, 187 ], [ 112, 188 ], [ 188, 189 ], [ 189, 190 ], [ 110, 191 ], [ 191, 192 ], [ 0, 193 ], [ 193, 194 ], [ 193, 195 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.math.BigDecimal;\nimport java.math.BigInteger;\nimport java.util.Arrays;\nimport java.util.StringTokenizer;\nclass InputReader {\n BufferedReader buf;\n StringTokenizer tok;\n \n public InputReader() {\n buf = new BufferedReader(new InputStreamReader(System.in));\n// try {\n// Path currentRelativePath = Paths.get(\"\");\n// String s = currentRelativePath.toAbsolutePath().toString();\n// String curDir = System.getProperty(\"user.dir\");\n// System.out.println(\"current dir: \" + s);\n// buf = new BufferedReader(new FileReader(\"/Users/wangdong/Dropbox/LC_Java/src/test/resources/testA.txt\"));\n// } catch (FileNotFoundException e) {\n// e.printStackTrace();\n// }\n }\n \n public boolean hasNext() {\n while (tok == null || !tok.hasMoreElements()) {\n try {\n tok = new StringTokenizer(buf.readLine());\n } catch (Exception e) {\n return false;\n }\n }\n return true;\n }\n \n public String next() {\n if (hasNext()) return tok.nextToken();\n return null;\n }\n \n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n \n public Double nextDouble() {\n return Double.parseDouble(next());\n }\n \n public BigInteger nextBigInteger() {\n return new BigInteger(next());\n }\n \n public BigDecimal nextBigDecimal() {\n return new BigDecimal(next());\n }\n}\n \n \npublic class Main {\n public static void main(String[] args) {\n InputReader in = new InputReader();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n \tint[] p = new int[n+1];\n \tp[1] = -1;\n \tint[] cnt = new int[n+1];\n \tfor (int i = 2; i <=n; i++) {\n p[i] = in.nextInt();\n cnt[p[i]] += 1;\n }\n\t\t\n \tfor (int i = 1; i <= n; i++) {\n out.println(cnt[i]);\n }\n out.close();\n }\n \n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.math.BigDecimal;", "BigDecimal", "java.math", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "class InputReader {\n BufferedReader buf;\n StringTokenizer tok;\n \n public InputReader() {\n buf = new BufferedReader(new InputStreamReader(System.in));\n// try {\n// Path currentRelativePath = Paths.get(\"\");\n// String s = currentRelativePath.toAbsolutePath().toString();\n// String curDir = System.getProperty(\"user.dir\");\n// System.out.println(\"current dir: \" + s);\n// buf = new BufferedReader(new FileReader(\"/Users/wangdong/Dropbox/LC_Java/src/test/resources/testA.txt\"));\n// } catch (FileNotFoundException e) {\n// e.printStackTrace();\n// }\n }\n \n public boolean hasNext() {\n while (tok == null || !tok.hasMoreElements()) {\n try {\n tok = new StringTokenizer(buf.readLine());\n } catch (Exception e) {\n return false;\n }\n }\n return true;\n }\n \n public String next() {\n if (hasNext()) return tok.nextToken();\n return null;\n }\n \n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n \n public Double nextDouble() {\n return Double.parseDouble(next());\n }\n \n public BigInteger nextBigInteger() {\n return new BigInteger(next());\n }\n \n public BigDecimal nextBigDecimal() {\n return new BigDecimal(next());\n }\n}", "InputReader", "BufferedReader buf;", "buf", "StringTokenizer tok;", "tok", "public InputReader() {\n buf = new BufferedReader(new InputStreamReader(System.in));\n// try {\n// Path currentRelativePath = Paths.get(\"\");\n// String s = currentRelativePath.toAbsolutePath().toString();\n// String curDir = System.getProperty(\"user.dir\");\n// System.out.println(\"current dir: \" + s);\n// buf = new BufferedReader(new FileReader(\"/Users/wangdong/Dropbox/LC_Java/src/test/resources/testA.txt\"));\n// } catch (FileNotFoundException e) {\n// e.printStackTrace();\n// }\n }", "InputReader", "{\n buf = new BufferedReader(new InputStreamReader(System.in));\n// try {\n// Path currentRelativePath = Paths.get(\"\");\n// String s = currentRelativePath.toAbsolutePath().toString();\n// String curDir = System.getProperty(\"user.dir\");\n// System.out.println(\"current dir: \" + s);\n// buf = new BufferedReader(new FileReader(\"/Users/wangdong/Dropbox/LC_Java/src/test/resources/testA.txt\"));\n// } catch (FileNotFoundException e) {\n// e.printStackTrace();\n// }\n }", "buf = new BufferedReader(new InputStreamReader(System.in))", "buf", "new BufferedReader(new InputStreamReader(System.in))", "public boolean hasNext() {\n while (tok == null || !tok.hasMoreElements()) {\n try {\n tok = new StringTokenizer(buf.readLine());\n } catch (Exception e) {\n return false;\n }\n }\n return true;\n }", "hasNext", "{\n while (tok == null || !tok.hasMoreElements()) {\n try {\n tok = new StringTokenizer(buf.readLine());\n } catch (Exception e) {\n return false;\n }\n }\n return true;\n }", "while (tok == null || !tok.hasMoreElements()) {\n try {\n tok = new StringTokenizer(buf.readLine());\n } catch (Exception e) {\n return false;\n }\n }", "tok == null || !tok.hasMoreElements()", "tok == null", "tok", "null", "!tok.hasMoreElements()", "tok.hasMoreElements()", "tok.hasMoreElements", "tok", "{\n try {\n tok = new StringTokenizer(buf.readLine());\n } catch (Exception e) {\n return false;\n }\n }", "try {\n tok = new StringTokenizer(buf.readLine());\n } catch (Exception e) {\n return false;\n }", "catch (Exception e) {\n return false;\n }", "Exception e", "{\n return false;\n }", "return false;", "false", "{\n tok = new StringTokenizer(buf.readLine());\n }", "tok = new StringTokenizer(buf.readLine())", "tok", "new StringTokenizer(buf.readLine())", "return true;", "true", "public String next() {\n if (hasNext()) return tok.nextToken();\n return null;\n }", "next", "{\n if (hasNext()) return tok.nextToken();\n return null;\n }", "if (hasNext()) return tok.nextToken();", "hasNext()", "hasNext", "return tok.nextToken();", "tok.nextToken()", "tok.nextToken", "tok", "return null;", "null", "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 long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public 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 BigInteger nextBigInteger() {\n return new BigInteger(next());\n }", "nextBigInteger", "{\n return new BigInteger(next());\n }", "return new BigInteger(next());", "new BigInteger(next())", "public BigDecimal nextBigDecimal() {\n return new BigDecimal(next());\n }", "nextBigDecimal", "{\n return new BigDecimal(next());\n }", "return new BigDecimal(next());", "new BigDecimal(next())", "public class Main {\n public static void main(String[] args) {\n InputReader in = new InputReader();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n \tint[] p = new int[n+1];\n \tp[1] = -1;\n \tint[] cnt = new int[n+1];\n \tfor (int i = 2; i <=n; i++) {\n p[i] = in.nextInt();\n cnt[p[i]] += 1;\n }\n\t\t\n \tfor (int i = 1; i <= n; i++) {\n out.println(cnt[i]);\n }\n out.close();\n }\n \n}", "Main", "public static void main(String[] args) {\n InputReader in = new InputReader();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n \tint[] p = new int[n+1];\n \tp[1] = -1;\n \tint[] cnt = new int[n+1];\n \tfor (int i = 2; i <=n; i++) {\n p[i] = in.nextInt();\n cnt[p[i]] += 1;\n }\n\t\t\n \tfor (int i = 1; i <= n; i++) {\n out.println(cnt[i]);\n }\n out.close();\n }", "main", "{\n InputReader in = new InputReader();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n \tint[] p = new int[n+1];\n \tp[1] = -1;\n \tint[] cnt = new int[n+1];\n \tfor (int i = 2; i <=n; i++) {\n p[i] = in.nextInt();\n cnt[p[i]] += 1;\n }\n\t\t\n \tfor (int i = 1; i <= n; i++) {\n out.println(cnt[i]);\n }\n out.close();\n }", "InputReader in = new InputReader();", "in", "new InputReader()", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int[] p = new int[n+1];", "p", "new int[n+1]", "n+1", "n", "1", "p[1] = -1", "p[1]", "p", "1", "-1", "1", "int[] cnt = new int[n+1];", "cnt", "new int[n+1]", "n+1", "n", "1", "for (int i = 2; i <=n; i++) {\n p[i] = in.nextInt();\n cnt[p[i]] += 1;\n }", "int i = 2;", "int i = 2;", "i", "2", "i <=n", "i", "n", "i++", "i++", "i", "{\n p[i] = in.nextInt();\n cnt[p[i]] += 1;\n }", "{\n p[i] = in.nextInt();\n cnt[p[i]] += 1;\n }", "p[i] = in.nextInt()", "p[i]", "p", "i", "in.nextInt()", "in.nextInt", "in", "cnt[p[i]] += 1", "cnt[p[i]]", "cnt", "p[i]", "p", "i", "1", "for (int i = 1; i <= n; i++) {\n out.println(cnt[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n out.println(cnt[i]);\n }", "{\n out.println(cnt[i]);\n }", "out.println(cnt[i])", "out.println", "out", "cnt[i]", "cnt", "i", "out.close()", "out.close", "out", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n InputReader in = new InputReader();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n \tint[] p = new int[n+1];\n \tp[1] = -1;\n \tint[] cnt = new int[n+1];\n \tfor (int i = 2; i <=n; i++) {\n p[i] = in.nextInt();\n cnt[p[i]] += 1;\n }\n\t\t\n \tfor (int i = 1; i <= n; i++) {\n out.println(cnt[i]);\n }\n out.close();\n }\n \n}", "public class Main {\n public static void main(String[] args) {\n InputReader in = new InputReader();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n \tint[] p = new int[n+1];\n \tp[1] = -1;\n \tint[] cnt = new int[n+1];\n \tfor (int i = 2; i <=n; i++) {\n p[i] = in.nextInt();\n cnt[p[i]] += 1;\n }\n\t\t\n \tfor (int i = 1; i <= n; i++) {\n out.println(cnt[i]);\n }\n out.close();\n }\n \n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.math.BigDecimal; import java.math.BigInteger; import java.util.Arrays; import java.util.StringTokenizer; class InputReader { BufferedReader buf; StringTokenizer tok; public InputReader() { buf = new BufferedReader(new InputStreamReader(System.in)); // try { // Path currentRelativePath = Paths.get(""); // String s = currentRelativePath.toAbsolutePath().toString(); // String curDir = System.getProperty("user.dir"); // System.out.println("current dir: " + s); // buf = new BufferedReader(new FileReader("/Users/wangdong/Dropbox/LC_Java/src/test/resources/testA.txt")); // } catch (FileNotFoundException e) { // e.printStackTrace(); // } } public boolean hasNext() { while (tok == null || !tok.hasMoreElements()) { try { tok = new StringTokenizer(buf.readLine()); } catch (Exception e) { return false; } } return true; } public String next() { if (hasNext()) return tok.nextToken(); return null; } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public Double nextDouble() { return Double.parseDouble(next()); } public BigInteger nextBigInteger() { return new BigInteger(next()); } public BigDecimal nextBigDecimal() { return new BigDecimal(next()); } } public class Main { public static void main(String[] args) { InputReader in = new InputReader(); PrintWriter out = new PrintWriter(System.out); int n = in.nextInt(); int[] p = new int[n+1]; p[1] = -1; int[] cnt = new int[n+1]; for (int i = 2; i <=n; i++) { p[i] = in.nextInt(); cnt[p[i]] += 1; } for (int i = 1; i <= n; i++) { out.println(cnt[i]); } out.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 17, 42, 2, 13, 17, 30, 4, 18, 13, 40, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 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, 18, 13, 29, 13, 23, 13, 6, 13, 41, 13, 20, 41, 13, 17, 41, 13, 40, 17, 41, 13, 2, 17, 17, 41, 13, 17, 12, 13, 30, 29, 2, 2, 2, 2, 13, 13, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 2, 2, 13, 13, 2, 13, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 2, 13, 2, 13, 17, 2, 13, 17, 17, 23, 13, 12, 13, 30, 29, 2, 2, 13, 2, 13, 17, 17, 23, 13, 12, 13, 30, 41, 13, 17, 0, 13, 2, 13, 13, 42, 2, 13, 17, 30, 14, 2, 2, 13, 17, 17, 0, 13, 4, 13, 13, 13, 0, 13, 4, 13, 13, 13, 0, 13, 2, 13, 17, 29, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 4, 18, 13, 17, 40, 18, 13, 13, 28, 13, 13, 30, 4, 18, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 392, 11 ], [ 392, 12 ], [ 12, 13 ], [ 12, 14 ], [ 392, 15 ], [ 15, 16 ], [ 15, 17 ], [ 392, 18 ], [ 18, 19 ], [ 18, 20 ], [ 392, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 27, 29 ], [ 23, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 34, 38 ], [ 38, 39 ], [ 23, 40 ], [ 40, 41 ], [ 41, 42 ], [ 21, 43 ], [ 43, 44 ], [ 392, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 45, 49 ], [ 49, 50 ], [ 45, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 57, 59 ], [ 51, 60 ], [ 60, 61 ], [ 45, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 65, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 75, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 64, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 45, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 45, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 45, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 45, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 45, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 125, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 135, 137 ], [ 130, 138 ], [ 138, 139 ], [ 139, 140 ], [ 130, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 142, 146 ], [ 146, 147 ], [ 147, 148 ], [ 125, 149 ], [ 149, 150 ], [ 123, 151 ], [ 151, 152 ], [ 45, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 155, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 160, 165 ], [ 165, 166 ], [ 165, 167 ], [ 160, 168 ], [ 168, 169 ], [ 169, 170 ], [ 160, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 172, 176 ], [ 176, 177 ], [ 177, 178 ], [ 155, 179 ], [ 179, 180 ], [ 153, 181 ], [ 181, 182 ], [ 392, 183 ], [ 183, 184 ], [ 183, 185 ], [ 185, 186 ], [ 185, 187 ], [ 183, 188 ], [ 188, 189 ], [ 188, 190 ], [ 183, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 183, 195 ], [ 195, 196 ], [ 195, 197 ], [ 197, 198 ], [ 197, 199 ], [ 183, 200 ], [ 200, 201 ], [ 200, 202 ], [ 183, 203 ], [ 203, 204 ], [ 203, 205 ], [ 205, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 209, 213 ], [ 208, 214 ], [ 207, 215 ], [ 203, 216 ], [ 216, 217 ], [ 203, 218 ], [ 218, 219 ], [ 183, 220 ], [ 220, 221 ], [ 220, 222 ], [ 222, 223 ], [ 223, 224 ], [ 224, 225 ], [ 225, 226 ], [ 225, 227 ], [ 224, 228 ], [ 220, 229 ], [ 229, 230 ], [ 220, 231 ], [ 231, 232 ], [ 183, 233 ], [ 233, 234 ], [ 233, 235 ], [ 235, 236 ], [ 236, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 240, 241 ], [ 240, 242 ], [ 239, 243 ], [ 243, 244 ], [ 243, 245 ], [ 238, 246 ], [ 237, 247 ], [ 233, 248 ], [ 248, 249 ], [ 233, 250 ], [ 250, 251 ], [ 183, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 255, 256 ], [ 256, 257 ], [ 257, 258 ], [ 258, 259 ], [ 258, 260 ], [ 260, 261 ], [ 260, 262 ], [ 257, 263 ], [ 263, 264 ], [ 263, 265 ], [ 256, 266 ], [ 252, 267 ], [ 267, 268 ], [ 183, 269 ], [ 269, 270 ], [ 269, 271 ], [ 271, 272 ], [ 272, 273 ], [ 273, 274 ], [ 274, 275 ], [ 274, 276 ], [ 276, 277 ], [ 276, 278 ], [ 273, 279 ], [ 269, 280 ], [ 280, 281 ], [ 183, 282 ], [ 282, 283 ], [ 282, 284 ], [ 284, 285 ], [ 285, 286 ], [ 285, 287 ], [ 284, 288 ], [ 288, 289 ], [ 288, 290 ], [ 290, 291 ], [ 290, 292 ], [ 284, 293 ], [ 293, 294 ], [ 294, 295 ], [ 294, 296 ], [ 293, 297 ], [ 297, 298 ], [ 298, 299 ], [ 299, 300 ], [ 300, 301 ], [ 300, 302 ], [ 299, 303 ], [ 298, 304 ], [ 304, 305 ], [ 304, 306 ], [ 306, 307 ], [ 306, 308 ], [ 306, 309 ], [ 297, 310 ], [ 310, 311 ], [ 310, 312 ], [ 312, 313 ], [ 312, 314 ], [ 312, 315 ], [ 297, 316 ], [ 316, 317 ], [ 316, 318 ], [ 318, 319 ], [ 318, 320 ], [ 284, 321 ], [ 321, 322 ], [ 282, 323 ], [ 323, 324 ], [ 282, 325 ], [ 325, 326 ], [ 183, 327 ], [ 327, 328 ], [ 327, 329 ], [ 329, 330 ], [ 330, 331 ], [ 331, 332 ], [ 331, 333 ], [ 330, 334 ], [ 334, 335 ], [ 329, 336 ], [ 336, 337 ], [ 337, 338 ], [ 337, 339 ], [ 337, 340 ], [ 340, 341 ], [ 340, 342 ], [ 327, 343 ], [ 343, 344 ], [ 327, 345 ], [ 345, 346 ], [ 183, 347 ], [ 347, 348 ], [ 347, 349 ], [ 349, 350 ], [ 350, 351 ], [ 350, 352 ], [ 352, 353 ], [ 353, 354 ], [ 349, 355 ], [ 355, 356 ], [ 355, 357 ], [ 349, 359 ], [ 359, 360 ], [ 360, 361 ], [ 361, 362 ], [ 361, 363 ], [ 359, 364 ], [ 364, 365 ], [ 364, 366 ], [ 359, 367 ], [ 367, 368 ], [ 368, 369 ], [ 359, 370 ], [ 371, 371 ], [ 371, 372 ], [ 372, 373 ], [ 372, 374 ], [ 374, 375 ], [ 375, 376 ], [ 376, 377 ], [ 374, 378 ], [ 371, 379 ], [ 379, 380 ], [ 380, 381 ], [ 380, 382 ], [ 349, 383 ], [ 383, 384 ], [ 383, 385 ], [ 383, 386 ], [ 386, 387 ], [ 387, 388 ], [ 388, 389 ], [ 387, 390 ], [ 0, 391 ], [ 391, 392 ], [ 391, 393 ] ]
[ "import java.io.*;\nimport java.text.*;\nimport java.util.*;\n\npublic class Main {\n\n static InputReader sc = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }\n\n static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }\n\n static int inf = 5000013;\n\n static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n = sc.ni();\n int a[] = new int[n];\n for (int i = 1; i < n; i++) {\n int t = sc.ni() - 1;\n a[t]++;\n }\n for (int h : a)\n out.println(h);\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.text.*;", "text.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n\n static InputReader sc = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }\n\n static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }\n\n static int inf = 5000013;\n\n static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n = sc.ni();\n int a[] = new int[n];\n for (int i = 1; i < n; i++) {\n int t = sc.ni() - 1;\n a[t]++;\n }\n for (int h : a)\n out.println(h);\n }\n }\n}", "Main", "static InputReader sc = new InputReader(System.in);", "sc", "new InputReader(System.in)", "static PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "static int inf = 5000013;", "inf", "5000013", "public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }", "main", "{\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }", "solver s = new solver();", "s", "new solver()", "int t = 1;", "t", "1", "while (t > 0) {\n s.solve();\n t--;\n }", "t > 0", "t", "0", "{\n s.solve();\n t--;\n }", "s.solve()", "s.solve", "s", "t--", "t", "out.close()", "out.close", "out", "String[] args", "args", "static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }", "InputReader", "public BufferedReader br;", "br", "public StringTokenizer token;", "token", "public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }", "InputReader", "{\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }", "br = new BufferedReader(new InputStreamReader(stream), 32768)", "br", "new BufferedReader(new InputStreamReader(stream), 32768)", "token = null", "token", "null", "InputStream stream", "stream", "public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }", "sn", "{\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }", "while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "token == null || !token.hasMoreTokens()", "token == null", "token", "null", "!token.hasMoreTokens()", "token.hasMoreTokens()", "token.hasMoreTokens", "token", "{\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n token = new StringTokenizer(br.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 token = new StringTokenizer(br.readLine());\n }", "token = new StringTokenizer(br.readLine())", "token", "new StringTokenizer(br.readLine())", "return token.nextToken();", "token.nextToken()", "token.nextToken", "token", "public int ni() {\n return Integer.parseInt(sn());\n }", "ni", "{\n return Integer.parseInt(sn());\n }", "return Integer.parseInt(sn());", "Integer.parseInt(sn())", "Integer.parseInt", "Integer", "sn()", "sn", "public String snl() throws IOException {\n return br.readLine();\n }", "snl", "{\n return br.readLine();\n }", "return br.readLine();", "br.readLine()", "br.readLine", "br", "public long nlo() {\n return Long.parseLong(sn());\n }", "nlo", "{\n return Long.parseLong(sn());\n }", "return Long.parseLong(sn());", "Long.parseLong(sn())", "Long.parseLong", "Long", "sn()", "sn", "public double nd() {\n return Double.parseDouble(sn());\n }", "nd", "{\n return Double.parseDouble(sn());\n }", "return Double.parseDouble(sn());", "Double.parseDouble(sn())", "Double.parseDouble", "Double", "sn()", "sn", "public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }", "na", "{\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }", "int a[] = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++)\n a[i] = sc.ni();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = sc.ni();", "a[i] = sc.ni()", "a[i]", "a", "i", "sc.ni()", "sc.ni", "sc", "return a;", "a", "int n", "n", "public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }", "nal", "{\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }", "long a[] = new long[n];", "a", "new long[n]", "n", "for (int i = 0; i < n; i++)\n a[i] = sc.nlo();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = sc.nlo();", "a[i] = sc.nlo()", "a[i]", "a", "i", "sc.nlo()", "sc.nlo", "sc", "return a;", "a", "int n", "n", "static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n = sc.ni();\n int a[] = new int[n];\n for (int i = 1; i < n; i++) {\n int t = sc.ni() - 1;\n a[t]++;\n }\n for (int h : a)\n out.println(h);\n }\n }", "solver", "DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");", "df", "new DecimalFormat(\"0.00000000000000000000\")", "long max = 1000000000000000l", "max", "1000000000000000l", "min = -10000000000000000l;", "min", "-10000000000000000l", "10000000000000000l", "long mod = (long) 1e9 + 7;", "mod", "(long) 1e9 + 7", "(long) 1e9", "7", "final int maxn = 1000005;", "maxn", "1000005", "long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }", "pro", "{\n return (a % mod * b % mod) % mod;\n }", "return (a % mod * b % mod) % mod;", "(a % mod * b % mod) % mod", "(a % mod * b % mod)", "a % mod * b", "a % mod", "a", "mod", "b", "mod", "mod", "long a", "a", "long b", "b", "long add(long a, long b) {\n return (a + b) % mod;\n }", "add", "{\n return (a + b) % mod;\n }", "return (a + b) % mod;", "(a + b) % mod", "(a + b)", "a", "b", "mod", "long a", "a", "long b", "b", "long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }", "sub", "{\n return ((a % mod - b % mod) + mod) % mod;\n }", "return ((a % mod - b % mod) + mod) % mod;", "((a % mod - b % mod) + mod) % mod", "((a % mod - b % mod) + mod)", "(a % mod - b % mod)", "a % mod", "a", "mod", "b % mod", "b", "mod", "mod", "mod", "long a", "a", "long b", "b", "long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }", "ncr3", "{\n return (n * (n - 1) * (n - 2)) / 6l;\n }", "return (n * (n - 1) * (n - 2)) / 6l;", "(n * (n - 1) * (n - 2)) / 6l", "(n * (n - 1) * (n - 2))", "n * (n - 1) * (n - 2)", "n", "(n - 1)", "n", "1", "(n - 2)", "n", "2", "6l", "long n", "n", "long ncr2(long n) {\n return n * (n - 1) / 2l;\n }", "ncr2", "{\n return n * (n - 1) / 2l;\n }", "return n * (n - 1) / 2l;", "n * (n - 1) / 2l", "n * (n - 1)", "n", "(n - 1)", "n", "1", "2l", "long n", "n", "long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }", "modPow", "{\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }", "long res = 1;", "res", "1", "x = x % mod", "x", "x % mod", "x", "mod", "while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }", "y > 0", "y", "0", "{\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }", "if (y % 2 != 0)\n res = pro(res, x);", "y % 2 != 0", "y % 2", "y", "2", "0", "res = pro(res, x)", "res", "pro(res, x)", "pro", "res", "x", "x = pro(x, x)", "x", "pro(x, x)", "pro", "x", "x", "y = y >> 1", "y", "y >> 1", "y", "1", "return res;", "res", "long x", "x", "long y", "y", "int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }", "gcd", "{\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }", "if (b == 0)\n return a;", "b == 0", "b", "0", "return a;", "a", "return gcd(b, a % b);", "gcd(b, a % b)", "gcd", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "void solve() {\n int n = sc.ni();\n int a[] = new int[n];\n for (int i = 1; i < n; i++) {\n int t = sc.ni() - 1;\n a[t]++;\n }\n for (int h : a)\n out.println(h);\n }", "solve", "{\n int n = sc.ni();\n int a[] = new int[n];\n for (int i = 1; i < n; i++) {\n int t = sc.ni() - 1;\n a[t]++;\n }\n for (int h : a)\n out.println(h);\n }", "int n = sc.ni();", "n", "sc.ni()", "sc.ni", "sc", "int a[] = new int[n];", "a", "new int[n]", "n", "for (int i = 1; i < n; i++) {\n int t = sc.ni() - 1;\n a[t]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n int t = sc.ni() - 1;\n a[t]++;\n }", "{\n int t = sc.ni() - 1;\n a[t]++;\n }", "int t = sc.ni() - 1;", "t", "sc.ni() - 1", "sc.ni()", "sc.ni", "sc", "1", "a[t]++", "a[t]", "a", "t", "for (int h : a)\n out.println(h);", "int h", "a", "out.println(h);", "out.println(h)", "out.println", "out", "h", "public class Main {\n\n static InputReader sc = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }\n\n static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }\n\n static int inf = 5000013;\n\n static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n = sc.ni();\n int a[] = new int[n];\n for (int i = 1; i < n; i++) {\n int t = sc.ni() - 1;\n a[t]++;\n }\n for (int h : a)\n out.println(h);\n }\n }\n}", "public class Main {\n\n static InputReader sc = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) throws IOException {\n solver s = new solver();\n int t = 1;\n while (t > 0) {\n s.solve();\n t--;\n }\n out.close();\n }\n\n static class InputReader {\n\n public BufferedReader br;\n public StringTokenizer token;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n token = null;\n }\n\n public String sn() {\n while (token == null || !token.hasMoreTokens()) {\n try {\n token = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return token.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(sn());\n }\n\n public String snl() throws IOException {\n return br.readLine();\n }\n\n public long nlo() {\n return Long.parseLong(sn());\n }\n\n public double nd() {\n return Double.parseDouble(sn());\n }\n\n public int[] na(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.ni();\n return a;\n }\n\n public long[] nal(int n) {\n long a[] = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = sc.nlo();\n return a;\n }\n }\n\n static int inf = 5000013;\n\n static class solver {\n DecimalFormat df = new DecimalFormat(\"0.00000000000000000000\");\n long max = 1000000000000000l, min = -10000000000000000l;\n long mod = (long) 1e9 + 7;\n\n long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n long add(long a, long b) {\n return (a + b) % mod;\n }\n\n long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n long ncr3(long n) {\n return (n * (n - 1) * (n - 2)) / 6l;\n }\n\n long ncr2(long n) {\n return n * (n - 1) / 2l;\n }\n\n long modPow(long x, long y) {\n long res = 1;\n x = x % mod;\n while (y > 0) {\n if (y % 2 != 0)\n res = pro(res, x);\n x = pro(x, x);\n y = y >> 1;\n }\n return res;\n }\n\n int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n final int maxn = 1000005;\n\n void solve() {\n int n = sc.ni();\n int a[] = new int[n];\n for (int i = 1; i < n; i++) {\n int t = sc.ni() - 1;\n a[t]++;\n }\n for (int h : a)\n out.println(h);\n }\n }\n}", "Main" ]
import java.io.*; import java.text.*; import java.util.*; public class Main { static InputReader sc = new InputReader(System.in); static PrintWriter out = new PrintWriter(System.out); public static void main(String[] args) throws IOException { solver s = new solver(); int t = 1; while (t > 0) { s.solve(); t--; } out.close(); } static class InputReader { public BufferedReader br; public StringTokenizer token; public InputReader(InputStream stream) { br = new BufferedReader(new InputStreamReader(stream), 32768); token = null; } public String sn() { while (token == null || !token.hasMoreTokens()) { try { token = new StringTokenizer(br.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return token.nextToken(); } public int ni() { return Integer.parseInt(sn()); } public String snl() throws IOException { return br.readLine(); } public long nlo() { return Long.parseLong(sn()); } public double nd() { return Double.parseDouble(sn()); } public int[] na(int n) { int a[] = new int[n]; for (int i = 0; i < n; i++) a[i] = sc.ni(); return a; } public long[] nal(int n) { long a[] = new long[n]; for (int i = 0; i < n; i++) a[i] = sc.nlo(); return a; } } static int inf = 5000013; static class solver { DecimalFormat df = new DecimalFormat("0.00000000000000000000"); long max = 1000000000000000l, min = -10000000000000000l; long mod = (long) 1e9 + 7; long pro(long a, long b) { return (a % mod * b % mod) % mod; } long add(long a, long b) { return (a + b) % mod; } long sub(long a, long b) { return ((a % mod - b % mod) + mod) % mod; } long ncr3(long n) { return (n * (n - 1) * (n - 2)) / 6l; } long ncr2(long n) { return n * (n - 1) / 2l; } long modPow(long x, long y) { long res = 1; x = x % mod; while (y > 0) { if (y % 2 != 0) res = pro(res, x); x = pro(x, x); y = y >> 1; } return res; } int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } final int maxn = 1000005; void solve() { int n = sc.ni(); int a[] = new int[n]; for (int i = 1; i < n; i++) { int t = sc.ni() - 1; a[t]++; } for (int h : a) out.println(h); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 0, 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, 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, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 90, 5 ], [ 90, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 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 ], [ 37, 39 ], [ 36, 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 ], [ 53, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 57, 61 ], [ 54, 62 ], [ 8, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 8, 84 ], [ 84, 85 ], [ 85, 86 ], [ 6, 87 ], [ 87, 88 ], [ 0, 89 ], [ 89, 90 ], [ 89, 91 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a;\t//a[0]:A1\n a = new int[n];\n\n for (int i=1; i<n; i++) {\n \ta[i] = 0;\n }\n\n for (int i=1; i<n; i++) {\n \ta[(scan.nextInt())-1] += 1;\n }\n\n for (int i=0; i<n; i++) {\n\t\t\tSystem.out.println(a[i]);\n }\n\t scan.close();\t\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a;\t//a[0]:A1\n a = new int[n];\n\n for (int i=1; i<n; i++) {\n \ta[i] = 0;\n }\n\n for (int i=1; i<n; i++) {\n \ta[(scan.nextInt())-1] += 1;\n }\n\n for (int i=0; i<n; i++) {\n\t\t\tSystem.out.println(a[i]);\n }\n\t scan.close();\t\n }\n}", "Main", "public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a;\t//a[0]:A1\n a = new int[n];\n\n for (int i=1; i<n; i++) {\n \ta[i] = 0;\n }\n\n for (int i=1; i<n; i++) {\n \ta[(scan.nextInt())-1] += 1;\n }\n\n for (int i=0; i<n; i++) {\n\t\t\tSystem.out.println(a[i]);\n }\n\t scan.close();\t\n }", "main", "{\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a;\t//a[0]:A1\n a = new int[n];\n\n for (int i=1; i<n; i++) {\n \ta[i] = 0;\n }\n\n for (int i=1; i<n; i++) {\n \ta[(scan.nextInt())-1] += 1;\n }\n\n for (int i=0; i<n; i++) {\n\t\t\tSystem.out.println(a[i]);\n }\n\t scan.close();\t\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int[] a;", "a", "a = new int[n]", "a", "new int[n]", "n", "for (int i=1; i<n; i++) {\n \ta[i] = 0;\n }", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n \ta[i] = 0;\n }", "{\n \ta[i] = 0;\n }", "a[i] = 0", "a[i]", "a", "i", "0", "for (int i=1; i<n; i++) {\n \ta[(scan.nextInt())-1] += 1;\n }", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "{\n \ta[(scan.nextInt())-1] += 1;\n }", "{\n \ta[(scan.nextInt())-1] += 1;\n }", "a[(scan.nextInt())-1] += 1", "a[(scan.nextInt())-1]", "a", "(scan.nextInt())-1", "(scan.nextInt())", "scan.nextInt", "scan", "1", "1", "for (int i=0; i<n; i++) {\n\t\t\tSystem.out.println(a[i]);\n }", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(a[i]);\n }", "{\n\t\t\tSystem.out.println(a[i]);\n }", "System.out.println(a[i])", "System.out.println", "System.out", "System", "System.out", "a[i]", "a", "i", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a;\t//a[0]:A1\n a = new int[n];\n\n for (int i=1; i<n; i++) {\n \ta[i] = 0;\n }\n\n for (int i=1; i<n; i++) {\n \ta[(scan.nextInt())-1] += 1;\n }\n\n for (int i=0; i<n; i++) {\n\t\t\tSystem.out.println(a[i]);\n }\n\t scan.close();\t\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a;\t//a[0]:A1\n a = new int[n];\n\n for (int i=1; i<n; i++) {\n \ta[i] = 0;\n }\n\n for (int i=1; i<n; i++) {\n \ta[(scan.nextInt())-1] += 1;\n }\n\n for (int i=0; i<n; i++) {\n\t\t\tSystem.out.println(a[i]);\n }\n\t scan.close();\t\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[] a; //a[0]:A1 a = new int[n]; for (int i=1; i<n; i++) { a[i] = 0; } for (int i=1; i<n; i++) { a[(scan.nextInt())-1] += 1; } for (int i=0; i<n; i++) { System.out.println(a[i]); } scan.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 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, 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, 13, 18, 13, 13, 12, 13, 30, 4, 18, 13, 4, 18, 13, 12, 13, 30, 38, 30, 41, 13, 20, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 4, 18, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 177, 23 ], [ 177, 24 ], [ 24, 25 ], [ 24, 26 ], [ 177, 27 ], [ 27, 28 ], [ 27, 29 ], [ 177, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 32, 38 ], [ 38, 39 ], [ 38, 40 ], [ 41, 42 ], [ 41, 43 ], [ 32, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 56, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 32, 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 ], [ 79, 82 ], [ 82, 83 ], [ 82, 84 ], [ 177, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 87, 91 ], [ 91, 92 ], [ 92, 93 ], [ 177, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 102, 103 ], [ 103, 104 ], [ 94, 105 ], [ 105, 106 ], [ 177, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 107, 111 ], [ 111, 112 ], [ 107, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 119, 120 ], [ 119, 121 ], [ 113, 122 ], [ 122, 123 ], [ 107, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 127, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 137, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 126, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 107, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 155, 158 ], [ 158, 159 ], [ 107, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 164, 167 ], [ 167, 168 ], [ 107, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 177, 175 ], [ 0, 176 ], [ 176, 177 ], [ 176, 178 ] ]
[ "\nimport java.io.BufferedReader;\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main implements Closeable {\n\n private InputReader in = new InputReader(System.in);\n private PrintWriter out = new PrintWriter(System.out);\n\n public void solve() {\n int n = in.ni();\n int[] result = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n int next = in.ni();\n result[next]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(result[i]);\n }\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }\n\n public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.Closeable;", "Closeable", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main implements Closeable {\n\n private InputReader in = new InputReader(System.in);\n private PrintWriter out = new PrintWriter(System.out);\n\n public void solve() {\n int n = in.ni();\n int[] result = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n int next = in.ni();\n result[next]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(result[i]);\n }\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }\n\n public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }\n}", "Main", "private InputReader in = new InputReader(System.in);", "in", "new InputReader(System.in)", "private PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "public void solve() {\n int n = in.ni();\n int[] result = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n int next = in.ni();\n result[next]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(result[i]);\n }\n }", "solve", "{\n int n = in.ni();\n int[] result = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n int next = in.ni();\n result[next]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(result[i]);\n }\n }", "int n = in.ni();", "n", "in.ni()", "in.ni", "in", "int[] result = new int[n + 1];", "result", "new int[n + 1]", "n + 1", "n", "1", "for (int i = 2; i <= n; i++) {\n int next = in.ni();\n result[next]++;\n }", "int i = 2;", "int i = 2;", "i", "2", "i <= n", "i", "n", "i++", "i++", "i", "{\n int next = in.ni();\n result[next]++;\n }", "{\n int next = in.ni();\n result[next]++;\n }", "int next = in.ni();", "next", "in.ni()", "in.ni", "in", "result[next]++", "result[next]", "result", "next", "for (int i = 1; i <= n; i++) {\n out.println(result[i]);\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n out.println(result[i]);\n }", "{\n out.println(result[i]);\n }", "out.println(result[i])", "out.println", "out", "result[i]", "result", "i", "@Override\n public void close() throws IOException {\n in.close();\n out.close();\n }", "close", "{\n in.close();\n out.close();\n }", "in.close()", "in.close", "in", "out.close()", "out.close", "out", "public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }", "main", "{\n try (Main instance = new Main()) {\n instance.solve();\n }\n }", "try (Main instance = new Main()) {\n instance.solve();\n }", "{\n instance.solve();\n }", "Main instance = new Main()", "Main instance = new Main()", "new Main()", "instance.solve()", "instance.solve", "instance", "String[] args", "args", "static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }", "InputReader", "public BufferedReader reader;", "reader", "public StringTokenizer tokenizer;", "tokenizer", "public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "InputReader", "{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "reader = new BufferedReader(new InputStreamReader(stream), 32768)", "reader", "new BufferedReader(new InputStreamReader(stream), 32768)", "tokenizer = null", "tokenizer", "null", "InputStream stream", "stream", "public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "next", "{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n throw new RuntimeException(e);\n }", "IOException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n tokenizer = new StringTokenizer(reader.readLine());\n }", "tokenizer = new StringTokenizer(reader.readLine())", "tokenizer", "new StringTokenizer(reader.readLine())", "return tokenizer.nextToken();", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "public int ni() {\n return Integer.parseInt(next());\n }", "ni", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public long nl() {\n return Long.parseLong(next());\n }", "nl", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public void close() throws IOException {\n reader.close();\n }", "close", "{\n reader.close();\n }", "reader.close()", "reader.close", "reader", "Closeable", "public class Main implements Closeable {\n\n private InputReader in = new InputReader(System.in);\n private PrintWriter out = new PrintWriter(System.out);\n\n public void solve() {\n int n = in.ni();\n int[] result = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n int next = in.ni();\n result[next]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(result[i]);\n }\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }\n\n public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }\n}", "public class Main implements Closeable {\n\n private InputReader in = new InputReader(System.in);\n private PrintWriter out = new PrintWriter(System.out);\n\n public void solve() {\n int n = in.ni();\n int[] result = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n int next = in.ni();\n result[next]++;\n }\n for (int i = 1; i <= n; i++) {\n out.println(result[i]);\n }\n }\n\n @Override\n public void close() throws IOException {\n in.close();\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int ni() {\n return Integer.parseInt(next());\n }\n\n public long nl() {\n return Long.parseLong(next());\n }\n\n public void close() throws IOException {\n reader.close();\n }\n }\n\n public static void main(String[] args) throws IOException {\n try (Main instance = new Main()) {\n instance.solve();\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.StringTokenizer; public class Main implements Closeable { private InputReader in = new InputReader(System.in); private PrintWriter out = new PrintWriter(System.out); public void solve() { int n = in.ni(); int[] result = new int[n + 1]; for (int i = 2; i <= n; i++) { int next = in.ni(); result[next]++; } for (int i = 1; i <= n; i++) { out.println(result[i]); } } @Override public void close() throws IOException { in.close(); out.close(); } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int ni() { return Integer.parseInt(next()); } public long nl() { return Long.parseLong(next()); } public void close() throws IOException { reader.close(); } } public static void main(String[] args) throws IOException { try (Main instance = new Main()) { instance.solve(); } } }
[ 7, 15, 13, 17, 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, 40, 18, 13, 2, 4, 18, 13, 17, 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 ], [ 67, 5 ], [ 67, 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 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 36, 40 ], [ 8, 41 ], [ 41, 42 ], [ 42, 43 ], [ 8, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 6, 64 ], [ 64, 65 ], [ 0, 66 ], [ 66, 67 ], [ 66, 68 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i=1;i<n;i++) array[sc.nextInt()-1]++;\n\t\tsc.close();\n\t\tfor(int i=0;i<n;i++) System.out.println(array[i]);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i=1;i<n;i++) array[sc.nextInt()-1]++;\n\t\tsc.close();\n\t\tfor(int i=0;i<n;i++) System.out.println(array[i]);\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[] array = new int[n];\n\t\tfor(int i=1;i<n;i++) array[sc.nextInt()-1]++;\n\t\tsc.close();\n\t\tfor(int i=0;i<n;i++) System.out.println(array[i]);\n\t}", "main", "{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i=1;i<n;i++) array[sc.nextInt()-1]++;\n\t\tsc.close();\n\t\tfor(int i=0;i<n;i++) System.out.println(array[i]);\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", "for(int i=1;i<n;i++) array[sc.nextInt()-1]++;", "int i=1;", "int i=1;", "i", "1", "i<n", "i", "n", "i++", "i++", "i", "array[sc.nextInt()-1]++;", "array[sc.nextInt()-1]++", "array[sc.nextInt()-1]", "array", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "sc.close()", "sc.close", "sc", "for(int i=0;i<n;i++) System.out.println(array[i]);", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "System.out.println(array[i]);", "System.out.println(array[i])", "System.out.println", "System.out", "System", "System.out", "array[i]", "array", "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[] array = new int[n];\n\t\tfor(int i=1;i<n;i++) array[sc.nextInt()-1]++;\n\t\tsc.close();\n\t\tfor(int i=0;i<n;i++) System.out.println(array[i]);\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[] array = new int[n];\n\t\tfor(int i=1;i<n;i++) array[sc.nextInt()-1]++;\n\t\tsc.close();\n\t\tfor(int i=0;i<n;i++) System.out.println(array[i]);\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[] array = new int[n]; for(int i=1;i<n;i++) array[sc.nextInt()-1]++; sc.close(); for(int i=0;i<n;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, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 0, 18, 13, 13, 2, 18, 13, 13, 17, 40, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 17, 30, 4, 18, 18, 13, 13, 18, 13, 13, 30, 0, 18, 13, 13, 17, 4, 18, 18, 13, 13, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 103, 5 ], [ 103, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 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 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 36, 51 ], [ 51, 52 ], [ 8, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 53, 63 ], [ 63, 64 ], [ 64, 65 ], [ 53, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 68, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 68, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 83, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 8, 97 ], [ 97, 98 ], [ 98, 99 ], [ 6, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A [] = new int[200001];\n\t\tint j = 0;\n\t\t\n\t\tfor(int i =1; i<N; i++) {\n\t\t\tj = sc.nextInt();\n\t\t\tA[j] = A[j]+1;\n\t\t\tj++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A [] = new int[200001];\n\t\tint j = 0;\n\t\t\n\t\tfor(int i =1; i<N; i++) {\n\t\t\tj = sc.nextInt();\n\t\t\tA[j] = A[j]+1;\n\t\t\tj++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A [] = new int[200001];\n\t\tint j = 0;\n\t\t\n\t\tfor(int i =1; i<N; i++) {\n\t\t\tj = sc.nextInt();\n\t\t\tA[j] = A[j]+1;\n\t\t\tj++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A [] = new int[200001];\n\t\tint j = 0;\n\t\t\n\t\tfor(int i =1; i<N; i++) {\n\t\t\tj = sc.nextInt();\n\t\t\tA[j] = A[j]+1;\n\t\t\tj++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "int A [] = new int[200001];", "A", "new int[200001]", "200001", "int j = 0;", "j", "0", "for(int i =1; i<N; i++) {\n\t\t\tj = sc.nextInt();\n\t\t\tA[j] = A[j]+1;\n\t\t\tj++;\n\t\t}", "int i =1;", "int i =1;", "i", "1", "i<N", "i", "N", "i++", "i++", "i", "{\n\t\t\tj = sc.nextInt();\n\t\t\tA[j] = A[j]+1;\n\t\t\tj++;\n\t\t}", "{\n\t\t\tj = sc.nextInt();\n\t\t\tA[j] = A[j]+1;\n\t\t\tj++;\n\t\t}", "j = sc.nextInt()", "j", "sc.nextInt()", "sc.nextInt", "sc", "A[j] = A[j]+1", "A[j]", "A", "j", "A[j]+1", "A[j]", "A", "j", "1", "j++", "j", "for(int i=1; i<N+1; i++) {\n\t\t\tif(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<N+1", "i", "N+1", "N", "1", "i++", "i++", "i", "{\n\t\t\tif(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}\n\t\t}", "{\n\t\t\tif(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}\n\t\t}", "if(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}", "A[i] > 0", "A[i]", "A", "i", "0", "{\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}", "System.out.println(A[i])", "System.out.println", "System.out", "System", "System.out", "A[i]", "A", "i", "{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}", "A[i] = 0", "A[i]", "A", "i", "0", "System.out.println(A[i])", "System.out.println", "System.out", "System", "System.out", "A[i]", "A", "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\t\tint N = sc.nextInt();\n\t\tint A [] = new int[200001];\n\t\tint j = 0;\n\t\t\n\t\tfor(int i =1; i<N; i++) {\n\t\t\tj = sc.nextInt();\n\t\t\tA[j] = A[j]+1;\n\t\t\tj++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n}", "public class Main {\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint A [] = new int[200001];\n\t\tint j = 0;\n\t\t\n\t\tfor(int i =1; i<N; i++) {\n\t\t\tj = sc.nextInt();\n\t\t\tA[j] = A[j]+1;\n\t\t\tj++;\n\t\t}\n\t\t\n\t\tfor(int i=1; i<N+1; i++) {\n\t\t\tif(A[i] > 0) {\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}else{\n\t\t\t\tA[i] = 0;\n\t\t\t\tSystem.out.println(A[i]);\n\t\t\t}\n\t\t}\n\t\t\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 A [] = new int[200001]; int j = 0; for(int i =1; i<N; i++) { j = sc.nextInt(); A[j] = A[j]+1; j++; } for(int i=1; i<N+1; i++) { if(A[i] > 0) { System.out.println(A[i]); }else{ A[i] = 0; System.out.println(A[i]); } } sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 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 ], [ 77, 5 ], [ 77, 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 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 8, 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 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 6, 74 ], [ 74, 75 ], [ 0, 76 ], [ 76, 77 ], [ 76, 78 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] B = new int[N];\n\t\tfor(int i=1; i<N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t\tB[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] B = new int[N];\n\t\tfor(int i=1; i<N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t\tB[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] B = new int[N];\n\t\tfor(int i=1; i<N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t\tB[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\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\tint[] B = new int[N];\n\t\tfor(int i=1; i<N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t\tB[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tSystem.out.println(B[i]);\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[] A = new int[N];", "A", "new int[N]", "N", "int[] B = new int[N];", "B", "new int[N]", "N", "for(int i=1; i<N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t\tB[A[i]-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();\n\t\t\tB[A[i]-1]++;\n\t\t}", "{\n\t\t\tA[i] = sc.nextInt();\n\t\t\tB[A[i]-1]++;\n\t\t}", "A[i] = sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "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\t\tSystem.out.println(B[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(B[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(B[i]);\n\t\t}", "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\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] B = new int[N];\n\t\tfor(int i=1; i<N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t\tB[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N];\n\t\tint[] B = new int[N];\n\t\tfor(int i=1; i<N; i++) {\n\t\t\tA[i] = sc.nextInt();\n\t\t\tB[A[i]-1]++;\n\t\t}\n\t\tfor(int i=0; i<N; i++) {\n\t\t\tSystem.out.println(B[i]);\n\t\t}\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] A = new int[N]; int[] B = new int[N]; for(int i=1; i<N; i++) { A[i] = sc.nextInt(); B[A[i]-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, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 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, 18, 13, 13, 28, 13, 13, 30, 30, 41, 13, 13, 40, 18, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 17, 11, 1, 41, 13, 18, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 119, 5 ], [ 119, 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 ], [ 31, 32 ], [ 31, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 38, 48 ], [ 48, 49 ], [ 49, 50 ], [ 38, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 60, 62 ], [ 8, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 8, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 84 ], [ 77, 85 ], [ 85, 86 ], [ 86, 87 ], [ 77, 88 ], [ 89, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 97, 99 ], [ 93, 100 ], [ 100, 101 ], [ 100, 102 ], [ 93, 103 ], [ 103, 104 ], [ 104, 105 ], [ 93, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 89, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 6, 116 ], [ 116, 117 ], [ 0, 118 ], [ 118, 119 ], [ 118, 120 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\n\t\tString[] tempList = scanner.nextLine().split(\" \");\n\t\tint[] list = new int[n - 1];\n\t\tint[] resultList = new int[n];\n\t\tfor(int i= 0; i < n - 1; i++) {\n\t\t\tlist[i] = Integer.parseInt(tempList[i]);\n\t\t}\n\n\t\tfor(int i : list) {\n\t\t\tint temp = i;\n\t\t\tresultList[i - 1] ++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint result = 0;\n\t\t\tfor(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\n\t\tString[] tempList = scanner.nextLine().split(\" \");\n\t\tint[] list = new int[n - 1];\n\t\tint[] resultList = new int[n];\n\t\tfor(int i= 0; i < n - 1; i++) {\n\t\t\tlist[i] = Integer.parseInt(tempList[i]);\n\t\t}\n\n\t\tfor(int i : list) {\n\t\t\tint temp = i;\n\t\t\tresultList[i - 1] ++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint result = 0;\n\t\t\tfor(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\n\t\tString[] tempList = scanner.nextLine().split(\" \");\n\t\tint[] list = new int[n - 1];\n\t\tint[] resultList = new int[n];\n\t\tfor(int i= 0; i < n - 1; i++) {\n\t\t\tlist[i] = Integer.parseInt(tempList[i]);\n\t\t}\n\n\t\tfor(int i : list) {\n\t\t\tint temp = i;\n\t\t\tresultList[i - 1] ++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint result = 0;\n\t\t\tfor(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t}", "main", "{\n\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\n\t\tString[] tempList = scanner.nextLine().split(\" \");\n\t\tint[] list = new int[n - 1];\n\t\tint[] resultList = new int[n];\n\t\tfor(int i= 0; i < n - 1; i++) {\n\t\t\tlist[i] = Integer.parseInt(tempList[i]);\n\t\t}\n\n\t\tfor(int i : list) {\n\t\t\tint temp = i;\n\t\t\tresultList[i - 1] ++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint result = 0;\n\t\t\tfor(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int n = Integer.parseInt(scanner.nextLine());", "n", "Integer.parseInt(scanner.nextLine())", "Integer.parseInt", "Integer", "scanner.nextLine()", "scanner.nextLine", "scanner", "String[] tempList = scanner.nextLine().split(\" \");", "tempList", "scanner.nextLine().split(\" \")", "scanner.nextLine().split", "scanner.nextLine()", "scanner.nextLine", "scanner", "\" \"", "int[] list = new int[n - 1];", "list", "new int[n - 1]", "n - 1", "n", "1", "int[] resultList = new int[n];", "resultList", "new int[n]", "n", "for(int i= 0; i < n - 1; i++) {\n\t\t\tlist[i] = Integer.parseInt(tempList[i]);\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[i] = Integer.parseInt(tempList[i]);\n\t\t}", "{\n\t\t\tlist[i] = Integer.parseInt(tempList[i]);\n\t\t}", "list[i] = Integer.parseInt(tempList[i])", "list[i]", "list", "i", "Integer.parseInt(tempList[i])", "Integer.parseInt", "Integer", "tempList[i]", "tempList", "i", "for(int i : list) {\n\t\t\tint temp = i;\n\t\t\tresultList[i - 1] ++;\n\t\t}", "int i", "list", "{\n\t\t\tint temp = i;\n\t\t\tresultList[i - 1] ++;\n\t\t}", "{\n\t\t\tint temp = i;\n\t\t\tresultList[i - 1] ++;\n\t\t}", "int temp = i;", "temp", "i", "resultList[i - 1] ++", "resultList[i - 1]", "resultList", "i - 1", "i", "1", "for(int i = 0; i < n; i++) {\n\t\t\tint result = 0;\n\t\t\tfor(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tint result = 0;\n\t\t\tfor(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}", "{\n\t\t\tint result = 0;\n\t\t\tfor(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}", "int result = 0;", "result", "0", "for(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}", "int j = resultList[i];", "int j = resultList[i];", "j", "resultList[i]", "resultList", "i", "j > 0", "j", "0", "j--", "j--", "j", "{\n\t\t\t\tresult ++;\n\t\t\t}", "{\n\t\t\t\tresult ++;\n\t\t\t}", "result ++", "result", "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\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\n\t\tString[] tempList = scanner.nextLine().split(\" \");\n\t\tint[] list = new int[n - 1];\n\t\tint[] resultList = new int[n];\n\t\tfor(int i= 0; i < n - 1; i++) {\n\t\t\tlist[i] = Integer.parseInt(tempList[i]);\n\t\t}\n\n\t\tfor(int i : list) {\n\t\t\tint temp = i;\n\t\t\tresultList[i - 1] ++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint result = 0;\n\t\t\tfor(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\n\t\tString[] tempList = scanner.nextLine().split(\" \");\n\t\tint[] list = new int[n - 1];\n\t\tint[] resultList = new int[n];\n\t\tfor(int i= 0; i < n - 1; i++) {\n\t\t\tlist[i] = Integer.parseInt(tempList[i]);\n\t\t}\n\n\t\tfor(int i : list) {\n\t\t\tint temp = i;\n\t\t\tresultList[i - 1] ++;\n\t\t}\n\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tint result = 0;\n\t\t\tfor(int j = resultList[i]; j > 0; j--) {\n\t\t\t\tresult ++;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.nextLine()); String[] tempList = scanner.nextLine().split(" "); int[] list = new int[n - 1]; int[] resultList = new int[n]; for(int i= 0; i < n - 1; i++) { list[i] = Integer.parseInt(tempList[i]); } for(int i : list) { int temp = i; resultList[i - 1] ++; } for(int i = 0; i < n; i++) { int result = 0; for(int j = resultList[i]; j > 0; j--) { result ++; } System.out.println(result); } } }
[ 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, 0, 18, 13, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 40, 18, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 92, 5 ], [ 92, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 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 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 41, 42 ], [ 8, 43 ], [ 43, 44 ], [ 43, 45 ], [ 46, 47 ], [ 46, 48 ], [ 8, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 6, 89 ], [ 89, 90 ], [ 0, 91 ], [ 91, 92 ], [ 91, 93 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n // 配列\n int[] a = new int[n+1];\n for(int i=2;i<=n;i++){\n a[i] += sc.nextInt();\n }\n \n int[] cnt = new int[n+1];\n for(int i=2;i<=n;i++){\n cnt[a[i]]++;\n }\n\n for(int i=1;i<=n;i++){\n System.out.println(cnt[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 \n // 配列\n int[] a = new int[n+1];\n for(int i=2;i<=n;i++){\n a[i] += sc.nextInt();\n }\n \n int[] cnt = new int[n+1];\n for(int i=2;i<=n;i++){\n cnt[a[i]]++;\n }\n\n for(int i=1;i<=n;i++){\n System.out.println(cnt[i]);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n // 配列\n int[] a = new int[n+1];\n for(int i=2;i<=n;i++){\n a[i] += sc.nextInt();\n }\n \n int[] cnt = new int[n+1];\n for(int i=2;i<=n;i++){\n cnt[a[i]]++;\n }\n\n for(int i=1;i<=n;i++){\n System.out.println(cnt[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n // 配列\n int[] a = new int[n+1];\n for(int i=2;i<=n;i++){\n a[i] += sc.nextInt();\n }\n \n int[] cnt = new int[n+1];\n for(int i=2;i<=n;i++){\n cnt[a[i]]++;\n }\n\n for(int i=1;i<=n;i++){\n System.out.println(cnt[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=2;i<=n;i++){\n a[i] += sc.nextInt();\n }", "int i=2;", "int i=2;", "i", "2", "i<=n", "i", "n", "i++", "i++", "i", "{\n a[i] += sc.nextInt();\n }", "{\n a[i] += sc.nextInt();\n }", "a[i] += sc.nextInt()", "a[i]", "a", "i", "sc.nextInt()", "sc.nextInt", "sc", "int[] cnt = new int[n+1];", "cnt", "new int[n+1]", "n+1", "n", "1", "for(int i=2;i<=n;i++){\n cnt[a[i]]++;\n }", "int i=2;", "int i=2;", "i", "2", "i<=n", "i", "n", "i++", "i++", "i", "{\n cnt[a[i]]++;\n }", "{\n cnt[a[i]]++;\n }", "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 public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n // 配列\n int[] a = new int[n+1];\n for(int i=2;i<=n;i++){\n a[i] += sc.nextInt();\n }\n \n int[] cnt = new int[n+1];\n for(int i=2;i<=n;i++){\n cnt[a[i]]++;\n }\n\n for(int i=1;i<=n;i++){\n System.out.println(cnt[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 \n // 配列\n int[] a = new int[n+1];\n for(int i=2;i<=n;i++){\n a[i] += sc.nextInt();\n }\n \n int[] cnt = new int[n+1];\n for(int i=2;i<=n;i++){\n cnt[a[i]]++;\n }\n\n for(int i=1;i<=n;i++){\n System.out.println(cnt[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=2;i<=n;i++){ a[i] += sc.nextInt(); } int[] cnt = new int[n+1]; for(int i=2;i<=n;i++){ cnt[a[i]]++; } for(int i=1;i<=n;i++){ System.out.println(cnt[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 13, 17, 41, 13, 20, 13, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 4, 18, 13, 40, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 18, 13, 2, 13, 17, 18, 13, 13, 30, 40, 18, 13, 2, 18, 13, 2, 13, 17, 17, 30, 40, 18, 13, 2, 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 ], [ 123, 8 ], [ 123, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 23, 24 ], [ 23, 25 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 11, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 30, 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 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 55, 56 ], [ 11, 57 ], [ 57, 58 ], [ 58, 59 ], [ 11, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 11, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 64, 74 ], [ 74, 75 ], [ 75, 76 ], [ 64, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 80, 86 ], [ 86, 87 ], [ 86, 88 ], [ 79, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 93, 99 ], [ 79, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 11, 109 ], [ 109, 110 ], [ 109, 111 ], [ 109, 112 ], [ 113, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 114, 119 ], [ 9, 120 ], [ 120, 121 ], [ 0, 122 ], [ 122, 123 ], [ 122, 124 ] ]
[ "import java.util.Arrays;\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 N = sc.nextInt();\n\t\tint[] A = new int[N-1];\n\t\tint[] count = new int[N];\n\t\tArrays.fill(count, 0);\n\t\tfor(int i = 0;i < N-1;i++){\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\tcount[0]++;\n\t\tfor(int i = 1;i < N-1;i++){\n\t\t\tif(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\tfor(int num : count){\n\t\t\tSystem.out.println(num);\n\t\t}\n\t}\n\n}", "import java.util.Arrays;", "Arrays", "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 N = sc.nextInt();\n\t\tint[] A = new int[N-1];\n\t\tint[] count = new int[N];\n\t\tArrays.fill(count, 0);\n\t\tfor(int i = 0;i < N-1;i++){\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\tcount[0]++;\n\t\tfor(int i = 1;i < N-1;i++){\n\t\t\tif(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\tfor(int num : count){\n\t\t\tSystem.out.println(num);\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N-1];\n\t\tint[] count = new int[N];\n\t\tArrays.fill(count, 0);\n\t\tfor(int i = 0;i < N-1;i++){\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\tcount[0]++;\n\t\tfor(int i = 1;i < N-1;i++){\n\t\t\tif(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\tfor(int num : count){\n\t\t\tSystem.out.println(num);\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\tint[] count = new int[N];\n\t\tArrays.fill(count, 0);\n\t\tfor(int i = 0;i < N-1;i++){\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\tcount[0]++;\n\t\tfor(int i = 1;i < N-1;i++){\n\t\t\tif(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\tfor(int num : count){\n\t\t\tSystem.out.println(num);\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[] count = new int[N];", "count", "new int[N]", "N", "Arrays.fill(count, 0)", "Arrays.fill", "Arrays", "count", "0", "for(int i = 0;i < N-1;i++){\n\t\t\tA[i] = sc.nextInt();\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n\t\t\tA[i] = sc.nextInt();\n\t\t}", "{\n\t\t\tA[i] = sc.nextInt();\n\t\t}", "A[i] = sc.nextInt()", "A[i]", "A", "i", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "count[0]++", "count[0]", "count", "0", "for(int i = 1;i < N-1;i++){\n\t\t\tif(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < N-1", "i", "N-1", "N", "1", "i++", "i++", "i", "{\n\t\t\tif(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}\n\t\t}", "{\n\t\t\tif(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}\n\t\t}", "if(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}", "A[i-1]==A[i]", "A[i-1]", "A", "i-1", "i", "1", "A[i]", "A", "i", "{\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}", "count[A[i-1]-1]++", "count[A[i-1]-1]", "count", "A[i-1]-1", "A[i-1]", "A", "i-1", "i", "1", "1", "{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}", "count[A[i]-1]++", "count[A[i]-1]", "count", "A[i]-1", "A[i]", "A", "i", "1", "for(int num : count){\n\t\t\tSystem.out.println(num);\n\t\t}", "int num", "count", "{\n\t\t\tSystem.out.println(num);\n\t\t}", "{\n\t\t\tSystem.out.println(num);\n\t\t}", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N-1];\n\t\tint[] count = new int[N];\n\t\tArrays.fill(count, 0);\n\t\tfor(int i = 0;i < N-1;i++){\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\tcount[0]++;\n\t\tfor(int i = 1;i < N-1;i++){\n\t\t\tif(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\tfor(int num : count){\n\t\t\tSystem.out.println(num);\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] A = new int[N-1];\n\t\tint[] count = new int[N];\n\t\tArrays.fill(count, 0);\n\t\tfor(int i = 0;i < N-1;i++){\n\t\t\tA[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\t\tcount[0]++;\n\t\tfor(int i = 1;i < N-1;i++){\n\t\t\tif(A[i-1]==A[i]){\n\t\t\t\tcount[A[i-1]-1]++;\n\t\t\t}else{\n\t\t\t\tcount[A[i]-1]++;\n\t\t\t}\n\t\t}\n\t\tfor(int num : count){\n\t\t\tSystem.out.println(num);\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] A = new int[N-1]; int[] count = new int[N]; Arrays.fill(count, 0); for(int i = 0;i < N-1;i++){ A[i] = sc.nextInt(); } sc.close(); count[0]++; for(int i = 1;i < N-1;i++){ if(A[i-1]==A[i]){ count[A[i-1]-1]++; }else{ count[A[i]-1]++; } } for(int num : count){ System.out.println(num); } } }
[ 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, 17, 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, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 172, 17 ], [ 172, 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 ], [ 32, 34 ], [ 20, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 51, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 20, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 65, 67 ], [ 60, 68 ], [ 68, 69 ], [ 69, 70 ], [ 60, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 78, 79 ], [ 78, 80 ], [ 18, 81 ], [ 81, 82 ], [ 172, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 83, 87 ], [ 87, 88 ], [ 83, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 83, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 98, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 108, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 97, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 83, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 130, 131 ], [ 83, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 136, 139 ], [ 139, 140 ], [ 83, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 148, 149 ], [ 83, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 152, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 156, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 167, 168 ], [ 152, 169 ], [ 169, 170 ], [ 0, 171 ], [ 171, 172 ], [ 171, 173 ] ]
[ "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 public static void main(String[] args) {\n FastReader s=new FastReader();\n int n = s.nextInt();\n\n\n long total = 0;\n int[] counter = new int[n];\n for (int i = 1; i < n; i++) {\n int cur = s.nextInt()-1;\n counter[cur]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(counter[i]);\n }\n\n }\n\n static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }\n }\n}\n", "import java.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 public static void main(String[] args) {\n FastReader s=new FastReader();\n int n = s.nextInt();\n\n\n long total = 0;\n int[] counter = new int[n];\n for (int i = 1; i < n; i++) {\n int cur = s.nextInt()-1;\n counter[cur]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(counter[i]);\n }\n\n }\n\n static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "Main", "public static void main(String[] args) {\n FastReader s=new FastReader();\n int n = s.nextInt();\n\n\n long total = 0;\n int[] counter = new int[n];\n for (int i = 1; i < n; i++) {\n int cur = s.nextInt()-1;\n counter[cur]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(counter[i]);\n }\n\n }", "main", "{\n FastReader s=new FastReader();\n int n = s.nextInt();\n\n\n long total = 0;\n int[] counter = new int[n];\n for (int i = 1; i < n; i++) {\n int cur = s.nextInt()-1;\n counter[cur]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(counter[i]);\n }\n\n }", "FastReader s=new FastReader();", "s", "new FastReader()", "int n = s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "long total = 0;", "total", "0", "int[] counter = new int[n];", "counter", "new int[n]", "n", "for (int i = 1; i < n; i++) {\n int cur = s.nextInt()-1;\n counter[cur]++;\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n int cur = s.nextInt()-1;\n counter[cur]++;\n }", "{\n int cur = s.nextInt()-1;\n counter[cur]++;\n }", "int cur = s.nextInt()-1;", "cur", "s.nextInt()-1", "s.nextInt()", "s.nextInt", "s", "1", "counter[cur]++", "counter[cur]", "counter", "cur", "for (int i = 0; i < n; i++) {\n System.out.println(counter[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n System.out.println(counter[i]);\n }", "{\n System.out.println(counter[i]);\n }", "System.out.println(counter[i])", "System.out.println", "System.out", "System", "System.out", "counter[i]", "counter", "i", "String[] args", "args", "static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }", "FastReader", "{\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }", "br = new BufferedReader(new\n InputStreamReader(System.in))", "br", "new BufferedReader(new\n InputStreamReader(System.in))", "String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }", "catch (IOException e)\n {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt()\n {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong()\n {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble()\n {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }", "catch (IOException e)\n {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n public static void main(String[] args) {\n FastReader s=new FastReader();\n int n = s.nextInt();\n\n\n long total = 0;\n int[] counter = new int[n];\n for (int i = 1; i < n; i++) {\n int cur = s.nextInt()-1;\n counter[cur]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(counter[i]);\n }\n\n }\n\n static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n FastReader s=new FastReader();\n int n = s.nextInt();\n\n\n long total = 0;\n int[] counter = new int[n];\n for (int i = 1; i < n; i++) {\n int cur = s.nextInt()-1;\n counter[cur]++;\n }\n for (int i = 0; i < n; i++) {\n System.out.println(counter[i]);\n }\n\n }\n\n static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next()\n {\n while (st == null || !st.hasMoreElements())\n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String nextLine()\n {\n String str = \"\";\n try\n {\n str = br.readLine();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "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[] args) { FastReader s=new FastReader(); int n = s.nextInt(); long total = 0; int[] counter = new int[n]; for (int i = 1; i < n; i++) { int cur = s.nextInt()-1; counter[cur]++; } for (int i = 0; i < n; i++) { System.out.println(counter[i]); } } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 40, 18, 13, 2, 4, 18, 13, 17, 28, 13, 13, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 57, 5 ], [ 57, 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 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 36, 40 ], [ 8, 41 ], [ 41, 42 ], [ 41, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 8, 51 ], [ 51, 52 ], [ 52, 53 ], [ 6, 54 ], [ 54, 55 ], [ 0, 56 ], [ 56, 57 ], [ 56, 58 ] ]
[ "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[] subordinates = new int[n];\n\n for (int i = 1; i < n; i++) subordinates[sc.nextInt() - 1]++;\n for (int num: subordinates) System.out.println(num);\n sc.close();\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[] subordinates = new int[n];\n\n for (int i = 1; i < n; i++) subordinates[sc.nextInt() - 1]++;\n for (int num: subordinates) System.out.println(num);\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[] subordinates = new int[n];\n\n for (int i = 1; i < n; i++) subordinates[sc.nextInt() - 1]++;\n for (int num: subordinates) System.out.println(num);\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] subordinates = new int[n];\n\n for (int i = 1; i < n; i++) subordinates[sc.nextInt() - 1]++;\n for (int num: subordinates) System.out.println(num);\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[] subordinates = new int[n];", "subordinates", "new int[n]", "n", "for (int i = 1; i < n; i++) subordinates[sc.nextInt() - 1]++;", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "subordinates[sc.nextInt() - 1]++;", "subordinates[sc.nextInt() - 1]++", "subordinates[sc.nextInt() - 1]", "subordinates", "sc.nextInt() - 1", "sc.nextInt()", "sc.nextInt", "sc", "1", "for (int num: subordinates) System.out.println(num);", "int num", "subordinates", "System.out.println(num);", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] subordinates = new int[n];\n\n for (int i = 1; i < n; i++) subordinates[sc.nextInt() - 1]++;\n for (int num: subordinates) System.out.println(num);\n sc.close();\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] subordinates = new int[n];\n\n for (int i = 1; i < n; i++) subordinates[sc.nextInt() - 1]++;\n for (int num: subordinates) System.out.println(num);\n sc.close();\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[] subordinates = new int[n]; for (int i = 1; i < n; i++) subordinates[sc.nextInt() - 1]++; for (int num: subordinates) System.out.println(num); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 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, 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 ], [ 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 ], [ 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 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[] b = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = sc.nextInt();\n }\n for(int i=0; i<n-1; i++) {\n b[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(b[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 int[] b = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = sc.nextInt();\n }\n for(int i=0; i<n-1; 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", "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[] b = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = sc.nextInt();\n }\n for(int i=0; i<n-1; i++) {\n b[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(b[i]);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] a = new int[n-1];\n int[] b = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = sc.nextInt();\n }\n for(int i=0; i<n-1; i++) {\n b[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(b[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", "int[] b = new int[n];", "b", "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 b[a[i]-1]++;\n }", "int i=0;", "int i=0;", "i", "0", "i<n-1", "i", "n-1", "n", "1", "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 }", "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 = sc.nextInt();\n int[] a = new int[n-1];\n int[] b = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = sc.nextInt();\n }\n for(int i=0; i<n-1; i++) {\n b[a[i]-1]++;\n }\n for(int i=0; i<n; i++) {\n System.out.println(b[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 int[] b = new int[n];\n for(int i=0; i<n-1; i++) {\n a[i] = sc.nextInt();\n }\n for(int i=0; i<n-1; 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" ]
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[] b = new int[n]; for(int i=0; i<n-1; i++) { a[i] = sc.nextInt(); } for(int i=0; i<n-1; i++) { b[a[i]-1]++; } for(int i=0; i<n; i++) { System.out.println(b[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 13, 41, 13, 20, 2, 13, 17, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 11, 1, 41, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 40, 18, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 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, 4, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 0, 13, 20, 29, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 165, 8 ], [ 165, 9 ], [ 9, 10 ], [ 165, 11 ], [ 11, 12 ], [ 165, 13 ], [ 13, 14 ], [ 165, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 17, 25 ], [ 25, 26 ], [ 25, 27 ], [ 28, 29 ], [ 28, 30 ], [ 17, 31 ], [ 31, 32 ], [ 31, 33 ], [ 34, 35 ], [ 34, 36 ], [ 17, 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 ], [ 17, 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 ], [ 17, 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 ], [ 15, 96 ], [ 96, 97 ], [ 165, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 100, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 108, 111 ], [ 111, 112 ], [ 111, 113 ], [ 98, 114 ], [ 114, 115 ], [ 98, 116 ], [ 116, 117 ], [ 165, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 125, 126 ], [ 165, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 165, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 165, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 148, 157 ], [ 157, 158 ], [ 157, 159 ], [ 147, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 0, 164 ], [ 164, 165 ], [ 164, 166 ] ]
[ "import java.util.*; \nimport java.io.*;\n\npublic class Main{\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int N = nextInt();\n \n int[] postion = new int[N+1];\n int[] cnt = new int[N+1];\n \n for (int i=2; i<=N; i++) {\n postion[i] = nextInt();\n }\n\n // Every member has exactly one immediate boss with a smaller ID number.\n for (int i=N; i>=1; i--) {\n cnt[postion[i]] ++;\n }\n\n for (int i=1; i<=N; i++) {\n System.out.println(cnt[i]);\n }\n\n \n }\n\n public static int gcd(int a, int b) {\n if(b==0) return a;\n\n return gcd(b, a%b);\n }\n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main{\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int N = nextInt();\n \n int[] postion = new int[N+1];\n int[] cnt = new int[N+1];\n \n for (int i=2; i<=N; i++) {\n postion[i] = nextInt();\n }\n\n // Every member has exactly one immediate boss with a smaller ID number.\n for (int i=N; i>=1; i--) {\n cnt[postion[i]] ++;\n }\n\n for (int i=1; i<=N; i++) {\n System.out.println(cnt[i]);\n }\n\n \n }\n\n public static int gcd(int a, int b) {\n if(b==0) return a;\n\n return gcd(b, a%b);\n }\n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}", "Main", "static StringTokenizer st;", "st", "static BufferedReader br;", "br", "static PrintWriter out;", "out", "public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int N = nextInt();\n \n int[] postion = new int[N+1];\n int[] cnt = new int[N+1];\n \n for (int i=2; i<=N; i++) {\n postion[i] = nextInt();\n }\n\n // Every member has exactly one immediate boss with a smaller ID number.\n for (int i=N; i>=1; i--) {\n cnt[postion[i]] ++;\n }\n\n for (int i=1; i<=N; i++) {\n System.out.println(cnt[i]);\n }\n\n \n }", "main", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int N = nextInt();\n \n int[] postion = new int[N+1];\n int[] cnt = new int[N+1];\n \n for (int i=2; i<=N; i++) {\n postion[i] = nextInt();\n }\n\n // Every member has exactly one immediate boss with a smaller ID number.\n for (int i=N; i>=1; i--) {\n cnt[postion[i]] ++;\n }\n\n for (int i=1; i<=N; i++) {\n System.out.println(cnt[i]);\n }\n\n \n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "int N = nextInt();", "N", "nextInt()", "nextInt", "int[] postion = new int[N+1];", "postion", "new int[N+1]", "N+1", "N", "1", "int[] cnt = new int[N+1];", "cnt", "new int[N+1]", "N+1", "N", "1", "for (int i=2; i<=N; i++) {\n postion[i] = nextInt();\n }", "int i=2;", "int i=2;", "i", "2", "i<=N", "i", "N", "i++", "i++", "i", "{\n postion[i] = nextInt();\n }", "{\n postion[i] = nextInt();\n }", "postion[i] = nextInt()", "postion[i]", "postion", "i", "nextInt()", "nextInt", "for (int i=N; i>=1; i--) {\n cnt[postion[i]] ++;\n }", "int i=N;", "int i=N;", "i", "N", "i>=1", "i", "1", "i--", "i--", "i", "{\n cnt[postion[i]] ++;\n }", "{\n cnt[postion[i]] ++;\n }", "cnt[postion[i]] ++", "cnt[postion[i]]", "cnt", "postion[i]", "postion", "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 static int gcd(int a, int b) {\n if(b==0) return a;\n\n return gcd(b, a%b);\n }", "gcd", "{\n if(b==0) return a;\n\n return gcd(b, a%b);\n }", "if(b==0) return a;", "b==0", "b", "0", "return a;", "a", "return gcd(b, a%b);", "gcd(b, a%b)", "gcd", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }", "while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "st = new StringTokenizer(br.readLine().trim())", "st", "new StringTokenizer(br.readLine().trim())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "public class Main{\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int N = nextInt();\n \n int[] postion = new int[N+1];\n int[] cnt = new int[N+1];\n \n for (int i=2; i<=N; i++) {\n postion[i] = nextInt();\n }\n\n // Every member has exactly one immediate boss with a smaller ID number.\n for (int i=N; i>=1; i--) {\n cnt[postion[i]] ++;\n }\n\n for (int i=1; i<=N; i++) {\n System.out.println(cnt[i]);\n }\n\n \n }\n\n public static int gcd(int a, int b) {\n if(b==0) return a;\n\n return gcd(b, a%b);\n }\n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}", "public class Main{\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int N = nextInt();\n \n int[] postion = new int[N+1];\n int[] cnt = new int[N+1];\n \n for (int i=2; i<=N; i++) {\n postion[i] = nextInt();\n }\n\n // Every member has exactly one immediate boss with a smaller ID number.\n for (int i=N; i>=1; i--) {\n cnt[postion[i]] ++;\n }\n\n for (int i=1; i<=N; i++) {\n System.out.println(cnt[i]);\n }\n\n \n }\n\n public static int gcd(int a, int b) {\n if(b==0) return a;\n\n return gcd(b, a%b);\n }\n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}", "Main" ]
import java.util.*; import java.io.*; public class Main{ static StringTokenizer st; static BufferedReader br; static PrintWriter out; public static void main(String[] args) throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); int N = nextInt(); int[] postion = new int[N+1]; int[] cnt = new int[N+1]; for (int i=2; i<=N; i++) { postion[i] = nextInt(); } // Every member has exactly one immediate boss with a smaller ID number. for (int i=N; i>=1; i--) { cnt[postion[i]] ++; } for (int i=1; i<=N; i++) { System.out.println(cnt[i]); } } public static int gcd(int a, int b) { if(b==0) return a; return gcd(b, a%b); } public static int nextInt() throws IOException { return Integer.parseInt(next()); } public static long nextLong() throws IOException { return Long.parseLong(next()); } public static double nextDouble() throws IOException { return Double.parseDouble(next()); } static String next() throws IOException { while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine().trim()); return st.nextToken(); } }
[ 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, 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 ], [ 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 ], [ 45, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 6, 56 ], [ 56, 57 ] ]
[ "import java.util.*;\n\nclass Main{\n\tstatic public void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\n\t\tint[] num=new int[n];\n\t\tfor(int i=1;i<n;i++){\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tnum[a]++;\n\t\t}\n\t\t\n\t\tfor(int nn:num){\n\t\t\tSystem.out.println(nn);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "class Main{\n\tstatic public void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\n\t\tint[] num=new int[n];\n\t\tfor(int i=1;i<n;i++){\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tnum[a]++;\n\t\t}\n\t\t\n\t\tfor(int nn:num){\n\t\t\tSystem.out.println(nn);\n\t\t}\n\t}\n}", "Main", "static public void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\n\t\tint[] num=new int[n];\n\t\tfor(int i=1;i<n;i++){\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tnum[a]++;\n\t\t}\n\t\t\n\t\tfor(int nn:num){\n\t\t\tSystem.out.println(nn);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint n=sc.nextInt();\n\t\tint[] num=new int[n];\n\t\tfor(int i=1;i<n;i++){\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tnum[a]++;\n\t\t}\n\t\t\n\t\tfor(int nn:num){\n\t\t\tSystem.out.println(nn);\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[] num=new int[n];", "num", "new int[n]", "n", "for(int i=1;i<n;i++){\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tnum[a]++;\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()-1;\n\t\t\tnum[a]++;\n\t\t}", "{\n\t\t\tint a=sc.nextInt()-1;\n\t\t\tnum[a]++;\n\t\t}", "int a=sc.nextInt()-1;", "a", "sc.nextInt()-1", "sc.nextInt()", "sc.nextInt", "sc", "1", "num[a]++", "num[a]", "num", "a", "for(int nn:num){\n\t\t\tSystem.out.println(nn);\n\t\t}", "int nn", "num", "{\n\t\t\tSystem.out.println(nn);\n\t\t}", "{\n\t\t\tSystem.out.println(nn);\n\t\t}", "System.out.println(nn)", "System.out.println", "System.out", "System", "System.out", "nn", "String[] args", "args" ]
import java.util.*; class Main{ static public void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int[] num=new int[n]; for(int i=1;i<n;i++){ int a=sc.nextInt()-1; num[a]++; } for(int nn:num){ System.out.println(nn); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 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, 41, 13, 4, 13, 40, 18, 13, 2, 13, 17, 28, 13, 13, 30, 4, 18, 13, 13, 12, 13, 30, 41, 13, 17, 41, 13, 13, 42, 2, 13, 17, 30, 14, 2, 2, 13, 17, 17, 30, 0, 13, 2, 2, 13, 13, 13, 0, 13, 2, 2, 13, 13, 13, 0, 13, 17, 29, 2, 13, 13, 23, 13, 23, 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, 13, 13, 30, 14, 40, 4, 13, 13, 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, 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, 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 ], [ 611, 26 ], [ 611, 27 ], [ 27, 28 ], [ 611, 29 ], [ 29, 30 ], [ 611, 31 ], [ 31, 32 ], [ 31, 33 ], [ 611, 34 ], [ 34, 35 ], [ 34, 36 ], [ 611, 37 ], [ 37, 38 ], [ 37, 39 ], [ 611, 41 ], [ 41, 42 ], [ 41, 43 ], [ 611, 44 ], [ 44, 45 ], [ 44, 46 ], [ 611, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 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 ], [ 73, 75 ], [ 75, 76 ], [ 72, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 49, 83 ], [ 83, 84 ], [ 83, 85 ], [ 83, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 611, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 97, 99 ], [ 93, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 105, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 104, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 104, 126 ], [ 126, 127 ], [ 126, 128 ], [ 93, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 91, 133 ], [ 133, 134 ], [ 91, 135 ], [ 135, 136 ], [ 611, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 142, 146 ], [ 146, 147 ], [ 146, 148 ], [ 142, 149 ], [ 139, 150 ], [ 150, 151 ], [ 150, 152 ], [ 139, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 139, 158 ], [ 158, 159 ], [ 139, 160 ], [ 160, 161 ], [ 161, 162 ], [ 139, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 163, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 171, 175 ], [ 170, 176 ], [ 611, 177 ], [ 177, 178 ], [ 177, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 177, 183 ], [ 183, 184 ], [ 611, 185 ], [ 185, 186 ], [ 185, 187 ], [ 187, 188 ], [ 188, 189 ], [ 189, 190 ], [ 189, 191 ], [ 191, 192 ], [ 188, 193 ], [ 193, 194 ], [ 187, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 195, 199 ], [ 199, 200 ], [ 200, 201 ], [ 200, 202 ], [ 199, 203 ], [ 203, 204 ], [ 204, 205 ], [ 204, 206 ], [ 206, 207 ], [ 207, 208 ], [ 203, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 213, 214 ], [ 212, 215 ], [ 199, 216 ], [ 216, 217 ], [ 217, 218 ], [ 217, 219 ], [ 216, 220 ], [ 220, 221 ], [ 221, 222 ], [ 187, 223 ], [ 223, 224 ], [ 224, 225 ], [ 224, 226 ], [ 226, 227 ], [ 611, 228 ], [ 228, 229 ], [ 228, 230 ], [ 230, 231 ], [ 231, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 234, 236 ], [ 233, 237 ], [ 237, 238 ], [ 237, 239 ], [ 228, 240 ], [ 240, 241 ], [ 611, 242 ], [ 242, 243 ], [ 242, 244 ], [ 244, 245 ], [ 245, 246 ], [ 244, 247 ], [ 247, 248 ], [ 248, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 252, 253 ], [ 249, 254 ], [ 254, 255 ], [ 248, 256 ], [ 256, 257 ], [ 256, 258 ], [ 244, 259 ], [ 259, 260 ], [ 611, 261 ], [ 261, 262 ], [ 261, 263 ], [ 263, 264 ], [ 264, 265 ], [ 265, 266 ], [ 266, 267 ], [ 265, 268 ], [ 268, 269 ], [ 611, 270 ], [ 270, 271 ], [ 270, 272 ], [ 272, 273 ], [ 273, 274 ], [ 274, 275 ], [ 611, 276 ], [ 276, 277 ], [ 276, 278 ], [ 278, 279 ], [ 279, 280 ], [ 279, 281 ], [ 281, 282 ], [ 278, 283 ], [ 283, 284 ], [ 283, 285 ], [ 278, 286 ], [ 286, 287 ], [ 287, 288 ], [ 288, 289 ], [ 288, 290 ], [ 286, 291 ], [ 291, 292 ], [ 292, 293 ], [ 293, 294 ], [ 292, 295 ], [ 291, 296 ], [ 296, 297 ], [ 296, 298 ], [ 298, 299 ], [ 278, 300 ], [ 300, 301 ], [ 301, 302 ], [ 302, 303 ], [ 611, 304 ], [ 304, 305 ], [ 304, 306 ], [ 306, 307 ], [ 307, 308 ], [ 307, 309 ], [ 306, 311 ], [ 311, 312 ], [ 311, 313 ], [ 313, 314 ], [ 306, 315 ], [ 315, 316 ], [ 315, 317 ], [ 306, 318 ], [ 318, 319 ], [ 319, 320 ], [ 319, 321 ], [ 318, 322 ], [ 322, 323 ], [ 323, 324 ], [ 324, 325 ], [ 325, 326 ], [ 325, 327 ], [ 323, 328 ], [ 328, 329 ], [ 329, 330 ], [ 329, 331 ], [ 331, 332 ], [ 328, 333 ], [ 322, 334 ], [ 334, 335 ], [ 334, 336 ], [ 336, 337 ], [ 306, 338 ], [ 338, 339 ], [ 339, 340 ], [ 340, 341 ], [ 340, 342 ], [ 339, 343 ], [ 339, 344 ], [ 344, 345 ], [ 345, 346 ], [ 344, 347 ], [ 344, 348 ], [ 304, 349 ], [ 349, 350 ], [ 611, 351 ], [ 351, 352 ], [ 351, 353 ], [ 353, 354 ], [ 354, 355 ], [ 354, 356 ], [ 353, 358 ], [ 358, 359 ], [ 359, 360 ], [ 360, 361 ], [ 360, 362 ], [ 358, 363 ], [ 363, 364 ], [ 363, 365 ], [ 358, 366 ], [ 366, 367 ], [ 367, 368 ], [ 358, 369 ], [ 369, 370 ], [ 370, 371 ], [ 371, 372 ], [ 371, 373 ], [ 370, 374 ], [ 374, 375 ], [ 374, 376 ], [ 353, 377 ], [ 377, 378 ], [ 351, 379 ], [ 379, 380 ], [ 351, 381 ], [ 381, 382 ], [ 611, 383 ], [ 383, 384 ], [ 383, 385 ], [ 385, 386 ], [ 386, 387 ], [ 386, 388 ], [ 385, 390 ], [ 390, 391 ], [ 391, 392 ], [ 392, 393 ], [ 392, 394 ], [ 390, 395 ], [ 395, 396 ], [ 395, 397 ], [ 390, 398 ], [ 398, 399 ], [ 399, 400 ], [ 390, 401 ], [ 401, 402 ], [ 402, 403 ], [ 403, 404 ], [ 403, 405 ], [ 402, 406 ], [ 406, 407 ], [ 385, 408 ], [ 408, 409 ], [ 383, 410 ], [ 410, 411 ], [ 611, 412 ], [ 412, 413 ], [ 412, 414 ], [ 414, 415 ], [ 415, 416 ], [ 415, 417 ], [ 414, 419 ], [ 419, 420 ], [ 420, 421 ], [ 421, 422 ], [ 421, 423 ], [ 419, 424 ], [ 424, 425 ], [ 424, 426 ], [ 419, 427 ], [ 427, 428 ], [ 428, 429 ], [ 419, 430 ], [ 430, 431 ], [ 431, 432 ], [ 432, 433 ], [ 432, 434 ], [ 431, 435 ], [ 435, 436 ], [ 435, 437 ], [ 414, 438 ], [ 438, 439 ], [ 412, 440 ], [ 440, 441 ], [ 412, 442 ], [ 442, 443 ], [ 611, 444 ], [ 444, 445 ], [ 444, 446 ], [ 446, 447 ], [ 447, 448 ], [ 447, 449 ], [ 446, 450 ], [ 450, 451 ], [ 446, 452 ], [ 452, 453 ], [ 452, 454 ], [ 446, 455 ], [ 455, 456 ], [ 456, 457 ], [ 457, 458 ], [ 458, 459 ], [ 458, 460 ], [ 460, 461 ], [ 457, 462 ], [ 462, 463 ], [ 456, 464 ], [ 464, 465 ], [ 465, 466 ], [ 466, 467 ], [ 467, 468 ], [ 467, 469 ], [ 466, 470 ], [ 470, 471 ], [ 470, 472 ], [ 465, 473 ], [ 473, 474 ], [ 473, 475 ], [ 446, 476 ], [ 476, 477 ], [ 477, 478 ], [ 477, 479 ], [ 476, 480 ], [ 480, 481 ], [ 481, 482 ], [ 481, 483 ], [ 480, 484 ], [ 484, 485 ], [ 484, 486 ], [ 486, 487 ], [ 446, 488 ], [ 488, 489 ], [ 488, 490 ], [ 490, 491 ], [ 491, 492 ], [ 492, 493 ], [ 493, 494 ], [ 493, 495 ], [ 492, 496 ], [ 496, 497 ], [ 496, 498 ], [ 491, 499 ], [ 499, 500 ], [ 500, 501 ], [ 500, 502 ], [ 502, 503 ], [ 503, 504 ], [ 503, 505 ], [ 502, 506 ], [ 506, 507 ], [ 506, 508 ], [ 491, 509 ], [ 509, 510 ], [ 510, 511 ], [ 511, 512 ], [ 511, 513 ], [ 513, 514 ], [ 511, 515 ], [ 490, 516 ], [ 516, 517 ], [ 516, 518 ], [ 518, 519 ], [ 611, 520 ], [ 520, 521 ], [ 520, 522 ], [ 522, 523 ], [ 523, 524 ], [ 523, 525 ], [ 522, 526 ], [ 526, 527 ], [ 522, 528 ], [ 528, 529 ], [ 528, 530 ], [ 522, 531 ], [ 531, 532 ], [ 532, 533 ], [ 533, 534 ], [ 534, 535 ], [ 534, 536 ], [ 536, 537 ], [ 533, 538 ], [ 538, 539 ], [ 532, 540 ], [ 540, 541 ], [ 541, 542 ], [ 542, 543 ], [ 543, 544 ], [ 543, 545 ], [ 542, 546 ], [ 546, 547 ], [ 546, 548 ], [ 541, 549 ], [ 549, 550 ], [ 549, 551 ], [ 522, 552 ], [ 552, 553 ], [ 553, 554 ], [ 553, 555 ], [ 552, 556 ], [ 556, 557 ], [ 557, 558 ], [ 557, 559 ], [ 556, 560 ], [ 560, 561 ], [ 560, 562 ], [ 562, 563 ], [ 522, 564 ], [ 564, 565 ], [ 564, 566 ], [ 566, 567 ], [ 567, 568 ], [ 568, 569 ], [ 569, 570 ], [ 569, 571 ], [ 568, 572 ], [ 572, 573 ], [ 572, 574 ], [ 567, 575 ], [ 575, 576 ], [ 576, 577 ], [ 576, 578 ], [ 578, 579 ], [ 579, 580 ], [ 579, 581 ], [ 578, 582 ], [ 582, 583 ], [ 582, 584 ], [ 567, 585 ], [ 585, 586 ], [ 586, 587 ], [ 587, 588 ], [ 587, 589 ], [ 589, 590 ], [ 587, 591 ], [ 566, 592 ], [ 592, 593 ], [ 592, 594 ], [ 594, 595 ], [ 611, 596 ], [ 596, 597 ], [ 596, 598 ], [ 598, 599 ], [ 599, 600 ], [ 600, 601 ], [ 601, 602 ], [ 601, 603 ], [ 599, 604 ], [ 604, 605 ], [ 605, 606 ], [ 604, 607 ], [ 596, 608 ], [ 608, 609 ], [ 0, 610 ], [ 610, 611 ], [ 610, 612 ] ]
[ "import java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.HashSet;\nimport java.util.InputMismatchException;\nimport java.util.Set;\n\npublic class Main {\n\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tprivate static final long M = 1000000007;\n\n\tvoid solve() {\n\t\tint N = ni();\n\t\tint cnt[] = new int[N];\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint n = ni();\n\t\t\tcnt[n - 1]++;\n\t\t}\n\t\tfor (int i : cnt)\n\t\t\tout.println(i);\n\t}\n\n\tlong power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % M;\n\t\t\t}\n\t\t\ty = (y * y) % M;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % M;\n\t}\n\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\t\t\t\t\t\t\t// ')\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) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\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[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\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.Arrays;", "Arrays", "java.util", "import java.util.HashSet;", "HashSet", "java.util", "import java.util.InputMismatchException;", "InputMismatchException", "java.util", "import java.util.Set;", "Set", "java.util", "public class Main {\n\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tprivate static final long M = 1000000007;\n\n\tvoid solve() {\n\t\tint N = ni();\n\t\tint cnt[] = new int[N];\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint n = ni();\n\t\t\tcnt[n - 1]++;\n\t\t}\n\t\tfor (int i : cnt)\n\t\t\tout.println(i);\n\t}\n\n\tlong power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % M;\n\t\t\t}\n\t\t\ty = (y * y) % M;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % M;\n\t}\n\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\t\t\t\t\t\t\t// ')\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) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\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[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\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 static final long M = 1000000007;", "M", "1000000007", "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 cnt[] = new int[N];\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint n = ni();\n\t\t\tcnt[n - 1]++;\n\t\t}\n\t\tfor (int i : cnt)\n\t\t\tout.println(i);\n\t}", "solve", "{\n\t\tint N = ni();\n\t\tint cnt[] = new int[N];\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint n = ni();\n\t\t\tcnt[n - 1]++;\n\t\t}\n\t\tfor (int i : cnt)\n\t\t\tout.println(i);\n\t}", "int N = ni();", "N", "ni()", "ni", "int cnt[] = new int[N];", "cnt", "new int[N]", "N", "for (int i = 0; i < N - 1; i++) {\n\t\t\tint n = ni();\n\t\t\tcnt[n - 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 n = ni();\n\t\t\tcnt[n - 1]++;\n\t\t}", "{\n\t\t\tint n = ni();\n\t\t\tcnt[n - 1]++;\n\t\t}", "int n = ni();", "n", "ni()", "ni", "cnt[n - 1]++", "cnt[n - 1]", "cnt", "n - 1", "n", "1", "for (int i : cnt)\n\t\t\tout.println(i);", "int i", "cnt", "out.println(i);", "out.println(i)", "out.println", "out", "i", "long power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % M;\n\t\t\t}\n\t\t\ty = (y * y) % M;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % M;\n\t}", "power", "{\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % M;\n\t\t\t}\n\t\t\ty = (y * y) % M;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % M;\n\t}", "long x = 1", "x", "1", "y = a;", "y", "a", "while (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % M;\n\t\t\t}\n\t\t\ty = (y * y) % M;\n\t\t\tb /= 2;\n\t\t}", "b > 0", "b", "0", "{\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % M;\n\t\t\t}\n\t\t\ty = (y * y) % M;\n\t\t\tb /= 2;\n\t\t}", "if (b % 2 != 0) {\n\t\t\t\tx = (x * y) % M;\n\t\t\t}", "b % 2 != 0", "b % 2", "b", "2", "0", "{\n\t\t\t\tx = (x * y) % M;\n\t\t\t}", "x = (x * y) % M", "x", "(x * y) % M", "(x * y)", "x", "y", "M", "y = (y * y) % M", "y", "(y * y) % M", "(y * y)", "y", "y", "M", "b /= 2", "b", "2", "return x % M;", "x % M", "x", "M", "long a", "a", "long b", "b", "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\t\t\t\t\t\t\t// ')\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\t\t\t\t\t\t\t// ')\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\t\t\t\t\t\t\t// ')\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\t\t\t\t\t\t\t// ')\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) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\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) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\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) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}", "p < n", "p", "n", "{\n\t\t\tif (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}", "if (!(isSpaceChar(b)))\n\t\t\t\tbuf[p++] = (char) b;", "!(isSpaceChar(b))", "(isSpaceChar(b))", "isSpaceChar", "b", "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[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\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] = na(m);\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] = na(m);", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = na(m);", "a[i] = na(m)", "a[i]", "a", "i", "na(m)", "na", "m", "return a;", "a", "int n", "n", "int m", "m", "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\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tprivate static final long M = 1000000007;\n\n\tvoid solve() {\n\t\tint N = ni();\n\t\tint cnt[] = new int[N];\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint n = ni();\n\t\t\tcnt[n - 1]++;\n\t\t}\n\t\tfor (int i : cnt)\n\t\t\tout.println(i);\n\t}\n\n\tlong power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % M;\n\t\t\t}\n\t\t\ty = (y * y) % M;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % M;\n\t}\n\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\t\t\t\t\t\t\t// ')\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) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\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[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\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\n\tInputStream is;\n\tPrintWriter out;\n\tString INPUT = \"\";\n\n\tprivate static final long M = 1000000007;\n\n\tvoid solve() {\n\t\tint N = ni();\n\t\tint cnt[] = new int[N];\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tint n = ni();\n\t\t\tcnt[n - 1]++;\n\t\t}\n\t\tfor (int i : cnt)\n\t\t\tout.println(i);\n\t}\n\n\tlong power(long a, long b) {\n\t\tlong x = 1, y = a;\n\t\twhile (b > 0) {\n\t\t\tif (b % 2 != 0) {\n\t\t\t\tx = (x * y) % M;\n\t\t\t}\n\t\t\ty = (y * y) % M;\n\t\t\tb /= 2;\n\t\t}\n\t\treturn x % M;\n\t}\n\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\t\t\t\t\t\t\t// ')\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) {\n\t\t\tif (!(isSpaceChar(b)))\n\t\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[][] na(int n, int m) {\n\t\tint[][] a = new int[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = na(m);\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.Arrays; import java.util.HashSet; import java.util.InputMismatchException; import java.util.Set; public class Main { InputStream is; PrintWriter out; String INPUT = ""; private static final long M = 1000000007; void solve() { int N = ni(); int cnt[] = new int[N]; for (int i = 0; i < N - 1; i++) { int n = ni(); cnt[n - 1]++; } for (int i : cnt) out.println(i); } long power(long a, long b) { long x = 1, y = a; while (b > 0) { if (b % 2 != 0) { x = (x * y) % M; } y = (y * y) % M; b /= 2; } return x % M; } 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) { if (!(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[][] na(int n, int m) { int[][] a = new int[n][]; for (int i = 0; i < n; i++) a[i] = na(m); 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)); } }