Problem:


Score : 300 points

Problem Statement

A company has N members, who are assigned ID numbers 1, ..., N.

Every member, except the member numbered 1, has exactly one immediate boss with a smaller ID number.

When a person X is the immediate 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.

Constraints

2 \leq N \leq 2 \times 10^5

1 \leq A_i < i

Input

Input is given from Standard Input in the following format:

N
A_2 ... A_N

Output

For each of the members numbered 1, 2, ..., N, print the number of immediate subordinates it has, in its own line.

Sample Input 1

5
1 1 2 2

Sample Output 1

2
2
0
0
0

The member numbered 1 has two immediate subordinates: the members numbered 2 and 3.

The member numbered 2 has two immediate subordinates: the members numbered 4 and 5.

The members numbered 3, 4, and 5 do not have immediate subordinates.

Sample Input 2

10
1 1 1 1 1 1 1 1 1

Sample Output 2

9
0
0
0
0
0
0
0
0
0

Sample Input 3

7
1 2 3 4 5 6

Sample Output 3

1
1
1
1
1
1
0



Sample input:
5
1 1 2 2


Sample output:
2
2
0
0
0

Submission status: Wrong Answer

Solution code:
n = int(input())

boss_list = map(int, input().split())

employee_list = [0] * (n - 1)

for boss in boss_list:
	employee_list[boss - 1] += 1
	
for employee in employee_list:
	print(employee)

Submission status: Wrong Answer

Solution code:
N = input()
a = list(map(int,input().split()))
print(N,a)
for i in range(int(N)-1):
	print(a.count(i+1))

Submission status: Wrong Answer

Solution code:
# C - management
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n-1):
    ans[a[i]-1] += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))

x = [0]*n
j = 0
for i in range(n):
    k = 0
    while j < n-1:
        if i+1 == a[j]:
            j+=1
            k+=1
        else:
            break
    x[i] = k

ans = [print(_) for _ in x]

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))

x = [0]*n
j = 0
for i in range(n):
    k = 0
    while j < n-1:
        if i+1 == a[j]:
            j=j+1
            k=k+1
        else:
            break
    x[i] = k

ans = [print(_) for _ in x]

Submission status: Wrong Answer

Solution code:
N=int(input())
A=[int(i) for i in input().split()]
lis=[0 for i in range(N)]
for i in A:
    lis[i-1]+=1
print(lis)

Submission status: Wrong Answer

Solution code:
N=int(input())
A_r=list(input().split())
A=[int(x) for x in A_r]
B=[0 for i in range(N)]
print(B)
for i in range(len(A)):
    B[A[i]-1]+=1
[print(i) for i in B]

Submission status: Wrong Answer

Solution code:

N = int(input())
A_l = list(map(int, input().split()))

ans_l = [0]*N

i = 0
while i < N-1:
  ans_l[A_l[i]-1] += 1
  i += 1

i=0
while i < N-1:
  print(ans_l[i])
  i += 1

Submission status: Wrong Answer

Solution code:
N=input()
A=list(input().split(" "))
for n in range(1,int(N)):
    print(A.count(n))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(input().split(" "))
for n in range(1,N):
    print(A.count(str(n)))

Submission status: Wrong Answer

Solution code:
N,A=int(input()),input().split(" ")
for n in range(1,N):
    print(A.count(str(n)))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

for i in range(N-1):
    count = A.count(i+1)
    print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

bukaList = []
for i in range(N-1):
    count = A.count(i+1)
    bukaList.append(count)


for k in range(N-1):
    print(bukaList[k])

Submission status: Wrong Answer

Solution code:
N=int(input())
A=input().split(" ")
for n in range(1,N):
    print(A.count(str(n)))

Submission status: Wrong Answer

Solution code:
import collections

N = int(input())
A = list(map(int, input().split()))

dict = collections.Counter(A)

list = list(dict.values())

for i in range(len(dict)):
    print(list[i])

for i in range(N - len(dict)):
    print(0)

Submission status: Wrong Answer

Solution code:
import collections

