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

Сборники > Data Structures > задача:


50706 - The most crowded Club

Гость
• Вопросы к жюри (1)

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

• 51020 - Number of nodes removed
• 51023 - Preparing Keyword Index
• 50929 - Present from your uncles
• 51075 - Shortest Path for Bishop
• 50863 - Total Access Cost of a BST
• 50979 - Minimum access cost for BST
• 50688 - Epoka Furgon
• 50750 - Service Time - 2
• 50706 - The most crowded Club
• 50689 - The biggest building block
• 50686 - The Container
• 50771 - BST Level Sum
• 50773 - Balanced Sum Tree
• 50536 - Epoka Furgon Shpk
• 50506 - The Biggest Island
• 50682 - Hotel Durres
• 50777 - Dwarfs Maze

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

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

Лимит времени 4000/7000/4000/7000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

The most crowded Club

There are many student clubs at Epoka University. A student has asked from his friends about their clubs. And, he gathered the list of club friendships. Write a program that finds out the most crowded club at the university.

Input specification
The first line contains two numbers (n and m) where 2 ≤ (n, m) ≤ 10000. That means there are n students in the school and m student pairs will be given in the following m lines. Then, the following m lines have two numbers on each. The two numbers mean that those two students are in the same club. Note that, the students who are not listed are not registered to any club.

Output specification
Give just one number, the number of students in the most crowded club.

Sample Input:

10 5
3 4
5 6
7 8
9 4
10 9
        

Sample Output:
4

Input Explanation:
There are 10 students and the following 5 lines lists the 5 pairs of clubmates;

  • Student 3 is in the same club with Student 4
  • Student 5 is in the same club with Student 6
  • Student 7 is in the same club with Student 8
  • etc.

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

www.contester.ru