Back to General discussions forum
The problem asks for the index of eggs which need to be touched to turn all eggs into white. But what if there are multiple solutions?
For the example shown, it is said that touching 1-st, 2-nd and 4-th eggs will turn them all to white
But I found that If I touch last 2 eggs (4-th & 5-th), it also works.
So, will any answer work OR there needs to be minimum number of touches?
Hi Friend!
I honestly don't remember for sure, but you can try and see :)
I believe checker tries the answer you give and sees if all eggs are turned white. So any suitable answer should work.
Hi Amit and Rodion,
Hope you don't mind me replying to an older discussion. I just solved Easter Eggs and, like Amit, found the answer "4 5" for the example, not "1 2 4".
Both answers are correct, but since my solution finds only shortest paths, it doesn't come across "1 2 4".
Rodion, would it be a good idea to add a hint to the example, that says there may be shorter answers than "1 2 4"?
Midwinter, Hi!
Sorry for delay, I think I should review the checker for this problem and perhaps make it accept any solution. I just poorly remember this problem (perhaps it was created while the site couldn't use more clever checkers)... Hopefully I'll be back soon!
Hi Rodion,
Thanks for your answer, and don't worry about the delay. I was able to solve #103, so it didn't hold me back. ;)
Please understand, I think the checker is fine, and it accepts all possible solutions correctly.
My comment was about the example, which gives a sub-optimal solution "1 2 4". So if readers find the optimal solution "4 5" they may think they're doing it wrong. I was just saying, maybe it's a good idea to add a hint to the example text, that says there may be multiple solutions.
On the other hand, in the meantime I've tried to solve the advanced version (#222), and failed horribly so far - which made me realise how unimportant my suggestion is. ;)