I am unable to get what is wrong with my logic. The question link is here: http://codeforces.com/contest/580/problem/C
My solution is this: https://pastebin.com/DNgpJGnW
help in problem 580/C (Kefa and park).
I am unable to get what is wrong with my logic. The question link is here: http://codeforces.com/contest/580/problem/C
My solution is this: https://pastebin.com/DNgpJGnW