N = int(input())
A = list(map(int, input().split()))

dict = collections.Counter(A)

list = list(dict.values())

for i in range(len(dict)):
    print(list[i])

for i in range(N - len(dict)):
    print('0')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read
 

N = int(input())

A = list(map(int, input().split()))  # n個の文字列がリストに格納される

for i in range(N-1):
    print(A.count(i+1))
    while i+1 in A:
        A.remove(i+1)
    if A == []:
        break

print('0')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read

N = int(input())

A = list(map(int, input().split()))  # n個の文字列がリストに格納される

for i in range(N-1):
    print(A.count(i+1))
    while i+1 in A:
        A.remove(i+1)
    if A == []:
        break

print('0')

Submission status: Wrong Answer

Solution code:
n = int(input())+1
A = list(map(int, input().split())) 

for i in range(n):
  print(A.count(i+1))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for q in range(n - 1):
    ans[a[q]] += 1
print(*ans[1:], sep="\n")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for q in range(n - 1):
    ans[a[q]] += 1
print(*ans[0:], sep="\n")

Submission status: Wrong Answer

Solution code:
N = int(input())

Ninzu = []
for x in input().split():
	Ninzu.append(int(x))

i = 1
for i in range(1,N):
	print(Ninzu.count(i))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))

a.sort()
a.append(0)

number = 1
count = 0

for i in range(n):
    if number == a[i]:
        count += 1
    elif a[i] == number + 1:
        print(count)
        count = 1
    else:
        for j in range(n):
            print(count)
            count = 0
            number += 1
            if number == a[i]:
                break

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))

number = 1
count = 0

a.sort()
b = []

for i in range(n-1):
    if a[i] == number:
        count += 1
    else:
        print(count)
        number += 1
        count = 1
if number != n-1:
    print(count)
    for j in range(number, n):
        print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

B = [0] * N

for i in A:
  B[i-1] = int(B[i-1]) + 1
  
print(B)

Submission status: Wrong Answer

Solution code:
from collections import Counter
N = int(input())
funcionarios = list(map(int,input().split()))
for x in Counter(funcionarios).values():
    print(x)
    N -= 1
a = N
while a != 0:
    print(0)
    a -= 1

Submission status: Wrong Answer

Solution code:
from collections import Counter
N = int(input())
funcionarios = list(map(int,input().split()))
for x in Counter(funcionarios).values():
    print(x)

print(0)

Submission status: Wrong Answer

Solution code:
import collections
N = int(input())
A_list = list(map(int, input().split()))
ans = collections.Counter(A_list)
for i in range(N):
	print(ans[i])

Submission status: Wrong Answer

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
ans = ["{}\n".format(A_list.count(i)) for i in range(1, N+1)]
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
A_list = list(map(int, input().split()))
index = np.arange(1, N+1)
ans = ["{}\n".format(A_list.count(i)) for i in range(1, N+1)]
print(ans)

Submission status: Wrong Answer

Solution code:
N= int(input())
A=list(map(int,input().split()))


cnt=[0]*N
for i in range(1,N):
  cnt[A[i-1]-1]=cnt[A[i-1]-1]+1
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
dict = {}
for i in map(int, input().split(" ")):
	dict[i] = dict.get(i, 0) + 1
 
for i in range(0, n + 1):
	print(dict.get(i, 0))

Submission status: Wrong Answer

Solution code:
n = int(input())
dict = {}
for i in map(int, input().split(" ")):
	dict[i] = dict.get(i, 0) + 1

for i in range(n):
	print(dict.get(i, 0))

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[0]*a
c=list(map(int,input().split()))
for i in c:
    b[i-0]+=1
print(*b,sep="\n")

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
Al = list(input().split())
count = Counter(Al)
print(count)
for i in range(n):
    if str(i + 1) in Al:
        print(count[str(i+1)])
    else:
        print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
List = list(map(int,input().split()))
List2 = [0]*N
for i in range(N-1):
    List2[List[i-1]-1] += 1
print(List2)

Submission status: Wrong Answer

