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

Автор ps06756, история, 9 лет назад, По-английски

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,

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

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

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