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

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

syain = []

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

Submission status: Time Limit Exceeded

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

syain = []

for i in range(N):
    #syain.append(np.count_nonzero(A == i+1))
    syain.append(A.count(i+1))
    print(syain[i])

Submission status: Time Limit Exceeded

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

syain = []

for i in range(N):
    syain.append(np.count_nonzero(A == i+1))
    print(syain[i])

Submission status: Time Limit Exceeded

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

syain = []

for i in range(N):
    syain.append(A.count(i+1))
    #print(syain[i])
for j in range(N):
    print(syain[j])

Submission status: Time Limit Exceeded

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

syain = []

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

Submission status: Time Limit Exceeded

Solution code:
N = input()
S = input().replace(" ","")
 
for A in range (int(N)):
    print(S.count(str(A+1),A,int(N)-1))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

A1 = set(A)

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

Submission status: Time Limit Exceeded

Solution code:
#C✖︎
n = int(input())
a = input().split()

b = [0 for i in range(n)]
for i in range(1, n):
    b[i-1] = a.count(str(i))
for i in range(n):
    print(f"{b[i]}")

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:

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

Submission status: Time Limit Exceeded

Solution code:

n = int(input())

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import collections

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

c = collections.Counter(A)

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

n = 1
for i in ai :
    print(ai.count(n))
    n += 1
print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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))
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
input = sys.stdin.readline
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())
member = list(map(int, input().split()))

id = dict.fromkeys(member)

for k, v in id.items():
  id[k] = member.count(k)
  
for i in range(1,n+1):
  if i in member:
    print(id.get(i))
  else:
    print(0)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

rg = range(1, n + 1)

for i in rg:
    c = ls.count(i)
    print(c)

Submission status: Time Limit Exceeded

Solution code:
from numpy.core.defchararray import count

n = int(input())

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

a.insert(0,1)

s = a.count(1) - 1
print(s)

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

rg = range(1, n + 1)

for i in rg:
    c = ls.count(i)
    print(c)
    if c != 0:
        ls.remove(i)

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

for i in range(N-1):
  num = a.pop(0)
  buka_num[num]+=1

buka_num.pop(0)
buka_str = [str(n) for n in buka_num]
joined = "\n".join(buka_str)
print(joined)

Submission status: Time Limit Exceeded

Solution code:
import os

def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [a_list.count(i) for i in range(1,n+1)]
        for i in result:
                print(i)
        
if __name__ == "__main__":
        main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=list(input())

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

Submission status: Time Limit Exceeded

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

l.append(a.count(1))
for i in range(len(a)):
    co=0
    for j in range(i+1,len(a)):
        if i==0:
            if a[i]+1==a[j]:
                co+=1
        elif i>=1 and a[i]!=a[i-1]:
            if a[i]+1==a[j]:
                co+=1
    l.append(co)
for i in range(N):
    print(l[i])

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int, input().split()))
ans = []
for i in range(0,N-1):
    if A.count(1) == len(A):
        ans = [N-1]
        for j in range(N-1):
            ans.append(0)
    elif A[i] != A[i-1]:
        B = A[i]
        ans.append(A.count(B))
    else:
        ans.append(0)
if len(ans) != N:
    ans.append(0)
ans.sort()
ans.reverse()
for w in ans:
    print(w)

Submission status: Time Limit Exceeded

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


for i in range(len(aList)):
	# print(i)
	# if max(aList) < aList[i]:
	# 	print(0)
	# else:
	print(aList.count(i+1))
for i in range(n-len(aList)):
	print(0)

Submission status: Time Limit Exceeded

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

if __name__ == "__main__":
  main()

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:
# 5 
# 1 1 2 2

# 5人の部下
# 社員番号 2の社員の直属の上司の社員番号が 1, 社員番号 3の社員の直属の上司の社員番号が 1, 社員番号 4の社員の直属の上司の社員番号が 2, 社員番号 5の社員の直属の上司の社員番号が 2,
 

N = int(input())

AnStr = input().split(' ')
zyosiList = []
for v in AnStr:
  zyosiList.append(int(v))

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

Submission status: Time Limit Exceeded

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

