Answer to Question #63019 in C for chinmai
The player taking the last stone(s) wins the game.
A winning configuration is one where the first player can force a win. For example, (0,0,13), (0,11,11) and (5,5,5) are winning configurations because the first player can immediately remove all stones.
A losing configuration is one where the second player can force a win, no matter what the first player does. For example, (0,1,2) and (1,3,3) are losing configurations: any legal move leaves a winning configuration for the second player. Consider all losing configurations (xi,yi,zi) where xi ≤ yi ≤ zi ≤ 100. We can verify that Σ(xi+yi+zi) = 173895 for these.
Find Σ(xi+yi+zi) where (xi,yi,zi) ranges over the losing configurations with xi ≤ yi ≤ zi ≤ 1000.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!