Solution code:
n = int(input())
b = list(map(int, input().split()))

for i in range(n):
  if (i+1) in b:
    c=0
    for j in range(len(b)):
      if b[j]==i+1:
        c += 1
      else:
        break
    print(c)
  else:
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = [0 for i in range(n)]

for i in range(n-1):
  b[a[i]-1] += 1

for j in range(n-1):
  print(b[j])

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

for i in range(1,len(A)+1):
    print(A.count(i))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
b = [0]*n
for i in range(n-1):
  b[a[i]] += 1
  
for e in b:
  print(e)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(map(int, input().split()))

ans = [0] * n
for i in l:
  l[i-1] += 1
  
for i in ans:
  print(i)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int, input().split()))
ans=[0]*N
for a in A:
  ans[a-1]+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
ans = [0] * (n+1)
for i in a:
    ans[i] += 1
[print(i) for i in ans]

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
A = np.array(list(map(int, input().split())))

sub = np.bincount(A, weights=None, minlength=N+1)
sub1 = sub.reshape(N+1, 1)

print(sub1[1:])

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
A = np.array(list(map(int, input().split())))

sub = np.bincount(A, weights=None, minlength=N+1)

print(sub[1:])

Submission status: Wrong Answer

Solution code:
N=int(input())
list=list(input().split())
ans=[]
for i in range(1,N):
  ans.append(list.count(str(i)))
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

sub = [A.count(i) for i in range(N)]

[print(j) for j in sub]

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))
sub = []

for i in range(N):
    sub.append(A.count(i+1))

for j in range(len(sub)):
    print(sub[i])

Submission status: Wrong Answer

Solution code:
N = int(input())
As = list(map(int, input().split()))
ans = [0] * N

for i in As:
    ans[i]+=1

for j in ans:
    print(j)

Submission status: Wrong Answer

Solution code:
n = int(input())

line = list(map(int, input().strip().split(" ")))

ans = [0 for s in range(n)]

for i in line:
    ans[i] += 1

for i in range(1, n):
    print(ans[i])

Submission status: Wrong Answer

Solution code:
N = int(input())
A = input().split()
B = [0]*(N)
for i in range(0, len(A)):
    A[i] = int(A[i])
    B[A[i]-1] += 1

print(B)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = input().split()
ans = [0] * n
for i in range(n-1):
    ans[int(a[i])-1] +=1

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = input().split()
for i in range(N):
  count = 0
  for j in range(N-1):
    if i+1 == int(A[j]):
      count += 1
    print(count)

Submission status: Wrong Answer

Solution code:
import pprint
N = int(input())
A =list(map(int, input().split()))
B = [print(A.count(i+1)) for i in range(N)]
pprint.pprint(1)

Submission status: Wrong Answer

Solution code:
N = int(input())
A =list(map(int, input().split()))
b = 0
for i in range(N-1):
    print(A.count(i+1))

Submission status: Wrong Answer

Solution code:
#Aiの数字を数え上げればいい

n = int(input())
a = list(map(int, input().split()))

for k in range(1,n):
    print(a.count(k))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))

print(A.count(i+1) for i in range(N))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))


ans =[0] * N


for i in range(N-1):
    ans[A[i]-1]=ans[A[i]-1]+1
    
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
A = list(map(int, input().split()))
ans = [0 for i in range(n)]
for i in range(n-1):
    ans[A[i]-1] += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
A = list(map(int, input().split()))
ans = [0 for i in range(n)]
print(ans)

for i in range(n-1):
    ans[A[i]-1] += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
alis = list(map(int, input().split()))
d = {}
for i in alis:
    if str(i) in d.keys():
        d[str(i)] += 1
    else:
        d[str(i)] = 1
for i in range(1,n+1):
    if str(i) not in d.keys():
        d[str(i)] = 0
print('\n'.join(map(str, d.values())))

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
a = [int(x) for x in input().split()]
d = Counter(a)
d = sorted(d.items(), key = lambda x : x[0])
f = len(d)
for i in range(len(d)):
  print(d[i][1])

