LCC/Moose '20 Contest 4 J2 - Column Counting

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Given a N \times N size 2-D Array of numbers and a value K, determine how many occurences of K there are in each column.

Input Specification

The first line will contain N (1 \leq N \leq 100), and K (0 \leq K \leq 1000). The next N lines will each contain N integers, representing each value in the 2D Array. These values will be in the range of 0 to 1000.

Output Specification

Output 1 integer on each line, representing the number of occurences of K for that column.

Sample Input 1

5 1
1 2 3 4 5
0 1 1 2 1
1 7 3 0 8
1 1 9 8 1
3 3 3 3 3

Sample Output 1

3
2
1
0
2

Comments

There are no comments at the moment.