ps06756's blog

By ps06756, history, 8 years ago, In English

Hello all, I am trying to solve the problem Sausage Maximization. I am solving it using the approach mentioned in the editorial for the question.
I am getting Wrong answer on Test 33 on the following submission. Submission
I have tried a lot of test cases, but I am unable to find any error in the implementation. It would be really helpful, if someone could point out some error in the implementation,

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Finally found the error in the code. The error is in the line where I am doing (1 << cnt). If we change it to (1LL << cnt), the code will pass the test cases. Accepted Soution