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=[0]*(n-1)
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=tuple(map(int,input().split()))
for i in range(1,n+1):
    print(L.count(i))

Submission status: Time Limit Exceeded

Solution code:
import sys
input = sys.stdin.readline
import numpy as np

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

A = np.array(A)
Ones = np.array([1]*(n-1))

for i in range(n-1):
    A = A -Ones
    print(n-1 -len(np.nonzero(A)[0]))
print("0")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
length = int(input())
data = [int(i) for i in input().split()]

for i in range(1, length+1):
  print(data.count(i))

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:
import collections

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

o = '\n'.join([str(A.count(i)) for i in range(1, N+1)])
print(o)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
import sys
import math
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix
import itertools
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

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

Submission status: Time Limit Exceeded

Solution code:
#create date: 2020-04-19 21:04

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()
    a = na()
    for i in range(1, n+1):
        print(a.count(i))

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import fractions
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
A = LI()

cnt = [0] * n

sa = set(A)

for v in sa:
    if cnt[v-1] == 0:
        cnt[v-1] = A.count(v)

for c in cnt:
  print(c)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
A = input().split()
X = []
for i in range(N):
    X.append(A.count(str(i + 1)))
    print(X[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:
import sys
from collections import deque
input = lambda: sys.stdin.readline().rstrip()
Yes = lambda boolean: print('Yes') if boolean else print('No')
YES = lambda boolean: print('YES') if boolean else print('NO')
aint = lambda: int(input())
ints = lambda: list(map(int, input().split()))
is_even = lambda x: True if x%2==0 else False
zeros2d = lambda r,c: [[0 for col in range(c)] for row in range(r)]

n = aint()
a = ints()

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

Submission status: Time Limit Exceeded

Solution code:
# python3
# -*- coding: utf-8 -*-
import sys
import math
import bisect
from fractions import gcd
from itertools import count, permutations
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint

INF = float('inf')

ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
lmtx = lambda h: [list(map(int, lmis())) for _ in range(h)]
sys.setrecursionlimit(1000000000)


def lcm(a, b):
    return (a * b) // gcd(a, b)


# main
n = ii()
alist = lmis()

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

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 sys
input = sys.stdin.readline

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n = int(input())

a = input().split()

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

Submission status: Time Limit Exceeded

Solution code:
import sys
N = int(sys.stdin.readline())
li = list(map(int, sys.stdin.readline().split()))
i = 1
while i <= N:
  print(li.count(i))
  i += 1

Submission status: Time Limit Exceeded

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

for i in range(1,N+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, *a = map(int, open(0).read().split())
for i in range(1, n + 1):
    print(a.count(i))
    a = list(filter(lambda x: x != i, a))

Submission status: Time Limit Exceeded

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

import math

def main():
    n = int(input())
    a_li = list(map(int, input().strip().split()))

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
# Your code here!

# coding: utf-8
import sys
# import collections

# import bisect
# import math
import numpy as np

# from fractions import gcd

"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        # 参考
        # https://blog.rossywhite.com/2018/08/06/bit-search/
        # https://atcoder.jp/contests/abc105/submissions/4088632
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    # output.append(a[j])
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def main():
    # 1文字に省略
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    # n, m = ip.IL()
    # a = np.array(ip.IL())
    # for _ in range(m):
    #     a[np.argmax(a)] //= 2
    # print(np.sum(a))
    n = int(input())
    a = ip.IL()
    for i in range(1, n):
        print(a.count(i))
    print(0)


main()

Submission status: Time Limit Exceeded

Solution code:
#H,W = map(int,input().split())
N=int(input())
A = list(map(int,input().split()))
#S=str(input())
c=[]
for i in range(1,N+1):
    C=A.count(i)
    c.append(C)

for k in c:

    print(k)

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

Submission status: Time Limit Exceeded

Solution code:
import sys
import numpy as np

n=int(sys.stdin.readline())
#n,k=map(int,sys.stdin.readline().split())
a=np.array(sys.stdin.readline().split(),dtype='int64')
#a=np.array([sys.stdin.readline().split() for i in range(n)],dtype='int64')

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

Submission status: Time Limit Exceeded

Solution code:
N=int(input())
A=list(map(str, input().split()))
 
from collections import Counter
 
c = Counter(A)
 
for i in range(1,N+1):
    if str(i) in list(c):
        print(c[str(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())
alist = list(map(str, input().split()))
for i in range(1,N+1):
  print(alist.count(str(i)))

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
n, *a = map(int, open(0).read().split())

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
# ABC163 C

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

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 = [int(a) for a in input().split()]

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

Submission status: Time Limit Exceeded

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

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

d = {i: A.count(i) for i in range(1, N+1)}

for n in d.values():
  print(n)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
# coding: utf-8
n = int(input())
li = input().split()

for i in range(n):
    print(li.count(str(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 = [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())
L = [i for i in map(int,input().split())]
S = set(L)
for i in range(1,N+1):
    if i in S:
        print(L.count(i))
    else:
        print(0)

Submission status: Time Limit Exceeded

Solution code:
import numpy as np

n = int(input())
a_list = [int(i) for i in input().split()]
a_list = np.array(a_list, int)

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

Submission status: Time Limit Exceeded

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import fractions
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
A = LI()

cnt = [0] * n

for i in range(n-1):
    if cnt[A[i]-1] == 0:
        cnt[A[i]-1] = A.count(A[i])

for c in cnt:
  print(c)

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

ans = []*N
for i in range(1,N):
    a = A.count(i)
    ans.append(a)
ans.append(0)
for i in range(N):
    print(ans[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:
import math
import sys

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

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

Submission status: Time Limit Exceeded

Solution code:
num_staffs = int(input())
staffs = [int(i) for i in input().split()]

for i in range(1, num_staffs + 1):
    print(len([s for s in staffs if s == i]))

Submission status: Time Limit Exceeded

Solution code:
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    A = il()

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


if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
mod = 10**9+7
import sys
from collections import Counter, defaultdict, deque
from itertools import product, permutations, combinations
from itertools import accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from math import ceil,floor
from copy import deepcopy
from heapq import heappop,heappush,heapify
import heapq


sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

# リストの要素を改行を挟んで表示する
p2D = lambda x: print(*x, sep="\n")
# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())

def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

# 入力全てを整数に変換したものの配列を受け取る
# def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LI(): return list(map(lambda x:int(x), sys.stdin.readline().split()))
def HI(): return list(map(lambda x:int(x)*(-1), sys.stdin.readline().split()))




n= II()
a = LI()

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

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

from collections import Counter

c = Counter(A)

for i in range(1,N+1):
    if str(i) in list(c):
        print(c[str(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):
  cnt = 0
  for ai in a:
    if ai == i:
      cnt += 1
  print(cnt)

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

Solution code:
def main():
	s = int(input())
	a = list(map(str,input().split()))

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

if __name__ == '__main__':
	main()

Submission status: Time Limit Exceeded

Solution code:

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

Submission status: Time Limit Exceeded

Solution code:
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n=n0()
a=n1()

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

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
L = [i for i in map(int,input().split())]
c = max(L)
for i in range(1,N+1):
    print(L.count(i))

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

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

import collections
for i in range(1, n + 1):
  print(collections.Counter(a)[i])

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import fractions
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

n = I()
A = LI()

cnt = [0] * n

for i in range(n-1):
    cnt[A[i]-1] = A.count(A[i])

for c in cnt:
  print(c)

Submission status: Time Limit Exceeded

Solution code:
n=int(input())
a=[0]*(n-1)
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 x in range(N):
    print(A.count(x+1))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#create date: 2020-04-19 21:04

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()
    a = na()
    for i in range(1, n+1):
        print(a.count(i))

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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