CHEFGM - Editorial

may be you are correct.
But the example provided by you… the answer is ODD.
Please try.

The answer should be “don’t play” as if the player chooses odd he will have to remove all ones and then the opponent will win by removing 2 from the other pile. If the player chooses even then he will have to remove 2 and the opponent will win by removing all ones from the other pile.

1 Like

Updated links for Author’s and Tester’s solutions

Looks like the condition that pile contains only unique numbers got missed. I can see assert in Setter’s code that numbers are unique. I will let setter comment on this.

@shaleen did you intend to say that the pile contains “only unique numbers” ?

@kcahdog, yes! I just edited my comment…

@shaleen if the test cases are wrong or if their is any missing assertion with the problem statement than it’s purely not the participant’s problem. I was thinking that i was wrong, even I created more than 400 test cases of my own, but as we all have noticed a large group of submission are giving WA on very simple test cases. All the solutions must be rejudged.

I don’t think the solutions can be rejudged now because many of the users whose solutions are failing would have been able to correct their code if their solutions were judged WA. This is the problem setter’s mistake and nothing can be done about this now. This is actually a grave issue as it seems there is one problem in every month’s contest which has some missing test cases(remember KAMEHAMEHA).

@sikander_nsit In that case,let all WA submissions must be rejudged because as you said we cannot do anything after the contest for successful submissions which I also consider ok, but by rejudging the WA solutions with Correct Test Files, will reward with a fruit of green tick for their work which they did for the rest of the contest. I consider that if you are making a jugdement on the basis of the thing that now the contest is finished,then I can also say that ‘If I had known that a Wrong submission will give me a Correct Answer I would have done the same, but Alas the contest is finished.’

The present test files are not wrong but merely missing some test cases. So any solution which got WA during the contest will still be judged WA after rejudging. Your second point is valid generally but in this particular problem, the missing test case is not such as to prevent someone from submitting because their solution would have failed on the missing case but otherwise were correct. Only adding a single statement(std::unique) to the failing solution will make them correct.

According to question “all the numbers which are greater than or equal to chosen number will be removed from that pile”. Clearly saying that the number will be removed from that pile only ! So, ODD will be correct answer !

Grundy Theorem is applicable to only impartial games. This game is partial.

@devanshug I agree with your say…But rejudging the problem during the contest would have been a solution to it…Rejudging after the contest would not give a second chance to those who got AC initially…As the change in code is not a major one(just removing the repeated entries from each pile)…almost all would have corrected it during the contest.

@sikander_nsit how did you manage to submit this solution

http://www.codechef.com/viewsolution/2974228

@ 8 PM 11-11-13… ??
i cant figure out

There must be some bug…I m seeing 10-11-13 only.

CodeChef submission 2974228 (C++ 4.3.2) plaintext list. Status: AC, problem CHEFGM, contest NOV13. By sikander_nsit (sikander_nsit), 2013-11-10 20:27:57.

my version shows yesterday… don’t knw wat it is…

You are printing the value of “add” at several places.

In the editorial in the case 3,pile having the value {2,3},we are considering that if the chef is busy considering the other stalks, than {2 ,3} stalk will give more turns to the apponent and thus the value of the {2 ,3} stalk would be less than +v,but if the chef choses the stalk than the apponent will have not have extra turns which were provided by the stalk,so in that case will the value of the stalk will be equal to +v??