for i in range(n - f):
  print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())

a = list(map(int,input().split()))

for i in range(1, n):
  print(a.count(i))

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
counter = np.bincount(A)
print(counter)
for i in range(1, N+1):
    if i < len(counter):
        print(counter[i])
    else:
        print(0)

Submission status: Wrong Answer

Solution code:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
B = list(Counter(A).values())
lA = len(A)
la = len(set(A))
l = lA - la + 1
for _ in range(l):
  B.append(0)
for i in range(N):
  print(B[i])

Submission status: Wrong Answer

Solution code:
N = int(input()) 
sub = list(map(int,input().split())) 
number = list(range(1, N+1, 1)) 
print(number)
cnt = 0 
for i in range(int(len(number))):
    for j in range(int(len(sub))):
        if number[i] == sub[j]:
            cnt = cnt + 1
        
    print(cnt)
    cnt = 0

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = [0]*N
for i in range(N-1):
    B[A.pop()-1]+=1
for i in B:
    print(B[i])

Submission status: Wrong Answer

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
A_set = sorted(set(A_list))

A_output = [0 for i in range(N)]

for i in range(len(A_set)):
    A_output[A_set[i]-1] = A_list[A_set[i]:].count(A_set[i])
    
for i in range(len(A_output)):
    print(A_output[i])

Submission status: Wrong Answer

Solution code:
from collections import Counter
def main():
  N=int(input())
  A=list(map(int,input().split()))
  d=Counter(A)
  for i in range(1,N+1):
    if i not in d:
      print(0)
    else:
      print(d[1])
if __name__=='__main__':
  main()

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split(" ")))

cursor = 1
counter = 0

for i in range(0, n - 1):
    if a[i] == cursor:
        counter += 1
    elif a[i] > cursor:
        print(counter)
        for j in range(cursor + 1, a[i]):
            print(0)
        cursor = a[i]
        counter = 1

print(counter)
for i in range(cursor + 1, n + 1):
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split(" ")))

cursor = 1
counter = 0

for i in range(0, n - 1):
    if a[i] == cursor:
        counter += 1
    elif a[i] > cursor:
        print(counter)
        for j in range(cursor + 1, a[i] - 1):
            print(0)
        cursor = a[i]
        counter = 1

print(counter)
for i in range(cursor + 1, n + 1):
    print(0)

Submission status: Wrong Answer

Solution code:
from collections import Counter
n =int(input())
a = list(map(int, input().split()))
s = Counter(a)
for v in s.values():
    print(v)
for i in range(n - len(s)):
    print(0)

Submission status: Wrong Answer

Solution code:
num_all = int(input())
list = input().split(" ")
list_int = []
for i in list:
  list_int.append(int(i)) 
print(list_int)

for j in range(num_all):
  a = list_int.count(j)
  print(a)

Submission status: Wrong Answer

Solution code:
n  = int(input())
list1 = list(map(int,input().split()))
set1 = set(list1)
rem = n-len(set1)
for i in set1:
  print(list1.count(i))

for i in range(rem):
  print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))

for i in A:
    print(A.count(i))

Submission status: Wrong Answer

Solution code:
N = int(input())
A=[int(i) for i in input().split()]

B = [0 for i in range(len(A))]
for i in A:
    B[i-1] =B[i-1] + 1

for i in B:
    print(i)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int, input().split()))
s=0
for num in range(1, N+1):
  count = 0
  for i in range(s, N-1):
    if A[i] == num:
      count += 1
    else:
      break
  s+=count
  print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

A = list(map(int, input().split())) 

for i in range(N-1):
    print(A.count(i+1))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))

result = [0 for _ in range(n)]
for i in range(n - 1):
    result[a[i]-i] += 1

for v in result:
    print(v)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))

for i in range(1,N):
    print(A.count(i))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))

Clist = []
for count in range(len(A)+1):
    Clist.append(0)

for count in range(len(A)):
    Clist[A[count]-1] = Clist[A[count]-1] + 1

