Major issue with CHEFPART!

On CHEFPART during today’s lunchtime, the only person to get AC was tourist (gennady.korotkevich).
I believe this wasn’t because he was the only one to get the right answer though. It was because he was the only one to mess up in the same way as the judges.

First of all, what should the answer be if n=1. In this case, it is impossible to separate into two non-empty sequences, so every sequence is good, meaning chef does not have to do any swaps. The answer should be 0.

In cases where n=1, and a_0 is a power of 2, gennady.korotkevich’s code outputs -1.
Furthermore, I added a line to abort() if this output ever comes up and resubmitted, and got a run time error. That means that tourist’s code actually should have gotten WA.

Am I misunderstanding the problem here? I spent a while on this problem and gave up after failing to get AC.

7 Likes

Tagging @rishup_nitdgp ,author of this problem.
Can you give some insight?
Can you tell if problem is wrong or testcases are wrong ?

Hi, Thanks for reporting this. This was indeed missed in the official solutions. This has been fixed now, all non-AC solutions rejudged, and we will recalculate the ratings for the 2 users who have been affected by this. Apologies for the mistake.

1 Like