djdibs's blog

By djdibs, history, 4 years ago, In English

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.

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

| Write comment?
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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