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,
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