From adjacency matrix to edge list
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
A simple undirected graph is defined by an adjacency matrix.
Output its representation as a list of edges.
Input
The first line of the input file contains the number N (1 ≤ N ≤ 100). Then there are N lines with N elements in each - a description of the adjacency matrix.
Output
In the output file, output a list of edges, ordered first by the first vertex in the pair of vertices that describes the edge, and then by the second.
Examples
Input #1
Answer #1
Submissions 3K
Acceptance rate 67%