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
p02706
u912650255
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['N,M = map(int,input().split())\nA = sum(map(int,input().split()))\n\nprint(N-A if N<=A else -1)\n', 'N,M = map(int,input().split())\nA = sum(map(int,input().split()))\n\nprint(N-A if N>=A else -1)\n']
['Wrong Answer', 'Accepted']
['s101980473', 's483089318']
[9508.0, 9596.0]
[27.0, 27.0]
[93, 93]
p02706
u917444023
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
["n=int(input())\nn,k=map(int,input().split())\na=list(map(int,input().split())) \nans=0\nfor i in range(n):\n ans+=a[i]\nif ans<=n:\n print(n-ans)\nelse:\n print('-1')", "import sys\ninput = sys.stdin.readline\ndef main():\n n=int(input())\n n,m=map(int,input().split())\n a=list(map(int,input().split())) \...
['Runtime Error', 'Runtime Error', 'Accepted']
['s005758340', 's553923013', 's980237927']
[9192.0, 9196.0, 10188.0]
[21.0, 23.0, 25.0]
[185, 260, 243]
p02706
u918120636
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['a,b=map(int,input().split())\nc=input().split()\nif sum(int(i) for i in c)>a:\n print(-1)\nelse:\n print(a-sum(int(i)) for i in c)', 'N,M=map(int,input().split())\nc=input().split()\nif sum(int(i) for i in c)>N:\n print(-1)\nelse:\n print(N-sum(int(i) for i in c))']
['Wrong Answer', 'Accepted']
['s666766635', 's068816950']
[9536.0, 9692.0]
[23.0, 22.0]
[131, 131]
p02706
u918123058
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n,m = map(int,input().split())\na = list(map(int,input().split()))\nprint(a)\nfor i in range(m):\n n=n-a[i]\nif(i>=0):\n print(n)\nelse:\n print(-1)', 'n,m = map(int,input().split())\na = list(map(int,input().split()))\nprint(a)\nfor i in range(m):\n n=n-a[i]\nif(i>=0):\n print(n)\nelse:\n print(-1)...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s233787613', 's647482660', 's411382952']
[10080.0, 10024.0, 10056.0]
[24.0, 24.0, 23.0]
[149, 149, 140]
p02706
u919235786
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n,m=map(int,input().split())\nmm=[]\nfor i in range(m):\n s=int(input())\n mm.append(s)\na=n-sum(mm)\nif a>=0:\n print(a)\nelse: print(-1)', 'n,m=map(int,input().split())\nmm=list(map(int,input().split()))\na=n-sum(mm)\nif a>=0:\n print(a)\nelse: print(-1)']
['Runtime Error', 'Accepted']
['s521903351', 's356335033']
[9240.0, 10044.0]
[25.0, 22.0]
[139, 112]
p02706
u923010184
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['import numpy as np\nN,M = map(int,input().split())\nA = [int(a) for a input().split()]\n\nAsum = sum(A)\nif Asum > N:\n print(-1)\nelse:\n print(N - Asum)', 'N,M = map(int,input().split())\nA =list(map(int, input().split()))\nAsum = sum(A)\nif Asum > N:\n print(-1)\nelse:\n print(N - Asum)\n']
['Runtime Error', 'Accepted']
['s619558589', 's687885477']
[9024.0, 10060.0]
[24.0, 24.0]
[148, 129]
p02706
u925353288
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['\nM,N=map(int,input().split())\n\n\nm = int(M **2 * 1/2 + M *1/2)\n\nif N > m:\n print(N-m)\n\nelse:\n print(-1)\n', '\nN,M=map(int,input().split())\n\n\nm = int(M **2 * 1/2 + M *1/2)\n\nif N >= m:\n print(N-m)\n\nelse:\n print(-1)\n', '\nN,M=map(int,input().split())\n\n\nm = int(M **2 * 1/2 + M *1/2)\n\n...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s230801458', 's825329434', 's978199009', 's221727821']
[9156.0, 9168.0, 8984.0, 9864.0]
[29.0, 30.0, 27.0, 31.0]
[109, 110, 109, 130]
p02706
u926442879
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['m = int(input())\nn = int(input())\na = list(map(int,input().split()))\n\nans = m - sum(a)\n\nif ans < 0:\n print(-1)\nelse:\n print(ans)\n \n ', 'm_n = list(map(int,input().split()))\nm = m_n[0]\nn = m_n[1]\na = list(map(int,input().split()))\n \nans = m - sum(a)\n \nif ans < 0:\n print(-1)\nelse:\n print(ans)...
['Runtime Error', 'Accepted']
['s694478120', 's449214347']
[9144.0, 10040.0]
[22.0, 24.0]
[136, 157]
p02706
u926517746
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['inputdata = list(map(input().split()))\n# data = list(map(int, "41 2 5 6".split()))\n\nN = data[0] # days of summer vacation\nM = data[1] # summer assignments\n\nA = 0 # days to do the i-th assignment.\n\nfor i in range(2, M+2) :\n # print(data[i])\n A += data[i]\n\nif A <= N :\n print(N-A)\nelse :\n prin...
['Runtime Error', 'Runtime Error', 'Accepted']
['s197268774', 's385837767', 's509638040']
[9052.0, 9180.0, 9880.0]
[22.0, 24.0, 25.0]
[308, 308, 364]
p02706
u927807968
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n,m=map(int,input().split())\na=[]\nfor i in range(0,m):\n a[i] = input()\n n-=a[i]\nif n<=0:\n print(-1)\nelse:\n print(n)', 'n,m=map(int,input().split())\na=[]\nfor i in range(0,m):\n num=int(input())\n a.append(num)\n n-=a[i]\nif n<=0:\n print(-1)\nelse:\n print(n)', 'n,m=map(int,input()...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s095981437', 's508277282', 's566187570', 's749408584', 's845277928', 's758421390']
[9096.0, 9132.0, 9864.0, 9832.0, 9188.0, 9876.0]
[25.0, 24.0, 24.0, 22.0, 21.0, 23.0]
[127, 147, 138, 138, 122, 135]
p02706
u932868243
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n,m=map(int(input().split())\na=list(map(int,input().split()))\nif n>=sum(a):\n print(n-sum(a))\nelse:\n print(-1)', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\nif n>=sum(a):\n print(n-sum(a))\nelse:\n print(-1)']
['Runtime Error', 'Accepted']
['s541756448', 's839887652']
[9016.0, 10040.0]
[24.0, 22.0]
[111, 111]
p02706
u934638545
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n, m = map(int, input().split())\na = [int(i) for i in input().split()]\nif sum(a) > n: b = n - sum(a)\nelse: b = -1\nprint(b)', 'n, m = map(int, input().split())\na = [int(i) for i in input().split()]\nb = n - sum(a)\nif b < 0: b = -1\nprint(b)']
['Wrong Answer', 'Accepted']
['s913419106', 's362470117']
[9872.0, 9884.0]
[24.0, 20.0]
[122, 111]
p02706
u937239245
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n, m = map(int, input().split())\na = list(map(int, input().split()))\n\ntotal = sum(a)\nif total < n:\n print(total)\nelse:\n print(-1)\n', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\ntotal = sum(a)\nif total <= n:\n print(total)\nelse:\n print(-1)\n', 'n, m = map(int, input()...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s234845293', 's903377111', 's311951703']
[9988.0, 9888.0, 9996.0]
[22.0, 22.0, 23.0]
[136, 136, 140]
p02706
u938718404
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n,m=map(int,input().split())\nli=[]\nfor ai in range(m):\n ai=map(int,input().split())\n li.append(ai)\nk=sum(li)\nif k<=n:\n print(m-k)\nelse:\n print("-1")', 'n,m=map(int,input().split())\nli=[]\nfor ai in range(m):\n ai=int(input())\n li.append(ai)\nk=sum(li)\nif k<=n:\n print(m-k)\nelse:\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s065042137', 's367125762', 's473610596', 's537765848', 's740345985', 's659083367']
[9632.0, 9192.0, 9192.0, 8952.0, 9708.0, 10004.0]
[21.0, 25.0, 26.0, 23.0, 21.0, 23.0]
[160, 148, 134, 145, 132, 118]
p02706
u941284420
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['atcoder-tools: The pre-rendered templates are not found.#!/usr/bin/env python3\nimport sys\n\n\ndef solve(N: int, M: int, A: "List[int]"):\n play = N - sum(A)\n if play > -1:\n print(play)\n else:\n print(-1)\n\n\n# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You u...
['Runtime Error', 'Accepted']
['s066764899', 's601831858']
[9016.0, 10136.0]
[26.0, 24.0]
[758, 702]
p02706
u942505202
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['int a[10010];\nint main(){\n int n,m;\n scanf("%d%d",&n,&m);\n for(int i=0;i<m;i++)scanf("%d",&a[i]);\n int s=0;\n for(int i=0;i<m;i++)s+=a[i];\n if(s>n){\n printf("-1\\n");\n }else{\n printf("%d\\n",n-s);\n }\n}', "import numpy as np\n \nN, M = map(int, input().split())\nA = []\...
['Runtime Error', 'Accepted']
['s386840034', 's282371637']
[8848.0, 27160.0]
[25.0, 117.0]
[236, 157]
p02706
u946475383
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['N,M = (int(x) for x in input.split())\n\nhw = [int(x) for x in input().split()]\n\nhwsum = 0\n\nfor n in range(len(hw)-1):\n hwsum += hw[n]\n\nif hwsum<=N:\n print(N-hwsum)\nelse:\n print(-1)', 'N,M = (int(x) for x in input.split())\n\nhw = [int(x) for x in input().split()]\n\nhwsum = 0\n\nfor n in range(len(hw)-1...
['Runtime Error', 'Runtime Error', 'Accepted']
['s036048624', 's971178176', 's830821415']
[9048.0, 8976.0, 9856.0]
[25.0, 25.0, 30.0]
[182, 183, 183]
p02706
u946517952
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['days,num = map(int,input().split())\nhomeworks = list(map(int,input().split()))\n\ntemp = sum(homeworks)\n\nif temp > days:\n print(-1)\nelse:\n print(days-days)\n', 'days,num = map(int,input().split())\nhomeworks = list(map(int,input().split()))\n\ntemp = sum(homeworks)\n\nif temp > days:\n print(-1)\nelse:...
['Wrong Answer', 'Accepted']
['s002711794', 's535732401']
[9848.0, 9884.0]
[23.0, 22.0]
[160, 160]
p02706
u949831615
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['N, M = map(int, input().split())\nA = input().split()\nA_int = [int(n) for n in A]\n\nrest = sum(A_int)\nif N - rest >= 0:\n print(rest)\nelse:\n print(-1)', 'A = []\n\nN = input()\nM = input()\nfor i in range(M):\n A = A.append(input())\nrest = N - sum(A)\n\nif rest >= 0:\n print(rest)\nelse:\n print(-1)', 'N, ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s310958930', 's329394190', 's927156106', 's379491656']
[9884.0, 9044.0, 9976.0, 9872.0]
[22.0, 21.0, 21.0, 24.0]
[149, 139, 145, 149]
p02706
u951582245
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['N,M = input().split()\nA = list(map(int, input().split()))\n\nS =sum(A)\n\nif N-S >=0:\n print(N-S)\nelse: print("-1")', 'N,M = input().split()\nA = list(map(int, input().split()))\n\nS =sum(A)\n\nif S-N >=0:\n print(S-N)\nelse print(-1)', 'N,M = map(int, input().split()) \nA = list(map(int, input().split()))\nS ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s248352026', 's786192813', 's410398848']
[10008.0, 8916.0, 10188.0]
[23.0, 21.0, 21.0]
[114, 109, 124]
p02706
u953110527
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n,m = map(int,input().split())\na = list(map(int,input().split()))\nsum = 314\nfor i in a:\n sum -= i\nif sum < 0:\n print(-1)\nelse:\n print(sum)', 'n,m = map(int,input().split())\na = list(map(int,input().split()))\nsum = -314\nfor i in a:\n sum += a\nif sum < 0:\n print(-1)\nelse:\n print(sum)', 'n,m = map(i...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s883241486', 's894644866', 's704453003']
[9884.0, 9880.0, 9920.0]
[26.0, 21.0, 23.0]
[141, 142, 141]
p02706
u955865184
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n, m = list(map(int, input().split())\nprint(max(n - sum(list(map(int, input().split()), 0))', 'n, m = list(map(int, input().split())\nprint(max(n - sum(list(map(int, input().split()))), 0))', 'n, m = list(map(int, input().split()))\nprint(max(n - sum(list(map(int, input().split()))), -1))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s082504441', 's260149474', 's888382364']
[9032.0, 9008.0, 10196.0]
[21.0, 21.0, 22.0]
[91, 93, 95]
p02706
u956910277
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['tot , n = list( map ( int ,input().split()))\na = list( map( int , input().split()))\nif tot >= a.sum():\n\tprint(tot -a.sum())\nelse:\n\tprint(-1)', 'tot , n = list( map ( int ,input().split()))\na = list( map( int , input().split()))\nif tot >= sum(a):\n\tprint(tot -sum(a))\nelse:\n\tprint(-1)']
['Runtime Error', 'Accepted']
['s898811188', 's032568166']
[10040.0, 9992.0]
[24.0, 25.0]
[140, 138]
p02706
u960611411
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['NM = list(map(int, input().split()))\nN = NM[0]\nM = NM[1]\nAlist = []\nfor i in range(M):\n Alist.append(int(input()))\ndaysNeeded = sum(Alist)\nif daysNeeded>N:\n print(-1)\nelse:\n print(M - daysNeeded)', 'NM = list(map(int, input().split()))\nN = NM[0]\nM = NM[1]\nAlist = list(map(int, input().split()))\...
['Runtime Error', 'Accepted']
['s500504172', 's947546308']
[9244.0, 10004.0]
[25.0, 23.0]
[204, 183]
p02706
u961059809
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n,m = map(int,input())\na = [int(x) for x in input().split()]\ns = sum(a)\nif n < s:\n print("-1")\nelse:\n print(n-s)', 'n,m = map(int,input().split())\na = [int(x) for x in input().split()]\ns = sum(a)\nif n < s:\n print("-1")\nelse:\n print(n-s)']
['Runtime Error', 'Accepted']
['s576907321', 's939476469']
[9152.0, 10020.0]
[22.0, 23.0]
[114, 122]
p02706
u962609087
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['def main():\n n, m = map(int,input().split())\n a = list(map(int,input().split()))\n sum = sum(a)\n if sum <= n:\n print(n - sum)\n else:\n print(-1)\n \nmain()\n', 'def main():\n n, m = map(int,input().split())\n a = list(map(int,input().split()))\n Sum = sum(a)\n if Sum <= n:\n print(n - Sum)\n else:\n pri...
['Runtime Error', 'Accepted']
['s294439507', 's532754474']
[9968.0, 9972.0]
[29.0, 31.0]
[159, 159]
p02706
u968826463
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n,m= list(map(int,input().split(" ")))\narr = list(map(int,input().split(" ")))\nprint(sum(arr))\nif(sum(arr)>n):\n print(-1)\nelif(sum(arr)==n):\n print(0)\nelse:\n print(n-sum(arr))', 'n,m= list(map(int,input().split(" ")))\narr = list(map(int,input().split(" ")))\nif(sum(arr)>n):\n print(-1)\nelif(sum(...
['Wrong Answer', 'Accepted']
['s406156152', 's182370994']
[10004.0, 9888.0]
[21.0, 27.0]
[184, 168]
p02706
u969848070
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
["a, b = map(int, input().split())\nl = list(map(int, input().split()))\nif sum(l) < a:\n\tprint('-1')\nelse:\n\tprint(a-sum(l))\n", "a, b = map(int, input().split())\nl = list(map(int, input().split()))\nif sum(l) > a:\n\tprint('-1')\nelse:\n\tprint(a-sum(l))"]
['Wrong Answer', 'Accepted']
['s940109877', 's936378841']
[9892.0, 10056.0]
[22.0, 24.0]
[120, 119]
p02706
u987188835
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['N, M = [int(s) for s in input().split()]\nA = [int(s) for s in input().split()]\ndays = N - sum(A)\ndays = -1 if days < 0 else -1\nprint(days)', "N, M = [int(s) for s in input().split()]\nA = [int(s) for s in input().split()]\ndays = N - sum(A)\ndays = '-1' if days < 0 else days\nprint(days)"]
['Wrong Answer', 'Accepted']
['s116329669', 's641931015']
[10072.0, 10192.0]
[23.0, 21.0]
[138, 142]
p02706
u987637902
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n, m = map(int, input().split)\na = list(map(int, input().split()))\nct = 0\nfor i in range(m):\n ct += a[i]\n\nif n - ct >= 0:\n print(n - ct)\nelse:\n print(-1)\n', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\nct = 0\nfor i in range(m):\n ct += a[i]\n\nif n - ct >= 0:\n pri...
['Runtime Error', 'Accepted']
['s941071070', 's776360632']
[9060.0, 10168.0]
[25.0, 31.0]
[163, 165]
p02706
u992541367
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['N, M = map(int,input().split())\nA = list(map(int,input().split()))\nprint(min(-1,(N-sum(A))))', 'N, M = map(int,input().split())\nA = list(map(int,input().split()))\nprint(max(-1,(N-sum(A))))']
['Wrong Answer', 'Accepted']
['s137290333', 's846979528']
[10092.0, 10116.0]
[26.0, 21.0]
[92, 92]
p02706
u994935583
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['N,M = map(int,input().split())\nA = list(map(int,input().split()))\nans = N\nfor i in range(M):\n ans = ans - A[i]\nif ans < 0:\n print(-1)\nelse\n\tprint(ans)', 'def resolve():\n N,M = map(int,input().split())\n A = list(map(int,input().split()))\n ans = N\n for i in range(M):\n ans = ans - A[...
['Runtime Error', 'Accepted']
['s672460265', 's647335500']
[9028.0, 10048.0]
[21.0, 23.0]
[153, 222]
p02706
u996262044
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['n, _ = map(int, input().split())\nnums = list(map(int, input().split()))\ntotal = sum(nums)\nans = total - n\nprint(ans)', 'n, _ = map(int, input().split())\nnums = list(map(int, input().split()))\ntotal = sum(nums)\nans = n - total\nif ans < 0:\n print(-1)\nelse:\n print(ans)']
['Wrong Answer', 'Accepted']
['s877211905', 's927313041']
[9992.0, 10192.0]
[19.0, 23.0]
[116, 152]
p02706
u997389162
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['D, n = map(int,input().split())\nl = list(map(int,input().spliy()))\nprint(D-sum(l))', 'D, n = map(int,input().split())\nl = list(map(int,input().split()))\na = D - sum(l)\nif a >-1:\n print(a)\nelse:\n print(-1)']
['Runtime Error', 'Accepted']
['s358664007', 's670605325']
[9136.0, 10056.0]
[22.0, 22.0]
[82, 124]
p02706
u997927785
2,000
1,048,576
Takahashi has N days of summer vacation. His teacher gave him M summer assignments. It will take A_i days for him to do the i-th assignment. He cannot do multiple assignments on the same day, or hang out on a day he does an assignment. What is the maximum number of days Takahashi can hang out during the vacation if ...
['N, M = map(int, input().split())\na = list(map(int, input().split))\n\nhomework = sum(a)\n\nif homework > N:\n print("-1")\n\nelse:\n print(N - homework)', 'N, M = map(int, input().split())\na = [int(input()) for i in range(M)]\n\nhomework = sum(a)\n\nif homework > N:\n print("-1")\n\nelse:\n print(N - ho...
['Runtime Error', 'Runtime Error', 'Accepted']
['s338013076', 's378487710', 's818396174']
[9112.0, 9160.0, 9980.0]
[22.0, 23.0, 22.0]
[150, 154, 152]
p02707
u002611201
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 ...
['\na = int(input())\nlists = list(map(int, input().split())) \n\nnum = [0]*a\n\ndef mi(x):\n return int(x-1)\ny = list(map(mi,lists))\nfor i in y:\n #print(i)\n num[y[i]] += 1\nfor i in range(a):\n print(num[i])', 'a = int(input())\nlists = list(map(int, input().split())) \n\nnum = [0]*a\n\ndef mi(x):\n\n ...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s056692259', 's100539521', 's273665286', 's393621380', 's213723260']
[32244.0, 32308.0, 32240.0, 32364.0, 32244.0]
[192.0, 185.0, 127.0, 146.0, 191.0]
[307, 316, 344, 351, 314]
p02707
u005317312
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 ...
['import numpy as np\nimport math as mt\nN=int(input())\n#R=map(int, input().split())\nA=list(map(int,input().split()))\ncount=1\nfor i in range(0,N-1):\n if i==N-2:\n print(count)\n print(0)\n elif A[i]!=A[i+1]:\n print(count)\n else:\n count=count+1', 'import numpy as np\nimport m...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s669695683', 's839175235', 's772379352']
[50860.0, 50948.0, 32292.0]
[242.0, 236.0, 162.0]
[273, 256, 140]
p02707
u005960309
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 ...
["N = int(input())\nA = [0]\nA.extend(list(map(int, input().split())))\n\nbuka_num = [0]\n\nfor i in range(1, N+1):\n tmp_A = A[i:]\n\tbuka_num.append(tmp_A.count(i))\n\nprint(buka_num, sep='¥n')", "N = int(input())\nA = [0]\nA.extend(list(map(int, input().split())))\n\nbuka_num = []\n\nfor i in range(1,N):\n tmp_A...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s036027030', 's146432196', 's219267835', 's275511259', 's474078524', 's543129900', 's908042760', 's058048114']
[8960.0, 32360.0, 8964.0, 9052.0, 32364.0, 9028.0, 32176.0, 35192.0]
[24.0, 2206.0, 22.0, 21.0, 2206.0, 22.0, 2206.0, 205.0]
[184, 207, 202, 204, 149, 201, 149, 234]
p02707
u011277545
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 ...
['N=int(input())\nBoss=list(map(int, input().split()))\nBoss.insert(0, 0)\nfor i in range(N):\n print(Boss.count(Boss[i]+1))', 'import collections\nN=int(input())\nBoss=list(map(int, input().split()))\nAA=collections.Counter(Boss)\nfor i in range(N):\n print(AA[i+1])']
['Wrong Answer', 'Accepted']
['s232832880', 's550351061']
[32292.0, 34156.0]
[2206.0, 178.0]
[121, 137]
p02707
u013415932
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 ...
['N=int(input())\njosi = list(map(int,input().split()))\ncount=[0]*N\nn=0\nwhile n<N-1:\n count[josi[n]] =count[josi[n]]+1\n n=n+1\nn=0\nwhile n<N:\n print(count[n])\n\n ', 'N=int(input())\njosi = list(map(int,input().split()))\nn=1\nm=0\ncount=0\nwhile n<=N:\n m=n\n while m<N:\n if josi[m]=n:\n count...
['Time Limit Exceeded', 'Runtime Error', 'Accepted']
['s148360249', 's815914443', 's696154573']
[32232.0, 8900.0, 32344.0]
[2229.0, 26.0, 199.0]
[165, 188, 170]
p02707
u014800961
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 ...
['n = int(input())\nalist = list(map(int,input().split()))\nprint(alist)\nnum_b = [0]*(n+1)\nfor i in range(n-1):\n num_b[alist[i]] += 1 \nfor i in range(1,n+1):\n print(num_b[i])', 'n = int(input())\nalist = list(map(int,input().split()))\nnum_b = [0]*(n+1)\nfor i in range(n-1):\n num_b[alist[i]] += 1 \nfor i...
['Wrong Answer', 'Accepted']
['s165872391', 's736973502']
[32192.0, 32124.0]
[173.0, 155.0]
[176, 163]
p02707
u016302627
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 ...
['N = int(input())\nA = list(map(int, input().split()))\ndata = [0 for i in range(N-1)]\nfor i in range(N-1):\n data[A[i]-1] += 1\nfor j in range(N-1):\n print(data[j])', "N = int(input())\nA = list(map(int, input().split()))\ndata = [0 for i in range(N-1)]\nfor i in range(N-1):\n data[A[i]-1] += 1\nfor j in range...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s262488691', 's913459747', 's271797282']
[32304.0, 32236.0, 32204.0]
[167.0, 172.0, 175.0]
[162, 178, 174]
p02707
u018258333
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 ...
["n = int(input())\na = list(map(int,input().split()))\ncount = ''\nfor i in range(1,n+1):\n count+=(str(a.count(i))+'\\n')\nprint(count)", 'n = int(input())\na = list(map(int,input().split()))\n\ncount = [0]*n\n\nfor i in a:\n count[i-1]+=1\nfor i in count:\n print(i)']
['Time Limit Exceeded', 'Accepted']
['s067394831', 's864130989']
[32296.0, 32364.0]
[2206.0, 146.0]
[130, 122]
p02707
u018469350
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 ...
['n = int(input())\na = list(map(int, input().split()))\n\nresult = [0 for _ in range(n)]\nfor i in range(n - 1):\n result[a[i]-i] += 1\n\nfor v in result:\n print(v)', 'n = int(input())\na = []\nfor i in range(0, n - 1):\n a.append(int(input()))\n\nfor i in range(1, n +1):\n print(a.count(i))', 'n = int(in...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s362800429', 's716173882', 's090804462']
[32388.0, 11348.0, 32372.0]
[159.0, 32.0, 157.0]
[162, 124, 162]
p02707
u018591138
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 ...
['n = int(input())\na = list(input().split())\n#print(a)\n\nemploy = {}\n\nfor i in range(len(a)):\n if a[i] in employ:\n employ[a[i]] = employ[a[i]] + 1\n else:\n employ[a[i]] = 1\n\n#print(employ)\nfor i in range(1, n):\n if str(i) in employ:\n print(employ[str(i)])\n else:\n p...
['Wrong Answer', 'Accepted']
['s059730801', 's792936919']
[39988.0, 39876.0]
[282.0, 305.0]
[308, 310]
p02707
u022215787
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 ...
[' = int(input())\na_list = list(map(int, input().split()))\na_list = [ (i+2, s) for i, s in enumerate(a_list) ]\na_list = sorted(a_list, key=lambda x: x[1])\ncount = 0\nboss = 1\nfor a in a_list:\n if a[1] == boss:\n count += 1\n else:\n diff = a[1] - boss\n for _ in range(diff):\n ...
['Runtime Error', 'Accepted']
['s626375927', 's805794787']
[8960.0, 39576.0]
[22.0, 323.0]
[450, 451]
p02707
u024442309
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 ...
["N = int(input())\ns = [0 for i in range(N)]\nA = list(map(int, input().split()))\nprint(s)\nfor i in A:\n s[i - 1] += 1\nprint(*s, sep='\\n')\n", "N = int(input())\ns = [0 for i in range(N)]\nA = list(map(int, input().split()))\nfor i in A:\n s[i - 1] += 1\nprint(*s, sep='\\n')\n"]
['Wrong Answer', 'Accepted']
['s529379949', 's476156099']
[33796.0, 33940.0]
[144.0, 134.0]
[138, 129]
p02707
u028014940
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 ...
['\n\nimport sys\nread = sys.stdin.buffer.read \nreadline = sys.stdin.buffer.readline \nreadlines = sys.stdin.buffer.readlines \nsys.setrecursionlimit(10**7) \n\nN = int(readline().rstrip()) \nA = list(map(int,readline().rstrip().split()))\n\nbuka=[0]*N\n\nfor i in range(N-1):\n buka[A[i]-1]+=1\n\nprint(buka)', '\n#...
['Wrong Answer', 'Accepted']
['s802345347', 's268041897']
[27716.0, 33112.0]
[105.0, 132.0]
[409, 1500]
p02707
u030726788
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 ...
['n = int(input())\na = list(map(int,input().split()))\ns = [0 for _ in range(n)]\nfor i in range(n):\n s[a[i]-1] += 1\nfor t in s:print(t)', 'n = int(input())\na = list(map(int,input().split()))\nfor i in range(n):\n print(a.count(i))', 'n = int(input())\na = list(map(int,input().split()))\ns = [0 for _ in range...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s214187871', 's549881634', 's603971562']
[32364.0, 32376.0, 32192.0]
[105.0, 2206.0, 148.0]
[135, 92, 138]
p02707
u033360495
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 ...
['N = int(input())\nA = [0]*N\n\nprint(A)\nfor i in [int(s) for s in input().split()]:\n A[i-1] +=1\n\nfor j in range(N+1):\n print(A[j])', 'N = int(input())\nA1 = [1]\nAi = [int(a) for a in input().split()]\nA = A1+Ai\n\nfor ai in A:\n print([(a==ai+1) for a in A].count(True))', 'N = int(input())\nA1 = [0]\nA...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s155780456', 's267451540', 's322063648', 's462724739', 's700106724', 's723030905', 's465899804']
[33644.0, 32268.0, 32328.0, 32180.0, 32188.0, 32256.0, 33884.0]
[170.0, 2206.0, 2206.0, 2206.0, 2206.0, 2206.0, 159.0]
[133, 134, 149, 111, 134, 144, 122]
p02707
u033523569
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 ...
['n=int(input())-1\na=list(map(int,input().split()))\nr=[]\nfor i in range(n):\n \tr.append(0)\n r[a[i]-1]+=1\nfor i in range (n):\n print (r[i])\nprint (0)', 'n=int(input())-1\na=list(map(int,input().split()))\nr=[]\nfor i in range(n):\n r.append(0)\n r[a[i]-1]+=1\nfor i in range (n):\n print (r[i])\np...
['Runtime Error', 'Accepted']
['s842591386', 's743129031']
[8984.0, 32236.0]
[22.0, 167.0]
[152, 154]
p02707
u033524082
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 ...
['n=int(input())\na=list(map(int,input().split()))\nl=[0]*(n+1)\n\nfor i in a:\n l[i]+=1\nprint(l[1])\nfor i in a:\n print(l[i+1])\n', 'n=int(input())\na=list(map(int,input().split()))\nl=[0]*n\n\nfor i in a:\n l[i]+=1\nprint(l[1])\nfor i in a:\n print(l[i+1])\n', 'n=int(input())\na=list(map(int,input().split()))\n...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s101241913', 's841512669', 's334082926']
[32228.0, 32180.0, 32348.0]
[157.0, 151.0, 159.0]
[123, 119, 121]
p02707
u033724502
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 ...
['n = int(input())\na = map(int, input().split(" "))\nd = [0 for i in range(n)]\nfor i in a:\n d[i] += 1\nfor i in range(1, n):\n print(d[i])', 'n = int(input())\na = map(int, input().split(" "))\nd = [0 for i in range(n)]\nfor i in a:\n d[i - 1] += 1\nfor i in range(n):\n print(d[i])']
['Wrong Answer', 'Accepted']
['s268364919', 's912108476']
[25816.0, 26016.0]
[151.0, 160.0]
[139, 140]
p02707
u034128150
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 ...
['N = int(input())\ncounter = [0] * N\nAs = map(int, input().split())\nfor A in As:\n counter[A] += 1\nfor c in counter:\n print(c)', 'N = int(input())\ncounter = [0] * N\nAs = map(int, input().split())\nfor A in As:\n counter[A-1] += 1\nfor c in counter:\n print(c)\n']
['Wrong Answer', 'Accepted']
['s696925775', 's104858082']
[25904.0, 26016.0]
[138.0, 135.0]
[125, 128]
p02707
u034777138
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 ...
['N = int(input())\nA = list(map(int,input().split()))\n\nClist = []\nfor count in range(len(A)+1):\n Clist.append(0)\n\nfor count in range(len(A)):\n Clist[A[count]-1] = Clist[A[count]-1] + 1\n\nfor count in range(0,len(A)):\n print(Clist[count])', 'N = int(input())\nA = list(map(int,input().split()))\n\nClis...
['Wrong Answer', 'Accepted']
['s189292928', 's251554375']
[32364.0, 32288.0]
[192.0, 189.0]
[243, 245]
p02707
u036914910
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 ...
['N = int(input())\nA = list(input().split())\nfor i in range(1,N+1) :\n ans = A.count(i)\n print(ans)', 'N = int(input())\nA = list(map(int,input().split()))\nC = [0] * N\nfor i in range(len(A)) :\n x = A[i]\n C[x-1] += 1\nfor i in range(N) :\n print(C[i])']
['Wrong Answer', 'Accepted']
['s129026622', 's480226871']
[24928.0, 32236.0]
[2206.0, 169.0]
[102, 153]
p02707
u038569501
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 ...
['N=int(input())\narr=[0]*N\nfor i in range(1,N):\n A=int(input())\n arr[A-1]+=1\nfor i in range(0,N):\n print(arr[i])', 'N=int(input())\nL=[0]*N\nA=list(map(int,input().split()))\nfor i in range(0,len(A)):\n L[A[i]-1]+=1\nfor i in range(0,N):\n print(L[i])']
['Runtime Error', 'Accepted']
['s630240144', 's323087017']
[12920.0, 33860.0]
[29.0, 154.0]
[119, 135]
p02707
u046247133
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 ...
['N = int(input())\nsyain = []\nfor i in range(N):\n\tsyain.append(0)\nx =(input()).split(" ")\nxid = [int(s) for s in x]\nfor t in xid:\n\tsyain[t-1]+=1\nprint(syain)', 'N = int(input())\nsyain = []\nfor i in range(N):\n\tsyain.append(0)\nx =(input()).split(" ")\nxid = [int(s) for s in x]\nfor t in xid:\n\tsyain[t-1]+...
['Wrong Answer', 'Accepted']
['s413945454', 's589360268']
[33892.0, 34092.0]
[120.0, 167.0]
[155, 168]
p02707
u048013400
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 ...
['N = int(input())\n\nA = list(map(int,input().split()))\n\nsum = 0\nfor i in range(N):\n print(A.count(i+1))\n sum += A.count(i+1)\n if sum == (N-1):\n break', 'import collections\n\nN = int(input())\n\nA = list(map(int, input().split()))\n\nc = collections.Counter(A)\n\nfor i in range(N):\n print(c...
['Wrong Answer', 'Accepted']
['s983245448', 's020067120']
[32376.0, 33868.0]
[2206.0, 187.0]
[163, 139]
p02707
u048521352
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 ...
['import collections\nn = int(input())\nA = list(map(int, input().split()))\ncnt = collections.Counter(A)\nfor i in range(1,n):\n print(cnt[i])', 'import collections\nn = input()\na = list(map(int, input().split()))\na = Counter(a)\nfor i in range(n):\n print(a[i])\n', 'import collections\nn = int(input)\nA = list(ma...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s515454080', 's517845093', 's572520211', 's661648692', 's261917839']
[34052.0, 33600.0, 9404.0, 32244.0, 33972.0]
[178.0, 65.0, 22.0, 2206.0, 173.0]
[137, 115, 136, 105, 139]
p02707
u050641473
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 ...
['N = int(input())\nworks = sorted(list(map(int,input().split())))\n \nfor i in range(1,N + 1):\n print(works.count(i))\n works.remove(i)', 'N = int(input())\nworks = list(map(int, input().split()))\nans = [0] * (N + 1)\n \nfor i in range(0,N - 1):\n \n ans[works[i]] += 1\n\nans.pop(0)\nfor i in ans:\n print(i)']
['Runtime Error', 'Accepted']
['s725045442', 's717992998']
[32304.0, 32184.0]
[2206.0, 148.0]
[132, 164]
p02707
u050805798
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 ...
['a = int(input())\nb = list(map(int,input().split()))\nc = [0]*a\nfor i in b:\n c[i-1] += 1\nprint(c)\nfor i in c:\n print(i)\n\n\n\n', 'a = int(input())\nb = list(map(int,input().split()))\nc = [0]*a\nfor i in b:\n c[i-1] += 1\nfor i in c:\n print(i)\n']
['Wrong Answer', 'Accepted']
['s642046383', 's415286713']
[32368.0, 32360.0]
[160.0, 137.0]
[127, 115]
p02707
u051843295
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 ...
['n=int(input())\narr=[int(i) for i in input().split()]\nans=[ 0 for i in range(n+1)]\nfor i in range(n):\n ans[arr[i]-1]+=1\nfor i in ans:\n print(i)\n', 'n=int(input())\narr=[int(i) for i in input().split()]\nans=[ 0 for i in range(n)]\nfor i in arr:\n ans[i-1]+=1\nfor i in ans:\n print(i)\n']
['Runtime Error', 'Accepted']
['s060149933', 's816067856']
[32192.0, 32180.0]
[107.0, 158.0]
[149, 137]
p02707
u055244973
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 ...
['N = int(input())\nA = list(map(int, input().split()))\n\nfor i in A:\n print(A.count(i))', 'N = int(input())\nA = list(map(int, input().split()))\n\nans = [0] * N\n\nfor a in A:\n ans[a - 1] += 1\n\nfor a in ans:\n print(a)']
['Wrong Answer', 'Accepted']
['s943751869', 's571434193']
[32296.0, 32392.0]
[2206.0, 148.0]
[87, 128]
p02707
u055875839
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 ...
['n = int(input())\nl = list(map(int, input().split()))\n\nans = [0] * n\nfor i in l:\n l[i-1] += 1\n \nfor i in ans:\n print(i)', 'n = int(input())\nl = list(map(int, input().split()))\n \nans = [0] * n\nfor i in l:\n ans[i-1] += 1\n \nfor i in ans:\n print(i)']
['Wrong Answer', 'Accepted']
['s805644267', 's111321368']
[32280.0, 32132.0]
[161.0, 150.0]
[121, 124]
p02707
u061566631
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 ...
['import sys\ninput = sys.stdin.readline\nn = int(input())\na = [int(i) for i in input().split()]\ndel a[n:len(a)-1]\nprint(a)\nfor i in range(n):\n count = 0\n for j in a:\n if i+1 == j:\n count += 1\n print(count)\n', 'import sys\nimport collections\ninput = sys.stdin.readline\nn = int(inpu...
['Wrong Answer', 'Accepted']
['s225098369', 's072698239']
[30952.0, 35116.0]
[2206.0, 178.0]
[230, 174]
p02707
u062484507
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 ...
['import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nn = int(readline())\na = list(map(int, readline().split()))\nl = [0]*n\nfor i in a:\n l[i - 1] += 1\nprint(l, sep="/n")', "import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer....
['Wrong Answer', 'Accepted']
['s316647749', 's479967514']
[27880.0, 27972.0]
[96.0, 128.0]
[234, 234]
p02707
u066109980
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 ...
['N = int(input())\nA = [int(s) for s in input().split(" ")]\nR = [0] * (A + 1)\nfor a in A:\n\tR[a - 1] += 1\nfor a in R:\n print(a)', 'N = int(input())\nA = [int(s) for s in input().split(" ")]\nR = [0] * (len(A) + 1)\nfor a in A:\n\tR[a - 1] += 1\nfor a in R:\n print(a)']
['Runtime Error', 'Accepted']
['s045481132', 's028835248']
[32184.0, 32332.0]
[72.0, 156.0]
[125, 130]
p02707
u066551652
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 ...
['n = int(input())\na = list(map(int, input().split()))\ntm = 0\n\nfor i in range(1, n):\n tm = a.count(i)\n print(tm)', 'n = int(input())\na = list(map(int, input().split()))\ntm = [0] * n\n\nfor i in range(n-1):\n tm[a[i] - 1] += 1\n\nfor i in tm:\n print(i)']
['Wrong Answer', 'Accepted']
['s885941187', 's708489831']
[32284.0, 32176.0]
[2206.0, 158.0]
[116, 136]
p02707
u069479805
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 ...
['N = int(input())\nAs = list(map(int, input().split()))\nans = [0 for _ in range(N)]\n \nfor a in As\n ans[a-1] += 1\n\nprint(ans, sep="\\n")', '# coding: utf-8\n# Your code here!\n\nN = int(input())\nAs = list(map(int, input().split()))\nans = [0 for _ in range(N)]\n \nfor a in As:\n ans[a-1] += 1\n\nprint(*ans...
['Runtime Error', 'Accepted']
['s624515210', 's418369102']
[9016.0, 32352.0]
[21.0, 133.0]
[135, 172]
p02707
u075303794
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 ...
['N=int(input())\nA=list(map(int, input().split()))\nans=[0]*N\nfor _i in range(N):\n ans[A[i]-1]+=1\n\nfor x in ans:\n print(x)', 'N=int(input())\nA=list(map(int, input().split()))\nans=[0]*N\n\nfor i in range(N-1):\n ans[A[i]-1]+=1\n \nfor x in ans:\n print(x)']
['Runtime Error', 'Accepted']
['s351124075', 's646723531']
[32244.0, 32304.0]
[72.0, 162.0]
[121, 124]
p02707
u077003677
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 ...
["import sys\nimport os\nimport math\n\ndef file_input():\n f = open('input.txt', 'r')\n sys.stdin = f\n\ndef main():\n file_input()\n\n N = [0]*int(input())\n A = list(map(int, input().split()))\n\n for i in A:\n N[i-1]+=1\n\n for i in N:\n print(i)\n\n\nif __name__ == '__main__':\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s677896833', 's791337706', 's064938525']
[9060.0, 35200.0, 35180.0]
[22.0, 115.0, 131.0]
[306, 308, 317]
p02707
u078349616
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 ...
['N = int(input())\nA = sorted(list(map(int,input().split())))\nL = [0]*(N+1)\nfor i in range(N-1):\n L[A[i]] += 1\nfor l in L:\n print(l)', 'N = int(input())\nA = sorted(list(map(int,input().split())))\nL = [0]*(N+1)\nfor i in range(N-1):\n L[A[i]] += 1\nfor l in L[1:]:\n print(l)']
['Wrong Answer', 'Accepted']
['s059472280', 's930522432']
[32300.0, 32244.0]
[199.0, 195.0]
[132, 136]
p02707
u085334230
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 ...
['N = int(input())\nA = list(map(int, input().split()))\nfor r in {A.count(i) for i in range(1, N + 1)}:\n print(r)', 'import collections\nN = int(input())\nA = list(map(int, input().split()))\nc = collections.Counter(A)\nfor i in range(1, N + 1):\n if c[i]:\n print(c[i])\n else:\n print(0)']
['Wrong Answer', 'Accepted']
['s943004796', 's856434507']
[32376.0, 34176.0]
[2206.0, 184.0]
[113, 184]
p02707
u086503932
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 ...
['from collections import Counter\nN = int(input())\nA = list(map(int, input().split()))\n\nl = Counter(A)\n\nfor i in range(N):\n if i in l:\n print(l[i])\n else:\n print(0)', 'from collections import Counter\nN = int(input())\nA = list(map(int, input().split()))\n\nl = Counter(A)\n\nfor i in range(N):\n if i...
['Wrong Answer', 'Accepted']
['s867176856', 's708482323']
[34096.0, 34044.0]
[180.0, 189.0]
[170, 174]
p02707
u104005543
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 ...
['n = int(input())\na = list(map(int, input().split()))\narr = [0 for i in range(n)]\nfor i in a:\n arr[a - 1] += 1\nfor i in range(n):\n print(arr[i])', 'n = int(input())\na = list(map(int, input().split()))\narr = [0 for i in range(n)]\nfor i in a:\n arr[i - 1] += 1\nfor i in range(n):\n print(arr[i])']
['Runtime Error', 'Accepted']
['s559735163', 's318226693']
[32376.0, 32248.0]
[72.0, 159.0]
[149, 149]
p02707
u107601154
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 ...
['N = int(input())\narray = list(map(int, input().strip().split()))\narray.sort\nansarray = []\nansnum = 1\nans = 0\nansindex = 0\nfor i in range (1,N+1):\n for j in range(ansindex,N-1):\n if (array[j] == i):\n ans += 1\n ansindex += 1\n else:\n ansarray.append(ans)\n ...
['Runtime Error', 'Accepted']
['s159271962', 's237765885']
[32368.0, 32244.0]
[267.0, 305.0]
[489, 520]
p02707
u111652094
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 ...
['N=int(input())\nA=list(map(int,input().split()))\n\nA.sort()\nif A[0]==0:\n A.remove(0)\n\nl=len(A)\nk=0\n\nans=1\n\nm=max(A)\n\nfor i in range(l-1):\n if A[i+1]>A[i]:\n k=A[i]\n print(ans)\n while A[i+1]!=k+1:\n k=k+1\n print(0)\n ans=0\n else:\n ans=...
['Wrong Answer', 'Accepted']
['s823701364', 's120540847']
[32228.0, 32232.0]
[230.0, 157.0]
[406, 121]
p02707
u112007848
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 ...
['ninnzuu = (int)(input())\njoushi = list(map(int, input().split(" ")))\nbuka = [0 for i in range(ninnzuu)]\nfor i in range(1, ninnzuu + 1):\n buka[joushi[i] - 1] += 1\nfor i in range(ninnzuu):\n print(buka[i])', 'ninnzuu = (int)(input())\njoushi = list(map(int, input().split(" ")))\nbuka = [0 for i in range(ninnzu...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s330692147', 's850645247', 's715171950']
[32276.0, 32228.0, 32172.0]
[102.0, 161.0, 163.0]
[206, 199, 211]
p02707
u112623731
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 ...
['from collections import Counter\nn = int(input())\na = list(map(int, input().split()))\n\nfor _ in Counter(a).values():\n print(_)\n\n', 'from collections import Counter\nn = int(input())\na = list(map(int, input().split()))\nc = Counter(a)\nfor _ in range(1, n+1):\n print(c[_])\n\n']
['Wrong Answer', 'Accepted']
['s155493641', 's204914403']
[34016.0, 33868.0]
[134.0, 169.0]
[128, 139]
p02707
u114233208
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 ...
['n = int(input())\na = list(map(int, input().split()))\nsubmap = {}\nfor each in a:\n try:\n submap[i] += 1\n except:\n submap[i] = 1\nfor i in range(1, n+1):\n try:\n print(submap[i])\n except:\n print(0)', '\nn = int(input())\na = list(map(int, input().split()))\nsubmap = {}\nfor each in a:\n try:\n...
['Runtime Error', 'Accepted']
['s384121443', 's956892415']
[32240.0, 33348.0]
[63.0, 215.0]
[208, 215]
p02707
u115877451
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 ...
['a=int(input())\nb=list(map(int,input().split()))\n\nfor i in range(len(b)):\n print(b.count(b[i]))\nprint(0)', 'import collections\na=int(input())\nb=list(map(int,input().split()))\nc=[0]*a\nd=collections.Counter(b)\nn,m=zip(*d.most_common())\nn=list(n)\nm=list(m)\nfor i in n:\n c[i-1]=m[i-1]\nprint(c)\nfor i i...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s144434769', 's584243658', 's285423008']
[32264.0, 58724.0, 57088.0]
[2206.0, 285.0, 302.0]
[106, 210, 255]
p02707
u116484168
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 ...
['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\n', 'N = input()\nA = list(map(int, input().split()))\ni = 0\nwhile i < N:\n num = 0\n for i in len(A):\n if A[i] == i + 1:\n num += 1\n...
['Runtime Error', 'Runtime Error', 'Accepted']
['s244878773', 's768178410', 's152000165']
[32240.0, 32172.0, 32280.0]
[69.0, 71.0, 161.0]
[151, 167, 151]
p02707
u119012830
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 ...
['n = int(input())\na = list(map(int, input().split()))\nans = [0] * n\nfor i in range(len(a)):\n ans[a[i]-1] += 1\nfor i in range(len(a)):\n print(ans[i])\n\n', 'n = int(input())\na = list(map(int, input().split()))\nans = [0] * n\nfor i in range(len(a)):\n ans[i-1] += 1\nfor i in range(len(a)):\n print(an...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s677143978', 's730274536', 's160291941']
[32368.0, 32348.0, 32356.0]
[161.0, 153.0, 158.0]
[155, 151, 149]
p02707
u119982001
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 ...
['n = int(input())\na = [int(x) for x in input().split()]\n\na[0:0] = [0, 0]\n\nif n%2==0:\n plus = 0\nelse :\n plus = 1\n\nfor i in range(1, len(a)):\n count = 0\n tmp = a[i]\n tmp2 = a[i]\n first = True\n for j in range(i+1, len(a)):\n if tmp < a[j] and first:\n first = False\n ...
['Wrong Answer', 'Accepted']
['s395346842', 's193354235']
[32224.0, 32288.0]
[2206.0, 155.0]
[524, 141]
p02707
u121698457
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 ...
['N = int(input())\nA = list(map(int. input().split())\nfor i in range(1,N+1):\n print(A.count(i))', 'N = int(input())\nA = list(map(int, input().split()))\nB = [0 for _ in range(N)]\nfor i in A:\n B[i-1] += 1\nfor j in range(N):\n print(B[j])']
['Runtime Error', 'Accepted']
['s047038110', 's219173912']
[8972.0, 32372.0]
[22.0, 161.0]
[96, 141]
p02707
u122184618
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 ...
['n = int(input())\na = input().split()\nans = [0] * n\nfor i in range(n-1):\n ans[int(a[i])-1] +=1\n\nprint(ans)\n', 'n = int(input())\na = input().split()\nans = [0] * n\nfor i in range(n-1):\n ans[int(a[i])-1] +=1\nfor i in ans:\n print(i)\n']
['Wrong Answer', 'Accepted']
['s144580726', 's608674525']
[25948.0, 24936.0]
[107.0, 164.0]
[109, 124]
p02707
u123849536
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 ...
["n = int(input())\nboss_list = list(map(int, input().split(' ')))\n\n\n\n\nimport collections\nc = collections.Counter(boss_list)\n\nfor i in range(n):\n print(boss_list[i + 1])", "n = int(input())\nboss_list = list(map(int, input().split(' ')))\n\n\n\n\nimport collections\nc = collections.Counter(boss_list)\n\nfor...
['Runtime Error', 'Accepted']
['s380715600', 's706998151']
[33668.0, 33516.0]
[165.0, 174.0]
[224, 217]
p02707
u125337618
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 ...
['from collections import defaultdict\n\nres = defaultdict(list)\nn = int(input())\nfor i, j in zip(range(2, 2+n), map(int, input().split())):\n res[j].append(i)\n\nfor k,v in res.items():\n if k != 1:\n \tprint(len(v))', 'from collections import defaultdict\n\nres = defaultdict(list)\nn = int(input())\nfor i, j in ...
['Wrong Answer', 'Accepted']
['s724975480', 's817827290']
[67520.0, 62024.0]
[271.0, 353.0]
[210, 204]
p02707
u126146165
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 ...
['n = int(input())\n\nline = list(map(int, input().strip().split(" ")))\n\nans = [0 for s in range(n)]\n\nfor i in line:\n ans[i] += 1\n\nfor i in range(1, n):\n print(ans[i])\n', 'n = int(input())\n\nline = list(map(int, input().strip().split(" ")))\n\nans = [0 for s in range(n)]\n\nfor i in line:\n ans[i - 1...
['Wrong Answer', 'Accepted']
['s599241039', 's275357282']
[32340.0, 32292.0]
[154.0, 157.0]
[170, 171]
p02707
u127285813
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 ...
['N = int(input())\nA = list(map(int, input().split())\n\nnum_subordinates = [0 for _ in N]\nfor a in A:\n\t++num_subordinates[a]\n\nfor n in num_subordinates:\n\tprint(n)', 'N = int(input())\nA = list(map(int, input().split()))\n\nnum_subordinates = [0 for _ in range(N)]\nfor a in A:\n\tnum_subordinates[a-1] += 1\n\nf...
['Runtime Error', 'Accepted']
['s406210834', 's893204327']
[8956.0, 32220.0]
[22.0, 153.0]
[159, 172]
p02707
u128526013
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 ...
["a=[0]*int(input())\nfor i in input().split(): a[int(i)-1]+=1\nfor i in range(N): print(f'{a[i]}')", "a=[0]*int(input())\nfor i in input().split(): a[int(i)-1]+=1\nfor i in range(len(a)): print(f'{a[i]}')"]
['Runtime Error', 'Accepted']
['s426566666', 's234671017']
[25760.0, 25864.0]
[91.0, 161.0]
[95, 100]
p02707
u129749062
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 ...
['N = int(input())\na = list(input().split())\nfor i in range(N):\n s = str(i+1)\nprint(a.count(s))\n', 'N = int(input())\na = list(input().split())\nfor i in range(N):\n \ts = str(i+1)\n print(a.count(s))', 'N = int(input())\na = list(map(int, input().split()))\nli = [0] * N\nprint(li)\n\nfor i in range(N-1):\n...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s024467265', 's149130707', 's659751768', 's815670295', 's826904013']
[24496.0, 9032.0, 32368.0, 32228.0, 32372.0]
[93.0, 20.0, 186.0, 194.0, 177.0]
[97, 99, 167, 167, 157]
p02707
u130387509
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 ...
["# coding: utf-8\n# Your code here!\nimport sys\nreadline = sys.stdin.readline\nread = sys.stdin.read\n\nN = int(input())\n\nA = list(map(int, input().split())) \n\nfor i in range(N-1):\n print(A.count(i+1))\n while i+1 in A:\n A.remove(i+1)\n if A == []:\n break\n\nprint('0')\n", "N = int(inpu...
['Wrong Answer', 'Accepted']
['s060883947', 's351632060']
[32300.0, 32384.0]
[2206.0, 130.0]
[332, 171]
p02707
u135116520
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 ...
['import collections\nN=int(input())\nA=list(map(int,input().split()))\na=collections.Counter(A)\nfor i in range(N):\n print(a["i"])', 'import collections\nN=int(input())\nA=list(map(int,input().split()))\na=collections.Counter(A)\nfor i in range(1,N+1):\n print(a["i"])', 'import collections\nN=int(input())\nA=list(m...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s161653246', 's283081906', 's236588344']
[34048.0, 33996.0, 34048.0]
[176.0, 171.0, 185.0]
[126, 130, 128]
p02707
u135197221
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 ...
['from collections import Counter\n\nn = int(input())\ns = mapt(int, input().split(" "))\ndata = Counter(s)\nfor i in range(1, n+1):\n print(data.get(i, 0))', 'from collections import Counter\n\nn = int(input())\ns = map(int, input().split(" "))\ndata = Counter(s)\nfor i in range(1, n+1):\n print(data.get(i, 0))'...
['Runtime Error', 'Accepted']
['s192537587', 's957270235']
[9444.0, 45496.0]
[27.0, 167.0]
[151, 150]
p02707
u135265051
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 ...
['# import math\n# import statistics\na=int(input())\n#b,c=int(input()),int(input())\n# c=[]\n\n# c.append(i)\n# e1,e2 = map(int,input().split())\nf = list(map(int,input().split()))\n#g = [input() for _ in range(a)]\n\nf.sort()\ncount=1\nans=[0 for i in range(len(f))]\n\nfor i in range(len(f)-1):\n if f[i]==f[i+1...
['Wrong Answer', 'Accepted']
['s006905577', 's082617517']
[31932.0, 32348.0]
[214.0, 217.0]
[448, 444]
p02707
u135961419
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 ...
['n = int(input())\na = list(int,input().split()))\n \nfor i in range(n):\n\tprint(a.count(i + 1))', 'n = int(input())\na = list(map(int,input().split()))\nanswer = [0] * n\n \nfor i in range(n):\n answer[a[i]] += 1\n \nfor i in range(n):\n print(answer[i])', 'n = int(input())\na = list(map(int,input().split()))\n...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s124194736', 's364771073', 's408841673', 's524928333', 's963078199', 's479635203']
[8968.0, 32156.0, 32368.0, 8952.0, 32368.0, 32236.0]
[22.0, 91.0, 85.0, 22.0, 90.0, 149.0]
[91, 152, 151, 90, 156, 159]
p02707
u138045722
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 ...
['N=int(input())\nA_r=list(input().split())\nA=[int(x) for x in A_r]\nB=[0 for i in range(N)]\nprint(B)\nfor i in range(len(A)):\n B[A[i]-1]+=1\n[print(i) for i in B]', 'N=int(input())\nA_r=list(input().split())\nA=[int(x) for x in A_r]\nB=[0 for i in range(N)]\n\nfor i in range(len(A)):\n B[A[i]-1]+=1\nfor i in ...
['Wrong Answer', 'Accepted']
['s555426256', 's513111574']
[34300.0, 32960.0]
[178.0, 181.0]
[160, 170]
p02707
u140191608
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 ...
['import math\nN = int(input())\nA = [int(elem) for elem in input().split()]\ncount = [0]*N\nfor i in A:\n count[i-1] = count[i-1]+1\n [print (i) for i in count]', 'N = int(input())\nA = list(map(int , input().split()))\na_dict = {}\nfor i in range(N):\n a_dict[i+1] = 0\nfor i in A:\n a_dict[i] += 1\nfor v in a...
['Wrong Answer', 'Accepted']
['s330974232', 's613899305']
[33596.0, 38732.0]
[2238.0, 204.0]
[155, 174]