Zeros sota la diagonal
Submit solution
Points:
10
Time limit:
5.0s
Memory limit:
256M
Author:
Problem types
Allowed languages
C#, Go, Java
Donada una matriu quadrada de nombres, digues si tots els nombres per sota de la diagonal són 0.
Input Format
El primer nombre N
que indica el tamany de la matriu.
A continuació venen els nombres de la matriu.
Constraints
-
Output Format
{ SI | NO }
Sample Input 1
2
1 2
0 4
Sample Output 1
SI
Sample Input 2
3
0 0 0
0 0 0
0 0 0
Sample Output 2
SI
Sample Input 3
4
1 2 3 4
0 2 3 4
0 0 3 4
0 0 0 4
Sample Output 3
SI
Sample Input 4
3
0 0 0
1 0 0
0 0 0
Sample Output 4
NO
Sample Input 5
3
0 0 0
0 1 0
0 0 0
Sample Output 5
SI
Sample Input 6
3
0 0 0
0 0 0
1 0 0
Sample Output 6
NO
Sample Input 7
3
0 0 0
0 0 0
0 1 0
Sample Output 7
NO
Sample Input 8
5
11 12 13 14 15
21 22 23 24 25
31 32 33 34 35
41 42 43 44 45
51 52 53 54 55
Sample Output 8
NO
Sample Input 9
5
11 12 13 14 15
0 22 23 24 25
0 0 33 34 35
0 0 0 44 45
0 0 0 0 55
Sample Output 9
SI
Sample Input 10
2
1 2 0 3
Sample Output 10
SI
Explanation 10
1 2 0 3 => 1 2
0 3
Sample Input 11
3
1 2 3 0 4 5 0 0 6
Sample Output 11
SI
Explanation 11
1 2 3
1 2 3 0 4 5 0 0 6 => 0 4 5
0 0 6
Sample Input 12
9
1 5 7 3 6 4 0 0 9
0 7 8 5 0 9 3 6 3
0 0 6 8 9 6 8 1 5
0 0 0 3 4 8 8 5 9
0 0 0 0 0 1 8 8 8
0 0 0 0 0 8 7 3 1
0 0 0 0 0 0 1 3 4
0 0 0 0 0 0 0 0 6
0 0 0 0 0 0 0 0 2
Sample Output 12
SI
CC BY-NC-SA 4.0