for i in range(1,n+1):
  if len(a)>=1 and i==a[0]:
    for j in a:
      if i==j:
        count+=1
      else:
        break
    del a[:count]
        
  print(count)
  count=0

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter
from operator import itemgetter

N = int(input())
A = list(map(int, input().split()))
B = Counter(A)
BA = list(B.items())
BB = list(B.keys())


for i in range(N):
    flag = 0
    for j in BA:
        if i+1 == j[0]:
            print(j[1])
            flag = 1
            break
    if flag == 0:
        print('0')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

for i in range(1,N+1):
    print(len([j for j in L if i == j]))

Submission status: Time Limit Exceeded

Solution code:
N = input()
A = input().split()

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

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('\n'.join(map(str, ans)))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A_i = list(map(int, input().split()))
uq_A_i = list(set(A_i))
C = ["0\n"] * N
for i in uq_A_i:
    C[i - 1] = "{}".format(A_i.count(i)) + "\n"
print("".join(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()))
ans=list(range(N))
 
for i in range(0,N):
  ans[i]=a.count(i+1)
else:
  for answer in ans:
    print(answer)

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter
N = int(input())
l = list(map(int, input().split()))
s = 1
ca = Counter(l)
for k in ca.keys():
    for i in range(s, N + 1):
        s = k+1
        if i == k:
            print(ca[k])
        elif i < k:
            print(0)
        else:
            break

for j in range(N - s + 1):
    print(0)

Submission status: Time Limit Exceeded

Solution code:
import collections
n = int(input())
a = list(map(str,input().split()))
 
c = collections.Counter(a)
keys = list(c.keys())
 
for i in range(1,n+1):
    if str(i) in keys:
        print(c[str(i)])
    else:
        print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Buka_list = []
i = 1
while 1:
    ninzu = A_list.count(i)
    print(ninzu)
    i += 1
    if i > N:
        break

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

A = sorted(A)

cnt = [0] * N

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
joushiList = list(map(int, input().split()))
        
bukaList = {}
for no in range(1,N+1) :
    bukaList[no] = joushiList[no-1:].count(no)

for o in bukaList :
    print(bukaList[o])

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))
    a = [n for n in a if n != i]
for j in ans:
    print(j)

Submission status: Time Limit Exceeded

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

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

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:
import os
 
def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [0]*n
     
        for i in set(a_list):
                result[i-1] = a_list.count(i)
        for i in result:
                print(i)
 
if __name__ == "__main__":
        main()

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

assistant = 0
members = []


for j in range(1,N):
    for i in A:
        if i == j:
            assistant +=1

        
    members.append(assistant)
    assistant = 0

members.append(0)

for i in members:
    print(i)

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))
M = [A.count(x) for x in range(1,N+1)]
print('\n'.join(map(str,M)))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
L1 = list(map(int,input().split()))
i = 1
while N>= i :
    print(L1.count(i))
    i +=1

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

A = input().split()

A_i = [int(s) for s in A]

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

l = []
amount = 0
count = 1
for i in range(N):
    for j in range(N - 1):
        if count < j:
            break
        elif numbers[j] == i+1:
            amount = amount + 1
        count = count + 1
    count = 1 
    print(amount)
    amount = 0

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

c = a_list2.count(1)
a_list2 = a_list2[c:]
print(c)

for i in range(n-1):
    a_buka = a_list[i] + 1
    count = a_list2.count(a_buka)
    a_list2 = a_list2[count:]
    print(count)

Submission status: Time Limit Exceeded

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

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:
s = [input() for i in range(2)]
l1=int(s[0])
l2=s[1].split(" ")
c_l=([])
for c in range(l1):  
  c_l.append(c+1)

freq={}

for c in range(len(c_l)):
  freq[c_l[c]]=0

for e in l2:
  for c in range(len(c_l)):
    if int(e) == c:
      if c_l[c] in freq:
        freq[c_l[c-1]]+=1

 
for c in c_l:
  print(freq[c])

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:
num = int(input())
num2 = list(input().split())
for i in range(num):
  print(num2.count(str(i + 1)))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys

lines = sys.stdin.readlines()

