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: Time Limit Exceeded

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

b_list = list(range(1, N+1))
c_list = []
for i in range(N):
    sr = b_list[i]
    g = int(a.count(sr))
    c_list.append(g)

for i in c_list:
    print(i)

Submission status: Time Limit Exceeded

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

for i in range(1, n + 1):
	#	print(i)
	print(numlist.count(i))

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for i in range(1,N+1):
  ans.append(str(A.count(str(i))))

print("\n".join(ans))

Submission status: Time Limit Exceeded

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

for i in range(1,N+1):
  ans.append(str(A.count(str(i))))

print("\n".join(ans))

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

a.insert(0, 0)

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

Submission status: Time Limit Exceeded

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

a.insert(0, 0)

#cnt = 0
#for i in range(n):
#    for j in range(n):
#        if i + 1 == a[j]:
#            cnt = cnt + 1

#    print(cnt)
#    cnt = 0

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

Submission status: Time Limit Exceeded

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

a.insert(0, 0)

cnt = 0
for i in range(n):
    for j in range(n):
        if i + 1 == a[j]:
            cnt = cnt + 1

    print(cnt)
    cnt = 0

Submission status: Time Limit Exceeded

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

for i in range(n):
    num = a.count(i+1)
    print(num)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

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

Submission status: Time Limit Exceeded

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

for i in range(1,N + 1):
  ans = 0
  for j in A:
    if i == j:
      ans += 1
    
  print(ans)

Submission status: Time Limit Exceeded

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

for i in range(1, n + 1):
    count = 0
    for b in boss:
        if b == str(i):
            count += 1
    print(count)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = list(input().split())
l = [str(i) for i in range(1, n+1)]

for i in range(n):
  print(a.count(l[i]))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
boss = list(map(str, input().split()))
exective = set(boss)

for i in range(1, n + 1):
    if str(i) in exective:
        print(boss[i - 1 :].count(str(i)))
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
boss = list(map(str, input().split()))
exective = sorted(set(boss))

for i in range(1, n + 1):
    if str(i) in exective:
        print(boss.count(str(i)))
    else:
        print(0)

Submission status: Time Limit Exceeded

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

for i in range(1, n + 1):
    print(boss.count(str(i)))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

N = int(input())
A_list = list(map(int, input().split()))
A_np_list = np.array(A_list)
for i in range(1, N):
    print(np.count_nonzero(A_np_list == i))
print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
B_list = []
for i in range(1, N):
    B_i = A_list.count(i)
    print(B_i)
print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
l=[int(i) for i in input().split()]
f=[0 for i in range(n)]
s=set(l)
for i in s:
  f[i-1]=l.count(i)
print(*f)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for i in range(num):
  emp_num=str(i+1)
  print(inputstr.count(emp_num))

Submission status: Time Limit Exceeded

Solution code:
num = int(input())
inputstr = input().split()
list = []
for i in range(num-1):
  list.append(int(inputstr[i]))

list_unique = set(list)

dic = {}
for i in list_unique:
  dic[i] = list.count(i)

for i in range(num):
  if i+1 in dic.keys():
    print(dic[i+1])
  else:
    print(0)

Submission status: Time Limit Exceeded

Solution code:
num = int(input())
inputstr = input().split()
list = []
for i in range(num-1):
  list.append(int(inputstr[i]))

list_unique = set(list)

counter=0
dic = {}
for i in list_unique:
  for j in list:
    if j == i:
      counter += 1
  dic[i] = counter
  counter= 0

for i in range(num):
  if i+1 in dic.keys():
    print(dic[i+1])
  else:
    print(0)

Submission status: Time Limit Exceeded

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

m = 0
t = 0

for i in range(1, n):
    count = A.count(i)
    print(count)
    m += count
    t = i
    if m == n - 1:
        break
for _ in range(t, n):
    print(0)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
List = list(map(int, input().split(" ")))
a = 1
for i in range(n):
    m = List.count(a)
    a += 1
    print(m)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(n) for n in input().split()]
for i in range(N):
	A_init = A
	A = [n for n in A if n != i+1]
	print(len(A_init) - len(A))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = input().split()
A = [int(n) for n in A]
for i in range(N):
  A_init=A
  A=[n for n in A if n!=i+1]
  print(len(A_init)-len(A))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = input().split()
A = [int(n) for n in A]
for i in range(N):
	A_init = A
	A = [n for n in A if n != i+1]
	print(len(A_init) - len(A))

