Where to go next ?

Правка en1, от LIFE_GOES_ON, 2020-04-11 10:22:58

Here in this 1073C - Вася и робот 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?

Теги #help, #binary search

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский LIFE_GOES_ON 2020-04-11 10:22:58 542 Initial revision (published)