for count in range(0,len(A)):
    print(Clist[count])

Submission status: Wrong Answer

Solution code:
n = int(input())

a = list(map(int, input().split()))

ans = []
for i in range(n):
    ans.append(0)
 
print(ans)

for j in a:
    ans[j-1] += 1

for k in ans:
    print(k)

Submission status: Wrong Answer

Solution code:
n = int(input())
a1 = list(map(int, input().split())) 
a2 = [0] * n

for i in range(n) :
    print(i)
    for j in range(n-1) :
        if i+1 == a1[j] :
            a2[i] += 1
    print(a2[i])

Submission status: Wrong Answer

Solution code:
import collections
N=int(input())
A=[int(s) for s in input().split(" ")]

for i in range(1,N+1):
    if A==[]:
        break
    count=A.count(i)
    del A[0:count]
    print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=[int(x) for x in input().split()]
M=[0 for i in range(N)]

for i in range(len(A)):
    M[A[i]-1]+=1
print(M)

Submission status: Wrong Answer

Solution code:
N = int(input())
liste = list(map(int, input().split()))

from collections import Counter
countedList = Counter(liste)

for i in range(N):
  if i in countedList:
    print(countedList[i])
  else:
    print('0')

Submission status: Wrong Answer

Solution code:
N = int(input())
AR = str(input()).split()

ans = []
for i in range(len(AR)):
	if i == 0:
		cnt = 1
	else:
		if AR[i] == last_val:
			cnt += 1
		if AR[i] != last_val:
			ans.append(cnt)
			cnt = 1
		if i == N-2:
			ans.append(cnt)
	last_val = AR[i]

fill_num = N - len(ans)
for j in range(fill_num):
	ans.append(0)

for k in range(N):
	print(ans[k])

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
a = [int(x) for x in input().split()]
a_ = [int(x) for x in range(1, n+1)]
a += a_
a_count = Counter(a)
for i in range(n):
    print(a_count[i+1])

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
a = [int(x) for x in input().split()]
a_ = [int(x) for x in range(1, n+1)]
a += a_
a_count = Counter(a)
for i in a_count:
    print(str(a_count[i]-1))

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
a = [int(x) for x in input().split()]
a_ = [int(x) for x in range(1, n+1)]
a += a_
a_count = Counter(a)
for i in a_count:
    print(a_count[i]-1)

Submission status: Wrong Answer

Solution code:
#https://atcoder.jp/contests/abc163/tasks/abc163_c
# -*- coding: utf-8 -*-
N = int(input())
A = input().split()
for i in range(len(A)):
  A[i] = int(A[i])
# A.insert(0,0)
buka = [0]*N
for i in range(len(A)):
  tmp = A[i]-1
  buka[tmp] += 1
print(buka)

Submission status: Wrong Answer

Solution code:
n = int(input())
L = list(map(int,input().split()))
M = [0]*n
for i in range(n-1):
    M[L[i]-1] +=1
print(M)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))
data = [0 for i in range(N-1)]
for i in range(N-1):
    data[A[i]-1] += 1
for j in range(N-1):
    print(data[j], end = '\n')

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))
data = [0 for i in range(N-1)]
for i in range(N-1):
  data[A[i]-1] += 1
for j in range(N-1):
  print(data[j])

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))

for i in range(2,n+1):
    print(a.count(i))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
dic={}
for i in range(1,N+1):
  dic[i]=0
for a in A:
  dic[a]=+1
for i in range(1,N+1):
  print(dic[i])

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
print(N,A)
n =  [0 for i in range(N) ]
print(n)
for i in A:
    n[i - 1] += 1

for j in n:
    print(j)

Submission status: Wrong Answer

Solution code:
from collections import Counter
n=int(input())
a=list(map(int,input().split()))
sorted(a)
p=Counter(a)
for k,v in p.items():
    print(v)
z=n-len(p)
for i in range(z):
    print("0")

Submission status: Wrong Answer

Solution code:
N = int(input())
b = list(map(int,input().split()))
c= list()

for i in range( N ):
    c.append(0)

