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

Автор djdibs, история, 4 года назад, По-английски

Hello Guys, I Was solving the problem of 581A i.e. Vasya The Hipster. I could not understand it at first, tried for something, and then ended up reading the editorial. But sadly I could not understand anything yet I wrote a solution. 92244082 But it failed the test cases, so can anyone help me how to improve the solution and help me understand how to go about the problem and help me understand it. The problem link is given below. 581A - Хипстер Вася

Thanks and regards, See you in the arena, stay safe <3

Update Problem solved.

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

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Because of this line part you have WA if((a+b) % 2 != 0) System.out.println(0); even if the difference is not even he can still wear the sock (diff-1)/2 times