ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Camp. Turkey > задача:


Edges list to Adjacency matrix

Задачи сборника

• Herons
• Workshop
• City Tour
• A Palace with Many Columns
• Nameplates
• Cycle detection
• Cities and roads
• Adjacency matrix to edges list
• Edges list to Adjacency matrix
• Permutations
• Reverse permutation
• Divisors count
• GCD of ones
• Set cover problem
• Subsets
• The N Queens Problem
• Maximum Sum 2

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 1000/1000/1000/1000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

Problem description

Given edges list of undirected graph. Print this graph in form of adjacency matrix.

Input

The first line of the input contains two integers N and M (1 ≤ N ≤ 100, 1 ≤ M < 10000) where N denotes the number of verticies in graph, M - number of edges. Each of the following M lines contains two integers - one edge of graph.

Output

Print the adjacency matrix of given graph.

Example

stdin stdout

3 3
1 2
2 3
1 3

0 1 1
1 0 1
1 1 0

Для отправки решений необходимо выполнить вход.

www.contester.ru