for i in b:
    c[i - 1] += 1
for i in c:
    print(c[i - 1])

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
A = list(map(int,input().split()))

boss=[0]*N

for x in A:
    boss[x-1] += 1
for i in boss:
    print(int(boss[i-1]))

Submission status: Wrong Answer

Solution code:
N = int(input())
b = list(map(int,input().split()))
c= list()

for i in range( N - 1):
    c.append(0)
    
for i in b:
    c[i - 1] += 1
for i in c:
    print(c[i - 1])

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
A = list(map(int,input().split()))

boss=[0]*N

for x in A:
    boss[x-1] += 1
for i in boss:
    print(int(boss[i]))

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
staff = list(map(int, input().split()))

boss=[0]*N

for x in staff:
    boss[x-1] += 1
print(list)

Submission status: Wrong Answer

Solution code:
N = int(input())
b = list(map(int,input().split()))
for i in range(1,N):
    a = b.count(i)
    print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
b = list(map(int,input().split()))
print(b)
for i in range(N + 1):
    a = b.count(i)
    print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
AR = str(input()).split()

cnt = 1
under = []
for i in range(len(AR)):
  
  if i != 0:
    if AR[i] != retain:
      under.append(cnt)
      cnt = 1
    if AR[i] == retain:
      cnt += 1
  if i == (len(AR)-1):
    under.append(cnt)
  retain = AR[i]

add = len(AR) - len(under) + 1
for j in range(add):
  under.append(0)
  
for k in range(len(under)):
	print(under[k])

Submission status: Wrong Answer

Solution code:
N= int(input())
Alist = [int(i) for i in input().split()] 

count = 0

for j in range(1,N+1):
  for i in range(j-1,N-1):
    if Alist[i] == j:
      count += 1
    
    if Alist[i] > j:
      break
  
  print(count)
  count = 0

Submission status: Wrong Answer

Solution code:
N= int(input())
Alist = [int(i) for i in input().split()] 

count = 0

for j in range(1, N+1):
  for i in range(j,N-1):
    if Alist[i] == j:
      count += 1
     
    if Alist[j] > j:
      break
  
  print(count)
  count = 0

Submission status: Wrong Answer

Solution code:
N= int(input())
Alist = [int(i) for i in input().split()] 

count = 0

for j in range(1, N+1):
  for i in range(j,N-1):
    if Alist[i] == j:
      count += 1
  
  print(count)
  count = 0

Submission status: Wrong Answer

Solution code:
n= int(input())
listA = list(map(int,input().split()))
listA.append(0)
listA = sorted(listA)
for i in listA:
  num = i+1
  print(listA.count(num))

Submission status: Wrong Answer

Solution code:
N=int(input())
A=list(map(int,input().split()))
B=set(A)
for i in range(1,N+1):
  if i in B:
    print(A.count(i))
  else:
    m=i
    break
for j in range(N+1-m):
  print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
Alist = list(map(int,input().split()))#iの上司

result = [0]*N

for i in range(N-1):#最後の社員に部下いない
    result[Alist[i]-1] +=1#上司の順番の要素に+1

print(result)
for i in range(N):
    print(result[i])

Submission status: Wrong Answer

Solution code:
#N ≡ int(inport())
#lists = list(int,inport().split())
#print(lists.count(for_in range(N))
N = int(input())
lists = list(map(int,input().split()))
#print(lists.count( for X in range(N)))
for X in range(1,N):
    print(lists.count(X))

Submission status: Wrong Answer

Solution code:
num = int(input())
boss = input().split()

ans_list = [0] * num

for i_boss in boss:
  ans_list[int(i_boss)-1] += 1
  a = list(map(lambda  x: str(x), ans_list))
  print('\n'.join(a))

Submission status: Wrong Answer

Solution code:
def main():
    N = int( input())
    A = list( map( int, input().split()))
    B = [0]*(N)
    for a in A:
        
        B[a-1] += 1
        print(B)
    print("\n".join( map( str, B)))
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
a_list = map(int, input().split())
nl = [0] * n
for a in a_list:
    nl[a] += 1
