HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC-2014-15 Questions > problem:


3rd-6. 50695 - Longest link between neurons

IMPC-2014-15 Questions

Start: Nov.22.2014 at 03:00:00 PM
Finish: Nov.22.2014 at 08:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 2nd-2. 50512 - Coding redundancy
• 2nd-3. 50533 - Contacts List
• 2nd-5. 50793 - Top M Customers
• 2nd-6. 50486 - Problems and Progr...
• 3rd-2. 50405 - Accounts Receivable
• 3rd-3. 50474 - Sum of Two Primes
• 3rd-4. 50406 - Draw Pattern 178
• 3rd-5. 50415 - The Scientist
• 3rd-6. 50695 - Longest link bet...
• 4th-1. 50491 - Brokers
• 4th-2. 50524 - Elevator
• 4th-3. 50535 - Image Compression
• 4th-6. 50536 - Epoka Furgon Shpk
• Ind_01-10. 50752 - Student Groups
• Ind_01-20. 50416 - Placing Domino...
• Ind_01-30. 50764 - Fast Typing Co...
• Ind_01-50. 50718 - Elevator

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
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