The_coder_dibs's blog

By The_coder_dibs, history, 8 days 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 - Vasya the Hipster

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

»
8 days 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

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by The_coder_dibs (previous revision, new revision, compare).