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

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

Problem : 1324-D Submission : My Solution

It is giving WA, but Test case is long and can't figure out the mistake.

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

»
21 месяц назад, # |
Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

You're going wrong because you're taking the absolute value of the difference thereby you're missing out on the possibility sometimes even negative difference can be added to satiate the property, it works after you just simply negate the difference when you perform the lowerbound.

My Code — Python. 195945910

Your code changed. 195946124