Codeforces -A. Ice Skating :Can someone explain the test case?

Can someone explain the test cases given in the problem ,I am not able to understand this question…

2 1
1 2

how the output is 1??

Screenshot_2020-08-03 Desmos Graphing Calculator|463x445

You can only move up, down, left and right. Hence, you need an additional point at (1,1) to reach from any point to any other.

1 Like

Thanks bro !!! :grinning: :grinning:

1 Like