N = int(lines[0])
Y = lines[1].split(' ')
A = list(range(N-1))
B =[]
for i in range(N):
    k = 0
    m = 0
    if m !=N:
      for j in list(set(A) & set(range(N-i-1))):
        if(int(Y[N-j-2])) == i+1:
          B.append(j)
          k = k +1
      A = list(set(A)-set(B))
    print(k)
    m = m + k

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter
N = int(input())
l = list(map(int, input().split()))
s = 1
ca = Counter(l)
for k, v in ca.items():
    for i in range(s, N + 1):
        s = k+1
        if i == k:
            print(v)
        elif i < k:
            print(0)
        else:
            break

for j in range(N - s + 1):
    print(0)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=list(map(int,input().split()))
a.sort()
num=a[0]
count=0

for i in range(1,n+1):
  if num==i:
    for j in a:
      if num==j:
        count+=1
      else:
        num=i+1
        break
    del a[:count]
        
  print(count)
  count=0

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter
from operator import itemgetter

N = int(input())
A = list(map(int, input().split()))
B = Counter(A)
BA = list(B.items())
BB = list(B.keys())


for i in range(N):
    flag = 0
    for j in BA:
        if i+1 == j[0]:
            print(j[1])
            flag = 1
    if flag == 0:
        print('0')

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

i=0

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

Submission status: Time Limit Exceeded

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

for n in range(1,N):
    x = A.count(n)
    B[n-1]=x
    count = count +1
    if count == N:
        break

for a in B:
    print(a)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = input().split()
i = 1
total = 0
while i <= n:
    total = 0
    for j in a:
        if int(j) == i:
            total += 1
    print(total)
    i += 1

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
def main():
    readline = stdin.readline
    N = int(input())
    A = list(map(int, readline().split()))
    listN = list(range(1, N+1))    

    for i in listN:
        print(A.count(i))
main()

Submission status: Time Limit Exceeded

Solution code:
from collections import Counter


def main():
    N = int(input()) # 5人
    An = list(map(int, input().split(' '))) # A2, A3,...
    
    # N = 10
    # An = [1,1, 1, 1, 1, 1, 1, 1, 1]
    
    start_index = 0
    
    for n in range(1, N+1):
        an = Counter(An[start_index:])
        start_index = an[n]
        print(start_index)
            


    
main()

Submission status: Time Limit Exceeded

Solution code:
import os

def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [a_list.count(i) for i in range(1,n+1)]
        for i in result:
                print(i)

if __name__ == "__main__":
        main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
sys.setrecursionlimit(4100000)
input = sys.stdin.readline
N = int(input()) #社員数
joushi_no_bangou = [0] #上司の社員番号
ans = []
joushi_no_bangou += map(int,input().split())

#==--------------

for i in range(N):
    print(joushi_no_bangou.count(i+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))
    print(str(hako[i]))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = list(map(int, input().split()))
if N >= 2:
    if len(A) == N-1:
        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))
    else:
        pass

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/evn python3

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

cnt = 0

for i in range(1, N+1):
    if not A:
        break
    else:
        print(A.count(i))
        A =[j for j in A if j != i]
    cnt += 1

print('\n'.join(map(str, [0]*(N-cnt))))

Submission status: Time Limit Exceeded

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

for num in range(1,N+1):
  result = 0
  for value in array:
    if value == num:
      result += 1
  print(result)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

tyouhuku_delete = set(a)

result = [ a.count(i) if i in tyouhuku_delete  else 0 for i in range(1, total_member)]

for i in result:
    print(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:
n = int(input())

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

CountList = list(range(n))
summ = 0
for i in range(n):
    summ += List.count(i+1)
    if summ < n:
        CountList[i] = List.count(i+1)
    else:
        CountList[i] = 0


for j in CountList:
    print(j)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

c = a_list2.count(1)
a_list2 = [i for i in a_list2 if i != 1]
print(c)

for i in range(n-1):
    a_buka = a_list[i] + 1
    count = a_list2.count(a_buka)
    a_list2 = [j for j in a_list2 if j != a_buka]
    print(count)

Submission status: Time Limit Exceeded

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

for i in range(N):
  a = str(i+1)
  print(lis.count(a))

Submission status: Time Limit Exceeded

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