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:
import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))
i = 1
while i <= N:
 print(A.count(i))
 i += 1

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:

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

# print(num_list)
for i in range(1, n):
    print(num_list.count(str(i)))
print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
emp = list(map(int,input().split()))
emp.sort()
# def rem_val(arr, value):
#     while value in arr:
#         try:
#             arr.remove(value)
#         except:
#             break
for i in range(N):
    # if(len(emp)!=0):
    print(emp.count(i+1))
        # rem_val(emp,i+1)
    # else:
    #     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:
num = int(input())
num2 = list(int(x) for x in input().split())
for i in range(num):
  print(num2.count(i + 1))

Submission status: Time Limit Exceeded

Solution code:
n = input()
n = int(n)
y = input()
list = y.split(' ')

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

N = int(input())
D = [int(x) for x in input().split()]
D = np.array(D)

ans = []
for i in range(N):
    num = np.sum(D == i+1)
    ans.append(num)

print("\n".join(map(str, ans)))

Submission status: Time Limit Exceeded

Solution code:
member = int(input())
subcount = list(map(int, input().split()))
m = max(subcount)
for i in range(1, member + 1):
  if i <= m:
    print(subcount.count(i))
  else:
    break
if(member - m > 0):
  print("0\n" * (member - m))

Submission status: Time Limit Exceeded

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

Buka_list = []
for i in range(1,N+1,1):
    ninzu = A_list.count(i)
    Buka_list.append(ninzu)
    
for j in range(N):
    print(Buka_list[j])

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

a = [int(N) for N in input().split()]
b = len(a)

count = 0

for i in range(1,N+1):
    for k in range(0,b):
        if(i == a[k]):
            count += 1
    print(count)
    count = 0

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
emp = list(map(int,input().split()))
emp.sort()
def rem_val(arr, value):
    while value in arr:
        try:
            arr.remove(value)
        except:
            break
for i in range(N):
    if(len(emp)!=0):
        print(emp.count(i+1))
        rem_val(emp,i+1)
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding UTF-8 -*-
n = int(input())
a = [int(x) for x in input(). split()]

ans = [0]*n
while a:
    x = a.pop(0)
    ans[x-1] = ans[x-1] + 1
while ans:
    print(ans.pop(0))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
li=list(map(int,input().split()))
for i in range(len(li)+1):
    print(li.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):
    k=l.count(i)
    print(k)
    for _ in range(k):
        l.remove(i)
print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import collections
n = int(input())
a = list(map(int,input().split()))
e = 1
for b in range(n) :
    d = a.count(e)
    e += 1
    print(d)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(n):
    b = a.count(i+1)
    print(b)
    del a[:b]

Submission status: Time Limit Exceeded

Solution code:
#C
n = int(input())
a = input().split()
#for i in range(n-1):
#    a[i] = int(a[i])

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

for i in range(len(b)):
    print(f"{b[i]}")

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

N = int(input())
A = list(map(int, input().split()))
s_list = [0]*N
for i in range(N):
  s_list[i-1] = A.count(i)
print(s_list[0])
for i in A:
  print(s_list[i])
  s_list[i] = 0

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = set(A)
C = [0]*N
for a in B:
    C[a-1] = A.count(a)
print(*C, sep="\n")

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
emp = list(map(int,input().split()))
def rem_val(arr, value):
    while value in arr:
        try:
            arr.remove(value)
        except:
            break
for i in range(N):
    print(emp.count(i+1))
    rem_val(emp,i+1)

Submission status: Time Limit Exceeded

Solution code:
member = int(input())
subcount = list(map(int, input().split()))
m = max(subcount)
for i in range(1, member + 1):
  if i <= m:
    print(subcount.count(i))
  else:
    break
for i in range(member - m):
  print(0)

Submission status: Time Limit Exceeded

Solution code:
a=int(input())
l=list(map(int,input().split()))
l1=sorted(l)
for i in range(1,a+1):
    if i>l1[-1]:
        print("0")
    else:
        print(l.count(i))

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

a = []
s = [0] * n
a.append(input().split())

for i in range(n - 1):
    a[0][i] = int(a[0][i])
    for j in range(n):
        if j == a[0][i]:
            s[j - 1] += 1
            break

for i in range(n):
    print(s[i])

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
N = int(input())
A = [int(i) for i in input().split()]
A = np.array(A)

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

Submission status: Time Limit Exceeded

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

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())
num2 = list(int(x) for x in input().split())
mb = [0] * num
for i in range(num):
  buka = num2.count(i + 1)
  mb[i] = buka
for j in range(num):
  print(mb[j])

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
b = np.zeros(n-1)
for i in range(1,n):
    b[i-1] = a.count(i)
b = np.append(b,0)
for i in b:
    print(int(i))

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))
  a= [a[j] for j in range(0, len(a)) if a[j] != i+1]

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

for j in range(len(hako)):
    print(str(hako[j]))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
emp = list(map(int,input().split()))
def rem_val(arr, value):
    while value in arr:
        try:
            arr.remove(value)
        except:
            pass
for i in range(N):
    print(emp.count(i+1))
    rem_val(emp,i+1)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
