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

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


Nameplates

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

• Workshop
• The N Queens Problem
• Subsets
• Maximum Sum 2
• Gifts of Santa Claus
• Rectangles on a plane
• Permutations
• Reverse permutation
• Nameplates
• Adjacency matrix to edges list
• Edges list to Adjacency matrix
• Cities and roads
• Cycle detection
• Diameter of graph
• Divisors count
• GCD of ones
• Prime numbers

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

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

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

Problem description

There are N cities and M roads between them in some country. In each city goverment wants to put a nameplate at the begining of each road (from both sides), which shows where the road leads (which city). According to the map given calculate how many nameplates are required for each city.

Input

The first line of the input contains two integers N and M (1 ≤ N ≤ 100, 0 ≤ M < 10000) where N denotes the number of cities, M - number of roads. Each of the following M lines contains two integers - numbers of cities connected with roads.

Output

Print N integers - number of nameplates required for each city.

Example

stdin stdout

7 10
5 1
3 2
7 1
5 2
7 4
6 5
6 4
7 5
2 1
5 3

3 3 2 2 5 2 3

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

www.contester.ru