Problem C
Fimbulferð
Languages
en
is
This spring, like many others, has had its fair share of really cold mornings. It’s quite a challenge to focus in class when you’re busy with desperately trying to warm your fingers. To try to prevent this we need a program that finds the warmest route between buildings! This is a normal and effective way to combat this problem.
Input
The input begins with a line containing three integers
Output
For each query print how much one would cool down in the best case. If you get warmer print the corresponding negative number. If there is no route to the destination print engin leid. If it’s possible to walk around and get arbitrarily warm before reaching the destination print nogu hlytt.
Sample Input 1 | Sample Output 1 |
---|---|
8 10 3 1 2 10 2 3 -1 3 4 -1 4 2 -1 4 8 10 1 7 10 1 5 10 5 6 -20 6 7 10 7 8 10 1 7 1 8 8 1 |
0 nogu hlytt engin leid |