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

Разделы > Задачи на графах > задача:


50695 - Longest link between neurons

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

Задачи раздела

• 50255 - Bishops
• 50261 - Roads
• 50690 - Parliament
• 50700 - Candidates for the Mayor
• 50692 - How much money?
• 50694 - The Cheapest Flight
• 50841 - My grand-grand-grandfather
• 50697 - Base Stations
• 50695 - Longest link between n...
• 50414 - Traffic
• 50698 - Ayran Delivery
• 50978 - Albanian Coders
• 50699 - Fighting Vampires
• 50857 - Nine-Stones Game
• 50929 - Present from your uncles
• 51076 - Key person
• 51080 - Deepest Point

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Osman Ay.

Longest link between neurons

Ms. Xhani works in a hospital as neurologist. A neuron is an electrically excitable living cell that processes or transmits information through electrical and chemical signals. These signals between neurons occur via synapses, specialized connections with other cells. For her research, she is trying to identify the points over the brain and the connections between them. She has identified around 2500 points on the brain and around 6000 neurons linking them. She works on how these neurons communicate. One neuron can have many inputs from many different synapses and these links are not two directional. She needs to identify the longest connection between the given points.

Question: Write a program that is going to find out the longest link starting from a given point.

Input specification
At the beginning, you will be given 3 integers;

  • Number of points (V): an integer between 1 and 2500
  • Number of neurons (linke) (E): an integer between 1 and 6000
  • Starting point: an integer between 1 and 2500
Then in the following E lines you will be given two integers where there is a link between from the first point to the second.

Output specification
Show one integer: The length of the longest link.

Sample Input I
8 6 4
1 5
7 6
4 1
2 7
4 2
4 3
Sample Output I
3



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

www.contester.ru