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 | u651058930 | 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()))\nA_set = sorted(set(A_list))\n\nA_output = [0 for i in range(N)]\n\nfor i in range(len(A_set)):\n A_output[A_set[i]-1] = A_list[A_set[i]:].count(A_set[i])\n \nfor i in range(len(A_output)):\n print(A_output[i])', 'N = int(input())\nA_list = list(map(int, input().split()))\nA_set = sorted(set(A_list), reverse=True)\nA_output = []\nfor i in range(len(A_set)):\n A_output[i] =len(A_list) - len(A_list.remove(A_set[i]))\n \nprint(A_output.reverse)', 'N = int(input())\nA_list = list(map(int, input().split()))\nbosses = [0] * N\n\nfor i in A_list:\n bosses[i-1] += 1\nfor boss in bosses:\n print(boss)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s445141327', 's595297030', 's573725875'] | [32248.0, 32232.0, 32352.0] | [2206.0, 85.0, 144.0] | [268, 230, 149] |
p02707 | u652081898 | 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 = dict()\nfor i in range(n):\n b[i+1] = 0\n\nfor i in range(n):\n b[a[i]+1] += 1\n\nfor i in range(n):\n print(b[i+1])', 'n = int(input())\na = list(map(int, input().split()))\nb = dict()\nfor i in range(n):\n b[i+1] = 0\n\nfor i in range(n):\n b[a[i]] += 1\n\nfor i in range(n):\n print(b[i+1])', 'n = int(input())\na = list(map(int, input().split()))\nb = dict()\nfor i in range(n):\n b[i+1] = 0\n\nfor i in range(n-1):\n b[a[i]] += 1\n\nfor i in range(n):\n print(b[i+1])\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s091329783', 's945052839', 's278007791'] | [38848.0, 38784.0, 38920.0] | [158.0, 142.0, 222.0] | [174, 172, 175] |
p02707 | u655048024 | 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(N):\n ans.append.(0)\nfor i in range(N-1):\n ans[A[i]] += 1\nprint(ans)', 'N = int(input())\nA = list(map(int,input().split()))\nans = []\nfor i in range(N):\n ans.append(0)\nfor i in range(N-1):\n ans[A[i]-1] += 1\nprint(ans)', 'N = int(input())\nA = list(map(int,input().split()))\nans = []\nfor i in range(N):\n ans.append(0)\nfor i in range(N-1):\n ans[A[i]-1] += 1\nfor i in range(N):\n print(ans[i])'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s772604215', 's940655336', 's189653448'] | [9020.0, 32304.0, 32236.0] | [22.0, 115.0, 174.0] | [145, 146, 170] |
p02707 | u658447090 | 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()))\nanslst = [0]*(N-1)\n\nfor i in a:\n anslst[i-1] += 1\n\nfor ans in anslst:\n print(ans)', 'N = int(input())\n\na = list(map(int, input().split()))\nanslst = [0]*(N-1)\n\nfor i in a:\n anslst[i-1] += 1\n\nfor ans in anslst:\n print(ans)\n\nprint(0)'] | ['Wrong Answer', 'Accepted'] | ['s665400163', 's751981487'] | [32200.0, 32240.0] | [149.0, 153.0] | [137, 147] |
p02707 | u661439250 | 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 = [int(x) for x in input().split()]\nfor i in range(1,n+1):\n a.append(i)\na_counter = Counter(a)\nprint(a_counter)\nfor i in a_counter:\n print(a_counter[i]-1)', 'from collections import Counter\nn = int(input())\na = [int(x) for x in input().split()]\na_ = [int(x) for x in range(1, n+1)]\na += a_\na_count = Counter(a)\nfor i in range(n):\n print(a_count[i+1])', 'from collections import Counter\nn = int(input())\na = [int(x) for x in input().split()]\na_count = Counter(a)\nfor i in range(n):\n print(a_count[i+1])\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s393163340', 's729435574', 's659589474'] | [65108.0, 45192.0, 35476.0] | [328.0, 243.0, 193.0] | [211, 195, 151] |
p02707 | u662396511 | 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(" ")))\nprint(A_list)\nfor i in range(1, n+1):\n print(A_list.count(i))', 'import collections\nn = int(input())\nA_list = list(map(int, input().split()))\nA_cont = collections.Counter(A_list)\nfor i in range(1, n+1):\n print(A_cont[i])'] | ['Wrong Answer', 'Accepted'] | ['s809827308', 's628863581'] | [32364.0, 34168.0] | [2206.0, 178.0] | [125, 158] |
p02707 | u665078057 | 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 collection import counter\n\nn = int(input())\na = list(map(int, input().split()))\n\nc = counter(a)\n\nfor _ in c:\n print(_)', 'from collections import Counter\n \nn = int(input())\na = list(map(int, input().split()))\n \nc = Counter(a)\n \nfor _ in range(1, n):\n print(c[_])', 'from collections import Counter\n \nn = int(input())\na = list(map(int, input().split()))\n \nc = Counter(a)\n \nfor _ in range(1, n+1):\n print(c[_])'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s104125720', 's399172285', 's049649989'] | [9104.0, 34048.0, 33868.0] | [23.0, 181.0, 175.0] | [124, 141, 143] |
p02707 | u668503853 | 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]]+=1\nfor j in B[1:]:\n print(j)', 'N=int(input())\nA=list(map(int,input().split()))\nB=[0]*N\nfor i in range(N-1):\n B[A[i]-1]+=1\nfor j in B:\n print(j)\n'] | ['Wrong Answer', 'Accepted'] | ['s116914854', 's924135540'] | [32288.0, 32236.0] | [154.0, 157.0] | [118, 115] |
p02707 | u673173160 | 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())\nli = list(map(int, input().split()))\n\nma = max(li)\ncnts = []\nfor i in range(0, ma):\n cnt = li.count(i+1)\n cnt = str(cnt)\n cnts.append(cnt)\n\nans = '\\n'.join(cnts)\n\nif ma < n:\n ans += '\\n' + '0\\n'*(n-ma)\n print(ans)\n\nelse:\n print(ans)", "n = int(input())\nli = list(map(int, input().split()))\n\nma = max(li)\ncnts = []\nfor i in range(0, ma):\n cnt = li.count(i+1)\n cnts.append(cnt)\n\nfor i in cnts:\n print(i)\n\nif ma < n:\n ans = '0\\n'*(n-ma)\n print(ans)", 'n = int(input())\nlist = list(map(int, input().split()))\ndata = [0] * n\n\nfor i in list:\n i -= 1\n data[i] += 1\n\nfor j in data:\n print(j)'] | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted'] | ['s546116917', 's623503347', 's108178304'] | [32256.0, 32304.0, 32376.0] | [2206.0, 2206.0, 150.0] | [267, 224, 143] |
p02707 | u678505520 | 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(0)\ni = 0\nwhile i<N:\n count = 0\n if A[i]==i+1:\n count+=1\n \n print(count)\n i+=1', 'N = int(input())\nA = list(map(int,input().split()))\nfor i in range(1,N+1):\n print(A.count(i+1))', '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', 'Wrong Answer', 'Accepted'] | ['s328938480', 's462047097', 's226361404'] | [32232.0, 32376.0, 33864.0] | [160.0, 2206.0, 178.0] | [160, 98, 144] |
p02707 | u679236042 | 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\n\nans =[0] * N\n\n\nfor i in range(N-1):\n ans[A[i]-1]=ans[A[i]-1]+1\n \nprint(ans)', 'N = int(input())\nA = list(map(int,input().split()))\n\n\nans =[0] * N\n\n\nfor i in range(N-1):\n ans[A[i]-1]=ans[A[i]-1]+1\n\n\nfor i in range(N):\n print(ans[i])'] | ['Wrong Answer', 'Accepted'] | ['s983978112', 's595818650'] | [32188.0, 32232.0] | [126.0, 176.0] | [135, 158] |
p02707 | u680872090 | 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 =[int(a) for a in input().split()]\ndef f():\n d = collections.defaultdict(int)\n for i, e in enumerate(A):\n d[e] += 1\n for key in range(1, N+1):\n print(d[key])\n', 'import collections\nN = int(input())\nA =[int(a) for a in input().split()]\ndef f():\n d = collections.defaultdict(int)\n for i, e in enumerate(A):\n d[e] += 1\n for key in range(1, N+1):\n print(d[key])\nf()'] | ['Wrong Answer', 'Accepted'] | ['s129871009', 's974978145'] | [33544.0, 37280.0] | [71.0, 211.0] | [219, 222] |
p02707 | u681323954 | 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 = a.sort()\nfor i in range(1,n+1):\n print(a.count(i))', 'n = int(input())\na = list(map(int,input().split()))\ncnt = [0] * n\nfor i in a:\n cnt[i-1] += 1\nfor j in cnt:\n print(j)'] | ['Runtime Error', 'Accepted'] | ['s227580899', 's373472722'] | [32364.0, 32192.0] | [93.0, 147.0] | [109, 122] |
p02707 | u681773563 | 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 = int(input())\nboss = input().split()\n\nans_list = [0] * num\n\nfor i_boss in boss:\n ans_list[int(i_boss)-1] += 1\n a = list(map(lambda x: str(x), ans_list))\n print('\\n'.join(a))\n\n", "num = int(input())\nboss = input().split()\nans_list = [0] * num\nfor i_boss in boss:\n ans_list[int(i_boss)-1] += 1\nprint('\\n'.join(list(map(str, ans_list))))"] | ['Wrong Answer', 'Accepted'] | ['s413913940', 's285887925'] | [71620.0, 40228.0] | [2243.0, 118.0] | [184, 158] |
p02707 | u685975555 | 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\ndp = [0] * n\n\nfor i in a:\n b[i-1] += 1\n \nfor _ in b:\n print(_)\n ', 'n = int(input())\na = [int(n) for n in input().split()]\n \nb = [0] * n\n \nfor i in a:\n b[i-1] += 1\n \nfor i in b:\n print(i)'] | ['Runtime Error', 'Accepted'] | ['s219535341', 's666772753'] | [32284.0, 32304.0] | [65.0, 145.0] | [123, 125] |
p02707 | u688219499 | 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,K=map(int,input().split())\nsum1=0\nfor k in range(K,N+2,1):\n sum1+=(N-k+1)*k+1\nprint(sum1%(10**9+7))', 'N=int(input())\nA=list(map(int,input().split()))\n\nbuka=[0]*N\nfor i in A:\n buka[i-1]=buka[i-1]+1\nfor i in range(N):\n print(buka[i])'] | ['Runtime Error', 'Accepted'] | ['s760820948', 's067080173'] | [9168.0, 32224.0] | [19.0, 158.0] | [104, 135] |
p02707 | u689701565 | 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. | ["\ndef get_subordinates(my_number):\n counter = 0\n for i, employee in enumerate(params1):\n if employee == my_number:\n counter += 1\n return counter\n\nparam_n = 5\nparams1 = list(map(lambda x: int(x), input().split(' ')))\n\nfor i in range(param_n):\n print(get_subordinates(i + 1))", "param_n = int(input())\nparams1 = list(map(lambda x: int(x), input().split(' ')))\n\nresult = [0 for i in range(param_n)]\n\nfor employee in params1:\n result[employee - 1] += 1\n\nfor num in result:\n print(num)"] | ['Wrong Answer', 'Accepted'] | ['s961769663', 's560602379'] | [9124.0, 32232.0] | [21.0, 155.0] | [328, 209] |
p02707 | u690833702 | 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 = list(map(int, input().split()))\n \n num = [0] * n\n \n for i in range(0, n-1):\n for k in range(0, len(A)):\n if A[k] == i+1:\n num[i] += 1\n \n print(num)\n \nmain()', 'def main():\n n = int(input())\n A = list(map(int, input().split()))\n \n num = [0] * n\n \n \n # for k in range(0, len(A)):\n # if A[k] == i+1:\n # num[i] += 1\n \n for i in range(0, n-1):\n num[A[i]] += 1\n \n for k in range(1, n+1): \n print(num[k])\n \nmain()', 'def main():\n n = int(input())\n A = list(map(int, input().split()))\n \n num = [0] * n + [0]\n \n \n # for k in range(0, len(A)):\n # if A[k] == i+1:\n # num[i] += 1\n \n for i in range(0, n-1):\n num[A[i]] += 1\n \n for k in range(1, n+1): \n print(num[k])\n \nmain()'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s517439155', 's965130362', 's424313489'] | [32396.0, 32368.0, 32312.0] | [2206.0, 138.0, 138.0] | [219, 306, 312] |
p02707 | u692498898 | 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()))\nbuka=[0]*n\nfor i in a:\n buka[i]=buka[i]+1\nfor i in buka:\n print(i)', 'n=int(input())\na=list(map(int,input().split()))\nbuka=[0]*n\nfor i in a:\n s[i]=s[i]+1\nfor i in buka:\n print(i)', 'n=int(input())\na=list(map(int,input().split()))\nbuka=[0]*n\nfor i in a:\n buka[i-1]=buka[i-1]+1\nfor i in buka:\n print(i)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s723412442', 's991937959', 's365584486'] | [32376.0, 32240.0, 32244.0] | [136.0, 60.0, 153.0] | [116, 110, 120] |
p02707 | u699944218 | 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 = [None for _ in range(N)]\nfor i in range(1,N+1):\n B[i] = A.count(i)\nfor j in range(N):\n print(B[j])', 'import numpy as np\nN = int(input())\nA = np.array(list(map(int, input().split())))\ncounter = np.bincount(A)\nprint(counter)\nfor i in range(1, N+1):\n if i < len(counter):\n print(counter[i])\n else:\n print(0)', 'import numpy as np\nN = int(input())\nA = np.array(list(map(int, input().split())))\ncounter = np.bincount(A)\nfor i in range(1, N+1):\n if i < len(counter):\n print(counter[i])\n else:\n print(0)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s315894470', 's414952008', 's396220039'] | [32168.0, 50984.0, 50764.0] | [2206.0, 332.0, 368.0] | [156, 223, 208] |
p02707 | u702018889 | 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 as c\nn=int(input())\na=list(map(int,input().split()))\nb=c.Counter(a)\nfor i in range(1,N+1):\n print(b[i])', 'import collections as c\nn=int(input())\na=list(map(int,input().split()))\nb=c.Counter(a)\nfor i in range(1,n+1):\n print(b[i])'] | ['Runtime Error', 'Accepted'] | ['s373103003', 's719172938'] | [33860.0, 33864.0] | [87.0, 173.0] | [125, 125] |
p02707 | u719181921 | 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]+list(map(int, input().split()))\nprint(a)\nans = [0] * n\nfor i in range(n):\n if 0 < a[i]:\n ans[a[i]-1] += 1\nprint(ans)', 'n = int(input())\na = [0]+list(map(int, input().split()))\n#print(a)\nans = [0] * n\nfor i in range(n):\n if 0 < a[i]:\n ans[a[i]-1] += 1\nfor i in ans:\n print(i)\n'] | ['Wrong Answer', 'Accepted'] | ['s822781684', 's345606495'] | [32188.0, 32372.0] | [137.0, 160.0] | [151, 169] |
p02707 | u726984689 | 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(1,N):\n count = 0\n for i in range(1,N):\n if A[i-1] == i:\n count += 1\n print(count)\nprint(0)', 'N = int(input())\nA = list(map(int,input().split()))\nl = [0]*N\nfor i in range(1,N):\n l[A[i-1]-1] += 1\nfor i in range(N):\n print(l[i])\n '] | ['Wrong Answer', 'Accepted'] | ['s321505568', 's613785617'] | [32288.0, 32340.0] | [2206.0, 167.0] | [168, 137] |
p02707 | u740267532 | 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\nfor i in A:\n l[i-1] +=1\nprint(x for x in l)', 'N = int(input())\nA = list(map(int,input().split()))\nl = [0]*N\nfor i in A:\n l[i-1] +=1\nfor x in l:\n print(x)'] | ['Wrong Answer', 'Accepted'] | ['s738622263', 's032506151'] | [32144.0, 32384.0] | [84.0, 150.0] | [108, 113] |
p02707 | u743682467 | 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())\nboss = [0] + list(map(int, input().split()))\nprint(boss)\nfor i in range(n):\n print(boss.count(i+1))', 'n = int(input())\ndicti = {}\nboss = list(map(int, input().split()))\nfor i in boss:\n if i in dicti:\n dicti[i] += 1\n else:\n dicti[i] = 1\n#print(dicti)\nfor j in range(1,n+1):\n try:\n print(dicti[j])\n except:\n print(0)'] | ['Wrong Answer', 'Accepted'] | ['s562195159', 's147233572'] | [32232.0, 33664.0] | [2206.0, 208.0] | [119, 252] |
p02707 | u763818368 | 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 deafualtdict\nn=int(input())\nar=list(map(int,input().split()))\nd=defaultdict(int)\nfor i in ar:\n d[i]+=1\nfor i in range (1,n+1):\n if i in d.keys():\n print(d[i])\n else:\n print(0)\n', 'from collections import defaultdict\nn=int(input())\nar=list(map(int,input().split()))\nd=defaultdict(int)\nfor i in ar:\n d[i]+=1\nfor i in range (1,n+1):\n if i in d.keys():\n print(d[i])\n else:\n print(0)\n'] | ['Runtime Error', 'Accepted'] | ['s169972781', 's347300776'] | [9408.0, 33864.0] | [23.0, 191.0] | [209, 208] |
p02707 | u765721093 | 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())) \ns=[]\nfor i in range(N):\n s.append(A.count(i+1))\n if A.count(i+1)>0:\n A.remove(i+1)\n if len(A)==0:\n for _ in range(i,N-1):\n print(0)\n break', 'import collections\nn = int(input())\nbase = map(int,input().split())\nc = collections.Counter(base)\nfor i in range(1,n):\n print(c[i])\nprint(0)'] | ['Wrong Answer', 'Accepted'] | ['s432183039', 's528798872'] | [32380.0, 45544.0] | [2206.0, 183.0] | [231, 143] |
p02707 | u769411997 | 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 for i in range(n)]\nprint(ans)\n\nfor i in range(n-1):\n ans[A[i]-1] += 1\n\nprint(ans)', 'n = int(input())\nA = list(map(int, input().split()))\nans = [0 for i in range(n)]\nfor i in range(n-1):\n ans[A[i]-1] += 1\n\nprint(ans)\n', 'n = int(input())\nA = list(map(int, input().split()))\nans = [0 for i in range(n)]\nfor i in range(n-1):\n ans[A[i]-1] += 1\n\nfor i in range(len(ans)):\n print(ans[i])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s518287022', 's938340661', 's790739085'] | [32252.0, 32264.0, 32284.0] | [121.0, 113.0, 165.0] | [146, 135, 167] |
p02707 | u771739784 | 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 woker = list(map(int, input().split()))\n woker_count = collections.Counter(woker)\n for i in range(n):\n print(woker_count[i + 1])\n\n\nresolve()', 'import collections\n\n\ndef resolve():\n n = int(input())\n woker = list(map(int, input().split()))\n woker_count = collections.Counter(woker)\n for i in range(n):\n print(woker_count[i + 1])\n\n\nresolve()'] | ['Runtime Error', 'Accepted'] | ['s598476872', 's886607896'] | [32284.0, 34060.0] | [66.0, 180.0] | [193, 214] |
p02707 | u773440446 | 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 = list(map(int,input().split()))\n\nfor i in range(N+1):\n print(M.count(i))', 'N = int(input())\nM = list(map(int,input().split()))\n\na = N/2\n\nif a%2 == 1:\n a += 0.5\n a = int(a)\n\nfor i in range(1,a):\n print(M.count(i))\n \nfor i in range(a,N+1):\n print(M.count(i))', 'N = int(input())\na = list(map(int,input().split()))\nb = [0]*N\n\nfor i in range(N-1):\n b[a[i]-1]+=1\n #print(a[i]-1)\n\nfor i in range(N):\n print(b[i])'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s044731403', 's384963488', 's349528021'] | [32164.0, 32316.0, 32356.0] | [2206.0, 2206.0, 165.0] | [93, 192, 149] |
p02707 | u774838740 | 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(1,N+1):\n count = 0\n B =[]\n for j in range(len(A)):\n if A[j]==i:\n count =+ 1\n else:\n B.append(A[j])\n print(count)\n A = B', 'N = int(input())\nA = list(map(int,input().split()))\nfor i in range(1,N+1):\n count = 0\n B =[]\n for j in range(len(A)):\n if A[j]==i:\n count += 1\n else:\n B.append(A[j])\n print(count)\n print(B)\n A = B', "N = int(input())\nA = list(map(int,input().split()))\nB = [0]*N\nfor i in range (len(A)):\n B[A[i]-1] +=1\nprint('\\n'.join(map(str, B)))"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s078493755', 's398991469', 's508683280'] | [32328.0, 85632.0, 32984.0] | [2206.0, 2865.0, 126.0] | [237, 250, 134] |
p02707 | u777499281 | 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()\nA = [int(n) for n in A]\nfor i in range(N):\n count = 0\n for j in range(len(A)):\n\tif i+1 == A[j]:\n\t count += 1\n A.pop(i+1)\n print(count)', 'N = int(input())\nA = input().split()\nA = [int(n) for n in A]\nfor i in range(N):\n count = 0\n for j in range(N-1):\n\tif i+1 == A[j]:\n\t count += 1\n print(count)\n', 'N = int(input())\nA =[int(i) for i in input().split()]\nb = [0]*N\nfor i in A:\n result[i-1]+=1\nfor i in range(N):\n print(b[i])\n', 'N = int(input())\nA = input().split()\nfor i in range(N):\n count=0\n for j in range(N-1):\n\tif i+1==int(A[j]):\n\t count+=1\n print(count)', 'A = input().split()\nA = [int(n) for n in A]\nfor i in range(N):\n count = 0\n for j in range(N-1):\n\tif i+1 == A[j]:\n\t count += 1\n print(count)', 'N = int(input())\nA = input().split()\nfor i in range(N):\n count = 0\n for j in range(N-1):\n if i+1 == int(A[j]):\n count += 1\n print(count)\n', 'N = int(input())\nA = input().split()\nfor i in range(N):\n count = 0\n for j in range(N-1):\n\tif i+1 == int(A[j]):\n\t count += 1\n print(count)\n', 'N = int(input())\nA =[int(n) for n in input().split()]\nb = [0]*N\nfor i in A:\n b[i-1]+=1\nfor i in range(N):\n print(b[i])\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s166817152', 's170790371', 's208535579', 's439815879', 's529062033', 's543574461', 's840640795', 's085757314'] | [9012.0, 8952.0, 32288.0, 8900.0, 9012.0, 27712.0, 9012.0, 32332.0] | [20.0, 23.0, 70.0, 20.0, 24.0, 2218.0, 22.0, 165.0] | [176, 161, 128, 135, 143, 150, 142, 121] |
p02707 | u779293207 | 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 = map(int,input().split())\nc=[]\nfor i in range N:\n c[i]=0\nfor j in A:\n c[j-1]+=1\n\nfor C in c:\n print(C)\n ', 'N = int(input())\nA = map(int,input().split())\nc=[]\nfor i in range (N):\n c.append(0)\nfor j in A:\n c[j-1]+=1\n\nfor C in c:\n print(C)'] | ['Runtime Error', 'Accepted'] | ['s044425624', 's821572898'] | [9024.0, 26004.0] | [20.0, 155.0] | [128, 132] |
p02707 | u782009499 | 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()]\nans = [0] * (n+1)\nfor i in a:\n ans[i] += 1\n[print(i) for i in ans]', 'n = int(input())\na = [int(i) for i in input().split()]\nans = [0] * (n)\nfor i in a:\n ans[i-1] += 1\n[print(i) for i in ans]'] | ['Wrong Answer', 'Accepted'] | ['s131467122', 's374719818'] | [32296.0, 32156.0] | [142.0, 146.0] | [124, 124] |
p02707 | u791110052 | 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())\nmentors = input().split(" ")\n\na = collections.Counter(mentors)\nprint(a.keys())\n\nfor i in range(1, n+1):\n if str(i) in a.keys():\n print(a[str(i)])\n else:\n print(0)', 'import collections\n\nn = int(input())\nmentors = input().split(" ")\n\na = collections.Counter(mentors)\n\nfor i in range(1, n+1):\n if str(i) in a.keys():\n print(a[str(i)])\n else:\n print(0)'] | ['Wrong Answer', 'Accepted'] | ['s760703759', 's201423307'] | [40432.0, 39688.0] | [315.0, 260.0] | [219, 203] |
p02707 | u802234211 | 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())\nemp = list(map(int,input().split()))\nemp.sort()\ndef rem_val(arr, value):\n while value in arr:\n try:\n arr.remove(value)\n except:\n break\nfor i in range(N):\n if(len(emp)!=0):\n print(emp.count(i+1))\n rem_val(emp,i+1)\n print(0)\n', 'N = int(input())\nemp = list(map(int,input().split()))\nlist.sort()\nfor i in range(N):\n print(emp.index(i+2)-emp.index(i+1))\n', 'N = int(input())\nemp = list(map(int,input().split()))\nfor i in range(N):\n print(emp.count(i+1))\n emp.remove(i+1)\n', 'N = int(input())\nemp = list(map(int,input().split()))\nans_l = [0]*(N+1)\nfor i in range(N-1):\n a = emp[i]\n ans_l[a] +=1\nfor i in range(1,N+1):\n print(ans_l[i])'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s394747792', 's565932791', 's654787721', 's153217109'] | [32308.0, 32280.0, 32244.0, 32252.0] | [2206.0, 66.0, 2206.0, 152.0] | [299, 126, 119, 167] |
p02707 | u802963389 | 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\nn = int(input())\nA = list(map(int, input().split()))\n\nc = Counter(A) \n\nfor i in range(1, n):\n if i in c.keys():\n print(c[i])\n else:\n print(0)', 'from collections import Counter\n\nn = int(input())\nA = list(map(int, input().split()))\n\nc = Counter(A)\n\nfor i in range(1, n + 1):\n if i in c.keys():\n print(c[i])\n else:\n print(0)'] | ['Wrong Answer', 'Accepted'] | ['s166786135', 's997071137'] | [34172.0, 34040.0] | [187.0, 174.0] | [182, 185] |
p02707 | u805852597 | 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()))\nanss = [0] * n\nfor _ in a:\n anss[a-1] += 1\nfor ans in anss:\n print(ans)', 'n = int(input())\na = list(map(int, input().split()))\nanss = [0] * n\nfor _ in a:\n anss[_-1] += 1\nfor ans in anss:\n print(ans)'] | ['Runtime Error', 'Accepted'] | ['s617969720', 's542823673'] | [32288.0, 32224.0] | [67.0, 149.0] | [130, 130] |
p02707 | u810066979 | 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()))\nmem=[0]*10\n\nfor i in a:\n\tmem[i-1]+=1\n\nfor i in mem:\n\tprint(i)', 'n=int(input())\na=list(map(int,input().split()))\nmem=[0]*n\n\nfor i in a:\n\tmem[i-1]+=1\n\nfor i in mem:\n\tprint(i)'] | ['Runtime Error', 'Accepted'] | ['s377223140', 's748814857'] | [32228.0, 32356.0] | [69.0, 151.0] | [109, 108] |
p02707 | u813125722 | 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 = input().split()\nA.insert(0,0)\nx = [0]*N\nfor j in range(N):\n print(c[str(j+1)])\n', 'N = int(input())\nA = input().split()\nA.insert(0,0)\nx = [0]*N\nfor i in range(N):\n x[A[i]-1]+=1\nfor j in range(N):\n print(x[j])\n', 'N = int(input())\nA = input().split()\nx = [0]*N\nfor i in range(N-1):\n x[int(A[i])-1]+=1\nfor j in range(N):\n print(x[j])\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s372378433', 's628180991', 's411677714'] | [27028.0, 24488.0, 25156.0] | [44.0, 40.0, 167.0] | [122, 132, 125] |
p02707 | u813993459 | 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\na = int(input())\nnum = np.array(list(map(int,input().split())))\nfor i in range(1,a+1):\n print(len(num[num==i])', 'import collections\na = int(input())\nnum = list(map(int,input().split()))\nc = collections.Counter(num)\nlist(map(lambda x: print(c[x]), range(1,a+1)))'] | ['Runtime Error', 'Accepted'] | ['s985880052', 's315272188'] | [8972.0, 33868.0] | [22.0, 181.0] | [132, 148] |
p02707 | u817692975 | 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 = input().split()\nclist = collections.Counter(A)\nfor i in range(1,N):\n j = str(i)\n print(clist['i'])", 'import collections\nN = int(input())\nA = list(map(int, input().split()))\nclist = collections.Counter(A)\nprint(clist)\nfor i in range(1,N + 1):\n print(clist[i])\n', "import collections\nN = int(input())\nA = input().split()\nclist = collections.Counter(A)\nfor i in range(1,N):\n print(clist['i'])", 'N = int(input())\nA = list(map(int, input().split()))\nclist = []\nfor i in range(1,N):\n clist = clist + [A.count(i)]\nfor j in clist:\n print(j)', 'import collections\nN = int(input())\nA = list(map(int, input().split()))\nclist = collections.Counter(A)\nfor i in range(1,N + 1):\n print(clist[i])\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s171134777', 's332145375', 's605047738', 's697771175', 's551782996'] | [39828.0, 57004.0, 39808.0, 32240.0, 34052.0] | [202.0, 249.0, 169.0, 2206.0, 197.0] | [140, 159, 127, 142, 146] |
p02707 | u818349438 | 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()))\nki = [[] for i in range(n)]\nfor i in range(n-1):\n ki[a[i]-1].append(i+1)\n ki[i+1].append(a[i]-1)\nfor i in range(n):\n if i == 0:\n print(len(ki[i]))\n continue\n print(len(ki[i])-1)\nprint(ki)', 'n = int(input())\na = list(map(int,input().split()))\nki = [[] for i in range(n)]\nfor i in range(n-1):\n ki[a[i]-1].append(i+1)\n ki[i+1].append(a[i]-1)\nfor i in range(n):\n if i == 0:\n print(len(ki[i]))\n continue\n print(len(ki[i])-1)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s124430597', 's568837855'] | [58528.0, 50668.0] | [457.0, 365.0] | [265, 257] |
p02707 | u824295380 | 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-1)\nfor i in range(1,N-1):\n B[i-1]=A.count(i)\nfor i in range(N-1):\n print(B[i])', 'import collections\nN =int(input())\nA = list(map(int, input().split()))\n\nk=0\nt=1\na=collections.Counter(A)\nfor i in range(1,N+1):\n print(a[i])\n'] | ['Wrong Answer', 'Accepted'] | ['s869194266', 's055281734'] | [32364.0, 34176.0] | [2206.0, 189.0] | [145, 144] |
p02707 | u826785572 | 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 print(a.count(i))\n', 'n = int(input())\na = list(map(int, input().split()))\n\nfor i in range(1, n):\n print(a.count(i))\n', 'n = int(input())\nlst = list(map(int, input().split()))\n\nans = [0] * n\n\nfor i in lst:\n ans[i-1] += 1\n\nfor j in range(n):\n print(ans[j])\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s300378571', 's878772376', 's090137610'] | [32352.0, 32296.0, 32376.0] | [2206.0, 2206.0, 152.0] | [98, 98, 141] |
p02707 | u828551622 | 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. | ["people = int(input()) - 1\nboss = input().split(' ')\nboss = list(map(int,boss))\ndict_boss = {}\nfor i in range(people):\n\tif boss[i]-1 not in dict_boss:\n\t\tdict_boss[boss[i]-1] = 1\n\telse:\n\t\tdict_boss[boss[i]-1] += 1\nboss = [0] * people\nfor key in dict_boss:\n\tboss[key] = dict_boss[key]\nfor i in boss:\n\tprint(i)", "people = int(input()) - 1\nboss = input().split(' ')\nboss = list(map(int,boss))\ndict_boss = {}\nfor i in range(people):\n\tif boss[i]-1 not in dict_boss:\n\t\tdict_boss[boss[i]-1] = 1\n\telse:\n\t\tdict_boss[boss[i]-1] += 1\nboss = [0] * (people + 1)\nfor key in dict_boss:\n\tboss[key] = dict_boss[key]\nfor i in boss:\n\tprint(i)"] | ['Wrong Answer', 'Accepted'] | ['s762043629', 's935629217'] | [38792.0, 38768.0] | [204.0, 206.0] | [306, 312] |
p02707 | u831752983 | 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())\nbuka = [0]*n\nfor i in range(n):\n buka[int(input())-1] += 1\nprint(*buka,sep='/n')", "n=int(input())\nbuka = [0]*n\nfor joushi in input().split():\n buka[int(joushi)-1] += 1\nprint(*buka,sep='\\n')"] | ['Runtime Error', 'Accepted'] | ['s013695170', 's846481739'] | [13080.0, 25904.0] | [30.0, 128.0] | [96, 107] |
p02707 | u834224054 | 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. | ["EN = input().split()\nBc = [0] * int(EN[0])\n\ntmp = input().split()\nBossN = [int(s) for s in tmp]\n\nfor i in tmp:\n\n Bc[i-1] = Bc[i-1] + 1\n\nprint(*Bc,sep='\\n')", "EN = input().split()\nBc = [0] * int(EN[0])\n\ntmp = input().split()\nBossN = [int(s) for s in tmp]\n\nfor i in BossN:\n\n Bc[i-1] = Bc[i-1] + 1\n\nprint(*Bc,sep='\\n')"] | ['Runtime Error', 'Accepted'] | ['s108659829', 's131415237'] | [33760.0, 37008.0] | [73.0, 149.0] | [158, 160] |
p02707 | u842797390 | 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 = [int(x) for x in input().split()]\nB = {}\n\nfor a in A:\n if a not in B:\n B[a] = 0\n B[a] += 1\n\nfor i in range(n):\n if i in B:\n print(B[i])\n else:\n print(0)\n', 'n = int(input())\n\nA = [int(x) for x in input().split()]\nB = {}\n\nfor a in A:\n if a not in B:\n B[a] = 0\n B[a] += 1\n\nfor i in range(1, n + 1):\n if i in B:\n print(B[i])\n else:\n print(0)\n'] | ['Wrong Answer', 'Accepted'] | ['s690614597', 's796347756'] | [33428.0, 33492.0] | [207.0, 196.0] | [208, 215] |
p02707 | u845573105 | 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()))\nres = rep(0,N)\nfor i in range(N-1):\n res[A[i]-1] += 1\nfor i in res:\n print(i)', 'N = int(input())\nA = list(map(int,input().split()))\nres = [0 for i in range(N)]\nfor i in range(N-1):\n res[A[i]-1] += 1\nfor i in res:\n print(i)'] | ['Runtime Error', 'Accepted'] | ['s535370772', 's981905996'] | [32248.0, 32244.0] | [66.0, 155.0] | [131, 144] |
p02707 | u845650912 | 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\nB = [0] * N\n\nfor i in range(N-1):\n B[A[i]-1] += A[i]\n \n[print(B[i]) for i in range(N)]', 'N = int(input())\nA = list(map(int, input().split())) \n\nB = [0] * N\n\nfor i in range(N-1):\n B[A[i]-1] += int(A[i]/A[i])\n \n[print(B[i]) for i in range(N)]'] | ['Wrong Answer', 'Accepted'] | ['s487388166', 's681220910'] | [32380.0, 32376.0] | [200.0, 183.0] | [147, 157] |
p02707 | u847758719 | 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.sort()\n\nbefore = 0\ntmp = 0\nfor i in range(N-1):\n if A[i] == before:\n tmp += 1\n else:\n print(tmp)\n before += 1\n tmp = 1\n\nprint(tmp)\n\nfor i in range(N-before):\n print(0)', 'N = int(input())\nA = list(map(int, input().split()))\n\nA.sort()\n\nANS = [0]*N\nfor i in range(N-1):\n ANS[A[i]-1] += 1\n\nfor i in range(N):\n print(ANS[i])'] | ['Wrong Answer', 'Accepted'] | ['s748815599', 's574825834'] | [32228.0, 32304.0] | [210.0, 181.0] | [260, 155] |
p02707 | u849229491 | 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()))\nc = collections.Counter(A)\nfor i in range(N+1):\n print(c[i])', 'N = int(input())\nlist = [int(N) for N in input().split()]\nfor i in range(1,N):\n print(list.count(i+1))', 'import collections\nN = int(input())\nA = list(map(int,input().split()))\nc = collections.Counter(A)\nfor i in range(N):\n print(c[i+1])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s264112894', 's748287572', 's878206479'] | [33924.0, 32192.0, 34056.0] | [179.0, 2206.0, 190.0] | [134, 105, 134] |
p02707 | u851125702 | 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()))\nlast=A[N-2]\nfor i in range(1,last+1):\n print(A.count(i))\nfor i in range(last+1,N+1)\n print(0)', 'N=int(input())\nA=list(map(int,input().split()))\nlast=A[N-2]\nfor i in range(1,last+1):\n print(A.count(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])'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s400972353', 's691818854', 's689894924'] | [9036.0, 32308.0, 32168.0] | [21.0, 2206.0, 166.0] | [147, 107, 134] |
p02707 | u851704997 | 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()))\ntmp2 = 0\nfor i in range(N+1):\n if(i == 0):\n tmp=A.count(1)\n print(str(tmp))\n else:\n tmp2 = i + 1\n tmp=A.count(tmp2)\n print(str(tmp))', 'import collections\nN = int(input())\nA = list(map(int,input().split()))\nc = collections.Counter(A)\nfor i in range(1,N+1):\n print(c[i])'] | ['Wrong Answer', 'Accepted'] | ['s034319197', 's596278169'] | [32368.0, 33868.0] | [2206.0, 174.0] | [201, 134] |
p02707 | u854780853 | 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()) \nsub = list(map(int,input().split())) \nnumber = list(range(1, N+1, 1)) \nprint(number)\ncnt = 0 \nfor i in range(int(len(number))):\n for j in range(int(len(sub))):\n if number[i] == sub[j]:\n cnt = cnt + 1\n \n print(cnt)\n cnt = 0\n\n', 'N = int(input())\nsub = list(map(int, input().split()))\nans = [0]*(N)\nfor i in sub:\n ans[i-1] += 1\nfor i in ans:\n print(i)'] | ['Wrong Answer', 'Accepted'] | ['s595617721', 's156243281'] | [32300.0, 32296.0] | [2206.0, 144.0] | [276, 127] |
p02707 | u854992222 | 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\ninput = sys.stdin.readline\nn = int(input())\na = list(input())\nfor i in a:\n print(a.count(str(i+1)))', 'import sys\ninput = sys.stdin.readline\nn = int(input())\na = list(map(int, input().split())\nfor i in a:\n print(a.count(str(i+1)))', 'import sys\ninput = sys.stdin.readline\nn = 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)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s009790258', 's853968811', 's874731485'] | [20172.0, 9032.0, 30964.0] | [37.0, 20.0, 137.0] | [113, 130, 161] |
p02707 | u855967722 | 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(n-1):\n b = a.count(i+1)\n print(b)\n \n', 'n = int(input())\na = list(map(int,input().split()))\n\nfor i in range(n):\n for range(len(a)):\n if i in a:\n count++\n print(count\\n)\n \n', 'from collections import Counter\nn = int(input())\na = list(map(int,input().split()))\n\nac = Counter(a)\nad = list(ac.values())\nad.sort()\nfor i in range(len(ad)):\n print(ad[i])', 'n = int(input())\na = list(map(int,input().split()))\n\nfor i in range(n):\n print(a.count(i))\n \n', 'n = int(input())\na = list(map(int,input().split()))\n\nfor i in range(n):\n print(a.count(a)\\n)\n \n', 'n = int(input())\na = list(map(int,input().split()))\n\nlis = [0]*len(a)\n\nfor i in range(n-1):\n for j in range(len(a)):\n if a[j] == i+1:\n lis[i] += 1\n\nprint(lis)', 'from collections import Counter\nn = int(input())\na = list(map(int,input().split()))\n\nac = Counter(a)\nad = list(ac.values())\nad.sort()\nfor i in range(n):\n print(ad[i])\n', 'n = int(input())\na = list(map(int,input().split()))\n\nfor i in range(n):\n print(i.count(a))\n \n', 'n = int(input())\na = list(map(int,input().split()))\n\nfor i in range(n):\n print(a.count(i))', "n = int(input())\na = list(map(int,input().split()))\n\nlis = [0]*len(a)\n\nfor i in range(n-1):\n for j in range(len(a)):\n if a[j] == i+1:\n lis[i] += 1\n\nprint(*lis, sep='\\n')", 'from collections import Counter\nn = int(input())\na = list(map(int,input().split()))\n\nac = Counter(a)\nad = list(ac.values())\nad.sort()\nfor i in range(n-1):\n print(ad[i])\n', 'n = int(input())\na = list(map(int,input().split()))\n\nfor i in range(n-1):\n b = a.count(i)\n print(b)\n \n', 'n = int(input())\nA = list(map(int,input().split()))\n\nlis = [0] * n\nfor i in A:\n lis[i-1] += 1\n\nfor j in range(len(lis)):\n print(lis[j])'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s119091050', 's205915613', 's216898047', 's330053905', 's417750965', 's578138426', 's626315633', 's703103752', 's823135148', 's880880772', 's908344111', 's928363516', 's575421282'] | [32160.0, 9024.0, 33976.0, 32232.0, 8916.0, 32296.0, 34212.0, 32228.0, 32364.0, 32268.0, 34184.0, 32368.0, 32236.0] | [2206.0, 21.0, 154.0, 2206.0, 23.0, 2206.0, 148.0, 63.0, 2206.0, 2206.0, 157.0, 2206.0, 142.0] | [113, 146, 173, 99, 101, 167, 168, 99, 91, 178, 170, 111, 137] |
p02707 | u857555436 | 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()))\nworker = [0] * N\n\nfor i in range(len(A)):\n worker[A[i] - 1] += 1\n print(worker)\n\nfor i in worker:\n print(i)', 'N = int(input())\nA = list(map(int, input().split()))\nworker = [0] * N\n\nfor i in range(len(A)):\n worker[A[i] - 1] += 1\n\nfor i in worker:\n print(i)'] | ['Wrong Answer', 'Accepted'] | ['s232437481', 's011056470'] | [141384.0, 32296.0] | [2471.0, 156.0] | [169, 151] |
p02707 | u859241851 | 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. | ['M = int(input())\nA = list(map(int, input().split()))\nB = collections.Counter(A)\n\n#print(B[])\nnum = 1\n\nwhile num <= M:\n print(B[num])\n num += 1', 'import collections\nM = int(input())\nA = list(map(int, input().split()))\nB = collections.Counter(A)\nnum = 1\n\nwhile num <= M:\n print(B[num])\n num += 1'] | ['Runtime Error', 'Accepted'] | ['s216270799', 's113693096'] | [32368.0, 34036.0] | [63.0, 186.0] | [157, 154] |
p02707 | u860002137 | 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 - management\nn = int(input())\na = list(map(int, input().split()))\nans = [0] * n\nfor i in range(n-1):\n ans[a[i]-1] += 1\nprint(ans)', '# C - management\nn = 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])'] | ['Wrong Answer', 'Accepted'] | ['s727379277', 's639007631'] | [32232.0, 32368.0] | [109.0, 161.0] | [136, 162] |
p02707 | u860338101 | 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 = int(input())\nbossNumsList = list(map(int, input().split()))\n\nbossNums=[]\n\nfor i in range(Num):\n bossNums.append(0)\n\n\nfor i in range(Num-1):\n bossNums[bossNumsList[i]-1] += 1\n\nprint(bossNums)\n', 'Num = int(input())\nbossNumsList = list(map(int, input().split()))\n\nbossNums=[]\n\nfor i in range(Num):\n bossNums.append(0)\n\n\nfor i in range(Num-1):\n bossNums[bossNumsList[i]-1] += 1\n\nfor i in range(Num):\n print(bossNums[i])'] | ['Wrong Answer', 'Accepted'] | ['s928983945', 's514976896'] | [32328.0, 32168.0] | [135.0, 174.0] | [200, 225] |
p02707 | u860966226 | 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\ndata = input().split()\njousi = [int(s) for s in data]\n\nbuka = [0]*n\n\nfor i in jousi:\n buka[i] += 1\n\nfor i in buka:\n print(i)\n', 'n = int(input())\n\ndata = input().split()\njousi = [int(s) for s in data]\n\nbuka = [0]*n\n\nfor i in jousi:\n buka[i - 1] += 1\n\nfor i in buka:\n print(i)\n'] | ['Wrong Answer', 'Accepted'] | ['s833651485', 's276047561'] | [34172.0, 33968.0] | [153.0, 150.0] | [145, 149] |
p02707 | u861886710 | 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()))\nn = [0] * N\nfor i in range(N):\n n[A[i]-1] += 1\n\nfor j in range(N):\n print(n[j])', 'N = int(input())\nA = list(map(int, input().split()))\nn = [0] * N\nfor i in range( N):\n n[A[i]-1] += 1\n\nfor j in range(N):\n print(n[j])', 'N = int(input())\nA = list(map(int, input().split()))\nn = [0] * N\n\nfor i in range(N-1):\n n[A[i]-1] += 1\n\nfor j in range(N):\n print(n[j])'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s232346569', 's366517565', 's002511084'] | [32228.0, 32340.0, 32300.0] | [99.0, 95.0, 161.0] | [138, 139, 203] |
p02707 | u864085306 | 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 = int(input())\nindexes = list(map(int, input().split()))\n\nans = [0]*num\nprint(ans)\nprint(indexes)\n\nfor i in range(num-1):\n ans[indexes[i]-1] +=1\nprint(ans)', 'num = int(input())\nindexes = list(map(int, input().split()))\nans = [0]*num\nfor i in range(num-1):\n ans[indexes[i]-1] +=1\n\nfor i in range(len(ans)):\n print(ans[i])'] | ['Wrong Answer', 'Accepted'] | ['s212867648', 's843615538'] | [32120.0, 32248.0] | [136.0, 157.0] | [160, 164] |
p02707 | u867848444 | 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()))\n\nans = [n-1] + [0] * (n - 1)\nprint(*ans, sep='\\n')", 'from collections import defaultdict\nn = int(input())\na = list(map(int,input().split()))\na = [0] + a\ncnt = defaultdict(lambda :0)\n\nfor i in a:\n cnt[i - 1] += 1\n\nfor i in a:\n print(cnt[i - 1])\n cnt[i - 1] = 0\n', 'from collections import Counter\nn = int(input())\na = list(map(int,input().split()))\ncnt = Counter(a)\nans = n - 1 - cnt[1]\nprint(ans)\nfor i in range(n - 1):\n print(0)', 'from collections import defaultdict\nn = int(input())\na = list(map(int,input().split()))\n\ncnt = defaultdict(lambda :0)\nfor i in a:\n cnt[i] += 1\n\nfor i in range(1, n + 1):\n print(cnt[i])'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s393793839', 's586852911', 's594383499', 's488454848'] | [33788.0, 40460.0, 34148.0, 37500.0] | [103.0, 213.0, 138.0, 199.0] | [134, 216, 168, 190] |
p02707 | u868606077 | 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 = input()\na = input().split()\nlist_i = [int(b) for b in a]\n\n#print(N)\n#print(list_i)\n\nfor i in range(N):\n list_i.count(i+1)', 'N = input()\na = input().split()\nlist_i = [int(b) for b in a]\n\nprint(N)\nprint(list_i)\n\nfor i in range(N):\n print(list_i.count(i+1))', 'import collections\nN = int(input())\nA = list(map(int, input().split()))\n\nC = collections.Counter(A)\n#print(C)\n\nfor i in range(N):\n #print(A.count(i+1))\n print(C[i+1])'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s445455823', 's892359405', 's215159572'] | [32144.0, 35060.0, 34036.0] | [74.0, 92.0, 184.0] | [126, 131, 168] |
p02707 | u870736713 | 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,k=map(int,input().split())\nnum=0\nfor i in range(k,n+2):\n num+=i*(n-i+1)+1\nprint(num%(10**9+7))', 'N=int(input())\nA=list(map(int,input().split()))\n\nnum=[0]*N\nfor i in A:\n num[i-1]+=1\n\nfor j in range(len(num)):\n print(num[j])'] | ['Runtime Error', 'Accepted'] | ['s842975789', 's432302319'] | [9160.0, 32244.0] | [26.0, 153.0] | [99, 131] |
p02707 | u873736356 | 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, M = map(int, input().split())\n\nA = list(map(int, input().split()))\n \nn = N - np.sum(A)\nif(n >= 0):\n print(n)\nelse:\n print(-1)\n', 'import numpy as np\nN = int(input())\n\nA = list(map(int, input().split()))\n \nc = [0 for i in range(N)]\n\nfor i in range(N-1):\n c[A[i] - 1] += 1\n\nfor i in range(N):\n print(c[i])\n'] | ['Runtime Error', 'Accepted'] | ['s649012912', 's110268166'] | [27172.0, 50864.0] | [109.0, 253.0] | [162, 188] |
p02707 | u876225099 | 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()))\ncountlist = [0 for i in range(n)]\nfor j in range(n):\n countlist[a[j]-1]+=1\nfor i in range(n):\n print(countlist[i])', 'n = int(input())\na = list(map(int,input().split()))\ncountlist = [0 for i in range(n)]\nfor j in range(n-1):\n countlist[a[j]-1]+=1\nfor i in range(n):\n print(countlist[i])'] | ['Runtime Error', 'Accepted'] | ['s192100404', 's498361333'] | [32324.0, 32232.0] | [101.0, 171.0] | [172, 174] |
p02707 | u886459614 | 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\nlist1= input().split()\nlist2=list(set(list1))\nfor i in range(n):\n\tif i+1 in list2:\n\t\ta=list.count(i+1)\n\t\tcnt+=a\n\t\tprint(a)\n\telse:\n\t\tprint(0)\n', 'n = int(input())\nlis = list(map(int, input().split()))\ncnt = [0]*(n)\n\nfor i in range(n-1):\n\tcnt[lis[i]-1]+=1\n\nfor i in range(n):\n\tprint(cnt[i])'] | ['Wrong Answer', 'Accepted'] | ['s325593834', 's295603618'] | [36132.0, 32344.0] | [2206.0, 159.0] | [158, 143] |
p02707 | u889681568 | 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())\n#s = [0,]*(N-1)\ns = []\nfor i in range(N-1):\n #s[i] = int(input())\n s.append(int(input()))\n\nct = collections.Counter(s)\n\nfor i in range(N):\n print(ct[i+1])\n', "from collections import Counter\n\nN = int(input())\ns = [0]*(N-1)\nfor i in range(N-1):\n #s[i] = ''.join(sorted(list(input())))\n s[i] = int(input())\n\nct = Counter(s)\n\nfor i in range(N):\n print(ct[i+1])\n", "from collections import Counter\n\nN = int(input())\ns = [0]*(N-1)\nfor i in range(N-1):\n #s[i] = ''.join(sorted(list(input())))\n s[i] = int(input())\n\nct = Counter(s)\n\nfor i in range(1,N):\n if i in ct.keys():\n print(ct[i])\n else:\n print(0)\n#print(0)\n", 'from collections import Counter\n\nN = int(input())\n#s = [0,]*(N-1)\ns = []\nfor i in range(N-1):\n #s[i] = int(input())\n s.append(int(input()))\n\nct = Counter(s)\n\nfor i in range(N):\n print(ct[i+1])\n', 'from collections import Counter\n\nN = int(input())\ns = [0]*(N-1)\nfor i in range(N-1):\n s[i] = int(input())\n\nct = Counter(s)\n\nfor i in range(N):\n print(ct[i+1])\n', "from collections import Counter\n\nN = int(input())\ns = [0]*(N-1)\nfor i in range(N-1):\n #s[i] = ''.join(sorted(list(input())))\n s[i] = int(input())\n\nct = Counter(s)\n\nfor i in range(1,N):\n if i in ct.keys():\n print(ct[i])\n else:\n print(0)\nprint(0)\n", 'import collections\n\nN = int(input())\ns = list(map(int, input().split()))\n\nct = collections.Counter(s)\n\nfor i in range(N):\n print(ct[i+1])\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s056548986', 's493732159', 's532423407', 's629971446', 's659361637', 's691081025', 's264947599'] | [12984.0, 14364.0, 14468.0, 12932.0, 14484.0, 14316.0, 34044.0] | [29.0, 33.0, 34.0, 30.0, 36.0, 34.0, 182.0] | [201, 208, 272, 202, 165, 271, 141] |
p02707 | u890570193 | 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.pop()-1]+=1\nfor i in B:\n print(B[i])', 'N = int(input())\nA = list(map(int,input().split()))\nB = [0]*N\nfor i in range(N-1):\n B[A.pop()-1]+=1\nfor i in range(N):\n print(B[i])\n'] | ['Wrong Answer', 'Accepted'] | ['s027310169', 's742879305'] | [32380.0, 32360.0] | [157.0, 162.0] | [130, 138] |
p02707 | u891202624 | 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 A:\n ans[i-1]+=1\nfor j in ans:\n print(j)', 'N=int(input())\nA=list(map(int,input().split()))\nans=[]\nfor i in A:\n ans[i-1]+=1\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)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s198244570', 's844855070', 's208187472'] | [32148.0, 32160.0, 32216.0] | [71.0, 70.0, 148.0] | [112, 109, 112] |
p02707 | u892308039 | 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. | ["\nl = []\namount = 0\nfor i in range(N):\n for j in range(N-1):\n if numbers[j] == i+1:\n #print('numbers = {}'.format(numbers[j]))\n amount = amount + 1\n #print('amount = {}'.format(amount))\n l.append(amount)\n #print('l[{}] = {}'.format(i,l[i]))\n #print('--------------------')\n amount = 0\n\nfor i in range(N):\n print(l[i])", 'N = int(input())\nnumbers = list(map(int, input().split()))\n\nl = []\namount = 0\nfor i in range(N - i):\n for j in range(N-1):\n if numbers[j] == i+1:\n amount = amount + 1\n print(amount)\n amount = 0', 'N = int(input())\nnumbers = list(map(int, input().split()))\n\nresult = [0] * N\nfor i in numbers:\n result[i- 1] += 1\n \nfor i in range(N-1):\n print(result[i])\nprint(0)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s044610746', 's910755721', 's193071856'] | [9112.0, 32240.0, 32316.0] | [21.0, 62.0, 153.0] | [382, 220, 172] |
p02707 | u894074703 | 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 q3():\n N = int(input())\n A = [int(i) for i in input().split()]\n for i in range(N-1):\n print(A.count(i+1))\n\n\nif __name__ == '__main__':\n q3()\n", "def q3():\n from collections import deque\n N = int(input())\n A = deque([int(i) for i in input().split()])\n ans = [0]*N\n for a in A:\n ans[a-1] += 1\n for i in ans:\n print(i)\n\n\nif __name__ == '__main__':\n q3()\n"] | ['Wrong Answer', 'Accepted'] | ['s523470464', 's370433984'] | [32196.0, 33556.0] | [2206.0, 144.0] | [164, 241] |
p02707 | u900878720 | 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 itertools import repeat\n\nn = int(input())\nlis = list(map(int, input.split()))\nd = [[0] for i in repeat(None, n)]\n\nfor i in lis:\n d[i - 1][0] += 1\n \nfor i in d:\n print(i[0])', 'from itertools import repeat\n \nn = int(input())\nlis = list(map(int, input().split()))\nd = [[0] for i in repeat(None, n)]\n \nfor i in lis:\n d[i - 1][0] += 1\n \nfor i in d:\n print(i[0])'] | ['Runtime Error', 'Accepted'] | ['s396936802', 's265240416'] | [9204.0, 34572.0] | [22.0, 219.0] | [180, 184] |
p02707 | u902430070 | 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())\narr = {}\ns = list(map(int, input().split()))\nfor i in range(1, n):\n arr[i] = arr.get(s[i-1], 0) + 1\n\nfor i in range(1, n+1):\n print(arr[i] if i in arr else 0)\n ', 'n = int(input())\narr = {}\ns = list(map(int, input().split()))\nfor i in range(1, n):\n arr[s[i-1]] = arr.get(s[i-1], 0) + 1\n\nfor i in range(1, n+1):\n print(arr[i] if i in arr else 0)\n '] | ['Wrong Answer', 'Accepted'] | ['s739511978', 's208495812'] | [38748.0, 33668.0] | [223.0, 229.0] | [180, 185] |
p02707 | u904081717 | 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 = input()\nA = list(map(int, input().split()))\n\nresult = [0]*N\n\nfor i in range(N-1):\n result[A[i]-1] += 1\n\nfor i in range(N):\n print(result[i])', 'N = int(input())\nA = list(map(int, input().split()))\n \nresult = [0]*N\n \nfor i in range(N-1):\n result[A[i]-1] += 1\n \nfor i in range(N):\n print(result[i])'] | ['Runtime Error', 'Accepted'] | ['s900778666', 's800464034'] | [32308.0, 32144.0] | [66.0, 152.0] | [150, 158] |
p02707 | u904331908 | 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\np = list(map(int,input().split()))\n\nfor x in range(1,n):\n print(p.count(x))\n \n', 'n = int(input())\np = list(map(int,input().split()))\n\np2 = [0]*n \n\nfor x in p:\n p2[x-1] = p2[x-1] + 1\n\nfor x in p2:\n print(x)'] | ['Wrong Answer', 'Accepted'] | ['s928093716', 's445978905'] | [32276.0, 32232.0] | [2206.0, 163.0] | [98, 130] |
p02707 | u905793676 | 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 = collections.Counter(list(map(int, input().split())))\n\nfor i in range(1,n):\n print(a[i+1])\n', 'import collections\nn = int(input())\na = collections.Counter(list(map(int, input().split())))\n\nfor i in range(n):\n print(a[i+1])'] | ['Wrong Answer', 'Accepted'] | ['s978459250', 's837108643'] | [34184.0, 34052.0] | [190.0, 188.0] | [133, 130] |
p02707 | u907121797 | 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 for _ in range(n)]\nm = list(map(int, input().split()))\nfor i in m:\n\ta[i-1] += 1\nprint(a)', 'n = int(input())\na = [0 for _ in range(n)]\nm = list(map(int, input().split()))\nfor i in m:\n\ta[i-1] += 1\nfor v in a:\n\tprint(v)'] | ['Wrong Answer', 'Accepted'] | ['s468099674', 's236021187'] | [33936.0, 33928.0] | [99.0, 150.0] | [112, 125] |
p02707 | u907446975 | 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\na=int(input())\nl=list(map(int,input().split()))\nd=Counter(l)\nprint(d)\nfor i in range(1,a+1):\n if i in d:\n print(d[i])\n else:\n print("0")', 'a=int(input())\nl=list(map(int,input().split()))\nl1=[0]\nl1.extend(l)\nl2=[]\nl1=sorted(l1)\nfor i in range(a-1):\n if l1[i]<l1[i+1]:\n print(l.count(l[i+1]))\n else:\n print("0")\n', 'from collections import Counter\na=int(input())\nl=list(map(int,input().split()))\nd=Counter(l)\n# print(d)\nfor i in range(1,a+1):\n if i in d:\n print(d[i])\n else:\n print("0")'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s631378915', 's912937924', 's920082359'] | [57172.0, 32240.0, 33792.0] | [237.0, 2206.0, 178.0] | [188, 191, 190] |
p02707 | u910247652 | 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 find_first_duplicate(nums):\n num_set = set()\n no_duplicate = 0\n\n for i in range(len(nums)):\n\n if nums[i] in num_set:\n return nums[i]\n else:\n num_set.add(nums[i])\n\n return no_duplicate\n\n\nN = int(input())\nA = [int(x) for x in input().split()]\nA = list(sorted(A))\ni = len(A)\nwhile i > 0:\n if len(A) > 0:\n b = find_first_duplicate(A)\n print(A.count(b))\n if b in A:\n A.remove(b)\n else:\n print(0)\n i = i - 1\n', 'n = int(input())\na = list(map(int, input().split()))\nsub = []\nfor i in range(0, n):\n sub.append(0)\nfor j in a :\n sub[j - 1] += 1\nfor i in sub:\n print(i)\n '] | ['Wrong Answer', 'Accepted'] | ['s744310250', 's403902216'] | [32244.0, 32236.0] | [2206.0, 158.0] | [502, 166] |
p02707 | u912867658 | 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. | ['s = list(open(0))\ns = input()\n\nj = [0]*int(s)\n\na = list(map(int,input().split()))\nfor i in range(int(s)-1):\n j[a[i]] += 1\nfor i in range(len(j)-1):\n print(j[(i+1)])\n\nprint(0)', 's = input()\n\nj = [0]*int(s)\n\na = list(map(int,input().split()))\nfor i in range(int(s)-1):\n j[a[i]] += 1\nfor i in range(len(j)-1):\n print(j[(i+1)])\n\nprint(0)'] | ['Runtime Error', 'Accepted'] | ['s408211955', 's049914889'] | [11472.0, 33804.0] | [24.0, 166.0] | [181, 163] |
p02707 | u919235786 | 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):\n c=0\n for e in a:\n if a(i)+1==e:\n c+=1\n print(c)', 'N = int(input())\nA = list(map(int, input().split()))\nl = []\nfor i in range(N):\n l.append(0)\nfor x in A:\n l(x-1) += 1\nfor s in l:\n print(s)\n', 'r=int(input())\nprint(r*2*3.1415)\n', 'n=int(input())\na=list(map(int,input().split()))\nb=[]\nfor i in range(n):\n b.append(0)\nfor i in a:\n b[i-1]+=1\nfor i in b:\n print(i)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s048087872', 's236033309', 's759641295', 's965774469'] | [32236.0, 9040.0, 9156.0, 32296.0] | [60.0, 25.0, 22.0, 162.0] | [142, 148, 33, 138] |
p02707 | u924273546 | 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\nn = int(input())\na = input().split()\nlis = [0 for i in range(n)]\ncount = 0\n\nfor i in a:\n lis[int(i)] += 1\n\nfor i in lis:\n if count == 0:\n count = 1\n continue\n print("{}".format(i))', '#coding:utf-8\nn = int(input())\na = input().split()\nlis = [0 for i in range(n)]\ncount = 0\n\nfor i in a:\n lis[int(i)] += 1\n\nfor i in lis:\n if count == 0:\n count = 1\n continue\n print("{}".format(i))', '#coding:utf-8\nn = int(input())\na = input().split()\nlis = [0 for i in range(n)]\ncount = 0\n\nfor i in a:\n lis[int(i - 1)] += 1\n\nfor i in lis:\n print("{}".format(i))', '#coding:utf-8\nn = int(input())\na = input().split()\nlis = [0 for i in range(n)]\ncount = 0\n\nfor i in a:\n lis[i] += 1\n\nfor i in lis:\n if count == 0:\n count = 1\n continue\n print("{}".format(i))', '#coding:utf-8\nn = int(input())\na = input().split()\nlis = [0 for i in range(n)]\n\nfor i in a:\n lis[int(i) - 1] += 1\n\nfor i in lis:\n print("{}".format(i))'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s096792230', 's205885369', 's326306169', 's501052943', 's558636639'] | [26004.0, 25780.0, 26024.0, 26016.0, 25916.0] | [183.0, 181.0, 48.0, 51.0, 175.0] | [217, 217, 167, 212, 157] |
p02707 | u924828749 | 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()]\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 = [int(x) for x in input().split()]\nans = [0] * n\nfor i in range(n):\n ans[a[i]] += 1\nfor i in range(n):\n print(ans[i])', 'n = int(input())\na = [int(x) for x in 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])'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s087544873', 's604947516', 's600850742'] | [32144.0, 32152.0, 32136.0] | [103.0, 95.0, 175.0] | [141, 139, 143] |
p02707 | u926585789 | 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=[int(i) for i in input().split(' ')]\n\nc = collections.Counter(a_list)\n[print(c[i+1]) for i in range(n)]", "n=int(input())\na_list=[int(i) for i in input().split(' ')]\n\nimport collections\n\nc = collections.Counter(a_list)\n[print(c[i+1]) for i in range(n)]"] | ['Runtime Error', 'Accepted'] | ['s626877831', 's155110514'] | [32320.0, 33740.0] | [71.0, 177.0] | [125, 145] |
p02707 | u928758473 | 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 os\n\ndef main():\n n = int(input())\n a_list = tuple(map(int, input().split()))\n list_set = set(a_list)\n zero_list = [0]*n\n print(a_list)\n for l in list_set:\n zero_list[i-1] = a_list[i]\n for i in zero_list:\n print(i)\n \n\nif __name__ == "__main__":\n main()\n', 'import os\n\ndef main():\n n = int(input())\n a_list = tuple(map(int, input().split()))\n list_set = set(a_list)\n zero_list = [0]*n\n for l in list_set:\n zero_list[i-1] = a_list[i]\n for i in zero_list:\n print(i)\n\nif __name__ == "__main__":\n main()', 'import os\n\ndef main():\n\tn = int(input())\n\ta_list = list(map(int, input().split()))\n\tresult = [0]*n\n\tfor i in a_list:\n\t\tresult[i-1] += 1\n\tfor i in result:\n\t\tprint(i)\n\nif __name__ == "__main__":\n\tmain()\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s236029540', 's965172871', 's274238199'] | [32328.0, 32404.0, 32368.0] | [89.0, 78.0, 121.0] | [521, 320, 201] |
p02707 | u932868243 | 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 aa in a:\n ans[aa-1]+=1\nprint(ans sep='\\n')", 'N=input()\nlista=list(map(int,input().split()))\n for _ in range(1,N+1):\nprint(lista.count(_))', 'N=int(input())\nlista=list(map(int,input().split()))\n for _ in range(1,N+1)\nprint(lista.count(_))', "n=int(input())\na=list(map(int,input().split()))\nans=[0]*n\nfor aa in a:\n ans[aa-1]+=1\nprint(ans,sep='\\n')", 'N=input()\nlista=list(map(int,input().split()))\n for _ in range(1,N+1):\n print(lista.count(_))', 'n=int(input())\na=list(map(int,input().split()))\nans=[0]*n\nfor aa in a:\n ans[aa-1]+=1\nfor an in ans:\n print(an)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s134399224', 's163207360', 's288509130', 's568487586', 's608744861', 's996600149'] | [9032.0, 8968.0, 8932.0, 32220.0, 8948.0, 32388.0] | [21.0, 23.0, 24.0, 102.0, 23.0, 145.0] | [105, 93, 97, 105, 95, 112] |
p02707 | u933129390 | 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\n \nr = int(input())\nprint(2*r*math.pi)', 'n = int(input())\na = list(map(int, input().split()))\nans = [0 for i in range(n)]\nfor i in a:\n ans[i-1] += 1\nfor i in ans:\n print(i)\n'] | ['Wrong Answer', 'Accepted'] | ['s220832545', 's299791522'] | [9160.0, 32372.0] | [23.0, 155.0] | [49, 138] |
p02707 | u933717615 | 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\nfrom collections import Counter\nS=Counter(A)\n\na=[0]*N\nfor x, v in S.items():\n a[x] += v\n\nfor ans in a:\n print(ans)', 'import numpy as np\nN=int(input())\nA = list(map(int, input().split()))\n\nA_diff = np.diff(A)\nprint(A_diff)\n\na=[0]*N\ncnt=1\nj=0\nfor i in range(len(A_diff)):\n if A_diff[i] == 0:\n cnt+=1\n continue\n else:\n a[j] += cnt\n cnt=1\n j+=1\na[j] += cnt\n\nfor ans in a:\n print(ans)', 'import numpy as np\nN=int(input())\nA = list(map(int, input().split()))\n\nfrom collections import Counter\nS=Counter(A)\n#print(S)\n\na=[0]*N\nfor x, v in S.items():\n a[x-1] += v\n\nfor ans in a:\n print(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s384785686', 's471690597', 's783957355'] | [33672.0, 50868.0, 52776.0] | [164.0, 306.0, 263.0] | [168, 280, 199] |
p02707 | u934638545 | 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()]\nb = [len(i for i in a if i == j) for j in range(n+1)]\nprint(b[1:])', 'n = int(input())\na = [int(i) for i in input().split()]\nb = [len([i for i in a if i == j]) for j in range(n+1)]\nprint(b[1:])', 'import numpy as np\nn = int(input())\na = [int(i) for i in input().split()]\nb = np.zeros(n)\nfor i in a: b[i-1] += 1\nprint(b)\n', 'import numpy as np\nn = int(input())\na = [int(i) for i in input().split()]\nb = np.zeros(n)\nfor i in a: b[i-1] += 1\nfor i in b: print(i)', 'import numpy as np\nn = int(input())\na = [int(i) for i in input().split()]\nb = np.zeros(n)\nfor i in a: b[i-1] += 1\nfor i in b: print(int(i))'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s053898797', 's170303190', 's780516860', 's851978926', 's456472834'] | [32188.0, 32184.0, 50896.0, 50900.0, 50948.0] | [70.0, 2206.0, 237.0, 325.0, 340.0] | [121, 123, 123, 134, 139] |
p02707 | u938350027 | 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. | ['\ndef main():\n n = int(input())\n a = list(map(int, input().split(\' \')))\n buka = [0]*n\n print(a)\n\n for i in a:\n buka[i-1] += 1\n\n for i in buka:\n print(i)\n\n\nif __name__ == "__main__":\n main()\n', '\ndef main():\n n = int(input())\n a = list(map(int, input().split(\' \')))\n buka = [0]*n\n\n for i in a:\n buka[i-1] += 1\n\n for i in buka:\n print(i)\n\n\nif __name__ == "__main__":\n main()\n'] | ['Wrong Answer', 'Accepted'] | ['s211108803', 's491913849'] | [32232.0, 32172.0] | [145.0, 132.0] | [224, 211] |
p02707 | u939132000 | 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\n\nA.sort()\nA.append(N + 1)\nans = [0] * (N+1)\ncount = [0, 0]\n\nfor i in range(N):\n if count[0] == A[i]:\n count[1] += 1\n else:\n ans[count[0]] = count[1]\n count[0] = A[i]\n count[1] = 1\n\nprint(ans[1:N+1])', 'N = int(input())\nA = list(map(int, input().split()))\n\n\nA.sort()\nA.append(N + 1)\nans = [0] * (N+1)\ncount = [0, 0]\n\nfor i in range(N):\n if count[0] == A[i]:\n count[1] += 1\n else:\n ans[count[0]] = count[1]\n count[0] = A[i]\n count[1] = 1\n\nfor j in range(1, N+1):\n print(ans[j])'] | ['Wrong Answer', 'Accepted'] | ['s502263247', 's333031128'] | [32360.0, 32208.0] | [162.0, 202.0] | [286, 310] |
p02707 | u941438707 | 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,*a,=map(int,open(0).read().split())\nd=[0]*n\nfor i in a:\n d[i-1]+=1\nprint(*d[1:],sep="\\n") ', 'n,*a,=map(int,open(0).read().split())\nb=[0]*n\nfor i in a:\n b[i-1]+=1\nprint(*b,sep="\\n") '] | ['Wrong Answer', 'Accepted'] | ['s099424750', 's583994600'] | [31732.0, 31812.0] | [126.0, 119.0] | [94, 92] |
p02707 | u942356554 | 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())\nc=list(map(int,input().split()))\nk=n\nu=n\nc1 = collections.Counter(c)\nif len(c1)==len(c):\n while k>1:\n k=k-1\n print(1)\n print(0)\nelse:\n for i in range(1,n):\n p=(c.count(i))\n print(p)\n k=k-p\n u=u-1\n if k<2:\n break\n while u>0:\n print(0)\n u=u-1', 'n = int(input())\na = list(map(int, input().split()))\nd = dict()\nfor i in range(n):\n d[i] = 0\nfor e in a:\n d[e-1] += 1\nfor i in range(n):\n print(d[i])'] | ['Wrong Answer', 'Accepted'] | ['s958979573', 's382698600'] | [33988.0, 38768.0] | [2206.0, 205.0] | [384, 158] |
p02707 | u943057856 | 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()))\ndic=collections.Counter(a)\nfor i in range(1,n):\n if i in dic.keys():\n print(dic[i])\n else:\n print(0)', 'import collections\nn=int(input())\na=list(map(int,input().split()))\ndic=collections.Counter(a)\nfor i in range(1,n+1):\n if i in dic.keys():\n print(dic[i])\n else:\n print(0)'] | ['Wrong Answer', 'Accepted'] | ['s507095925', 's695801996'] | [34040.0, 34048.0] | [174.0, 181.0] | [187, 189] |
p02707 | u944643608 | 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])', 'import math\nR, G, B, N = map(int, input().split())\nans = 0\ncr = math.ceil(N/R)\ncg = math.ceil(N/G)\ncb = math.ceil(N/B)\nfor i in range(cr + 1):\n for j in range(cg + 1):\n tmp = i * R + j * G\n if N - tmp >= 0 and (N - tmp) % B == 0:\n ans += 1\n elif N - tmp < 0:\n break\nprint(ans)\n', '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', 'Runtime Error', 'Accepted'] | ['s231975476', 's310896175', 's054924439'] | [32240.0, 9208.0, 32372.0] | [94.0, 21.0, 158.0] | [141, 321, 144] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.