#K40687. Dice Throws Count

    ID: 26698 Type: Default 1000ms 256MiB

Dice Throws Count

Dice Throws Count

In this problem, you are given multiple test cases. For each test case, you are provided with a number N followed by N integers representing the outcomes of dice throws. Your task is to count the occurrences of each dice face (from 1 to 6) and output the counts for each test case on a separate line.

For each test case, if the list of throws is represented by ({a_1, a_2, \dots, a_N}), you need to compute an array (C = [c_1, c_2, c_3, c_4, c_5, c_6]) where (c_i) is the number of times the face (i) appears. Input is read from standard input (stdin) and output must be written to standard output (stdout).

inputFormat

The input starts with an integer T, the number of test cases. For each test case, there are two lines:

  1. The first line contains an integer N indicating the number of dice throws.
  2. The second line contains N integers separated by spaces, each integer between 1 and 6 representing the result of a dice throw.

    It is guaranteed that 0 ≤ N and for each throw, 1 ≤ value ≤ 6. When N is 0, the second line will be empty.

outputFormat

For each test case, print a single line with six space-separated integers. These integers represent the count of occurrences from face 1 to face 6 respectively.## sample

3
6
1 2 2 3 4 5
5
6 6 6 6 6
7
2 3 4 5 6 1 1
1 2 1 1 1 0

0 0 0 0 0 5 2 1 1 1 1 1

</p>