saptarshikuar2003's blog

By saptarshikuar2003, history, 18 months ago, In English

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......

  • Vote: I like it
  • -12
  • Vote: I do not like it

| Write comment?
»
18 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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