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

Submission status: Time Limit Exceeded

Solution code:
n=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:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
A = LI()

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
*A,=tuple(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,=map(int,input().split())

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

for x in X:print(x)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

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


for i in range(1,int(max(list))+1):
	print(list.count(str(i)))

for i in range(N-int(max(list))):
	print(0)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

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

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

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

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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()))
    aMax = max(aList)
    for i in range(n):
        if aMax >= i + 1:
            print(aList.count(i + 1))
        else:
            print(0)


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import itertools
import math
import sys

INF = float('inf')


def solve(N: int, A: "List[int]"):
    return "\n".join([str(A.count(i+1)) for i in range(N)])


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N - 2 + 1)]  # type: "List[int]"
    print(solve(N, A))


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
As = list(map(int, input().split()))
preans = [n for n in range(N)]
for n in range(1, N):
    preans[n] = As[n-1] - 1
del preans[0]
for n in range(N):
    print(preans.count(n))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

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

I = [0]*N

for i in range(N):
    for j in range(len(A)):
        if A[j] == i:
            I[i-1] += 1


for i in range(N):
    print(I[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()))
ans = []*(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 = [int(i) for i in input().split()]
staff_count_list = []

for i in range(1, N + 1):
    staff_count = A_list.count(i)
    staff_count_list.append(staff_count)

for staff_count in staff_count_list:
    print(staff_count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(N):
  for a in A:
    if a == i + 1:
      R.extend("1") 
  print(len(R))
  R = []

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

c=collections.Counter(b)
n,m=zip(*c.most_common())
n,m=list(n),list(m)

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

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

Submission status: Time Limit Exceeded

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

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()))
l = []

for i in range(1, n + 1):
    cnt = 0
    for j in range(n - 1):
        if i == a[j]:
            cnt += 1
    l.append(cnt)
            
for k in range(n):
    print(l[k])

Submission status: Time Limit Exceeded

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

for i in range(1, n + 1):
    cnt = 0
    for j in range(n - 1):
        if i == a[j]:
            cnt += 1
    l.append(cnt)
            
for k in range(n):
    print(l[k])

Submission status: Time Limit Exceeded

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
N = int(input())
A = list(map(int,input().split()))
countstop = False
for i in range(N+1)[1:]:
	if countstop:
		print(0)
		continue
	ni = A.count(i)
	print(ni)
	N = N - ni
	if N == 1:
		countstop = True

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
boss = [0] * N

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

import collections

dic = collections.Counter(A)

for i in range(N-1):
    if i+1 in A:
        print(dic[i+1])
    else:
        print(0)

print(0)

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

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()))
i = 0
while i < N:
    num = 0
    for j in A:
        if j == i + 1:
            num += 1
    i += 1
    print(num)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#163C
#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 = int(input())
list_ = list(map(int, input().split()))

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
s=int(input())
e_list=map(int,input().split())
e_lst=list(e_list)
e_dic={}
for i in range(1,s+1):
  e_dic[i]=e_lst.count(i)

for i in e_dic.keys():
  print(e_dic[i])

Submission status: Time Limit Exceeded

Solution code:
s=int(input())
e_list=list(map(int,input().split()))
e_dic={}
for i in range(1,s+1):
  e_dic[i]=e_list.count(i)

for i in e_dic.keys():
  print(e_dic[i])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

ans = [0]*n
for i in set(a):
    ans[i-1] = a.count(i)

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

Submission status: Time Limit Exceeded

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

aa = set(a)
for i in range(1, n+1):
    if i in aa:
        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(1, n+1):
    print(a.count(i))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(n-1):
    if counter == n:
        print(0)
    else:
        t = a.count(i+1)
        counter = counter + t
        print(t)

print(0)

Submission status: Time Limit Exceeded

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

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

print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
alist=list(map(int, input().split()))
alist.sort()
aa=alist[0]
anslist=[0]*N
for i in range(1,N+1):
    anslist[i-1]=alist.count(i)
for ans in anslist:
    print(ans)

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
alist=list(map(int, input().split()))
alist.sort()
for i in range(1,N+1):
    if i in alist:
        ans=alist.count(i)
        print(ans)
        alist=alist[ans:]
    else:
        print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(1,n):
  count = a.count(i)
  lst.append(count)
