Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M
Simon likes drilling tunnels parallel to the ground. Simon has drilled horizontal line tunnels. Each tunnel starts from and ends at . What is the length of the longest tunnel that Simon has dug?
The first line of input will contain the single integer .
For each of the next lines, line will contain two space-separated integer values and .
On one line, the length of the longest tunnel.
3 1 8 9 150 0 81
what if two tunnels are the same length?
down voting so toxic. valid question bro
You only need to find the longest tunnel, so you can choose either tunnel (if they're tied for the maximum length).
indeed, since your printing out the length not which tunnel it is