problem_id stringlengths 6 6 | user_id stringlengths 10 10 | time_limit float64 1k 8k | memory_limit float64 262k 1.05M | problem_description stringlengths 48 1.55k | codes stringlengths 35 98.9k | status stringlengths 28 1.7k | submission_ids stringlengths 28 1.41k | memories stringlengths 13 808 | cpu_times stringlengths 11 610 | code_sizes stringlengths 7 505 |
|---|---|---|---|---|---|---|---|---|---|---|
p02707 | u384379887 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = input().split()\nB = [0]*(N)\nfor i in range(0, len(A)):\n A[i] = int(A[i])\n B[A[i]-1] += 1\n\nprint(B)\n', 'N = int(input())\nA = input().split()\nB = [0]*(N)\nfor i in range(0, len(A)):\n A[i] = int(A[i])\n B[A[i]-1] += 1\n\nfor i in B:\n print(i)\n'] | ['Wrong Answer', 'Accepted'] | ['s973455231', 's871486558'] | [25696.0, 24896.0] | [121.0, 171.0] | [126, 142] |
p02707 | u385649291 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['# coding: utf-8\n# Your code here!\nline= list(map(int,input().split()))\nN = line[0]\nK = line[1]\n\n\nanswer = 0\nfor i in range (K,N+2):\n minit = i*(i-1)/2\n maximum = (2*N-i+1)*i/2\n \n num = maximum-minit+1\n answer += num\n \nif answer >=(10**9+7):\n print(int(answer%(10**9+7)))\n \nelse:\n print(int(answer))', '# coding: utf-8\n# Your code here!\nimport collections\nnum = int(input())\nline = list(map(int,input().split()))\nclist = collections.Counter(line)\nfor i in range (1,num):\n print(clist[i])', '# coding: utf-8\n# Your code here!\nimport collections\nnum = int(input())\nline = list(map(int,input().split()))\nclist = collections.Counter(line)\nfor i in range (1,num+1):\n print(clist[i])\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s566457363', 's856711484', 's816674951'] | [9100.0, 34184.0, 34108.0] | [22.0, 189.0, 176.0] | [390, 187, 190] |
p02707 | u387080888 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['a=int(input())\nb=[0]*a\nc=list(map(int,input().split()))\nfor i in c:\n b[i-0]+=1\nprint(*b,sep="\\n")', 'a=int(input())\nb=[0]*a\nc=list(map(int,input().split()))\nfor i in c:\n b[i-1]+=1\nprint(*b,sep="\\n")'] | ['Wrong Answer', 'Accepted'] | ['s426269012', 's052145356'] | [33732.0, 33928.0] | [127.0, 130.0] | [100, 100] |
p02707 | u389135205 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\na = list(map(int,input().split()))\n\nfor i in range(1,n):\n nmb_cnt = 0\n idx_cnt = 0\n for j in a:\n if j == i:\n del a[idx_cnt]\n nmb_cnt += 1\n else:\n idx_cnt += 1\n print(nmb_cnt)\n\nprint(0)', 'import numpy as np\nn = int(input())\na = list(map(int,input().split()))\n\nrsl = np.zeros(n)\n\nfor i in a:\n rsl[i-1] += 1\n\nfor i in range(n):\n print(int(rsl[i]))'] | ['Wrong Answer', 'Accepted'] | ['s394444013', 's549437471'] | [32376.0, 51028.0] | [2206.0, 342.0] | [260, 163] |
p02707 | u390894175 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import numpy as np\n\nnum = int(input())\nsup_num = list(map(int,input().split()))\nyn_num = list(np.zeros(num,dtype=np.int16))\nprint(yn_num)\nfor x in sup_num:\n yn_num[x-1] +=1\nprint(list(yn_num))\n', 'import numpy as np\n\nnum = int(input())\nsup_num = list(map(int,input().split()))\nyn_num = list(np.zeros(num))\nprint(yn_num)\nfor x in sup_num:\n yn_num[x-1] +=1\nprint(list(yn_num))', 'import numpy as np\n\nnum = int(input())\nsup_num = list(map(int,input().split()))\nyn_num = list(np.zeros(num,dtype=np.int16))\n\nfor x in sup_num:\n yn_num[x-1] +=1\nfor x in yn_num:\n print(x)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s203672882', 's592304269', 's592716528'] | [50636.0, 50992.0, 50956.0] | [642.0, 289.0, 644.0] | [194, 178, 189] |
p02707 | u391390380 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['\nn = int(input())\n\n\na = (int(x) for x in input().split())\n\n\nans = [0] * n\n\nfor i in range(n - 1):\n ans[a[i] - 1] = ans[a[i] - 1] + 1\n\nfor i in ans:\n print(i)', '\nn = int(input())\n\n\na = list(map(int, input().split()))\n\n\nans = [0] * n\n\nfor i in range(n - 1):\n ans[a[i] - 1] = ans[a[i] - 1] + 1\n\nfor i in ans:\n print(i)\n'] | ['Runtime Error', 'Accepted'] | ['s607414631', 's033816739'] | [24616.0, 32212.0] | [51.0, 170.0] | [205, 204] |
p02707 | u394950523 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['from collections import Counter\n\n\nN = int(input())\nA = list(map(int, input().split()))\n\nc = Counter(A)\nprint(c)\nfor i in range(1, N + 1):\n print(c[i])', 'from collections import Counter\n\n\nN = int(input())\nA = list(map(int, input().split()))\n\nc = Counter(A)\nfor i in range(1, N + 1):\n print(c[i])'] | ['Wrong Answer', 'Accepted'] | ['s202941176', 's018154210'] | [57056.0, 34184.0] | [243.0, 182.0] | [153, 144] |
p02707 | u395894569 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import collections\n\nn=int(input())\na = [int(_) for _ in input().split()]\n\nc=collections.Counter(a)\nprint(c)\nfor i in range(1,n+1):\n print(c[i])', 'import collections\n\nn=int(input())\na = [int(_) for _ in input().split()]\n\nc=collections.Counter(a)\nfor i in range(1,n+1):\n print(c[i])'] | ['Wrong Answer', 'Accepted'] | ['s118142021', 's274082386'] | [57032.0, 35500.0] | [234.0, 193.0] | [146, 137] |
p02707 | u397638621 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = list(map(int,input().split()))\nT = {}\nfor i in A:\n if i not in T:\n T[i] = 0\n T[i] = T[i] + 1\nT = T.values()\nfor i in T:\n print(i)', 'N = int(input())\nA = list(map(int,input().split()))\nT = {}\nfor i in A:\n if i not in T:\n T[i] = 0\n T[i] = T[i] + 1\nfor i in range(1, N+1):\n print(T.get(i, 0))'] | ['Wrong Answer', 'Accepted'] | ['s173860464', 's352654419'] | [33644.0, 33444.0] | [172.0, 210.0] | [166, 173] |
p02707 | u398430753 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | [' n=int(input())\n boss=[int(x) for x in input().split()]\n mem=list(range(1, n+1))\n h_map = dict.fromkeys(mem, 0)\n for i in boss:\n h_map[i]+=1\n for i in mem:\n print(h_map[i])', 'n=int(input())\nboss=[int(x) for x in input().split()]\nmem=list(range(1, n+1))\nh_map = dict.fromkeys(mem, 0)\nfor i in boss:\n h_map[i]+=1\n\nfor i in mem:\n print(h_map[i])\n '] | ['Runtime Error', 'Accepted'] | ['s903155776', 's294481625'] | [9008.0, 41012.0] | [22.0, 196.0] | [197, 180] |
p02707 | u404678206 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\nlist1=list(map(int,input().split()))\nfor i in range(n):\n print(count.list1(i))', 'N=int(input())\nA=list(map(int, input().split()))\nans=[0]*N\n#print(ans)\nfor a in A:\n ans[a-1] += 1\n #print(ans)\nfor i in ans:\n print(i)\n\n'] | ['Runtime Error', 'Accepted'] | ['s363385855', 's895456982'] | [32316.0, 32168.0] | [63.0, 144.0] | [94, 145] |
p02707 | u405660020 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['from collections import defaultdict\n\nn=int(input())\na=list(map(int,input().split()))\n\nd=defaultdict(int)\nfor item in a:\n d[item-1]+=1\nprint(d)\nfor i in range(n):\n print(d[i])\n', 'from collections import defaultdict\n\nn=int(input())\na=list(map(int,input().split()))\n\nd=defaultdict(int)\nfor item in a:\n d[item-1]+=1\nfor i in range(n):\n print(d[i])\n'] | ['Wrong Answer', 'Accepted'] | ['s879535777', 's780057019'] | [41832.0, 40752.0] | [230.0, 225.0] | [181, 172] |
p02707 | u411237324 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['A = list(map(int, input().split()))\n\nm = 0\nt = 0\n\nfor i in range(1, n):\n count = A.count(i)\n print(count)\n m += count\n t = i\n if m == n - 1:\n break\nfor _ in range(t, n):\n print(0)\n', 'A = list(map(int, input().split()))\n\nm = 0\nt = 0\n\nfor i in range(1, n):\n count = A.count(i)\n print(count)\n m += count\n t = i\n if m == n - 1:\n break\nfor _ in range(t, n):\n print(0)\n', 'n = int(input())\nA = list(map(int, input().split()))\n\n# m = 0\n# t = 0\n\n\n# count = A.count(i)\n# print(count)\n# m += count\n# t = i\n# if m == n - 1:\n# break\n# for _ in range(t, n):\n# print(0)\n\nB = [0] * n\nfor i in A:\n B[i-1] += 1\nfor i in B:\n print(i)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s376928714', 's517640661', 's346290222'] | [9160.0, 9084.0, 32132.0] | [23.0, 23.0, 150.0] | [205, 205, 310] |
p02707 | u411865056 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = list(map(int, input().split()))\ndef count(n, a):\n c = 0\n for i in range(n+1):\n if a[i] == n:\n c += 1\n return c\nfor j in range(N):\n print(count(j+1, A))', 'N = int(input())\nA = list(map(int, input().split()))\nbuka = list()\nfor i in range(N):\n buka.append(0)\nfor j in range(len(A)):\n buka[A[j]-1] += 1\nfor k in range(len(buka)):\n print(buka[k])'] | ['Runtime Error', 'Accepted'] | ['s812156316', 's909859999'] | [32384.0, 32264.0] | [2206.0, 175.0] | [202, 196] |
p02707 | u414050834 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\na=list(map(int,input().split()))\nb=sorted(b)\nfor i in range(1,n+1):\n print(b.count(i))\n b=b[b.count(i):]\n', 'from collections import Counter\nn = int(input())\nc = Counter(map(int, input().split()))\nfor i in range(n):\n print(c[i + 1])\n'] | ['Runtime Error', 'Accepted'] | ['s624848314', 's026355437'] | [32244.0, 45532.0] | [67.0, 172.0] | [122, 125] |
p02707 | u418381221 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = list(map(int,input().split()))\n\na = [0]*N\nfor i in range(len(A)):\n a[A[i]-1] += 1\n \nfor j in range(len(A)):\n print(a[A[j]-1])\nprint(0)', 'N = int(input())\nA = list(map(int,input().split()))\n\na = [0]*N\nfor i in range(len(A)):\n a[A[i]-1] += 1\n \nfor j in range(len(A)):\n print(a[j])\nprint(0)'] | ['Wrong Answer', 'Accepted'] | ['s889280310', 's581180493'] | [32368.0, 32240.0] | [185.0, 153.0] | [164, 159] |
p02707 | u423665486 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['print(0)', 'def resolve():\n n = int(input())\n\ta = list(map(int, input().split()))\n\tans = [0]*n\n\tfor i in a:\n\t\tans[i-1] += 1\n\tfor i in ans:\n\t\tprint(i)\nresolve()', 'def resolve():\n n = int(input())\n\ta = list(map(int, input().split()))\n\tans = [0]*n\n\tfor i in a:\n\t\tans[i-1] += 1\n\tfor i in ans:\n\t\tprint(i)\nresolve()', 'def resolve():\n\tn = int(input())\n\ta = list(map(int, input().split()))\n\tans = [0]*n\n\tfor i in a:\n\t\tans[i-1] += 1\n\tfor i in ans:\n\t\tprint(i)\nresolve()'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s156608422', 's333225229', 's878594209', 's584514840'] | [9132.0, 9012.0, 8968.0, 32368.0] | [22.0, 21.0, 22.0, 132.0] | [8, 150, 150, 147] |
p02707 | u425184437 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N=int(input())\nA=list(map(int,input().split()))\ndic={}\nfor i in range(1,N+1):\n dic[i]=0\nfor a in A:\n dic[a]=+1\nfor i in range(1,N+1):\n print(dic[i])', 'n = int(input())\nA = list(map(int, input().split()))\ndic = {}\nfor i in range(1, n+1):\n dic[i] = 0\nfor a in A:\n dic[a] += 1\nfor i in range(1, n+1):\n print(dic[i])\n'] | ['Wrong Answer', 'Accepted'] | ['s686095068', 's547552820'] | [38848.0, 38856.0] | [200.0, 219.0] | [151, 165] |
p02707 | u428416104 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\na = list(map(int, input().split()))\njousi={}\nfor i in range(N):\n itmp=str(i)\n jousi[itmp]=0\nfor i in range(N-1):\n atmp=str(a[i])\n jousi[atmp]+=1\nfor i in range(1,N+1):\n print(jousi[str(i)])\n', 'N = int(input())\na = list(map(int, input().split()))\njousi={}\nfor i in range(N+1):\n jousi[str(i)]=0\n\nfor i in range(N-1):\n jousi[str(a[i])]+=1\n \nfor i in range(1,N+1):\n print(jousi[str(i)])\n'] | ['Runtime Error', 'Accepted'] | ['s408516898', 's280484383'] | [44344.0, 44204.0] | [365.0, 352.0] | [222, 202] |
p02707 | u429029348 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\na=[-1,-1]+list(map(int,input().split()))\ncnt=[0]*(n+1)\nfor i in range(2,n+1):\n cnt[a(i)]+=1\n \nfor i in range(1,n+1):\n print(cnt[i])', 'n=int(input())\na=[-1,-1]+list(map(int,input().split()))\ncnt=[0]*(n+1)\nfor i in range(2,n+1):\n cnt[a[i]+=1\n \nfor i in range(1,n+1):\n print(cnt[i])', 'n=int(input())\na=list(map(int,input().split()))\ncnt=[0]*n\nfor i in range(0,n-1):\n cnt[a[i]-1]+=1\nfor i in range(0,n):\n print(cnt[i])'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s341291731', 's464463131', 's031583775'] | [32356.0, 8964.0, 32332.0] | [62.0, 19.0, 159.0] | [155, 154, 138] |
p02707 | u430771494 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N=int(input())\nA=list(map(int, input().split()))\nB=[0]+A\nprint(B)\nfor i in range(0,len(B)):\n print(B.count(i+1))', 'N=int(input())\nA=list(map(int, input().split()))\nimport collections\nB=collections.Counter(A)\nfor i in range(0,N):\n print(B[i+1])'] | ['Wrong Answer', 'Accepted'] | ['s631441335', 's979811062'] | [32244.0, 33684.0] | [2206.0, 190.0] | [115, 131] |
p02707 | u433380437 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\nw=list(map(int,input().split()))\na=[0]*(n)\n\nfor i in range(n-1):\n a[w[i]-1]+=1\nprint(a)', 'n=int(input())\nw=list(map(int,input().split()))\na=[0]*(n)\n\nfor i in range(n-1):\n a[w[i]-1]+=1\n\nfor j in range(n):\n print(a)', 'n=int(input())\nw=list(map(int,input().split()))\na=[0]*(n)\n\nfor i in range(n-1):\n a[w[i]-1]+=1\n\nfor j in range(n):\n print(a[j])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s052510607', 's558403280', 's485422571'] | [32328.0, 144404.0, 32172.0] | [110.0, 2360.0, 162.0] | [105, 129, 132] |
p02707 | u437439694 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['\nN = int(input())\nA_l = list(map(int, input().split()))\n\nans_l = [0]*N\n\ni = 0\nwhile i < N-1:\n ans_l[A_l[i]-1] += 1\n i += 1\n\ni=0\nwhile i < N-1:\n print(ans_l[i])\n i += 1\n', '\nN = int(input())\nA_l = list(map(int, input().split()))\n\nans_l = [0]*N\n\ni = 0\nwhile i < N-1:\n ans_l[A_l[i]-1] += 1\n i += 1\n\ni=0\nwhile i < N:\n print(ans_l[i])\n i += 1\n'] | ['Wrong Answer', 'Accepted'] | ['s280914179', 's928627975'] | [32324.0, 32348.0] | [197.0, 190.0] | [172, 170] |
p02707 | u437727817 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\na = list(map(int,input().split()))\n\nid = [0 for _ in range(n)]\nfor i in range(len(a)):\n\tid[a[i]-1] += 1\n\nfor i in id:\n\tprint(i', 'n = int(input())\na = list(map(int,input().split()))\n\nid = [0 for _ in range(n)]\nfor i in range(len(a)):\n\tid[a[i]-1] += 1\n\nfor i in id:\n\tprint(i)'] | ['Runtime Error', 'Accepted'] | ['s461750321', 's191008007'] | [9004.0, 32180.0] | [23.0, 158.0] | [143, 144] |
p02707 | u439706453 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['A=input().split()\nN=int(A[0])\ndel A[0]\nB=[]\nfor i in range(N):\n B.append(0)\nfor i in range(N-1):\n B[int(A[i])-1]+=1\nprint(B)', 'A=input().split()\nN=int(A[0])\ndel A[0]\nB=[]\nfor i in range(N):\n B.append(0)\nfor i in range(N-1):\n B[int(A[i])-1]+=1\nfor i in range(N):\n print(B[i])', 'n=int(input())\nl=list(map(int,input().split()))\na=[]\nfor i in range(n):\n a.append(0)\nfor i in range(n-1):\n a[l[i]-1]+=1\nfor i in range(n):\n print(a[i])'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s105150942', 's176187705', 's481837613'] | [10544.0, 10552.0, 32184.0] | [39.0, 41.0, 170.0] | [130, 156, 154] |
p02707 | u444481227 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\na=[int(input()) for _ in range(n-1)]\n\nfor i in range(n):\n print(a.count(i+1))\n\n', 'n=int(input())\na=list(map(int,input().split()))\nprint(a)\n\nfor i in range(n):\n print(a.count(i+1))\n', 'n=int(input())\na=list(map(int,input().split()))\nb=[0]*n\n\nfor i in a:\n b[i-1]+=1\n\n[print(i) for i in b]\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s281764574', 's688547198', 's316531356'] | [11612.0, 32332.0, 32288.0] | [29.0, 2207.0, 143.0] | [97, 101, 106] |
p02707 | u446774692 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = list(map(int,input().split()))\nA.append(N)\nA.sort()\nfor i in range(1,N):\n count = 0\n while A[0] == i:\n A.pop(0)\n count += 1\n print(count)\n ', 'N = int(input())\nA = list(map(int,input().split()))\n\ncount = [0]*(N-1)\n\nfor i in range(N-1):\n count[A[i]-1] += 1\n\nfor i in count:\n print(i)\n', 'N = int(input())\nA = list(map(int,input().split()))\n\ncount = [0]*N\n\nfor i in range(N-1):\n count[A[i]-1] += 1\n\nfor i in count:\n print(i)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s211951171', 's507769372', 's538925929'] | [32220.0, 32328.0, 32312.0] | [2206.0, 154.0, 155.0] | [186, 146, 142] |
p02707 | u455034505 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\n\nboss_list = map(int, input().split())\n\nemployee_list = [0] * (n - 1)\n\nfor boss in boss_list:\n\temployee_list[boss - 1] += 1\n\t\nfor employee in employee_list:\n\tprint(employee)\n', 'n = int(input())\n\nboss_list = map(int, input().split())\n\nemployee_list = [0] * n\n\nfor boss in boss_list:\n\temployee_list[boss - 1] += 1\n\nfor employee in employee_list:\n\tprint(employee)\n'] | ['Wrong Answer', 'Accepted'] | ['s674082527', 's935425919'] | [24476.0, 24640.0] | [144.0, 146.0] | [191, 184] |
p02707 | u455642216 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N=int(input())\nA=list(map(int,input().split()))\nx=A[0]*N\nfor i in A:\n x[i-1]+=1\nfor j in x:\n print(j)', 'N=int(input())\nA=list(map(int,input().split()))\nx=[0]*N\nfor i in A:\n x[i-1]+=1\nfor j in x:\n print(j)'] | ['Runtime Error', 'Accepted'] | ['s095555465', 's951434460'] | [32344.0, 32312.0] | [66.0, 149.0] | [107, 106] |
p02707 | u457423258 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import collections\nN = int(input())\nA = list(map(int, input().split()))\n\nc = collections.Counter(A)\nprint(c)\n\nfor i in range(N):\n print(c[i+1])', 'import collections\nN = int(input())\nA = collections.Counter(list(map(int,input().split())))\nfor i in range(N):\n print(A[i + 1])'] | ['Wrong Answer', 'Accepted'] | ['s920269928', 's756992304'] | [57000.0, 34012.0] | [243.0, 187.0] | [146, 130] |
p02707 | u457683760 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA=[int(i) for i in input().split()]\n\nB = [0 for i in range(len(A))]\nfor i in A:\n B[i] =B[i] + 1\n\nfor i in range(B):\n print(i)', 'N = int(input())\nA=[int(i) for i in input().split()]\n\nB = [0 for i in range(len(A))]\nfor i in A:\n B[i] =B[i] + 1\n\nfor i in B:\n print(i)', 'N = int(input())\nA=[int(i) for i in input().split()]\n\nB = [0 for i in range(len(A))]\nfor i in A:\n B[i-1] =B[i-1] + 1\n\nfor i in B:\n print(i)', 'N = int(input())\nA=[int(i) for i in input().split()]\n\nB = [0 for i in range(N)]\nfor i in A:\n B[i-1] =B[i-1] + 1\n\nfor i in B:\n print(i)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s048589622', 's095686787', 's245197260', 's579574071'] | [32324.0, 32320.0, 32324.0, 32128.0] | [95.0, 154.0, 166.0, 167.0] | [148, 141, 145, 140] |
p02707 | u459419927 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['from sys import stdin\nimport numpy as np\nN=list(map(int,(stdin.readline().strip().split())))[0]\nA=list(map(int,(stdin.readline().strip().split()))).sort()\nmoji=A[0]\ncount=1\ni=0\nlength=len(A)-1\nj=0\nsougou=0\nwhile(i!=length):\n\n if moji==A[i+1]:\n count+=1\n i+=1\n j+=1\n else:\n sougou += 1\n print(count)\n count=1\n j=1\n i+=1\n moji=A[i]\nif j>=1:\n sougou += 1\n print(count)\nfor _ in range(N-sougou):print(0)', 'from sys import stdin\nimport numpy as np\nN=list(map(int,(stdin.readline().strip().split())))[0]\nA=list(map(int,(stdin.readline().strip().split())))\nnum_list=[0]*N\nmoji=A[0]\ni=0\nlength=len(A)-1\nfor i in A:\n num_list[i-1]+=1\nfor num in num_list:\n print(num)'] | ['Runtime Error', 'Accepted'] | ['s213576153', 's826698392'] | [50884.0, 51060.0] | [167.0, 232.0] | [474, 261] |
p02707 | u464823755 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\na=list(map(int, input().split()))\nb=[0]*n\nfor i in range(1,n+1):\n b[i-1]=a.count(i)\nfor i in b:\n print(b)', 'n=int(input())\na=list(map(int, input().split()))\nb= [0]*n\nfor i in a:\n b[i-1]+=1\nfor i in b:\n print(i)\n '] | ['Wrong Answer', 'Accepted'] | ['s867918974', 's021925289'] | [32316.0, 32268.0] | [2206.0, 149.0] | [122, 107] |
p02707 | u467881696 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import numpy as np\nn = int(input())\njousi = list(map(int, input().split()))\na = np.zeros(n)\nfor i in jousi :\n a[jousi[i] -1] += 1\n print(int(a[jousi[i] - 1]))', 'import numpy as np\nn = int(input())\njousi = list(map(int, input().split()))\na = np.zeros(n)\nfor i in jousi :\n i = i-1\n a[jousi[i] -1] += 1\nfor i in range(len(a)):\n print(int(a[i]))', 'import numpy as np\nn = int(input())\njousi = list(map(int, input().split()))\na = np.zeros(n)\nfor i in range(len(jousi)) :\n a[jousi[i] - 1] += 1\nfor i in range(len(a)):\nprint(int(a[i]))', 'import numpy as np\nn = int(input())\njousi = list(map(int, input().split()))\na = np.zeros(n)\nfor i in range(len(jousi)) :\n a[jousi[i] - 1] += 1\n for i in range(len(a)):\n print(int(a[i]))', 'import numpy as np\nn = int(input())\njousi = list(map(int, input().split()))\na = np.zeros(n)\nfor i in range(len(jousi)) :\n a[jousi[i] - 1] += 1\nfor i in range(len(a)):\n print(int(a[i]))'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s141472769', 's438042817', 's737115238', 's885162935', 's325386155'] | [50968.0, 50784.0, 9044.0, 9052.0, 50984.0] | [400.0, 361.0, 23.0, 19.0, 351.0] | [164, 189, 186, 194, 190] |
p02707 | u470735879 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['from collections import Counter\nn =int(input())\na = list(map(int, input().split()))\ns = Counter(a)\nfor v in s.values():\n print(v)\nfor i in range(n - len(ans)):\n print(0)\n\n', 'from collections import Counter\nn =int(input())\na = list(map(int, input().split()))\ns = Counter(a)\nans = [0] * n\nfor k, v in s.items():\n ans[k - 1] = v\nfor i in ans:\n print(i)\n'] | ['Runtime Error', 'Accepted'] | ['s894454709', 's450247994'] | [33976.0, 34048.0] | [147.0, 165.0] | [177, 182] |
p02707 | u472534477 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N=int(input())\nA=list(map(int,input().split()))\nfor i in range(N-1):\n print(A.count(i))\nprint("0")\n', 'N=int(input())\nA=input().split()\nfor i in range(N-1):\n print(A.count([i]))\nprint("0")\n', 'N=int(input())\nA=input().split()\nfor i in range(N-1):\n print(A.count(A[i]))\n print("0")\n', 'N=int(input())\nA=input().split()\nfor i in range(N-1):\n print(A.count(A[i]))\nprint("0")\n', 'N=int(input())\nA=input().split()\nfor i in range(N-1):\n print(A.count(A[i]))\n print("0")\n', 'N=int(input())\nA=[int(n) for n in input().split()]\nsub=[0]*N\nfor index in A:\n sub[index-1]+=1\nprint("\\n".join(map(str,sub)))'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s004810618', 's113216978', 's458616386', 's940944349', 's973793304', 's598942616'] | [32368.0, 24340.0, 24432.0, 24260.0, 24444.0, 33008.0] | [2206.0, 2206.0, 2206.0, 2206.0, 2206.0, 127.0] | [102, 89, 94, 90, 94, 127] |
p02707 | u478132434 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\na = list(map(int, input().split()))\n\ns = list(set(a))\n#print(s)\n\nans = [0] * n\nfor i in (s):\n ans[i] = a.count(i)\n\n[print(ans[i]) for i in range(n)]', 'n = int(input())\na = list(map(int, input().split()))\n\nans = [0] * n\nfor i in a:\n ans[i-1] += 1\n\nfor i in range(n):\n print(ans[i])'] | ['Wrong Answer', 'Accepted'] | ['s979902192', 's467033013'] | [32224.0, 32364.0] | [2206.0, 154.0] | [168, 135] |
p02707 | u479638406 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["n = int(input())\na = list(map(int, input().split()))\n\nl = [0]*n\nfor i in range(n-1):\n l[a[i]] += 1\n \nprint(*l[1:], sep = '\\n')", "n = int(input())\na = list(map(int, input().split()))\n\nl = [0]*(n+1)\nfor i in range(n-1):\n l[a[i]] += 1\n \nprint(*l[1:], sep = '\\n')\n"] | ['Wrong Answer', 'Accepted'] | ['s529173347', 's292932492'] | [32284.0, 32228.0] | [133.0, 124.0] | [128, 133] |
p02707 | u489762173 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import collections\n\nN = int(input())\nA = list(map(int,input().split()))\na = Collections.Counter(A)\n\nfor i in range(N):\n print(a[i])', 'import collections\n \nN = int(input())\nA = list(map(int,input().split()))\na = collections.Counter(A)\n \nfor i in range(N):\n print(a[i+1])'] | ['Runtime Error', 'Accepted'] | ['s130705145', 's238209176'] | [33720.0, 34040.0] | [66.0, 188.0] | [132, 136] |
p02707 | u490489966 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['#C\nfrom collections import Counter\nn = int(input())\na = list(map(int, input().split()))\nm=max(a)\na = Counter(a)\nprint(a)\n\nfor i in range(1, n + 1):\n if i <= m:\n print(a[i])\n else:\n print(0)\n', '#C\nfrom collections import Counter\nn = int(input())\na = list(map(int, input().split()))\nm = max(a)\na = Counter(a)\n# print(a)\n\nfor i in range(1, n + 1):\n if i <= m:\n print(a[i])\n else:\n print(0)\n'] | ['Wrong Answer', 'Accepted'] | ['s719597052', 's624913970'] | [55556.0, 34036.0] | [255.0, 192.0] | [210, 214] |
p02707 | u492959898 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\n\nNinzu = []\nfor x in input().split():\n\tNinzu.append(int(x))\n\ni = 1\nfor i in range(1,N):\n\tprint(Ninzu.count(i))', 'import collections\n\nN = int(input())\n\nNinzu = []\nfor x in input().split():\n\tNinzu.append(int(x))\n\nl = collections.Counter(Ninzu)\n\nfor i in range(1,N):\n\tprint(l[i])\n\nprint(0)'] | ['Wrong Answer', 'Accepted'] | ['s622304200', 's006850828'] | [32188.0, 35548.0] | [2206.0, 204.0] | [127, 173] |
p02707 | u497805118 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\ndict = {}\nfor i in map(int, input().split(" ")):\n\tdict[i] = dict.get(i, 0) + 1\n\nfor i in range(n):\n\tprint(dict.get(i, 0))', 'n = int(input())\ndict = {}\nfor i in map(int, input().split(" ")):\n\tdict[i] = dict.get(i, 0) + 1\n \nfor i in range(0, n + 1):\n\tprint(dict.get(i, 0))', 'n = int(input())\ndict = {}\nfor i in map(int, input().split(" ")):\n\tdict[i] = dict.get(i, 0) + 1\n \nfor i in range(1, n + 1):\n\tprint(dict.get(i, 0))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s057720909', 's365465205', 's329281595'] | [45124.0, 45148.0, 45088.0] | [187.0, 190.0, 193.0] | [138, 146, 146] |
p02707 | u498575211 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['10\n1 1 1 1 1 1 1 1 1', 'N = int(input())\na = list(map(int, input().split()))\n\nk = [0]*N\n\nfor i in a:\n k[i-1] += 1\n\nfor i in k:\n print(i)'] | ['Runtime Error', 'Accepted'] | ['s184694227', 's593773928'] | [9084.0, 32396.0] | [22.0, 147.0] | [20, 114] |
p02707 | u499267715 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["def main():\n N = int(input())\n A = [int(x) for x in input().split()]\n \n B = [0] * N\n for i in range(N):\n e = A[N-i-1]\n B[e] += 1\n \n for i in range(N):\n print(B[i])\n \nif __name__ == '__main__':\n main()", "def main():\n N = int(input())\n A = [int(x) for x in input().split()]\n \n B = [0] * N\n for i in range(N):\n B[A[N-i-1]] += 1\n \n for i in range(N):\n print(B[i])\n \nif __name__ == '__main__':\n main()", "def main():\n N = int(input())\n A = [int(x) for x in input().split()]\n \n B = []\n for i in range(N):\n B.append(0)\n \n for i in range(N):\n e = int(A[N-i-1])\n B[e] += 1\n \n for i in range(N):\n print(B[i])\n \nif __name__ == '__main__':\n main()", "def main():\n N = input()\n A = [int(x) for x in input().split()]\n \n B = [0] * N\n for i in range(N):\n B[A[N-i-1]] += 1\n \n for i in range(N):\n print(B[i])\n \nif __name__ == '__main__':\n main()", "def main():\n N = int(input())\n A = [int(x) for x in input().split()]\n \n B = [0] * N\n B = int(B)\n for i in range(N):\n e = int(A[N-i-1])\n B[e] += 1\n \n for i in range(N):\n print(B[i])\n \nif __name__ == '__main__':\n main()", "def main():\n N = int(input())\n A = [int(x) for x in input().split()]\n \n B = [0] * N \n for i in range(N-1):\n B[A[N-i-2]] += 1\n \n for i in range(N):\n print(B[i])\n \nif __name__ == '__main__':\n main()", "def main():\n N = int(input())\n A = [int(x) for x in input().split()]\n \n B = [0] * N\n for i in range(N):\n e = int(A[N-i-1])\n B[e] = B[e] + 1\n \n for i in range(N):\n print(B[i])\n \nif __name__ == '__main__':\n main()", "def main():\n N = int(input())\n A = [int(x) for x in input().split()]\n \n B = [0] * N \n for i in range(N-1):\n B[A[N-i-2]-1] += 1\n \n for i in range(N):\n print(B[i])\n \nif __name__ == '__main__':\n main()"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s050228790', 's063046292', 's119654342', 's186456930', 's215353894', 's224367022', 's682091459', 's107488698'] | [32188.0, 32316.0, 32260.0, 32232.0, 32224.0, 32300.0, 32208.0, 32204.0] | [72.0, 71.0, 80.0, 68.0, 74.0, 153.0, 76.0, 154.0] | [220, 210, 262, 205, 238, 218, 231, 220] |
p02707 | u500990280 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\nA = list(map(int,input().split()))\nA.insert(0,0)\nb = []\nfor i in A:\n print(A.count(i+1))\n', 'def main():\n N = int( input())\n A = list( map( int, input().split()))\n B = [0]*(N)\n for a in A:\n \n B[a-1] += 1\n print(B)\n print("\\n".join( map( str, B)))\nif __name__ == \'__main__\':\n main()\n', 'def main():\n N = int( input())\n A = list( map( int, input().split()))\n B = [0]*(N)\n for a in A:\n B[a-1] += 1\n print("\\n".join( map( str, B)))\nif __name__ == \'__main__\':\n main()\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s394265682', 's793832529', 's529481663'] | [32368.0, 141384.0, 33060.0] | [2206.0, 2419.0, 103.0] | [109, 228, 202] |
p02707 | u508934152 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = list(map(int, input().split()))\n\nL = []\nfor i in range(N-1):\n L.append(0)\n\nfor i in range(N-1):\n L[A[i]-1] += 1\n\nfor j in range(N-1):\n print(L[j])', 'N = int(input())\nA = list(int, input().split())\n\nL = []\nfor i in range(N-1):\n L.append(0)\n\nfor i in range(N-1):\n L[A[i]] += 1\n\nfor j in range(N-1):\n print(L[j])', 'N = int(input())\nA = list(map(int, input().split()))\n\nL = []\nfor i in range(N):\n L.append(0)\n\nfor i in range(N-1):\n L[A[i]-1] += 1\n\nfor j in range(N):\n print(L[j])'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s015030982', 's535343705', 's202417142'] | [32308.0, 24456.0, 32236.0] | [177.0, 37.0, 176.0] | [170, 163, 166] |
p02707 | u514206029 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["N = int(input('')) \n\nA = list(map(int,input().split()))\n\nA.insert(0,0)\n\nA.insert(0,0)\n\nsubordinate = [0] * (N+1)\n\n\n\n# print(A)\n\nfor index in range(N, 1, -1):\n subordinate[A[index]] = subordinate[A[index]] + 1\n\n\nfor index in range(1, N, 1):\n print(subordinate[index])\n\n", "N = int(input('')) \n\nA = list(map(int,input().split()))\n\nA.insert(0,0)\n\nA.insert(0,0)\n\nsubordinate = [0] * (N+1)\n\n\nprint(subordinate)\nprint(A)\n\nfor index in range(N, 1, -1):\n subordinate[A[index]] = subordinate[A[index]] + 1\n\n\nfor index in range(1, N, 1):\n print(subordinate[index])\n", "N = int(input('')) \n\nA = list(map(int,input().split()))\n\nA.insert(0,0)\n\nA.insert(0,0)\n\nsubordinate = [0] * (N+1)\n\n\n\n# print(A)\n\nfor index in range(N, 1, -1):\n subordinate[A[index]] = subordinate[A[index]] + 1\n\n\nfor index in range(1, N+1, 1):\n print(subordinate[index])\n\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s076660520', 's298846328', 's029886819'] | [32296.0, 32244.0, 32316.0] | [164.0, 196.0, 168.0] | [388, 383, 390] |
p02707 | u515647766 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['def function(n, list1):\n ans = [0] * n\n for i in list1:\n ans[i - 1] += 1\n string = ""\n for i in range(len(ans)):\n if i < len(ans) - 1:\n string += ans[i] + "\\n"\n else:\n string += ans[i]\n return string\n\nn = int(input())\nlist1 = input().split()\nlist1 = [int(i) for i in list1]\nprint(function(n, list1))\n ', 'def function(n, list1):\n ans = [0] * n\n for i in list1:\n ans[i - 1] += 1\n string = ""\n for i in range(len(ans)):\n if i < len(ans) - 1:\n string += str(ans[i]) + "\\n"\n else:\n string += str(ans[i])\n return string\n \nn = int(input())\nlist1 = input().split()\nlist1 = [int(i) for i in list1]\nprint(function(n, list1))'] | ['Runtime Error', 'Accepted'] | ['s686195743', 's264945604'] | [32340.0, 32136.0] | [86.0, 154.0] | [328, 334] |
p02707 | u518064858 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\na=list(map(int,input().split()))\na1=[0]*(n+1)\nfor i in range(n-1):\n a1[a[i]]+=1\nprint(a1)\nfor j in range(1,n+1):\n print(a1[j])\n', 'n=int(input())\na=list(map(int,input().split()))\na1=[0]*(n+1)\nfor i in range(n-1):\n a1[a[i]]+=1\nfor j in range(1,n+1):\n print(a1[j])\n'] | ['Wrong Answer', 'Accepted'] | ['s906490649', 's255683268'] | [32236.0, 32364.0] | [168.0, 162.0] | [148, 138] |
p02707 | u527616458 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\nb = list(map(int, input().split()))\n\nfor i in range(n):\n if (i+1) in b:\n c=0\n for j in range(len(b)):\n if b[j]==i+1:\n c += 1\n else:\n break\n print(c)\n else:\n print(0)', 'import collections\nn = int(input())\na = list(map(int, input().split()))\n\nc = collections.Counter(a)\nfor i in range(n):\n print(c[i+1])'] | ['Wrong Answer', 'Accepted'] | ['s423105628', 's718437136'] | [32148.0, 34048.0] | [2206.0, 182.0] | [220, 134] |
p02707 | u528887718 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = list(map(int,input().split()))\nans = [0]*N\nfor i in range(N):\n ans[A[i]-1] += 1\nfor i in range(N):\n print(ans[i])', 'N = int(input())\nA = list(map(int,input().split()))\nans = [0]*N\nfor i in range(N-1):\n ans[A[i]-1] += 1\nfor i in range(N):\n print(ans[i])\n'] | ['Runtime Error', 'Accepted'] | ['s083250358', 's264359135'] | [32236.0, 32360.0] | [95.0, 167.0] | [140, 143] |
p02707 | u530497183 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = list(map(int,input().split()))\nL = [0] * (N+1)\nfor i in range(N):\n L[A[i]]+=1\nfor i in range(1,N+1):\n print(L[i])', 'N = int(input())\nA = list(map(int,input().split()))\nL = [0] * (N+1)\nfor i in range(N-1):\n L[A[i]]+=1\nfor i in range(1,N+1):\n print(L[i])'] | ['Runtime Error', 'Accepted'] | ['s384635999', 's327470068'] | [32232.0, 32280.0] | [86.0, 147.0] | [136, 138] |
p02707 | u531599639 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["N=map(int, input())\nlist=list(map(str, input().split()))\nanswer=[]\nfor i in range(1, N):\n\tanswer.append(list.count(i))\na_s='\\n'.join(answer)\nprint(a_s)", "N=map(int, input())\nlist=list(map(str, input().split()))\nanswer=[]\nfor i in range(1, N):\n\tanswer.append(str(list.count(str(i))))\na_s='\\n'.join(answer)\nprint(a_s)", "N=map(int, input())\nlist=list(map(str, input().split()))\nanswer={}\nfor i in range(1, N+1):\n m=0\n for j in range(0, len(list)):\n \tif list[j] is str(i):\n m=m+1\n else:\n m=m+0\n answer.append(m)\na_s='\\n'.join(answer)\nprint(a_s)", "N=map(int, input())\nlist=list(map(str, input().split()))\nanswer=[]\nfor i in range(1, N+1):\n\tm=0\n\tfor j in range(0, len(list)):\n \t\tif list[j] is str(i):\n \t\tm=m+1\n \telse:\n \t\tm=m+0\n\tanswer.append(m)\na_s='\\n'.join(answer)\nprint(a_s)", "N=map(int, input())\nlist=list(map(str, input().split()))\nanswer={}\nfor i in range(1, N+1):\n\tm=0\n\tfor j in range(0, len(list)):\n \t\tif list[j] is str(i):\n \t\tm=m+1\n \telse:\n \t\tm=m+0\n\tanswer.append(m)\na_s='\\n'.join(answer)\nprint(a_s)", 'N=int(input())\nlist=list(input().split())\nans=[]\nfor i in range(1,N):\n ans.append(list.count(str(i)))\nprint(ans)', "N=map(int, input())\nlist=list(map(str, input().split()))\nanswer=[]\nfor i in range(1, N+1):\n\tanswer.append(list.count(i))\na_s='\\n'.join(answer)\nprint(a_s)", "N=map(int, input())\nlist=list(map(str, input().split()))\nanswer=[]\nfor i in range(1, N-2):\n\tanswer.append(list.count(i))\na_s='\\n'.join(answer)\nprint(a_s)", "N=map(int, input())\nlist=list(map(str, input().split()))\nanswer=[]\nfor i in range(1, N-2):\n m=list.count(str(i)\n answer.append(m)\na_s='\\n'.join(answer)\nprint(a_s)", 'N=int(input())\nA=list(map(int, input().split()))\nans=[0]*N\nfor a in A:\n ans[a-1]+=1\nprint(ans)', 'N=int(input())\nA=list(map(int, input().split()))\nans=[0]*N\nfor a in A:\n ans[a-1]+=1\nfor n in ans:\nprint(n)', "N=map(int, input())\nlist=list(map(str, input().split()))\nanswer={}\nfor i in range(1, N+1):\n m=0\n for j in range(0, len(list)):\n \tif list[j] is str(i):\n m=m+1\n else:\n m=m+0\nanswer.append(m)\na_s='\\n'.join(answer)\nprint(a_s)", "N=map(int, input())\nlist=list(map(str, input().split()))\nanswer=[]\nfor i in range(1, N-2):\n\tanswer.append(list.count(str(i)))\na_s='\\n'.join(answer)\nprint(a_s)", 'n = int(input())\na = [0,0] + list(map(int, input().split()))\nascts = [0]*(n+1)\nfor i in range(2,n+1):\n ascts[a[i]] += 1\nfor i in range(1, n+1):\n print(ascts[i])'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s062991978', 's192969357', 's195280886', 's237536341', 's393619261', 's395031567', 's602797797', 's662493204', 's806098928', 's870913387', 's873911989', 's932525206', 's950605711', 's725923449'] | [25900.0, 25824.0, 8976.0, 9008.0, 9040.0, 24880.0, 25900.0, 25764.0, 8912.0, 32288.0, 8996.0, 9004.0, 25788.0, 32232.0] | [55.0, 55.0, 24.0, 21.0, 21.0, 2206.0, 56.0, 55.0, 22.0, 102.0, 23.0, 23.0, 58.0, 161.0] | [151, 161, 239, 242, 242, 113, 153, 153, 164, 95, 107, 237, 158, 162] |
p02707 | u532549251 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['\n#List = list(map(int, input().split()))\n#req = [list(map(int, input().split())) for _ in range(q)]\n#t = t[:-1]\n\n\nn = int(input())\na = list(map(int, input().split()))\nprint(a)\nans = [0]*n\n\nfor i in a:\n ans[i-1] += 1\n\nfor j in ans:\n print(j)\n', '\n#List = list(map(int, input().split()))\n#req = [list(map(int, input().split())) for _ in range(q)]\n#t = t[:-1]\n\n\nn = int(input())\na = list(map(int, input().split()))\nans = [0]*n\n\nfor i in a:\n ans[i-1] += 1\n\nfor j in ans:\n print(j)\n'] | ['Wrong Answer', 'Accepted'] | ['s940300863', 's736154662'] | [32288.0, 32228.0] | [162.0, 148.0] | [341, 332] |
p02707 | u536034761 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = [int(input()) for i in range(N - 1)]\nfor i in range(1, N + 1):\n print(A.count(i))', 'N = int(input())\nA = list(map(int, input().split()))\nans = [0 for i in range(N)]\nfor a in A:\n ans[a - 1] += 1\nfor a in ans:\n print(a)'] | ['Runtime Error', 'Accepted'] | ['s134713367', 's524488660'] | [11476.0, 32268.0] | [29.0, 154.0] | [103, 135] |
p02707 | u536642030 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['num = input()\nhoge = list(map(int, input().split()))\ncount = 0\n\nfor i in range(1, len(hoge)):\n if hoge[i] != hoge[i - 1]:\n print(i - count)\n count = i\n if i == len(hoge) - 1:\n print(i + 1- count)\n else:\n if i == len(hoge) - 1:\n print(i + 1- count)', 'num = input()\nhoge = list(map(int, input().split()))\ncount = 0\nfuga = 0\n\nfor i in range(1, len(hoge)):\n if hoge[i] != hoge[i - 1]:\n print(i - count)\n fuga += 1\n count = i\n if i == len(hoge) - 1:\n print(i + 1- count)\n fuga += 1\n else:\n if i == len(hoge) - 1:\n print(i + 1- count)\n fuga += 1\nfor i in range(fuga, num):\n print(0)', 'num = int(input())\nhoge = list(map(int, input().split()))\nfuga = 0\nfor i in range(num):\n count = 0\n for j in range(fuga, num):\n if hoge[j] == i + 1:\n count += 1\n fuga += count\n print(count)', 'num = input()\nhoge = list(map(int, input().split()))\ncount = 0\nfuga = 0\n \nfor i in range(1, len(hoge)):\n\tif hoge[i] != hoge[i - 1]:\n\t\tprint(i - count)\n\t\tfuga += 1\n\t\tcount = i\n\t\tif i == len(hoge) - 1:\n\t\t\tprint(i + 1- count)\n\t\t\tfuga += 1\n\telse:\n\t\tif i == len(hoge) - 1:\n\t\t\tprint(i + 1- count)\n\t\t\tfuga += 1\nfor i in range(fuga, num):\n\tprint(0)', 'num = int(input())\nhoge = list(map(int, input().split()))\n\nfor i in range(num):\n count = 0\n for j in hoge:\n if j == i:\n count += 1\n print(count)', 'num = int(input())\nhoge = list(map(int, input().split()))\n\nfuga = [0] * num\n\nfor i in hoge:\n fuga[i - 1] += 1\nfor i in fuga:\n print(i)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s262170508', 's491883838', 's606368417', 's674366251', 's888963917', 's518287694'] | [32312.0, 32260.0, 32236.0, 32376.0, 32240.0, 32240.0] | [201.0, 210.0, 77.0, 174.0, 2206.0, 144.0] | [277, 372, 201, 340, 155, 136] |
p02707 | u536685012 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\na = list(map(int, input().split()))\n\nans = [0 for i in range(n)]\n\nfor i in range(n - 1):\n b = a[i]\n ans[b - 1] = ans[b-1] + 1\n\nprint(ans)\n', 'n = int(input())\na = list(map(int, input().split()))\n\nans = [0 for i in range(n)]\n\nfor i in range(n - 1):\n b = a[i]\n ans[b - 1] = ans[b-1] + 1\n\nfor i in range(n):\n print(ans[i])\n'] | ['Wrong Answer', 'Accepted'] | ['s737627652', 's508716028'] | [32300.0, 32232.0] | [126.0, 184.0] | [157, 181] |
p02707 | u538537141 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nAlist = list(map(int,input().split()))\n\nresult = [0]*N\n\nfor i in range(N-1):\n result[Alist[i]-1] +=1\n\nprint(result)\nfor i in range(N):\n print(result[i])', '\nN = int(input())\nAlist = list(map(int,input().split()))\n\nresult = [0]*N\n\nfor i in range(N-1):\n result[Alist[i]-1] +=1\n\nfor i in range(N):\n print(result[i])'] | ['Wrong Answer', 'Accepted'] | ['s509606174', 's167403017'] | [32368.0, 32216.0] | [162.0, 150.0] | [250, 237] |
p02707 | u540746268 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["import numpy as np\n\n\nif __name__ == '__main__':\n List = [list(map(int, input().split())) for i in range(2)]\n N = List[0][0]\n buka = np.array(List[1][:])\n\n\n l_out = np.zeros(N,dtype=int)\n\n for i in range(N):\n l_out[buka[i]-1] += 1\n\n for i in range(N):\n print(l_out[i])\n\n", "import numpy as np\n \n \nif __name__ == '__main__':\n List = [list(map(int, input().split())) for i in range(2)]\n N = List[0][0]\n buka = np.array(List[1][:])\n \n \n l_out = np.zeros(N,dtype=int)\n \n for i in range(N-1):\n l_out[buka[i]-1] += 1\n \n for i in range(N):\n print(l_out[i])\n "] | ['Runtime Error', 'Accepted'] | ['s472487343', 's044656126'] | [51028.0, 50752.0] | [328.0, 470.0] | [301, 309] |
p02707 | u548093253 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\na = list(map(int,input().split()))\nans = []\nfor i in range(1,n+1):\n ans.append(a.count(i))\n if sum(ans) == n-1:\n for k in range(1,n-i):\n ans.append(0)\n break\nfor j in ans:\n print(j)', 'n = int(input())\na = list(map(int,input().split()))\nans = [0]*n\nfor i in a:\n ans[i-1] += 1\nfor j in ans:\n print(j)\n'] | ['Wrong Answer', 'Accepted'] | ['s008450413', 's904957944'] | [32380.0, 32344.0] | [2206.0, 138.0] | [236, 121] |
p02707 | u550126284 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | [' n = int(input())\n a = list(map(int, input().split()))\n from collections import Counter\n x=Counter(a)\n for i in range(1,n+1):\n print(x[i])', 'n = int(input())\na = list(map(int, input().split()))\nimport Counter\nx=Counter(a)\nfor i in range(1,n+1):\n print(a[x])', ' n = int(input())\n a = list(map(int, input().split()))\n import Counter\n x=Counter(a)\n for i in range(1,n+1):\n print(x[i])', ' n = int(input())\n a = list(map(int, input().split()))\n from collections import Counter\n x=Counter(a)\n for i in range(1,n+1):\n print(x[i])', 'n = int(input())\na = list(map(int, input().split()))\na=sorted(a)\nlength=len(a)\n\nprevious=1\ncount=0\nfor j in a+[n+1]:\n if j==previous:\n count+=1\n else:\n print(count)\n count=1\n for _ in range(j-previous-1):\n print(0)\n previous=j'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s206356730', 's324732772', 's500603200', 's579974118', 's582477895'] | [9008.0, 32336.0, 8952.0, 8984.0, 32224.0] | [24.0, 58.0, 22.0, 23.0, 199.0] | [182, 117, 141, 182, 278] |
p02707 | u550535134 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = [int(x) for x in input().split()]\ncount = 0\nfor i in N-1:\n if i == ', 'n = int(input())\na = list(map(int, input().split()))\nans = [0]*n\nfor i in range(n-1):\n ans[a[i]-1] += 1\nfor i in range(n):\n print(ans[i])\n'] | ['Runtime Error', 'Accepted'] | ['s542164114', 's954760244'] | [9036.0, 32288.0] | [21.0, 159.0] | [89, 144] |
p02707 | u551058317 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["N = int(input())\nnumbers = input().strip().split(' ')\n\nboss_dict = [0] * N\nfor i in range(N - 1):\n boss_num = int(numbers[i])\n boss_dict[boss_num] += 1\n \nfor boss in boss_dict:\n print(boss)", "N = int(input())\nnumbers = input().strip().split(' ')\n\nboss_dict = [0] * N\nfor i in range(N - 1):\n boss_num = int(numbers[i])\n boss_dict[boss_num - 1] += 1\n\nfor boss in boss_dict:\n print(boss)"] | ['Wrong Answer', 'Accepted'] | ['s747512693', 's382755917'] | [25156.0, 25020.0] | [157.0, 167.0] | [201, 201] |
p02707 | u552533086 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['from collections import Counter\nN = int(input())\na = list(input().split())\nfact_count = Counter(a)\nfor i in range(1, N+1)\n\ttry:\n \tprint(fact_count[i])\n\texcept:\n \tprint(0)', 'from collections import Counter\nN = int(input())\na = list(input().split())\nfact_count = dict(Counter(a))\nprint(fact_count)\nfor i in range(1, N+1):\n try:\n print(fact_count[str(i)])\n except:\n print(0)', 'from collections import Counter\nN = int(input())\na = list(input().split())\nfact_count = dict(Counter(a))\nfor i in range(1, N+1):\n try:\n print(fact_count[str(i)])\n except:\n print(0)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s409379484', 's778452395', 's175586585'] | [9044.0, 46384.0, 46696.0] | [21.0, 274.0, 216.0] | [177, 219, 201] |
p02707 | u554760428 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\nA = list(map(int, input().sprit()))\nfor i in range(1,n):\n print(A.count(i))', 'import collections\n\nn = int(input())\nA = list(map(int, input().split()))\n\nc = collections.Counter(A)\n\nfor i in range(1,n+1):\n print(c[i])'] | ['Runtime Error', 'Accepted'] | ['s622041797', 's264458761'] | [11304.0, 34048.0] | [27.0, 179.0] | [93, 138] |
p02707 | u558717347 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['ar = [0]*n\n\nfor i in range(n-1):\n ar[a[i]] += 1\n\ntmp = ar.pop(0)\nar.append(tmp)\nfor i in range(n):\n print(ar[i])\n', 'n = int(input())\na = input().split()\na = [int(x) for x in a]\nar = [0]*n\n\nfor i in range(n-1):\n ar[a[i]] += 1\n\ntmp = ar.pop(0)\nar.append(tmp)\nfor i in range(n):\n print(ar[i])\n'] | ['Runtime Error', 'Accepted'] | ['s941636699', 's513382667'] | [9028.0, 32332.0] | [23.0, 160.0] | [119, 181] |
p02707 | u561862393 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\nA = [0]*(n+1)\nA[a] +=0 for a in input().split()\n\nfor e in A[1:]:\n print(e)', 'import sys\ninput = sys.stdin.readline\n\nn = int(input())\nA = [int(a) for a in input().split()]\n\nsub_list = [0] *n\n\nfor a in A:\n sub_list[a] +=1\n\nfor i in range(n):\n print(sub_list[i])', 'import sys\ninput = sys.stdin.readline\n\n\nn = int(input())\nA = [0]*(n+1)\nfor a in input().split():\n A[int(a)] +=1 \n\nfor e in A[1:]:\n print(e)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s343635133', 's625024138', 's624244996'] | [9004.0, 31016.0, 25988.0] | [21.0, 155.0, 149.0] | [94, 184, 144] |
p02707 | u563711100 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\nm = input().split()\nm = [int(i) for i in m]\n \nfor i in range(n):\n l.append(0)\nfor i in m:\n ind = i-1\n l[ind] += 1\nfor i in l:\n print(i)', 'n = int(input())\nm = input().split()\nm = [int(i) for i in m]\n\nfor i in range(n):\n l.append(0)\n\nfor i in m:\n ind = i-1\n l[ind] += 1\n\nfor i in l:\n print(i)\n \n ', 'n = int(input())\nm = input().split()\nm = [int(i) for i in m]\n \nfor i in range(n):\n l.append(0)\nfor i in m:\n ind = i-1\n l[ind] += 1\nfor i in l:\n print(i)\n ', 'n = int(input())\nm = input().split()\nm = [int(i) for i in m]\n \nl =[]\nfor i in range(n):\n l.append(0)\nfor i in m:\n ind = i-1\n l[ind] += 1\nfor i in l:\n print(i)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s235895629', 's449070406', 's701165863', 's936821330'] | [32136.0, 32236.0, 32132.0, 32256.0] | [70.0, 68.0, 64.0, 167.0] | [156, 165, 159, 162] |
p02707 | u567124995 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import collections\n\nn = int(input())\na = list(map(int, input().split()))\nc = collections.Counter(a)\n\nfor i in range(n):\n print(c[a[i]])', 'import collections\nn = int(input())\na = list(map(int, input().split()))\nc = collections.Counter(a)\n\nfor i in range(n-1):\n print(c[i+1])\n\nprint("0")'] | ['Runtime Error', 'Accepted'] | ['s781341662', 's396894564'] | [34180.0, 34200.0] | [190.0, 186.0] | [136, 148] |
p02707 | u568559987 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA_list = list(map(int, input().split()))\nB_list = [0]* n\nfor i in range(1, N):\n print(A_list.count(i))\nprint(0)\n', 'N = int(input())\nA_list = list(map(int, input().split()))\nans_list = [0] * (N + 1)\nfor i in range(N-1):\n ans_list[A_list[i]] += 1\nfor j in range(N):\n print(ans_list[j + 1])\n'] | ['Runtime Error', 'Accepted'] | ['s730789791', 's187671413'] | [32256.0, 32344.0] | [64.0, 161.0] | [132, 179] |
p02707 | u568789901 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N=int(input())\nA=list(map(int,input().split()))#N-1\ncount=0\n\nL=len(A)\n\nfor i in range(1,N):\n if i in A:\n A.remove(i)\n t=L-len(A)\n L=len(A)\n print(t)\n else:\n print(0)\n', 'N=int(input())\nA=list(map(int,input().split()))#N-1\nlist=[]\nfor i in range(N):\n list.append(0)\n\nfor i in range(0,N-1):\n list[A[i]-1]+=1\n\nfor i in range(0,N):\n print(list[i])\n'] | ['Wrong Answer', 'Accepted'] | ['s526750219', 's841770007'] | [32372.0, 32368.0] | [2206.0, 168.0] | [223, 183] |
p02707 | u571395477 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["import math\ndef main():\n N = map(int, input())\n l = [int(_) for _ in input().split()]\n count_list = [0] * N\n for i in l:\n index = i - 1\n count_list[index] += 1\n\n for out in count_list:\n print(out + '\\n')\nmain()", 'import math\ndef main():\n N = int(input())\n l = [int(_) for _ in input().split()]\n count_list = [0] * N\n for i in l:\n index = i - 1\n count_list[index] += 1\n\n for out in count_list:\n print(out)\nmain()'] | ['Runtime Error', 'Accepted'] | ['s014475561', 's631780497'] | [33524.0, 33588.0] | [71.0, 134.0] | [246, 234] |
p02707 | u572343785 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nA = list(map(int,input().split()))\n\nprint(A.count(i+1) for i in range(N))\n', 'N = int(input())\nA = list(map(int,input().split()))\n\ndef count(N,A):\n for i in range(N):\n print(A.count(i+1))\n A.remove(i+1)\ncount(N,A)', 'def count():\n N = int(input())\n A = list(map(int,input().split()))\n\n for i in range(N):\n print(A.count(i+1))\n A.remove(i+1)\ncount()', 'N = int(input())\nA = list(map(int,input().split()))\nAnsbox = [0]*(N+1)\n\ndef count(N,A,Ansbox):\n\n for i in range(N- 1):\n Ansbox[A[i] - 1] += 1\n \n for i in range(N):\n print(Ansbox[i])\n \ncount(N,A,Ansbox)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s322855714', 's617143098', 's875450095', 's184321979'] | [32220.0, 32260.0, 32292.0, 32196.0] | [65.0, 2206.0, 2206.0, 144.0] | [91, 152, 154, 235] |
p02707 | u573234244 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\n\na = list(map(int, input().split()))\n\nimport collections\nc = collections.Counter(a)\n\nprint(c[1])\nfor i in range(n-1):\n num = a[i]\n print(c[num+1])', 'n = int(input())\n\na = list(map(int, input().split()))\n\nimport collections\nc = collections.Counter(a)\n\nfor i in range(n-1):\n num = a[i]\n print(c[num+1])', 'n = int(input())\n\na = list(map(int, input().split()))\n\nimport collections\nc = collections.Counter(a)\n\nfor i in range(n-1):\n print(c[i+1])\n \nprint(0)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s093076518', 's144659505', 's808700230'] | [33752.0, 33812.0, 33676.0] | [212.0, 214.0, 199.0] | [169, 157, 154] |
p02707 | u573536767 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\na = list(map(int, input().split()))\n\nprint (a)\nfor i in range(0,n):\n aa=a.count(i+1)\n print (aa)\n ', 'n = int(input())\na = list(map(int, input().split()))\n\n\n# print (a.count(i+1))\n# a= [a[j] for j in range(0, len(a)) if a[j] != i+1]\n#\n# print (a)\n\nkekka= [0] * (n+1)\nfor i in range(0,n-1):\n kekka[a[i]]+=1\n\nfor i in range(1,n+1):\n print (kekka[i])'] | ['Wrong Answer', 'Accepted'] | ['s987880367', 's492579787'] | [32180.0, 32240.0] | [2206.0, 152.0] | [118, 271] |
p02707 | u581187895 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['\nfrom collections import Counter\ndef resolve():\n N = int(input())\n A = list(map(int, input().split()))\n C = Counter(A)\n\n for i in range(1, N+1):\n print(C[i])\n\nif __name__ == "__main__":\n unittest.main()', '\nfrom collections import Counter\ndef resolve():\n N = int(input())\n A = list(map(int, input().split()))\n C = Counter(A)\n\n for i in range(1, N+1):\n print(C[i])\n\nif __name__ == "__main__":\n resolve()'] | ['Runtime Error', 'Accepted'] | ['s896680696', 's840049768'] | [9400.0, 34116.0] | [26.0, 162.0] | [224, 218] |
p02707 | u581403769 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\na = list(map(int, input().split()))\nl = [0] * n\n\nfor i in range(n - 1):\n if a[i] > 0:\n l[a[i] - 1] += 1\n\nfor i in range(n - 1):\n print(l[i])\n', 'n = int(input())\na = list(map(int, input().split()))\nl = [0] * n\n\nfor i in range(n):\n if a[i] > 0:\n l[a[i] - 1] += 1\n\nfor i in range(n):\n print(l[i])', 'n = int(input())\na = list(map(int, input().split()))\nl = [0] * n\n\nfor i in range(n):\n l[a[i] - 1] += 1\n \nfor i in range(n):\n print(l[i])', 'n = int(input())\na = list(map(int, input().split()))\nl = [0] * n\n\nfor i in range(n - 1):\n if a[i] > 0:\n l[a[i] - 1] += 1\n\nfor i in range(n):\n print(l[i])\n'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s384683701', 's393830642', 's536524637', 's061968342'] | [32144.0, 32300.0, 32372.0, 32268.0] | [165.0, 105.0, 103.0, 169.0] | [171, 162, 145, 167] |
p02707 | u583276018 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\ns = list(map(int, input().split()))\nt = []\ncnt = 2\nfor a in s:\n try:\n t[a-1].append(cnt)\n except IndexError:\n for _ in range(a-len(t)):\n t.append([])\n t[-1].append(cnt)\nfor i in range(n-1):\n print(len(t[i]))\nprint(0)', 'n = int(input())\ns = list(map(int, input().split()))\nt = [0 for _ in range(n)]\nfor i in range(n-1):\n t[i] += 1\nfor i in range(n):\n print(t[i])', 'n = int(input())\ns = list(map(int, input().split()))\nt = [0 for _ in range(n)]\nfor i in range(n-1):\n t[s[i]-1] += 1\nfor i in range(n):\n print(t[i])'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s205721243', 's982814290', 's191961353'] | [37788.0, 32236.0, 32304.0] | [330.0, 158.0, 169.0] | [252, 144, 149] |
p02707 | u586857375 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N = int(input())\nvalues = list(map(int, input().split()))\nvalues_dict = {}\n\nfor value in values:\n values_dict[value] = values_dict.get(value, 0) + 1\n\nprint(values_dict.get(i, 0) for i in range(1, N+1))\n\n', 'N = int(input())\nvalues = list(map(int, input().split()))\nvalues_dict = {}\n\nfor value in values:\n values_dict[value] = values_dict.get(value, 0) + 1\nfor i in range(1, N+1):\n print(values_dict.get(i, 0))'] | ['Wrong Answer', 'Accepted'] | ['s525258246', 's073633595'] | [33544.0, 33528.0] | [114.0, 196.0] | [206, 208] |
p02707 | u588268040 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import numpy as np\nN=int(input())\nA=[int(x) for x in input().split()]\n\n\nX=[0]*200000\nfor i in range(N-1):\n tmp=A[i]\n X[tmp]+=1\nprint(X[1:N+1])', '\nN=int(input())\nA=[0,0]\nA[2:]=[int(x) for x in input().split()]\ndict1={}\nfor i in range(2,N+1):\n tmp=str(A[i])\n if (not tmp in dict1):\n dict1[tmp]=1\n else:\n dict1[tmp]+=1\nfor i in range(1,N+1):\n if (str(i) in dict1):\n print(dict1[str(i)])\n else:\n print(0)'] | ['Wrong Answer', 'Accepted'] | ['s087907216', 's929477549'] | [50788.0, 45600.0] | [198.0, 345.0] | [165, 349] |
p02707 | u598720217 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import sys\ndef input():\n return sys.stdin.readline()[:-1]\nN = int(input())\nl = list(map(int, input().split()))\nANS = [0]*N\n\nfor i in range(N-1):\n k = l[i]\n ANS[k] += 1\nfor i in range(1,N):\n print(ANS[i])', '\nimport sys\ndef input():\n return sys.stdin.readline()[:-1]\nN = int(input())\nl = list(map(int, input().split()))\nANS = [0]*N\n\nfor i in range(N-1):\n k = l[i]\n ANS[k-1] += 1\nfor i in range(N):\n print(ANS[i])'] | ['Wrong Answer', 'Accepted'] | ['s515628509', 's622300284'] | [32292.0, 32376.0] | [157.0, 166.0] | [215, 216] |
p02707 | u599004729 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["N = int(input())\nA = [int(a) for a in input().split()]\n\no = '\\n'.join([str(A.count(i)) for i in range(1, N+1)])\nprint(0)#print(o)\n", 'N = int(input())\nA = [int(a) for a in input().split()]\nx = [0] * N\n\nfor i in A:\n x[i-1] += 1\n\nfor i in x:\n print(i)\n'] | ['Wrong Answer', 'Accepted'] | ['s813509228', 's755195797'] | [32180.0, 32188.0] | [2206.0, 145.0] | [130, 122] |
p02707 | u600261652 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['def resolve():\n N = int(input())\n A = list(map(int, input().split()))\n for i in range(N-1):\n print(A.count(i+1))\nresolve()', 'def resolve():\n N = int(input())\n A = list(map(int, input().split()))\n ans = [0]*N\n for i in A:\n ans[i-1] += 1\n for j in ans:\n print(j)\nresolve()'] | ['Wrong Answer', 'Accepted'] | ['s554390300', 's436860485'] | [32324.0, 32220.0] | [2206.0, 132.0] | [138, 174] |
p02707 | u605601159 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input().strip().split())\narr = [int(i) for i in input().strip().split()]\nresult = {i:0 for i in range(1, n + 1)}\nfor i, j in enumerate(arr, 2):\n result[j] += 1\n \nfor i in result.values():\n print(i)', 'n = int(input().strip())\narr = [int(i) for i in input().strip().split()]\nresult = {i:0 for i in range(1, n + 1)}\nfor i, j in enumerate(arr, 2):\n result[j] += 1\n \nfor i in result.values():\n print(i)'] | ['Runtime Error', 'Accepted'] | ['s390828669', 's168158744'] | [9140.0, 38844.0] | [22.0, 208.0] | [214, 206] |
p02707 | u606001175 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\n\nls = list(map(int, input().split()))\n\nfor i in range(1, n + 1):\n ls2 = ls[i:]\n c = ls2.count(i)\n print(c)\n', 'n = int(input())\n\nls = list(map(int, input().split()))\nlist.sort()\n\nrg = range(1, n + 1)\n\nfor i in rg:\n print(ls.count(i))\n ls.remove(i)\n', 'n = int(input())\nls = list(map(int, input().split()))\n\nls2 =[0 for x in range(n)]\n\n\nfor x in ls:\n ls2[x - 1] += 1\n\nfor x in range(n):\n print(ls2[x])'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s392959021', 's984867515', 's628688890'] | [32240.0, 32228.0, 32200.0] | [2206.0, 60.0, 158.0] | [133, 143, 190] |
p02707 | u607729897 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nimport numpy as np\n\ndef main():\n N, *A = map(int, read().split())\n ans = [0] * (N + 1)\n print(ans)\n for a in A:\n ans[a] += 1\n ans = list(map(str, ans))\n print('\\n'.join(ans[1:]))\n return\n\nif __name__ == '__main__':\n main()\n\n", "import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nimport numpy as np\n\ndef main():\n N, *A = map(int, read().split())\n ans = [0] * (N + 1)\n for a in A:\n ans[a] += 1\n ans = list(map(str, ans))\n print('\\n'.join(ans[1:]))\n return\n\nif __name__ == '__main__':\n main()\n\n"] | ['Wrong Answer', 'Accepted'] | ['s178304432', 's588650331'] | [51180.0, 51048.0] | [204.0, 186.0] | [371, 356] |
p02707 | u608178601 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['N=int(input())\nA=list(map(int, input().split()))\nA_=list(set(A))\n\ncountzumi=[]\ncount_=[0]*N\n\nfor i in range(len(A_)):\n\tcount_[A[i]-1]=A.count(A_[i])\n\nfor i in range(N):\n\tprint(count_[i])\n', 'N=int(input())\nA=list(map(int, input().split()))\nA_=list(set(A))\ncount_=["0\\n"]*N\n\nfor i in range(len(A_)):\n\tcount_[A_[i]-1]=str(A.count(A_[i]))+"\\n"\n\nprint("".join(count_))\n\n', 'N = int(input())\nK = [0]*N\nA = [int(i) for i in input().split()]\n\nfor i in range(N-1):\n K[A[i]-1] += 1\nfor i in K:\n print(i)\n'] | ['Wrong Answer', 'Time Limit Exceeded', 'Accepted'] | ['s956335742', 's959990107', 's332511343'] | [32236.0, 32160.0, 33780.0] | [2206.0, 2206.0, 157.0] | [187, 175, 131] |
p02707 | u622847899 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\na=list(map(int,input().split()))\n\nanswer=[0]*n\nfor i in range(n):\n answer[a[i]-1]+=1\n\nfor i in range(n):\n print(answer[i])\n\n', 'n=int(input())\na=list(map(int,input().split()))\n\nanswer=[0]*n\nfor i in range(n):\n answer[a[i]-1]+=1\n\nfor i in range(n):\n print(answer[i])', 'n=int(input())\na=list(map(int,input().split()))\n\nanswer=[0]*n\nfor i in range(n-1):\n answer[a[i]-1]+=1\n\nfor i in range(n):\n print(answer[i])'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s602418585', 's612569675', 's766415594'] | [32292.0, 32236.0, 32376.0] | [95.0, 95.0, 162.0] | [145, 143, 145] |
p02707 | u625864724 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\nlst = list(map(int,input().split()))\nlst2 = [0 for i in range(n)]\nfor i in range(n):\n x = lst[i]\n lst2[x - 1] = lst2[x - 1] + 1\nfor i in range(n):\n print(lst2[i])', 'n = int(input())\nlst = list(map(int,input().split()))\nlst2 = [0 for i in range(n)]\nfor i in range(n - 1):\n x = lst[i]\n lst2[x - 1] = lst2[x - 1] + 1\nfor i in range(n):\n print(lst2[i])\n'] | ['Runtime Error', 'Accepted'] | ['s503514820', 's280707018'] | [32108.0, 32220.0] | [113.0, 178.0] | [182, 187] |
p02707 | u625963200 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\nA = list(map(int,input().split()))\n\nans = [0]*n\nfor a in A:\n ans[a-1]+=1\nprint(ans)', 'n = int(input())\nA = list(map(int,input().split()))\n\nans = [0]*n\nfor a in A:\n ans[a-1]+=1\nfor a in ans:\n print(a)'] | ['Wrong Answer', 'Accepted'] | ['s847633314', 's137231395'] | [32368.0, 32204.0] | [101.0, 149.0] | [101, 115] |
p02707 | u626299761 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['i = 1\n\nprint(i)', 'num_sub = int(input())\nsub_boss = input().split()\n\nnum_boss = [0]*(num_sub)\n\nfor i in sub_boss:\n\tnum_boss[int(i)-1] += 1\n\nfor i in num_boss:\n\tprint(i)'] | ['Wrong Answer', 'Accepted'] | ['s326948602', 's093210483'] | [9136.0, 25148.0] | [20.0, 145.0] | [15, 151] |
p02707 | u626881915 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\na = list(map(int, input().split()))\nb = [0]*n\nfor i in range(n-1):\n b[a[i]] += 1\n \nfor e in b:\n print(e)', 'n = int(input())\na = list(map(int, input().split()))\nb = [0]*n\nfor i in range(1, n):\n b[a[i]] += 1\n\nfor e in b:\n print(e)', 'n = int(input())\na = list(map(int, input().split()))\nb = [0]*n\nfor i in range(n-1):\n b[a[i]-1] += 1\n \nfor e in b:\n print(e)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s149791074', 's261712687', 's320883767'] | [32384.0, 32304.0, 32276.0] | [148.0, 92.0, 152.0] | [124, 123, 126] |
p02707 | u627674248 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import collections\n\nn = int(input())\na = list(map(int, input().split()))\n\n\nac = collections.Counter(a)\n\nfor i in range(n):\n print(a[i+1])', 'import collections\n\nn = int(input())\na = list(map(int, input().split()))\n\n\nac = collections.Counter(a)\n\nfor i in range(n):\n print(ac[i+1])'] | ['Runtime Error', 'Accepted'] | ['s277619686', 's343441526'] | [34028.0, 34084.0] | [161.0, 192.0] | [138, 139] |
p02707 | u628597699 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\na=[int(0)]*n\nl=list(map(int,input().split()))\nfor i in range(n-1):\n\ta[l[i]] = a[l[i]] + 1\nfor i in range(n):\n\tprint(a[i])', 'n=int(input())\na=[int(0)]*n\nl=list(map(int,input.().split()))\nfor i in range(n-1):\n\ta[l[i]] = a[l[i]] + 1\nfor i in range(n):\n\tprint(a[i])\n ', 'n=int(input())\na=[int(0)]*n\nl=list(map(int,input().split()))\nfor i in range(n-1):\n\ta[l[i]-1] = a[l[i]-1] + 1\nfor i in range(n):\n\tprint(a[i])\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s667502507', 's944114503', 's286087439'] | [33932.0, 8964.0, 33856.0] | [157.0, 20.0, 167.0] | [136, 142, 141] |
p02707 | u630467326 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import collections \n\nn = int(input())\na = list(map(int, input().split()))\n\nc = collections.Counter(a)\nprint(c)\n\nfor i in range(1, n + 1):\n print(c[i])', 'import collections \n\nn = int(input())\na = list(map(int, input().split()))\n\nc = collections.Counter(a)\n\nfor i in range(1, n + 1):\n print(c[i])'] | ['Wrong Answer', 'Accepted'] | ['s513845580', 's923987505'] | [56956.0, 34012.0] | [241.0, 184.0] | [151, 142] |
p02707 | u631299617 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n=int(input())\na=[int(x) for x in input().split()]\nfor c in range(n-1):\n s=0\n for d in range(c,n-1):\n if a[d]==c+1:\n s+=1\n print(s)', 'n=int(input())\na=[int(x) for x in input().split()]\ns=[0]*n\nfor c in a:\n s[c-1]+=1\nfor c in range(n):\n print(s[c])'] | ['Wrong Answer', 'Accepted'] | ['s378813743', 's314165418'] | [32324.0, 32188.0] | [2206.0, 155.0] | [158, 119] |
p02707 | u631755487 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ["N = int(input())\nliste = list(map(int, input().split()))\n\nfrom collections import Counter\ncountedList = Counter(liste)\n\nfor i in range(N):\n if i in countedList:\n print(countedList[i])\n else:\n print('0')", "N = int(input())\nliste = list(map(int, input().split()))\n \nfrom collections import Counter\ncountedList = Counter(liste)\n# print(\n\nfor i in range(N):\n if i+1 in countedList:\n print(countedList[i+1])\n else:\n print('0')"] | ['Wrong Answer', 'Accepted'] | ['s462955112', 's150311679'] | [33620.0, 33740.0] | [181.0, 194.0] | [210, 224] |
p02707 | u632359546 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['num_all = int(input())\nlist = input().split(" ")\nlist_int = []\nfor i in list:\n list_int.append(int(i)) \nprint(list_int)\n\nfor j in range(num_all):\n a = list_int.count(j)\n print(a)', 'n=int(input())\n\nlist = input().split(" ")\nlist_int = []\nfor i in list:\n list_int.append(int(i)) \nk = [0]*n \nfor i in list_int:\n k[i-1] = k[i-1]+1\nfor j in range(n):\n print(k[j])'] | ['Wrong Answer', 'Accepted'] | ['s860057724', 's519149981'] | [35052.0, 34012.0] | [2207.0, 182.0] | [181, 339] |
p02707 | u646412443 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['n = int(input())\na = list(map(int, input().split()))\nans = [0] * n\nprint(ans)\nfor i in range(n-1):\n ans[a[i] - 1] += 1\n\nfor i in range(n):\n print(ans[i])\n', 'N = int(input())\nA = list(map(int, input().split()))\ncnt = [0]*N\nfor a in A:\n cnt[a-1] += 1\nfor c in cnt:\n print(c)\n'] | ['Wrong Answer', 'Accepted'] | ['s118187216', 's838867884'] | [32372.0, 32240.0] | [162.0, 148.0] | [160, 122] |
p02707 | u650265349 | 2,000 | 1,048,576 | A company has N members, who are assigned ID numbers 1, ..., N. Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number. When a person X is the immediate boss of a person Y, the person Y is said to be an immediate subordinate of the person X. You are given the information that the immediate boss of the member numbered i is the member numbered A_i. For each member, find how many immediate subordinates it has. | ['import numpy as np\nN = int(input())\nA_list = list(map(int, input().split()))\nindex = np.arange(1, N+1)\nans = ["{}\\n".format(i) for A_list.count(i) in range(1, N+1)]\nprint(ans)', 'N = int(input())\nA_list = list(map(int, input().split()))\nans = ["{}\\n".format(A_list.count(i)) for i in range(1, N+1)]\nprint(ans)', 'import numpy as np\nN = int(input())\nA_list = list(map(int, input().split()))\nindex = np.arange(1, N+1)\nans = ["{}\\n".format(A_list.count(i)) for i in range(1, N+1)]\nprint(ans)', 'import collections\nN = int(input())\nA_list = list(map(int, input().split()))\nans = collections.Counter(A_list)\nfor i in range(N):\n\tprint(ans[i])', 'import collections\nN = int(input())\nA_list = list(map(int, input().split()))\nans = collections.Counter(A_list)\nfor i in range(1, N+1):\n\tprint(ans[i])'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s327832510', 's508705148', 's584541200', 's939458061', 's400938073'] | [9112.0, 32304.0, 50980.0, 33940.0, 33976.0] | [23.0, 2206.0, 2207.0, 179.0, 176.0] | [175, 130, 175, 144, 149] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.