Feedback | | If you notice incorrect translations in Contester, please let author know.
|
|
Time limit 1000/1000/1000/1000 ms. Memory limit 65000/65000/65000/65000 Kb.
Problem description
Given N cities and some of them are connected with roads. Calculate number of roads.
Input
There is a single integer N on the first line (0 ≤ N ≤ 100). There are N integers 1 or 0 on each of N next lines. Where (i, j) = 1 if cities i and j are connected and 0 otherwise.
Output
Write number of roads.
Example
| stdin |
stdout |
5
0 1 0 0 0
1 0 1 1 0
0 1 0 0 0
0 1 0 0 0
0 0 0 0 0 |
3 |
Для отправки решений необходимо выполнить вход.
|