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()))
out = []
for i in range(1, N+1):
    if i not in A:
        out.append(0)
    else:
        out.append(A.count(i))
for a in out:
  print(a)

Submission status: Time Limit Exceeded

Solution code:

n = int(input())
a = list(map(int,input().split()))
t = [0]*(len(a)+1)

for i in range(len(a)+1):
    t[i] = a.count(i+1)

for i in range(len(t)):
    print(t[i])

Submission status: Time Limit Exceeded

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

count = 0
for i in range(1, n + 1):
	for a in A:
		if i == a:
			count += 1
	print(count)
	count = 0

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

ans = [0]*(N+1)

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

Submission status: Time Limit Exceeded

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

for i in range(1,n+1):
    print(hw.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:
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())
al = list(map(int, input().split()))

ans_al = [0]*n

for i in range(n):
    ans_al[i-1] += al.count(i)

for ans in ans_al:
    print(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(i+1))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=[0]*(n+1)

for i in range(0,n+1):
    for j in range(0,n-1):
        if a[j]==i:
            ans[i]+=1
ans=ans[1:]
ansstr=''
for i in range(len(ans)):
    print(ans[i])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
def func(a, i):
    cnt = 0
    for num in a:
        if num == i:
            cnt = cnt + 1
    return cnt


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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int,input().split()))
B = [None for i in range(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())

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

import collections

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
a=int(input())
c=input().split()
x=[]
for i in range(a-1):
    x.append(int(c[i]))
for j in range(a):
    count=0
    for k in range(a-1):
        z=x[k]
        if z==(j+1):
            count+=1
        else:
            continue
    print(count)

Submission status: Time Limit Exceeded

Solution code:
a=int(input())
b=input().split()
l=[]
for i in b:
  l.append(int(i))
i=0
while i<a:
  if i!=a-1:
    print(l.count(i+1))
  else:
    print(l.count(i+1),end="")
  i+=1

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
ls = list(map(int, input().split()))
rg = range(1, n + 1)
for i in rg:
    print(ls.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()))
anslist=[]
for x in range(N):
  print((A).count(x+1))

Submission status: Time Limit Exceeded

Solution code:
n = input()
a = input().split()

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

Submission status: Time Limit Exceeded

Solution code:
a = int(input())
i = list(map(int, input().split()))
for num in range(a):
  sum = 0
  for num2 in range(len(i)):
    if i[num2] == num + 1:
      sum += 1
  print(sum)

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()))
b = [0] * (n + 1)
for i in range(1, n):
    print(a.count(i))
print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#C
M = int(input())
A = list(map(int, input().split())) 
ans = [0] * M

for i in range(1,M+1):
    ans[i-1]=A.count(i)
    if sum(ans)>=M:
        break
    
for a in ans:
    print(a)

Submission status: Time Limit Exceeded

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

coun = [0] * n;

for i in range(n):
  num = A.count(i+1);
  coun[i] = num;

for j in coun:
  print(j);

Submission status: Time Limit Exceeded

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

ans = [0]*(N+1)

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

for j in range(1,N+1):
    print(ans[j])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:

man_count = int(input())

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

ans = []

for i in range(len(infos)+1):
    work = infos.count(i+1)
    ans.append(work)

for i in ans:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
  print(a[i:].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+1):
    ans = a.count(i)
    print(ans)

Submission status: Time Limit Exceeded

Solution code:
n, *aa = map(int, open(0).read().split())

for i in range(1, n+1):
    have = 0
    for a in aa:
        if a == i:
            have += 1
    
    print(have)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
As=[int(x) for x in input().split()]
As2={x:As.count(x) for x in range(1,N+1)}
for i in As2:
    print(As2[i])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter

N = int(input())
A = list(map(int,input().split()))
X = Counter(A)
for i in range(1,N+1):
    if i in A:
        print(X[i])
    else:
        print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!
num = int(input())
line = list(map(int,input().split()))
for i in range(1,num+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):
    print(a.count(i))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

alist = input().split(" ")

for i in range(1,n+1):
    sum = 0
    for j in range(n-1):
        if int(alist[j]) == i:
            sum = sum + 1
    print(sum)

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())
ls_a = list(map(int,input().split()))

for i in range(1,n+1):
    count = 0
    for j in ls_a:
        if i == j:
            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, max(A)):
	print(A.count(i+1))