lst.append(0)

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = list(map(int,readline().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
for i in range(n):
  print(a.count(i+1))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = [i for i in 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):
    count = 0
    while True:
        if i+1 in a:
            a.remove(i+1)
            count += 1
        else:
            break
    print(count)

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

a.insert(0, 0)
cnt = a.count(max(a))

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(1+i))

Submission status: Time Limit Exceeded

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

for i in range(n):
	mem.append(a.count(i+1))
	print(mem[i])

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

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())
emplist = [int(x) for x in input().split()]
sum = 0
for i in range(1,N+1):
    if sum < N-1:
        x = emplist.count(i)
        sum += x
        print(x)
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
emplist = [int(x) for x in input().split()]
sum = 0
for i in range(1,N+1):
    if sum < N-1:
        print(emplist.count(i))
        sum += emplist.count(i)
    else:
        print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

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


if __name__=="__main__":
    main()

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

    for i in range(n):
        print(np.count_nonzero(a == i+1))


if __name__=="__main__":
    main()

Submission status: Time Limit Exceeded

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

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


if __name__=="__main__":
    main()

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

Submission status: Time Limit Exceeded

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

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()))
count = ''
for i in range(1,n+1):
  count+=(str(a.count(i))+'\n')
print(count)

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

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

Submission status: Time Limit Exceeded

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



main()

Submission status: Time Limit Exceeded

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



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 = [int(x) for x in input().split()]
num = len(a)
for i in range(N):
    a = [int(x) for x in a if i+1 != x]
    print(num-len(a))
    num -= (num-len(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:
n = int(input())
a = list(map(int, input().split()))
numbers = {}

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()))
numbers = {}

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

b=[0 for i in range(n)]
res=0
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()))

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

Submission status: Time Limit Exceeded

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

print(0)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int,input().split()))
A  =sorted(A)
for i in range(1,N):
  if i in A :
    k = A.count(i)
    print(k)
    A = A[k:N]
  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):
  print(A[i-1:N].count(i))
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:
import sys
S=0
N=int(input())
L=list(map(int,input().split()))
for i in range(1,N+1):
  print(L.count(i))
  S+=L.count(i)
  if S==N:
    for j in range(N-i):
      print(0)
      sys.exit()

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:
def main():
    N = int(input())
    A = list(map(int, input().strip().split()))

    for i in range(1,N+1):
        if N <= 1:
            print(0)
        else:
            print(A.count(i))
            N = N - A.count(i)

main()

Submission status: Time Limit Exceeded

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

    for i in range(1,N+1):
        print(A.count(i))
        N = N - A.count(i)
        if N <= 0:
            return

main()

Submission status: Time Limit Exceeded

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

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

main()

Submission status: Time Limit Exceeded

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

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

main()

Submission status: Time Limit Exceeded

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

a = N/2

if a%2 == 1:
  a += 0.5
  
a = int(a)
for i in range(1,a):
  print(M.count(i))
  
for i in range(a,N+1):
  print(M.count(i))

Submission status: Time Limit Exceeded

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

for i in range(n):
    if i + 1 in l_set:
        print(l.count(i + 1))
        l.remove(i + 1)
        l_set.remove(i + 1)
    else:
        print(0)

Submission status: Time Limit Exceeded

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

for i in range(n):
    print(l.count(i + 1))
    if l.count(i + 1) > 0:
        l.remove(i + 1)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(1, n + 1):
    b = a.count(i)
    if b > 0:
        a = a[a.index(i):]
    print(b)

Submission status: Time Limit Exceeded

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


for i in count:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = ['']*N
    for i in range(N):
        ans[i] = str(A.count(i+1))
    print('\n'.join(ans))
resolve()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

for i in range(1,n+1):
    num=a.count(i)
    while True:
        if i in a:
            a.remove(i)
        else:
            break
    print(num)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:

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

Submission status: Time Limit Exceeded

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

for i in range(N):
    sum = 0

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

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

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 ans:
    print(k)