Back to Problem Solutions forum
Hi everyone.
I ask for help. On the test data with the help of my code, I persistently get the answer 46 although the correct 54. I tried to redo it with a sheet of paper and a pencil. I also received the answer 46 ... Probably somewhere I am making a mistake. I can't figure out exactly where. If necessary, I can place the code in Python.
Thank you in advance.
I can place the code in Python.
that's not needed, it is accessible in your profile in unsuccessful - right?
I have tried to write down the step-by-step explanation for the given example in the end of problem statement - so please have a look at it and see whether it clarifies the matter (or contains an error?). I'd say manipulations are a bit confusing - and I myself failed several times :)
Rodion, thank a lot. I think this will help me. I'll lern for this problem. I'll write to you on the result.
The code in my profile is still very rough. I'm sory if this is inconvenient. I'll fix it)))
Good day, Rodion.
Finally, I was able to deal with this problem. My mistake was that I thought that cells should be removed if their number is 2 or more. What I missed is that even a single cell counts for a player and points. I fixed this in my code.
Thank you for your help. You have described the test data solution step by step. It helped to see my error almost immediately.
Hello, Benedict! Nice to hear that you succeeded!
Yeah, it it important to correctly understand the problem. I had many troubles because of misunderstanding, too.
Hello qwerty_one. You're absolutely right. I need to carefully understand the condition of the problem. I've been messing around with this problem for a long time. But I wrote a visualization for it))). It feels good when a problem is solved))) Thanks for your feedback.