leetcode.com 2026-08-03
🔴1406.stone-game-iii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #zero_sum_game
🔴1406.stone-game-iii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #zero_sum_game
Telegraph
stone-game-iii
Alice and Bob continue their games with piles of stones. There are several stones arranged in a row, and each stone has an associated value which is an integer given in the array stoneValue. Alice and Bob take turns, with Alice starting first. On each player's…
leetcode.cn 2026-08-09
🟡1140.stone-game-ii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #prefix_sum #zero_sum_game
🟡1140.stone-game-ii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #prefix_sum #zero_sum_game
Telegraph
stone-game-ii
Alice 和 Bob 继续他们的石子游戏。许多堆石子 排成一行,每堆都有正整数颗石子 piles[i]。游戏以谁手中的石子最多来决出胜负。 Alice 和 Bob 轮流进行,Alice 先开始。最初,M = 1。 在每个玩家的回合中,该玩家可以拿走剩下的 前 X 堆的所有石子,其中 1 <= X <= 2M。然后,令 M = max(M, X)。 游戏一直持续到所有石子都被拿走。 假设 Alice 和 Bob 都发挥出最佳水平,返回 Alice 可以得到的最大数量的石头。 示例 1: 输入:piles…
leetcode.com 2026-08-09
🟡1140.stone-game-ii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #prefix_sum #zero_sum_game
🟡1140.stone-game-ii
🏷️ Tags
#minimax_algorithm #array #math #dynamic_programming #game_theory #prefix_sum #zero_sum_game
Telegraph
stone-game-ii
Alice and Bob continue their games with piles of stones. There are a number of piles arranged in a row, and each pile has a positive integer number of stones piles[i]. The objective of the game is to end with the most stones. Alice and Bob take turns, with…
leetcode.cn 2026-08-10
🔴1510.stone-game-iv
🏷️ Tags
#minimax_algorithm #math #dynamic_programming #game_theory #nim_game #sprague_grundy_theorem #zero_sum_game
🔴1510.stone-game-iv
🏷️ Tags
#minimax_algorithm #math #dynamic_programming #game_theory #nim_game #sprague_grundy_theorem #zero_sum_game
Telegraph
stone-game-iv
Alice 和 Bob 两个人轮流玩一个游戏,Alice 先手。 一开始,有 n 个石子堆在一起。每个人轮流操作,正在操作的玩家可以从石子堆里拿走 任意 非零 平方数 个石子。 如果石子堆里没有石子了,则无法操作的玩家输掉游戏。 给你正整数 n ,且已知两个人都采取最优策略。如果 Alice 会赢得比赛,那么返回 True ,否则返回 False 。 示例 1: 输入:n = 1 输出:true 解释:Alice 拿走 1 个石子并赢得胜利,因为 Bob 无法进行任何操作。 示例 2: 输入:n =…
leetcode.com 2026-08-10
🔴1510.stone-game-iv
🏷️ Tags
#minimax_algorithm #math #dynamic_programming #game_theory #nim_game #sprague_grundy_theorem #zero_sum_game
🔴1510.stone-game-iv
🏷️ Tags
#minimax_algorithm #math #dynamic_programming #game_theory #nim_game #sprague_grundy_theorem #zero_sum_game
Telegraph
stone-game-iv
Alice and Bob take turns playing a game, with Alice starting first. Initially, there are n stones in a pile. On each player's turn, that player makes a move consisting of removing any non-zero square number of stones in the pile. Also, if a player cannot…