Submission status: Time Limit Exceeded

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: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

c_163()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import numpy
import math

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

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
line_2 = input().split()
line_2 = list(map(lambda x: int(x), line_2))

for i  in range(n):
  r = len(list(filter(lambda x: x == i+1, line_2)))
  print(r)
  line_2 = list(filter(lambda x: x != i+1, line_2))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
line_2 = input().split()
line_2 = list(map(lambda x: int(x), line_2))

for i  in range(n):
  i += 1
  print(len(list(filter(lambda x: x == i, line_2))))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for i in range(1,n+1):
  ilist = [s for s in alist if s==i]
  print(len(ilist))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
alist = input().split()

for i in range(1,n+1):
  ilist = [s for s in alist if int(s)==i]
  print(len(ilist))

Submission status: Time Limit Exceeded

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


def count(N,A):

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

Submission status: Time Limit Exceeded

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

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

count(N,A)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int,input().split()))
M = 1
while M <= N :
    print(A.count(M))
    M = M+1

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

bukaninzu_list = []
for i in range(N):
    bukaninzu_list.append(A.count(i+1))
    
for bukaninzu in bukaninzu_list:
    print(bukaninzu)

Submission status: Time Limit Exceeded

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

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

for i in a:
  print(i)

Submission status: Time Limit Exceeded

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

for n in range(len(A)):
  for i in range(N):
    if A[n]==i+1:
      a[i]=a[i]+1

for i in a:
  print(i)

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import numpy
import math

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

for i in range(1, n + 1):
  print(a.count(i))
  [n for n in a if n!= i ]

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
numlist = input().split()

for i in range(1, n + 1):
	#	print(i)
	print(numlist.count(str(i)))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
numlist = input().split()

for i in range(1,n+1):
	print(numlist.count(str(i)))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input()) 
sub = list(map(int,input().split())) 
number = list(range(1, N+1, 1)) 
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: Time Limit Exceeded

Solution code:
human_num = int(input())

nyu = list(map(int, input().split(" ")))

for i in range(human_num):
    print(nyu.count(i + 1))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
l = []
k = []
s = 0
l = list(map(int, input().split(" ")))
for i in range(1, len(l)+2):
    k.append(l.count(i))
for i in range(len(k)):
    print(k[i], end = "\n")

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
if __name__ == "__main__":
    N = int(input())
    As = list(map(int, input().split(" ")))

    bosses = []
    for n in range(1, N+1):
        bosses.append(As.count(n))
    
    print("\n".join(map(str, bosses)))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
list_child = list(map(int, input().split()))
count_list = []
for x in range(1, n + 1):
    count_list.append(list_child.count(x))
for x in count_list:
    print(x)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
mem_dict = {}
list_child = list(map(int,input().split()))
for x in range(1,n+1):
    mem_dict[x] = 0
    if x in list_child:
        mem_dict[x]=list_child.count(x)
for x in mem_dict.values():
    print(x)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
mem_dict = {}
list_child = list(map(int,input().split()))
for x in range(1,n+1):
    mem_dict[x] = 0
for x in range(1,n+1):
    if x in list_child:
        mem_dict[x]=list_child.count(x)
for x in mem_dict.values():
    print(x)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
num_all = int(input())
list = input().split(" ")

i = 1
while i <= num_all:
  data = list.count(str(i))
  #print(i)
  print(data)
  i = i+1

Submission status: Time Limit Exceeded

Solution code:
num_all = int(input())
list = input().split(" ")

list_int = []
for j in list:
  list_int.append(int(j))

i = 1
while i <= num_all:
  data = list_int.count(i)
  print(data)
  i = i+1

Submission status: Time Limit Exceeded

Solution code:
num_all = int(input())
list = input().split(" ")


list_int = []
for j in list:
  list_int.append(int(j))

i = 1
while i <= num_all:
  data = list_int.count(i)
  print(data)
  i = i+1

Submission status: Time Limit Exceeded

Solution code:
num_all = int(input())
list = input().split(" ")


list_int = []
for j in list:
  list_int.append(int(j))

i = 1
while i <= num_all:
  data = list_int.count(i)
  #print(i)
  print(data)
  i = i+1

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#C
N = int(input())
Ai = input().split(' ')
for k in range (1,N+1):
    print(Ai.count(str(k)))

