Where to go next ?

Revision en1, by LIFE_GOES_ON, 2020-04-11 10:22:58

Here in this 1073C - Vasya and Robot my observations are -

1)If (abs(x) + abs(y)) < string_length then ans -1

2)If (abs(x) + abs(y)) > string_length and ((abs(x) + abs(y))-string_length)%2 != 0 then also ans -1

Then I was thinking like, okay only way can be binary approach or any tiring greedy approach. But none of these could not help to proceed. Because If I will use binary search, how can I increase or decrease the length.

Do not put any direct solution. Just hints or just let me know where my thinking is wrong?

Tags #help, #binary search

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English LIFE_GOES_ON 2020-04-11 10:22:58 542 Initial revision (published)