for v in nl:
    print("{}".format(v))

Submission status: Wrong Answer

Solution code:
N = int(input())
X = [0]*N
A = list(map(int,input().split()))
for i in A:
    X[i] +=1
print(*X,sep="\n")

Submission status: Wrong Answer

Solution code:
N = int(input())
X = [0]*N
A = list(map(int,input().split()))
for i in A:
    X[i] +=1
print(X,sep="\n")

Submission status: Wrong Answer

Solution code:
n = int(input())
a_list = [int(i) for i in input().split()]

nl = [0 for i in range(n)]
print(nl)
for a in a_list:
    nl[a-1] += 1

for i in nl:
    print("{}".format(i))

Submission status: Wrong Answer

Solution code:
i = 1

print(i)

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())
a = [int(i) for i in input().split()]
b = np.zeros(n)
for i in a: b[i-1] += 1
for i in b: print(i)

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())
a = [int(i) for i in input().split()]
b = np.zeros(n)
for i in a: b[i-1] += 1
print(b)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
b = [len([i for i in a if i == j]) for j in range(n+1)]
print(b[1:])

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

#n = int(input())
#l = list(map(int, input().split()))

'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''

n = int(input())
a = list(map(int, input().split()))

import collections
cnt=0
c=collections.Counter(a)
for i in c.values():
    print(i)
    cnt+=1

for i in range(n-cnt):
    print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))
counter = [0] * N
for i in range(len(A)):
  for j in range(i-1):
    if A[i] == j:
      counter[j-1] += 1
for i in range(N):
  print(counter[i])

Submission status: Wrong Answer

Solution code:
def input_int_list():
    return [int(thing) for thing in input().split(" ")]

def int_input():
    return int(input())


import collections
N=int_input()
A_list=input_int_list()
ans_list=[0]
C=collections.Counter(A_list)
for i in range(1,N+1):
    if i in C:
        pass
    else:
        C[i]=0

for n in C:
    print(C[n])

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
cnt = Counter(a)
ans = n - 1 - cnt[1]
print(ans)
for i in range(n - 1):
    print(0)

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
a = list(map(int,input().split()))

ans = [n-1] + [0] * (n - 1)
print(*ans, sep='\n')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int, input().split()))
sorted(a)
length=len(a)

previous=1
count=0
for j in a+[n+1]:
    if j==previous:
        count+=1
    else:
        print(count)
        count=1
        for _ in range(j-previous-1):
            print(0)
        previous=j

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int, input().split()))
c = [0 for _ in range(N+1)]

for i in A:
  c[i-1] += 1
for i in c:
  print(i)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=list(map(int,input().split()))
buka=[0]*n
for i in a:
  buka[i]=buka[i]+1
for i in buka:
  print(i)

Submission status: Wrong Answer

Solution code:
N = input()
S = input().replace(" ","")
 
for A in range (int(N)-1):
    print(S.count(str(A+1),A,int(N)-2))

print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
counter = [0] * N
As = map(int, input().split())
for A in As:
  counter[A] += 1
for c in counter:
  print(c)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[int(0)]*n
l=list(map(int,input().split()))
for i in range(n-1):
	a[l[i]] = a[l[i]] + 1
for i in range(n):
	print(a[i])

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))

lis = [0]*len(a)

for i in range(n-1):
  for j in range(len(a)):
    if a[j] == i+1:
      lis[i] += 1

print(*lis, sep='\n')

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))

lis = [0]*len(a)

for i in range(n-1):
  for j in range(len(a)):
    if a[j] == i+1:
      lis[i] += 1

print(lis)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
for i in range(1,N+1):
    print(A.count(i+1))

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())
a = np.array(input().split(),dtype=int)
buka = [0 for i in range(n)]

for i in a:
    buka[i] += 1

for i in buka:
    print(i)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(map(int,input().split()))
ans = []
for i in range(N):
  ans.append(0)
for i in range(N-1):
  ans[A[i]-1] += 1
print(ans)