第 4 / 4 页
非代码面试题
显示 15 / 75 道匹配题目
答题状态:未尝试未正确已正确
ID题目领域难度题型进度权限
5683Sum of Two Take-1-or-2 GamesTwo independent piles are in play, of sizes 4 and 7. On a turn a player picks ONE pile and removes 1 or 2 stones from it. The player who takes the last stone overall (leaving both piles empty) wins. Under optimal play, does the first player win or lose?脑筋急转弯中等brainteaser未尝试免费5684Grundy Value at TenConsider the impartial subtraction game where from a single pile a player may remove 1, 3, or 4 stones, and the player taking the last stone wins. Compute the Sprague-Grundy value of a pile of size 10.脑筋急转弯中等数值题未尝试免费5685Three-Player Take-It-or-Leave-It SplitPlayers A, B, C divide 100 in integer dollars. A proposes a split (a, b, c) summing to 100. If B accepts, the split stands. If B rejects, 1 is burned (now 99 remain) and B proposes a split of the remaining money between B and C only; if C rejects that, another 1 is burned (98 remain) and C takes everything. All players are rational, maximize their own dollars, and accept when indifferent. How many dollars does A keep in A's optimal proposal?脑筋急转弯中等数值题未尝试免费5686Don't Take the Last OneA single pile of stones is played by removing 1 or 2 stones per turn, but the twist is misere: the player forced to take the LAST stone LOSES. Among pile sizes from 1 upward, list the rule for which starting sizes are losing for the player about to move, and state the 4th such losing size.脑筋急转弯简单brainteaser未尝试免费5687Moore's Nim with Two-Pile MovesIn Moore's Nim k a player may, on a single turn, remove any positive number of stones from AT MOST k distinct piles (different counts allowed). Play Nim 2 (k=2) with four piles of sizes 1, 2, 4, 7 and last-stone-overall wins. Under optimal play, does the first player win or lose?脑筋急转弯中等brainteaser未尝试免费5688Staircase NimCoins sit on a staircase numbered step 0 (the ground) up to step 4, with counts (step 0..4) = (2, 3, 1, 0, 5). A move takes any positive number of coins from a step s >= 1 and moves them down to step s-1. Coins on step 0 are off the board. The player who cannot move (all coins on the ground) loses. Under optimal play, does the first player win or lose?脑筋急转弯简单brainteaser未尝试免费5689Euclid's GameStart with the pair (25, 7). A move replaces the larger number by the larger minus any positive multiple of the smaller, keeping both numbers nonnegative. The player who makes one of the numbers 0 wins (equivalently, the player unable to move loses). With (25, 7), does the player to move win or lose under optimal play?脑筋急转弯中等brainteaser未尝试免费5690Fibonacci NimA pile has 50 stones. On the FIRST move a player may remove any number of stones from 1 to 49 (not the whole pile). After that, a player may remove any number of stones up to TWICE the number the opponent just removed. The player taking the last stone wins. Does the first player win, and if so how many stones should they remove on the first move?脑筋急转弯中等数值题未尝试免费5691Chomp on a 2x3 BarChomp is played on a 2-by-3 grid of chocolate squares; the top-left square (row 1, column 1) is poisoned. A move picks any remaining square and eats it together with every square below and to the right of it. The player forced to eat the poisoned top-left square loses. Under optimal play, does the first player win or lose, and what is the standard argument?脑筋急转弯中等brainteaser未尝试免费5692Kayles Grundy ValueKayles is played on a single row of n adjacent bowling pins. A move knocks down either one pin or two ADJACENT pins, possibly splitting the row into two independent shorter rows. The player who knocks down the last pin wins. Compute the Sprague-Grundy value of a single row of 7 pins.脑筋急转弯中等数值题未尝试免费5693Dawson's Chess Grundy ValueDawson's chess is the octal game .137, whose Grundy values g(n) for n = 0,1,2,... are the well-known sequence 0,0,1,1,2,0,3,1,1,0,3,3,2,2,4,0,5,... (eventually periodic with period 34). In this game a position made of several independent strips is a win for the mover iff the XOR of the strips' Grundy values is nonzero. Using the published sequence, what is g(8)?脑筋急转弯困难数值题未尝试面试订阅5694Green Hackenbush StalksGreen Hackenbush is played on graphs of green edges rooted to the ground. A move deletes one edge; any edges no longer connected to the ground also disappear. The player unable to move loses. The position consists of three separate vertical stalks (paths) rising from the ground, of heights 4, 6, and 9 edges. Under optimal play, does the first player win or lose?脑筋急转弯简单brainteaser未尝试免费5695Turning Turtles (Coin-Turning Game)Turning Turtles is a coin-turning game on a row of coins numbered 1, 2, 3, ... A move chooses a coin showing HEADS at some position k, turns it to TAILS, and simultaneously turns over EXACTLY ONE other coin at a position j < k (to either face). The player who cannot move (all tails) loses. A standard result is that a single heads at position k is equivalent to a Nim heap of size k, and a position is the XOR (disjunctive sum) of its heads. If the only heads are at positions 3 and 6, does the player to move win or lose?脑筋急转弯中等brainteaser未尝试免费5696Grundy Values on a Game DAGA token sits on a vertex of a directed acyclic graph; a move slides it along one outgoing edge, and a player who cannot move (token on a sink) loses. The edges are: S to A, S to B, S to C; A to two distinct sinks; B to A and B to a sink; C to B. Sinks have Grundy value 0. Compute the Grundy values of A, B, C, and S.脑筋急转弯简单数值题未尝试免费5697Subtraction by Perfect SquaresFrom a single pile a player may remove any positive perfect-square number of stones (1, 4, 9, 16, ...). The player taking the last stone wins. Among pile sizes n = 0, 1, ..., 20, identify the losing (P-)positions for the player about to move, and state the 5th positive losing position.脑筋急转弯中等brainteaser未尝试免费