Loops
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
The adjacency matrix of an undirected graph is given. Determine whether it contains loops.
Input
The first line contains the number of vertices . Then given lines with elements in each — the description of adjacency matrix.
Output
Print "YES" if graph contains loops and "NO" otherwise.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 6K
Acceptance rate 64%