~/algor $ cat problems/matritsa-qatordagi-musbatlar
Positives in each row
Easy
1000 ms
64 MB
24%
A matrix of size $n \times m$ is given. For every row, find how many positive elements it has ($0$ is not positive).
Input
The first line contains two positive integers $n$ and $m$.
Each of the next $n$ lines contains $m$ integers — the matrix.
Output
One line with $n$ space-separated integers.
Note
$1 \le n, m \le 100$
$-1000 \le a_{i,j} \le 1000$
Examples
Input #1
3 4 1 -2 3 0 -1 -1 -1 -1 5 6 7 8
Output #1
2 0 4
Input #2
1 1 0
Output #2
0