count = 1
if N >= 2:
    A = list(map(int, input().split()))
    for j in A:
        if j < N:
            count += 1
        else:
            count = 0
            break

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

print(0)

Submission status: Time Limit Exceeded

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

for j in range(N):
    list1[j]=list.count(j+1)
for l in range(N):
    print(list1[l])

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:
n=int(input())
l=list(map(int,input().split()))
for i in range(1,n):
    print(l.count(i))
    for _ in range(l.count(i)):
        l.remove(i)
print(0)

Submission status: Time Limit Exceeded

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


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

Submission status: Time Limit Exceeded

Solution code:
import sys

def main():
    n = int(input())
    a = tuple(map(int,sys.stdin.readline().split()))
    for cnt in range(len(a)):
        num = 0
        for j in a[cnt:]:
            if j == cnt + 1:
                num += 1
        print(num)
    print(0)

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
an = input().split()
An = [int(i) for i in an]
buka = []
for i in range (1,N+1):
    buka.append(An.count(i))
for b in buka:
    print(b)

Submission status: Time Limit Exceeded

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


for i in range(N):
    if i == N-1:
        print('0')
    else:
        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())

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

for i in range(n):
	if cnt<n:	
		listi=list[cnt:]	
		a=listi.count(i+1)
		cnt+=a
		print(a)
	else:
		print(0)

Submission status: Time Limit Exceeded

Solution code:
a = int(input())
l = list(map(int, input().split()))
l_2 = list(set(l))
l_2.sort()
if l_2[0] == 1:
    for i in range(len(l_2) - 1):
        print(l.count(l_2[i]))
        word = '0\n' * (l_2[i + 1] - l_2[i])
        if l_2[i + 1] - l_2[i] - 1 > 0:
            print(word[:-3])
    print(l.count(l_2[-1]))
    word = '0\n' * (a - max(l_2))
    print(word[:3 * (a - max(l_2) - 1) + 1])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

def main(i):
  a = A[i-1:n-1].count(i)
  print(a)


for i in range(1,n+1):
  main(i)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = list(int(i) for i in input().split())

p = [0] * n

for i, num in enumerate(p):
  for j in a:
    if(i == j - 1):
      p[i] += 1

for i in p:
  print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
emp = list(map(int,input().split()))
def rem_val(arr, value):
    while value in arr:
        arr.remove(value)

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input()) 
A=list(map(int,input().split())) 
i=0 
s=[i for i in range(N)]
sumall=0
for i in range(N):
    s[i]=A.count(i+1)
    sumall=sumall+s[i]
    print(s[i])
    i=i+1
    if sumall>=N-1:
        break
for _ in range(i,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):
  print(len([1 for x in A if x==i]))

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
import math as mt
N=int(input())
#R=map(int, input().split())
A=list(map(int,input().split()))
count=1
p_count=0
for i in range(0,N-1):
    print(A.count(i+1))
print(0)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

N = int(input())
D = [int(x) for x in input().split()]
D = np.array(D)

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

Submission status: Time Limit Exceeded

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


for a in range(1,N+1):
    if a in A:
        print(A.count(a))
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int,input().split()))
l = []
for i in range(1,N+1):
    l.append(A.count(i))
    print(l[i-1])
    if sum(l)==N-1:
        break
num = N-len(l)
print(("0\n"*num).strip())

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

a = [int(N) for N in input().split()]
b = len(a)

count = 0

for i in range(1,N+1):
    for k in range(0,b):
        if(i == a[k]):
            count += 1
    print(count)
    count = 0

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
a=(input())
sum=0
for i in range(1,N+1):
    b=a.count(str(i))
    sum+=b
    print(b)
    if sum==N+1:
        for i in range(N-sum):
            print(0)
        break

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
mem = list(map(int, input().split()))
 
a = 0
cnt = 1
for i in range(n):
    for j in mem:
        if j==cnt:
            a+=1
    if a>0:
        del mem[:a-1]
    cnt += 1
    print(a)
    a = 0

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=list(map(int,input().split()))
ans=[0 for _ in range(n)]
for i in range(n):
    ans[i]=a.count(i+1)
print('\n'.join(map(str,ans)))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A1 = [0]
Ai = [int(a) for a in input().split()]
A = A1+Ai

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):
    b = a.count(i+1)
    print(b)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

sum = 0
for i in range(N):
    print(A.count(i+1))
    sum += A.count(i+1)
    if sum == N:
        break

Submission status: Time Limit Exceeded

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

s_a = set(a)

dc = {}

l_s = []
for i in a:
  dc[int(i)] = a.count(i)
  
index = 1
k = 0
for i in dc.keys():
  while i + k < index:
    print(0)
    k += 1
  print(dc[i])
  index += 1
  
while index <= num:
  print(0)
  index += 1

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
a = input().split()
list_i = [int(b) for b in a]

#print(N)
#print(list_i)

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = 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 = list(map(int, input().split()))
A.insert(0, 0)
for i in range(N):
    tmp = 0
    for j in range(i+1, N):
        if(i+1 == A[j]):
            tmp += 1
        else:
            pass
    print(tmp)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(total_member):
    result = a.count(i + 1)
    print(result)

