Half-powers of vertices#477

Half-powers of vertices

1 second
64 megabytes
Very easy (≈850)

You are given a directed graph represented by an adjacency matrix. Your task is to determine the in-degree and out-degree for each vertex in the graph. The in-degree is the number of edges coming into a vertex, while the out-degree is the number of edges going out from a vertex.

Input Data

Output Data

For each vertex, output a pair of numbers: the in-degree followed by the out-degree. Provide these pairs for all N vertices.

Examples

Example 1

Loading
Loading