for i in range (max(A), N):
	print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
l=list(map(int,input().split()))
m=[]
for i in range(1,n):
    m.append(l.count(i))
m.append(0)
for j in range(n):
    print(m[j])

Submission status: Time Limit Exceeded

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

for i in range(1, n+1):
  if i in a:
    ans=len([j for j in a if j==i])
  else:
    ans = 0
  print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N = int(input())
data = np.array(input().split(), dtype=np.int64)

for i in range(1,N+1):
  ans = np.count_nonzero(data == i)
  print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# cook your dish here
n=int(input())
arr=list(map(int,input().split()))
for i in range(0,n):
    temp=0
    for j in range(len(arr)):
        if i+1==arr[j]:
            temp+=1
    print(temp)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = input().split()
b = []

for i in range(1,n+1):
	b.append(0)
	for j in range(len(a)):
		if i == int(a[int(j)]):
			b[i-1] += 1

for i in b:
	print(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()))
import numpy  as np
a = np.array(a)
for i in range(1, n+1):
  print(np.count_nonzero(a == i))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))

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

Submission status: Time Limit Exceeded

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

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:
# -*- coding: utf-8 -*-
N = int(input())
As = list(map(int, input().split()))
for i in range(1,N):
    print(As.count(i))
print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
List = list(map(int, input().split()))

for i in range(1,n):
  print(List.count(i))
print("0")

Submission status: Time Limit Exceeded

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

def main():
    n = int(input())
    a_li = list(map(int, input().strip().split()))

    a_set = set(a_li)

    a_dict = {}

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

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(1,N+1):
    array = [x for x in IDs if x==i]
    print(len(array))

Submission status: Time Limit Exceeded

Solution code:


n = 0
a = []

def format_input(filename = None):
	global n
	global a
	if filename == None:
		n = int(input())
		a = list(map(int, input().split()))

	elif filename == '__random__':
		from random import randint as rng
		n = rng(2, 2 * 10**5)
		a = [rng(1, i) for i in range(1, n)]
		print(n)
		print(' '.join(list(map(str, a))))

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

if __name__ == '__main__':
	format_input()

	get_answer()

Submission status: Time Limit Exceeded

Solution code:
#C
M = int(input())
A = list(map(int, input().split())) 
ans = [0] * M

for i in range(1,M+1):
    ans[i-1]=A.count(i)
    
for a in ans:
    print(a)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
for i in range(n):
    print(np.count_nonzero(a == i + 1))

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
inon = input().split(" ")
intw = input().split(" ")
numbuka = list()
for i in range(int(inon[0])):
  enum = i + 1
  jousis = ' '.join(intw)
  numb = jousis.count(str(enum))
  numbuka.append(str(numb))
for ele in numbuka:
  print(ele)

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
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(1, n+1):
    print(a.count(i))

Submission status: Time Limit Exceeded

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

m=max(A)

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

for j in range(m+1,N+1):
    print(0)

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 range(n-1):
		if a[j] == i:
			ans += 1
		else:
			ans += 0
	print(ans)

Submission status: Time Limit Exceeded

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

x = []
for i in range(1, N+1):
	x.append(a.count(i))
print("\n".join(str(n) for n in x))

Submission status: Time Limit Exceeded

Solution code:

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


for i in range(1,n+1):
    res=0
    for aa in a:
        if aa ==i:
            res+=1
    print(res)

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:
n = int(input())
a = list(map(int, input().split()))

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

Submission status: Time Limit Exceeded

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

for no in range(1,n+1):
  nums = jyoushis.count(no)
  print(nums)

Submission status: Time Limit Exceeded

Solution code:
def main():
  x = int(input())
  y = [int(t) for t in input().split()]
  for i in range(x):
  	print(y.count(i+1))
