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:
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]
    
    counter = []
    count = 0
    start_index = 0
    
    for n in range(1, N+1):
        an = Counter(An[start_index:])
        print(an[n])
        
    
    # for i in counter:
    #     print(i)
            


    
main()

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
base = input().split()
x = []
for i in base:
    x.append(int(i))
x.sort(reverse = False)
for i in range(1,n):
    if i in x:
        a = x.count(i)
        print(a)
        for s in range(a):
            del x[0]
    else:
        print(0)
print(0)

Submission status: Time Limit Exceeded

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

for i in range(0,N):
	print(l1.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):
  if a.count(i)>0:
    print(a.count(i))
    l.append(a.count(i))
x=n-len(l)
y='0'*x
m=list(str(y))
n='\n'.join(m)
print(n)

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:
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(1, N - s + 2):
    print(0)

Submission status: Time Limit Exceeded

Solution code:
import collections

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

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

for i in range(N):
    if i+1 in st:
        print(num_d.popleft())
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 18 18:06:41 2020

"""


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

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

Submission status: Time Limit Exceeded

Solution code:
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(i)
        else:
            print(A.count(i))
    else:
        print(A.count(i))

Submission status: Time Limit Exceeded

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

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:
import numpy as np

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

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

Submission status: Time Limit Exceeded

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

for M in range(1, N+1):
	Cou = A.count(str(M))
	if N - Cou > 0:
		Num = Cou
	else:
		Num = 0
    
	print(Num)

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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
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()) 
A=list(map(int,input().split())) 
s=[]
sumall=0
for i in range(N):
    s.append(A.count(i+1))
    sumall=sumall+s[i]
    print(s[i])

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
sys.setrecursionlimit(20000000)
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:
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)

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

Submission status: Time Limit Exceeded

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

for i in range(0,N):
	num=l1.count(i+1)
	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):
  x = a.count(i)
  print(x)

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
# N=7
A=list(map(int,input().split()))
# A=sorted(A)
B=[]
for i in range(N):
    B=[j for j in A if j-1==i]
    print(len(B))
    B=[]

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

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

Submission status: Time Limit Exceeded

Solution code:


n=int(input())

s=0

a=list(input().split())


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

    for k in range(0,n-1):

        if int(a[k]) == i:

            s+=1
        else:pass

    print(s)

    s=0

Submission status: Time Limit Exceeded

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

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

if N - s + 1 < N:
    for j in range(1, N - s+2):
        print(0)

Submission status: Time Limit Exceeded

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

SL = sorted(L)
count = 0

for i in range (0, max(L)):
	p=len([j for j in SL[count::] if j == i+1]) 
	count+=p
	print(p)

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

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

Submission status: Time Limit Exceeded

Solution code:
# Python3 での解答例
# Copy
# -*- coding: utf-8 -*-
# 整数の入力
# スペース区切りの整数の入力
# b, c = map(int, input().split())
# 文字列の入力
# s = input()
# 出力
# print("{} {}".format(a+b+c, s))

N = int(input())
array = list(map(int, input().strip().split()))
uniqueArray = set(array)

for num in range(1,N+1):
  # print(num)
  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(int, input().split()))
a.sort()
c = 0
for i in range(n):
    c = a.count(i+1)
    del a[:c]
    print(c)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = tuple(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()))
count = 0
for i in range(N):
    NN = N-1
    if NN > 0:
        countA = A.count(i+1)
        print(countA)
        NN = NN-countA
        count +=1
    else:
        break

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

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 j == i:
            assistant += 1
        
    members.append(assistant)
    assistant = 0

members.append(0)

for i in members:
    print(i)

Submission status: Time Limit Exceeded

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

for i in range(N):
  a = 0
  for j in lis:
    num = int(j)
    if num == i+1:
      a += 1
  print(a)

Submission status: Time Limit Exceeded

Solution code:
def main():
    N = int(input()) # 5人
    An = list(map(int, input().split(' '))) # A2, A3,...
    
    # N = 5
    # An = [1, 1, 2, 2]
    
    # N = 7
    # An = [1, 2, 3, 4, 5, 6]

    # NUM = An.copy()
    # out = []
    # counter = []
    
    # start_index = 0
    
    # for n in range(1, N+1):
    #     count = 0
    #     for an in An[start_index:]:
    #         if n >= an:
    #             if len(NUM) > 0:
    #                 count += 1
    #                 start_index += 1
    #                 NUM = An[start_index:]
    #             # print(n, an, NUM)
    #     counter.append(count)
    #     # out.append(count)
        
    #     # print('counter:', counter, 'out:', out)
        
    # # print('counter:', counter)
    
    counter = []
    count = 0
    start_index = 0
    
    for n in range(1, N+1):
        an = An[start_index:]
        for a in an:
            a -= n
            if a == 0:
                count += 1        
        counter.append(count)
        count = 0
                
        
        
        
        
    
    
    for i in counter:
        print(i)
            


    
main()

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
data=list(map(int,input().split()))
sum=[]
for i in range(N):
    sum.append(0)
    for n in range(i,len(data)):
        if i==data[n]-1:
            sum[i]+=1
    print(sum[i])

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
lists=list(map(int,input().split()))
listsN=list(range(N))
for x in listsN: #listsNは0~N-1のリスト
    y=lists.count(x+1)
    print(y)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

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

CountList = list(range(n))

for i in range(n):
    CountList[i] = List.count(i+1)

for j in CountList:
    print(j)

Submission status: Time Limit Exceeded

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

tyouhuku_delete = set(a)

for i in range(1, total_member):
    if i in tyouhuku_delete:
        print(a.count(i))
    else:
        print(0)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
# スペース区切りの整数の入力
A = list(map(int, input().split()))

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

Submission status: Time Limit Exceeded

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

leadnum = 1
counter = 0 

for _ in range(N):
  print(A.count(leadnum))
  leadnum += 1

Submission status: Time Limit Exceeded

Solution code:
M = int(input())
A = list(map(int, input().split()))
num = 1

while num <= M:
    print(A.count(num))
    num += 1

Submission status: Time Limit Exceeded

Solution code:
import os
 
def main():
        n = int(input())
        a_list = list(map(int, input().split()))
        result = [0]*n
        list_set = set(a_list)
        for i in list_set:
                result[i-1] = a_list.count(i)
        for i in result:
                print(i)
 
if __name__ == "__main__":
        main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
from collections import deque
def main():
    n = int(input())
    q = deque(map(int, sys.stdin.readline().split()))
    cnt=1
    while q:
        print(q.count(cnt))
        cnt +=1
        q.popleft()
    print(0)

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
a = str(input())

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

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
    for j in A:
      if(int(Y[N-j-2])) == i+1:
        B.append(j)
        k = k +1
    A = list(set(A)-set(B))
    print(k)

Submission status: Time Limit Exceeded

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

for M in range(1, N+1):
	Cou = A.count(str(M))
	if N - Cou > 0:
		Num = Cou
	else:
		Num = 0
    
	print(Num)

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

for i in range(len(a)):
    for j in range(n):
        if j == a[i]:
            b[j-1] += 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()))
a.sort(reverse = True)
p = 0
for i in range(1,n+1):
    p = p+1
    print(a.count(p))

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

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

[print(np.count_nonzero(a==i)) for i in range(1,n+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()))
    
    for i in range(1, N+1):
        print(A.count(i))
        
main()

Submission status: Time Limit Exceeded

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

boss_list = sorted(boss_list)


for i in range(1, n+1):
    # boss_count = boss_list.count(i)
    boss_count = 0
    while (True):
        index = 0
        if boss_list[index] == i:
            boss_count += 1
        else:
            break

    del boss_list[:boss_count]
    print(boss_count)

Submission status: Time Limit Exceeded

Solution code:
import sys
sys.setrecursionlimit(4100000)
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 = list(map(int, input().split()))

one_a = ''.join([str(n) for n in a_list])

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

    print(one_a.count(str(i)))

Submission status: Time Limit Exceeded

Solution code:
N = int(input()) 
A=list(map(int,input().split())) 
i=0 
s=[]
sumall=0
for i in range(N-1):
    s.append(A.count(i+1))
    sumall=sumall+s[i]
    print(s[i])
    if sumall>=N-1:
        i=i+1
        break
for _ in range(i,N):
    print(0)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
data=list(map(int,input().split()))
sum=[]
for i in range(N):
    sum.append(0)
    for n,m in enumerate(data):
        if i>n:
            pass
        elif i==m-1:
            sum[i]+=1
    print(sum[i])

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
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())
lis = input().split()

for i in range(N):
  a = 0
  #print(i,"i")
  for j in lis:
    #print(j,"j")
    num = int(j)
    if num == i+1:
      #print("clear")
      a += 1
  print(a)

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

def count(element,seq):

    count = 0
    for i in seq:
        if  element == i:
            count += 1
    return count
    
for i in range(N):
    print(count(i+1, A))

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

Solution code:
syainsu = int(input())
syainlist = list(map(int,input().split()))
for bangou in range(1,syainsu+1):
	print(syainlist.count(bangou))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())

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

#count = 0

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

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

SL = sorted(L)

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

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

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 = []
s = [0] * n
a.append(input().split())

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

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

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
N = int(input())
A = list(map(int, stdin.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()))
lst_ans = [0]*n

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

Submission status: Time Limit Exceeded

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

for i in range(n):
    i = i + 1
    nums.append(i)

for i in nums:
    i = str(i)
    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):
    ans=a.count(i)
    print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
L1 = list(map(int,input().split()))
lcount = []
i = 1
while N>= i :
    lcount.append(L1.count(i))
    i +=1
 
for ans in lcount:
    print(ans)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

boss_list = sorted(boss_list)


for i in range(1, n+1):
    boss_count = boss_list.count(i)
    del boss_list[:boss_count]
    print(boss_count)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
base = input().split()
x = []
for i in base:
    x.append(int(i))
x.sort(reverse = False)
for i in range(1,n):
    a = x.count(i)
    print(a)
    for s in range(a):
        del x[0]
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):
    n = A.count(i+1)
    print(n)
    if i+1 in A:
        A.remove(i+1)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

print(0)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
# N = 5

A = list(map(int, input().split()))
# A = list(map(int, "1 1 2 2".split()))

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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np
from sys import stdin

N = int(input())
A = list(map(int, stdin.readline().split()))
#u, counts = np.unique(A, return_counts=True)

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




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

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

N = int(input())

A = np.array(list(map(int, input().split(' '))))

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

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

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
import sys


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    N = int(input())
    a = list(map(int,input().split()))
    l = []
    num = 0
    for i in range(N):
        l.append(a.count(i+1))


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



if __name__ == '__main__':
    main()

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()))
lst_ans = [0]*n

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

for j in range(n):
    print(lst_ans[j])

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
data=list(map(int,input().split()))
sum=[]
for i in range(N):
    sum.append(0)
    for n in data:
        if i==n-1:
            sum[i]+=1
    print(sum[i])

Submission status: Time Limit Exceeded

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


for i in range(N-1):
    L = len(A)
    #print(A)
    Ans = 0
    for j in range(L):
        if A[j]==i+1:
            Ans += 1
        else:
            for k in range(Ans):
                A.remove(i+1)                
            break
    print(Ans)
    

        
print("0")

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
base = input().split()
x = []
for i in base:
    x.append(int(i))
for i in range(1,n):
    a = x.count(i)
    print(a)
    for s in range(a):
        del x[0]
print(0)