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()))
ans=[]
for i in range(1,n+1):
    ans.append(a.count(i))
for k in range(len(ans)):
    print(ans[k])

Submission status: Time Limit Exceeded

Solution code:
from collections import deque

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

for i in range(n):
    print(a.count(i+1))
    if a.count(i+1)!=0:
        while len(a)!=0 and a[0]==i+1:
            a.popleft()

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int, input().split()))
 
for i in range(N):
  print(str(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(len(a)):
    print(a.count(i+1))
    c+=a.count(i+1)
    if c==n-1:
        break

for _ in range(n-i-1):
    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:
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):
    x = a.count(i)
    print(x)

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
l=list(map(int,input().split(" ")))
for i in range(1,n+1):
    c=0
    for j in range(len(l)):
        if l[j]==i:
            l[j]=0
            c+=1
    print(c)
    for j in range(c):
        l.remove(0)

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

for i in range(1, num_of_employee + 1):
    print(employeenos.count(i))

Submission status: Time Limit Exceeded

Solution code:
num_of_employee = int(input())
employeenos = list(map(int, input().split()))

bossenos = set(employeenos)
output = [0] * (len(employeenos) + 1)
for boss in bossenos:
    output[boss - 1] = employeenos.count(boss)

for _ in output:
    print(_)

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
#n = range(N)
a = list(int(i) for i in input().split()) #A_i =: a_{i-2}

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

Submission status: Time Limit Exceeded

Solution code:
import math
N = int(input().strip())
a = list(map(int, input().strip().split()))
A=[0]*N
for i in range (N):
    for j in range (N-1):
        if a[j]==i+1:
            A[i]=A[i]+1
for i in range(N):
    print(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(map(int, input().split()))

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int, input().split()))
result = {}
count = []
count = [0 for i in range(N)]

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

result = {}

for count, i in enumerate(A):
    result[count+1] = i

for i in range(N):
    print(list(result.values()).count(i+1))

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    N = int(input())
    strA = input()
    for i in range(1,N+1):
        print(strA.count(str(i)))
resolve()

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

n = int(input())
a = np.concatenate([np.array([0]),np.array(list(map(int,input().split())))])

for i in range(n):
  ans = np.sum(np.where(a == (i+1),1,0))
  print(ans)

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(sum(x == i for x in A))

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
josi = list(map(int,input().split()))
count=[0]*N
n=0
while n<N-1:
  count[josi[n]] =count[josi[n]]+1
  n=n+1
n=0
while n<N:
  print(count[n])

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
josi = list(map(int,input().split()))
n=1
m=0
count=0
while n<=N:
  m = n-1 
  while m<N-1:
    if josi[m]==n:
      count = count+1
    m=m+1
  print(count)
  n=n+1
  m=0
  count=0

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
josi = list(map(int,input().split()))
n=1
m=0
count=0
while n<=N:
  while m<N-1:
    if josi[m]==n:
      count = count+1
    m=m+1
  print(count)
  n=n+1
  m=0
  count=0

Submission status: Time Limit Exceeded

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

ans = [A.count(j) for j in range(1, N)]
ans.append(0)

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

Submission status: Time Limit Exceeded

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

ans = [A.count(j) for j in range(1, N)]
ans.append(0)

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

Submission status: Time Limit Exceeded

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

a.sort()
for i in range(1,n):
    tem = a.count(i)
    print(tem)
    a = a[tem:]

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[i-1:].count(i))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int, input().split()))
d = dict()
for i in range(1,N+1):
    print(A[i-1:].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())
person = list(map(int,input().split()))
for i in range(n-1) :
    p = person.count(i+1)
    print(p)
print(0)

Submission status: Time Limit Exceeded

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