Submission status: Time Limit Exceeded

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

max_num = max(A)
for i in range(max_num):
	print(A.count(i+1))

for i in range(N - max_num):
	print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

for ans in count_list:
   print(ans)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-

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


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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#C
n = int(input())
a = input().split()
for i in range(n-1):
    a[i] = int(a[i])

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

for i in range(len(b)):
    print(f"{b[i]}")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

while i < N+1:
    print(A.count(i))
    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:
N=int(input())
data=list(map(int,input().split()))
sum=[]
for i in range(N):
    sum.append(0)
    for m,n in enumerate(data):
        if i==n-1:
            sum[i]=sum[i]+1
for i in sum:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
import collections

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

stuff_lis = collections.Counter(stuff)
st = list(stuff_lis.keys())
num = list(stuff_lis.values())

for i in range(N):
    if i+1 in st:
        print(num[st.index(i+1)])
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:

N = int(input())
A = list(input().split())
A = [int(i) for i in A]
B = len(A)+1

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

Submission status: Time Limit Exceeded

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

for i, value in enumerate(a):
    print(a.count(i+1))
print('0')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for j in range(N-1):
    for k in range(N):
        if list[j]==k+1:
            list1[k]+=1
for l in range(N):
    print(list1[l])

Submission status: Time Limit Exceeded

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

[print(a_list.count(i+1)) for i in range(n-1)]
print(0)

Submission status: Time Limit Exceeded

Solution code:
member = int(input())
subcount = list(map(int, input().split()))
m = max(subcount)
for i in range(1, member + 1):
  if i <= m:
    print(subcount.count(i))
  else:
    print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:

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

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

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a = [int(_) for _ 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()))

count = []

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

a = []
s = [0] * n
a.append(input().split())

for i in range(n-1):
    a[0][i] = int(a[0][i])

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

for i in range(n):
    print(s[i])

Submission status: Time Limit Exceeded

Solution code:
n = input()
n = int(n)
y = input()
list = y.split(' ')

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

Submission status: Time Limit Exceeded

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

slaves=[print(a_list.count(i+1)) for i in range(n-1)]
print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
numOfemp = int(input())
numOfBossInt = []

numOfBossStr = input().split(' ')
numOfBossInt = list(map(int, numOfBossStr))

for i in range(0, numOfemp-1):
    print(numOfBossInt.count(i+1))

print('0')

Submission status: Time Limit Exceeded

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

s = []
for i in range(N):
    if i == 0:
        s.append(A.count('1'))
    else:
        s.append(A.count(str(i+1)))
for i in s:
    print(i)

Submission status: Time Limit Exceeded

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

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

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-1):
    tmp = 0
    for j in range(i+1, N):
        if(i+1 == A[j]):
            tmp += 1
    print(tmp)
print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input()) 
A=list(map(int,input().split())) 
i=0 
s=[]
sumall=0
for i in range(N):
    s.append(0) 
    s[i]=A.count(i+1)
    sumall=sumall+s[i]
    print(s[i])
    i=i+1
    if sumall>=N-1:
        break
for _ in range(i,N):
    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.count_nonzero(a == i+1))
    np.delete(a, np.where(a == i+1))

Submission status: Time Limit Exceeded

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

for i in range (1,n+1):
    ans = a.count(i)
    print(ans)
    p = p + ans
    if p == n-1:
        break
for s in range (n-i):
    print(0)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

#data = np.array(input().split(), dtype=np.int64)


def read(): return list(map(int, input().split()))
data = read()

#count = collections.Counter(data)

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

Submission status: Time Limit Exceeded

Solution code:
def MI(): return map(int, input().split())
def LI(): return list(MI())

if __name__ == "__main__":
    N = int(input())
    A = LI()
    for i in range(1, N+1):
        print(A.count(i))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

  print('\n'.join(results))

if __name__ == "__main__":
  resolve()

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
li=list(map(int,input().split()))
li.sort()
li2=[]
for i in range(len(li)+1):
    if li.count(i+1)!=0:
        li2.append(li.count(i+1))
    else:
        li2.append(0)
for s in li2:
    print(s)

Submission status: Time Limit Exceeded

Solution code:

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

for i in range(1,N+1):
    print(A.count(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(str, input().split())) 
for i in range(N): 
    print(A.count("{}".format(i+1)))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

count = 0

for i in range(1,N+1):
    for k in range(0,len(a)):
        if(i == a[k]):
            count += 1
    print(count)
    count = 0

Submission status: Time Limit Exceeded

Solution code:
str = input()
line = input().split()
 
count = []
num = int(str)
line = list(map(int, line))
for i in range(num):
    temp = 0
    for k in range(len(line)):
        if (i+1) == line[k]:
            temp = temp + 1
    count.append(temp)
 
[print(i) for i in count]

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
l=list(map(int,input().split()))
d={}
for i in set(l):
  d[i]=l.count(i)
ans=[ d[i]  if i in d else 0 for i in range(1,n+1)]
print(*ans, sep = "\n")