Submission status: Time Limit Exceeded

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.count(A_set[i])
    
for i in range(len(A_output)):
    print(A_output[i])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    n = int(input())
    woker = list(map(int, input().split()))
    for i in range(n):
        print(woker.count(i + 1))


resolve()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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
  s+=count
  print(count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = []
line = input()
for v in line.split():
    a.append(int(v))

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

B=[0]*N

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

set_a = set(li_a)

for i in range(1, n + 1):
    if i in set_a:
        print(li_a.count(i))
    else:
        print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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)
    print(count)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
list = [int(e) for e in input().split()]
set = set(list)

for i in range(1,n+1):
    if i in set:
        print(list.count(i))
        del list[0:list.count(i)]
        set.remove(i)
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
list = [int(e) for e in input().split()]
set = set(list)

for i in range(1,n+1):
    if i in set:
        print(list.count(i))
        del list[0:list.count(i)]
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
list = [int(e) for e in input().split()]

for i in range(1,n+1):
    print(list.count(i))
    del list[0:list.count(i)]

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
list = [int(e) for e in input().split()]

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

def main():
    n = int(input())
    a = np.array(list(map(int,input().split())))

    [print(np.count_nonzero(a==i)) for i in range(1,n+1)]

main()

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
a=int(input())
b=list(map(int,input().split()))
c=[]
for q in range(a):
    c.append(0)
x=int(1)
j=max(b)
while x<=j:
    for xx in b:
        if xx==x:
            c[x-1]=c[x-1]+1
    x=x+1
for t in range(a):
    print(c[t])

Submission status: Time Limit Exceeded

Solution code:
a=int(input())
b=list(map(int,input().split()))
x=int(1)
while x<=a:
    print(b.count(x))
    x=x+1

Submission status: Time Limit Exceeded

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

List=[]
for i in range(1,N+1):
    print(A.count(i))

Submission status: Time Limit Exceeded

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

for i in range(n-1):
    i = i + 1
    cnt = 0
    for j in range(n-1):
        if i == A[j]:
            cnt += 1
    print(cnt)
print("0")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

A = [int(i) for i in input().split()]

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

A = [int(i) for i in input().split()]

B = []

for j in range(1, N+1):
    temp = 0
    for i in A:
        if i == j:
            temp += 1
    print(temp)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int, input().split()))
def count(n, a):
    c = 0
    for i in range(len(a)):
        if a[i] == n:
            c += 1
    return c
for j in range(N):
    print(count(j+1, A))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N = int(input().strip())
As = np.array(input().strip().split(" ")).astype(np.int32)
for i in range(1,N+1):
    indices = [j for j,val in enumerate(As) if val==i]
    print(len(indices))

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

N = int(input())
A=[int(x) for x in input().split()]

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

Submission status: Time Limit Exceeded

Solution code:
n = input()
n = int(n)

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

i = 1

while i <= n :
    num = l.count(i)
    print(num)
    i += 1

Submission status: Time Limit Exceeded

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

B = [0]*N

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

for i in B:
    print(i)

Submission status: Time Limit Exceeded

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

B = [0]*N

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

for i in B:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
n,*a=map(int,open(0).read().split())
for i in range(n):print(a.count(i+1))

Submission status: Time Limit Exceeded

Solution code:
n,a=open(0)
for i in range(int(n)):print(a.count(str(i+1)))

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
text =list(map(int,input().split()))
a =[]
for i in range(1,n+1):
    p=text.count(i)
    if(p>0):
        a.append(p)
    else:
        a.append(0)
for i in a:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
staff = list(map(int, input().split()))
i=1
while i<N:
    count = sum(x==i for x in staff)
    print(count)
    i += 1
print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
c = input().split()

for i in range(1, n+1):
    print(c.count(str(i)))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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(N-1):
    if Alist[i] == j:
      count += 1
  
  print(count)
  count = 0

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in a:
    ans[i-1] += 1
for j in ans:
    a.count(j)
    print(j)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [int(a) for a in input().split()]
s = set(A)
x = [0] * N

for i in s:
    x[i-1] += A.count(i)

for i in x:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
社員数 = int(input())

上司 = list(map(int, input().split(' ')))

for 社員番号 in range(1, 社員数+1):
    print(上司.count(社員番号))

Submission status: Time Limit Exceeded

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

for i in range(n):
    print("{}".format(a_list.count(str(i+1))))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

my_code()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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