Блог пользователя saptarshikuar2003

Автор saptarshikuar2003, история, 18 месяцев назад, По-английски

submission link:- https://codeforces.me/contest/2009/submission/313634231

problem link:- https://codeforces.me/contest/2009/problem/C

what is my mistake please someone clarify.......

here the author used ceil(x/k)<=ceil(y/k)----->> I have written (x<=y) why it is showing wrong

answer please clarify......

  • Проголосовать: нравится
  • -12
  • Проголосовать: не нравится

»
18 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Your code is wrong at test x = 4, y = 5, k = 3

You should check if the number of moves required to move in direction x (which is ceil(x/k)) is smaller or equal than that of direction y