From the list of edges to the adjacency matrix - 2#4767

From the list of edges to the adjacency matrix - 2

1 segundo
128 megabytes
Muy fácil

A simple directed graph is described by a list of edges.

Your task is to output its representation as an adjacency matrix.

Entrada

The first line of the input contains two integers: (1 \le N \le 100), representing the number of vertices, and (1 \le M \le N \cdot (N-1)/2), representing the number of edges. The following lines each contain a pair of numbers, specifying one edge of the graph.

Salida

Output the adjacency matrix of the graph.

Ejemplos

Ejemplo 1

Loading
Loading