main()

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:
from sys import stdin
import numpy as np
N=list(map(int,(stdin.readline().strip().split())))[0]
A=np.array(list(map(int,(stdin.readline().strip().split()))))
print(np.count_nonzero(A==1))
for i in range(2,N+1):
    print((np.count_nonzero(A==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 = list(map(int, input().split()))

for a in range(0, n):
    print(a_list.count(a + 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 = list(map(int,input().split()))
i = 0
while i < N:
    print(A.count(i + 1))

    i += 1

Submission status: Time Limit Exceeded

Solution code:
N= int(input())
Ai=list(map(int,input().split()))
for i in range(N):
    print(Ai.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+1):
    print(A.count(i))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import collections
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()))

ans = []*N
for i in range(1,N):
    print(A.count(i))
print(0)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = input().split(" ")
lista = [int(n) for n in a]
for i in range (1,n):
  print(lista.count(i))
print(0)

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:
num = int(input())
a = list(map(int, input().split()))

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
num_staffs = int(input())
staffs = [int(i) for i in input().split()]

sets = set(staffs)

for i in range(1, num_staffs + 1):
    ans = staffs.count(i) if i in sets else 0
    print(ans)

Submission status: Time Limit Exceeded

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

coun = [];

for i in range(n):
  num = A.count(i+1);
  coun.append(num);

for j in coun:
  print(j);

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
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(str, input().split()))

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

for i in np.arange(1, n+1):
    print(A.count(i))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
print(a.count(1))
b = []
for i in range(2, n + 1):
    if i not in b:
        print(a.count(i))
        b.append(i)
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
a = int(input())
l = list(map(int, input().split()))
for i in range(a):
    print(l.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(1,N+1):
  l=a.count(i)
  print(l)

Submission status: Time Limit Exceeded

Solution code:

import collections
n=int(input())
s=list(map(int, input().split()))
c=collections.Counter(s)
for i in range(1,n+1):
    b=s.count(i)
    print(b)

Submission status: Time Limit Exceeded

Solution code:
n = input()
a = input().split()

for i in range( int(n) ):
    cnt = 0
    for a_i in a:
        if int(a_i) == i+1 :
            cnt += 1
    print(cnt)

Submission status: Time Limit Exceeded

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

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(str, input().split()))

from collections import Counter

c = Counter(A)
ind = list(c)
for i in range(1,N+1):
    if str(i) in ind:
        print(c[str(i)])
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
import collections
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:
from collections import Counter
n=int(input())
lst=list(map(int,input().split()))
dic=Counter(lst)
for i in range(1,n+1):
  if i in lst:
    print(dic[i])
  else:
    print(0)

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter

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

for i in range(1,N+1):
    print(Counter(A)[i])

Submission status: Time Limit Exceeded

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

for b in B:
    print(b)

Submission status: Time Limit Exceeded

Solution code:
import math
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(mi())
n = ii()
a = li()
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())
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())
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 = list(map(int, input().split()))
for i in range(N):
  print(A_list.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:
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(N):
    print(A.count(i + 1))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

ans = [a.count(i+1) for i in range(n)]

for i in ans:
  print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
def func(a, i):
    cnt = 0
    for num in a:
        if num == i:
            cnt = cnt + 1
    return cnt


n = int(input())
a = list(map(int, input().split()))
for i in range(n):
    # print(i+1)
    print(func(a, 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):
	howManySubs = a.count(i)
	print(howManySubs)

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()))
for i in range(1,N):
  print(A.count(i))
print(0)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N=int(input())
A= np.array(list(map(int,input().split())))


for i in range(N):
  print(np.sum(A==(i+1)))

Submission status: Time Limit Exceeded

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

for i in range(n):
    ans = li.count(i+1)
    print(ans)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
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:
N = int(input())
emp = list(map(int,input().split()))
for i in range(N):
    print(emp.count(i+1))

Submission status: Time Limit Exceeded

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

temp=[]
for i in range(1, n+1):
  ans=len([j for j in a if j==i])
  print(ans)

Submission status: Time Limit Exceeded

Solution code:
def f(N,L):
    S=N*[0]
    for i in range(N-1):
        S[L[i]-1]+=1
    return S
N=int(input())
L=list(map(int,input().split()))
for j in range(N):
    print(f(N,L)[j])

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()))
countzumi=[]
count_=[0]*N

for i in range(len(A)):
	if A[i] not in countzumi:
		count_[A[i]-1]=A.count(A[i])
		countzumi.append(A[i])

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

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:
import sys
input = sys.stdin.readline

# C - management
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,*A = map(int,open(0).read().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())
al = list(map(int, input().split()))

print(al.count(1))
for i in range(1, n):
    print(al.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 + 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(len(a)+1):
  print(a.count(i+1))