for i in range(n) :
    print(paisen[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[i-1:].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 = [0]
B = list(map(int, input().split()))
#A += B
#print(A)

sig = [0] * N

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

#print(sig)
#for i in sig:
#  print(i)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [0]
B = list(map(int, input().split()))
A += B
#print(A)

sig = [0] * N

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

#print(sig)
for i in sig:
  print(i)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

re=[]
temp1=[i for i in range(1,n)]
temp2=[i for i in range(n-1)]
c=0

for j in temp1:
    for i in  temp2:
        if a[i]==j:
            c=c+1
    re.append(c)
    c=0
[print(i) for i in re]
print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

        l = []

        for i in range(N-1):
                if i+1 in A:
                        l.append(A.count(i+1))
                else:
                        l.append(0)
        l.append(0)


        ans = "\n".join([str(x) for x in l])
        print(ans)

if __name__=="__main__":
        main()

Submission status: Time Limit Exceeded

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

        l = []

        for i in range(N-1):
                l.append(A.count(i+1))
        l.append(0)

        ans = "\n".join([str(x) for x in l])
        print(ans)

if __name__=="__main__":
        main()

Submission status: Time Limit Exceeded

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

        l = []

        for i in range(N-1):
                l.append(A.count(i+1))
        l.append(0)

        [print(n) for n in l]

if __name__=="__main__":
        main()

Submission status: Time Limit Exceeded

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

        l = []

        for i in range(N-1):
                l.append(A.count(i+1))
                print(l[i])
        l.append(0)
        print(l[N-1])

if __name__=="__main__":
        main()

Submission status: Time Limit Exceeded

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

        l = [0]*N

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

if __name__=="__main__":
        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:
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().strip())
A = [ int(i) for i in input().strip().split(' ')]
#unique_supervisor = list(set(A))

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

b = []
for i in range(1, N):
  num = a.count(i)
  nums = str(num)
  b.append(nums)

b.append("0")
print('\n'.join(b))

Submission status: Time Limit Exceeded

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

b = []
for i in range(1, N+1):
  num = a.count(i)
  b.append(num)

for c in b:
  print(c)

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()))
import collections 
for i in range(1,n+1):
    print(collections.Counter(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:
I = [input() for i in range(2)]
N = int(I[0])
A = list(map(int,I[1].split()))

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Bj = [0 for j in range(N+1)] 
# print(Bj)
for i in range(N+1) :
    #print(i)
    #print(Bi)
    Bj[i] = A.count(i)
    # print(Bj)
    if i > 0 :
        print(Bj[i])

Submission status: Time Limit Exceeded

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

Bj = [0 for j in range(N+1)] 
# print(Bj)
for i in range(N+1) :
    #print(i)
    #print(Bi)
    Bj[i] = A.count(i)
    # print(Bj)

ans = Bj[1:]
for k in range(len(ans)) :
    print(ans[k])

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:
I = [input() for i in range(2)]
N = int(I[0])
A = list(map(int,I[1].split()))
A = [0] + A
# print(A)

Bj = [0 for j in range(N+1)] 
# print(Bj)
for i in range(N+1) :
    #print(i)
    #print(Bi)
    for j in range(N) :
        # print(j)
        if A[j] == i :
            Bi = int(1) 
        else:
            Bi = int(0)
        Bj[i] = Bj[i]+Bi
    # print(Bj)

ans = Bj[1:]
for k in range(len(ans)) :
    print(ans[k])

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

A = list(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()))

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

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 a in ans[1:]:
    print(a)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!

def main():
    number_of_employee = int(input())
    employees_list = list(map(int,input().split()))
    for employees_number in range(1,number_of_employee+1):
        subordinate_list = [item_suffix for item_suffix,item in enumerate(employees_list) if item == employees_number]
        print(len(subordinate_list))
        map(lambda x:employees_list.pop(x),subordinate_list)

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
# Your code here!

def main():
    number_of_employee = int(input())
    employees_list = list(map(int,input().split()))
    for employees_number in range(1,number_of_employee+1):
        subordinate_list = [item_suffix for item_suffix,item in enumerate(employees_list) if item == employees_number]
        print(len(subordinate_list))
 
if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def main():
    n = int(input())
    As = list(map(int, input().split()))

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


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
import numpy as np


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

    for i in range(n):
        print(np.sum(As == i+1))


if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=list(map(str,input().split()))
s=[0]*n

for i in range(1,n):
  s[i-1]=a.count(str(i))
  
  print(s[i-1])

print(0)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=list(map(str,input().split()))
s=[0]*n

for i in range(1,n):
  s[i-1]=a.count(str(i))
  continue
  
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):
    print(a.count(i))

Submission status: Time Limit Exceeded

