In competitive programming, many game theory problems fall under the category of impartial combinatorial games (ICG). These games involve two players who take turns making moves according to fixed rules. Crucially, both players have identical move options from any given state, and no randomness or h...
Given three values A, B, and C where A < B < C, if A + B < C, no valid solution exists; otherwise, the answer is simply C. For the second problem, consider an N×N grid filled with numbers from 1 to N². The task is to count configurations where no row minimum equals any column maximum. Defin...
The game state is defined by an ordered pair $(x, y)$ representing the current values held by the first and second player, together with a global set of previously visited integers. During each turn, the active player must transform their value using one of two operations: multiplication by 2, or in...