Can you please give me the hint for this problem?
http://codeforces.com/problemset/problem/339/B
Can you please give me the hint for this problem?
To solve this problem we must learn how to calculate fast enought the time, needed to travel between houses a and b . Let’s consider the case when a ≤ b . Than Xenia needs b - a seconds to get from a to b . Otherwise a > b , Xenia will have to go thought house number 1. So she will need n - a + b seconds.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.