Solution code:
from collections import deque
N = int(input())
A = [int(n) for n in input().split()]
d = deque(A)
for i in range(1, N+1):
    print(d.count(i))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from itertools import zip_longest
N = int(input())
A = [int(n) for n 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()))

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

Submission status: Time Limit Exceeded

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

for i in range (1,N+1):
    c = 0
    a = c
    for j in range(a,len(nums)):
        if nums[j] == i:
            c = c + 1
    print(c)

Submission status: Time Limit Exceeded

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

for i in range (1,N+1):
    c = 0
    for j in range(0,len(nums)):
        if nums[j] == i:
            c = c + 1
    print(c)
    del nums[:int(c)]

Submission status: Time Limit Exceeded

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

for i in range (1,N+1):
    c = nums.count(i)
    print(c)
    del nums[:int(c)]

Submission status: Time Limit Exceeded

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

for i in range (1,N+1):
    j = 0
    c = 0
    while j < len(nums) and nums[j] == i:
        c = c + 1
    del nums[:c]
    print(c)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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


def main():
    n = int(readline().rstrip())
    aList = list(map(int, readline().rstrip().split()))
    for i in range(n):
        print(aList.count(i + 1))


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

A=[]
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()))
A.sort()
for i in range(1,N+1):
    x=A.count(i)
    print(x)
    A=A[x:]

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

for i in range(1,1+N):
    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,1+N):
    print(A.count(str(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()))
l = []

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
flag = 0
list = [int(x) for x in input().split()]
for i in range(1, n):
  if flag == n:
    break
  else:
    m = list[i-1:].count(i)
    flag += m
    print(m)
print(0)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
flag = 0
list = [int(x) for x in input().split()]
for i in range(1, n):
  if flag == n:
    break
  else:
    m = list.count(i)
    flag += m
    print(m)
print(0)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
flag = 0
list = [int(x) for x in input().split()]
for i in range(1, n+1):
  if flag == n:
    break
  else:
    m = list.count(i)
    flag += m
    print(m)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
flag = 0
list = [int(x) for x in input().split()]
for i in range(1, n+1):
  if flag == n:
    break
  else:
    m = list.count(i)
    flag += m
    print(m)
    while i in list:
      list.remove(i)

Submission status: Time Limit Exceeded

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

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

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(n) for n in input().split()]

for n in range(0, N):
    cnt = 0
    i = 0
    for a in A[i:]:
        i = i + 1
        if n + 1 == a:
            cnt = cnt + 1
        elif n + 1 < a:
            break
    print(A.count(n + 1))

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
# ABC 163
N =int(input())
A =[int(j) for j in input().split()]
memo = dict()
for i in set(A):
    memo[str(i)]=A.count(i)
    
for i in range(1,N+1):
    if str(i) in memo.keys():
        print(memo[str(i)])
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
# ABC 163
N =int(input())
A =[int(j) for j in input().split()]
for i in range(1,N+1):
    print(A.count(i))

Submission status: Time Limit Exceeded

Solution code:
n,  = map(int, input().split())
A = [int(x) for x in input().split()]
freq=[]
k=1
for k in range(n):
    freq.append(k+1)
count=0
for k in range(n):
    for j in range(n-1):
        if A[j]==freq[k]:
           count=count+1
    print(count)
    count=0

Submission status: Time Limit Exceeded

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

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:
ninnzuu = (int)(input())
joushi = list(map(int, input().split(" ")))
txt = ""
for i in range(1, ninnzuu + 1):
    print((str)(joushi.count(i)))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
# print(N)
List = list(map(int, input().split()))
# print(List)

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    l=list(map(int,input().split()))
    for i in range(1,n):
            print(l[i-1:].count(i))
    print(0)
resolve()

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int, input().split()))
result = []
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):
    print(A.count(i))
    
print(0)

Submission status: Time Limit Exceeded

Solution code:

# TLE

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

for i in range(N):
  print(n.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())
li = list(input())	
[print(li.count(str(i + 1))) for i in range(n)]

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()))
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()))
x = 1
for x in range(n):
	x = x+1
	print(a.count(x))

Submission status: Time Limit Exceeded

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

for num in range(x):
    print(A.count(num+1))

Submission status: Time Limit Exceeded

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

for num in range(x):
    print(A.count(num+1))

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(*ans,sep='\n')

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