We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I had an idea to solve this problem using Sprague–Grundy theorem and memoization so that recursion will not be needed, but I do'nt know any of these supported languages can I do it in some other languages like python 3 etc...
Why is the optimal choice of P1 not to always start with position (2, 1)? I don't understand why on the second example P1 starts on (1, 2) instead of (2, 1)
Why is 24 13 13 lose? P1 can reduce it to 24 13 11 and P2 cannot win this combo? How can I show this test on my CNA practice test website?
I had an idea to solve this problem using Sprague–Grundy theorem and memoization so that recursion will not be needed, but I do'nt know any of these supported languages can I do it in some other languages like python 3 etc...
Why is the optimal choice of P1 not to always start with position (2, 1)? I don't understand why on the second example P1 starts on (1, 2) instead of (2, 1)
Why is 24 13 13 lose? P1 can reduce it to 24 13 11 and P2 cannot win this combo
Interesting problem, that was fun!... Or maybe it's just me finally starting to learn DP. :)