—————博弈论—————
Alex_McAvoy
想要成为渔夫的猎手
展开
-
Applese 的取石子游戏
【题目描述】Applese 和 Bpplese 在玩取石子游戏,规则如下:一共有偶数堆石子排成一排,每堆石子的个数为ai。两个人轮流取石子,Applese先手。每次取石子只能取最左一堆或最右一堆,且必须取完。最后取得的石子多者获胜。假设双方都足够聪明,最后谁能够获胜呢?【输入描述】第一行是一个正偶数 n,表示石子的堆数。第二行是 n 个正整数a1,a2,…,an,表示每堆石...原创 2019-05-09 12:27:49 · 564 阅读 · 0 评论 -
Bash游戏 V2(51Nod-1067)
题目有一堆石子共有N个。A B两个人轮流拿,A先拿。每次只能拿1,3,4颗,拿到最后1颗石子的人获胜。假设A B都非常聪明,拿石子的过程中不会出现失误。给出N,问最后谁能赢得比赛。例如N = 2。A只能拿1颗,所以B可以拿到最后1颗石子。输入第1行:一个数T,表示后面用作输入测试的数的数量。(1 <= T <= 10000)第2 - T + 1行:每行1个数N。(1 ...原创 2019-04-17 18:08:26 · 322 阅读 · 0 评论 -
Alice&Brown(AtCoder-2400)
Problem DescriptionAlice and Brown loves games. Today, they will play the following game.In this game, there are two piles initially consisting of X and Y stones, respectively. Alice and Bob alte...原创 2019-06-06 20:25:34 · 601 阅读 · 0 评论 -
ABS(AtCoder-3671)
Problem DescriptionWe have a deck consisting of N cards. Each card has an integer written on it. The integer on the i-th card from the top is ai.Two people X and Y will play a game using this dec...原创 2019-06-29 16:10:34 · 268 阅读 · 0 评论 -
Who is better?(2019 ACM-ICPC 徐州赛区网络赛 A)
Problem DescriptionAfter Asgard was destroyed, tanker brought his soldiers to earth, and at the same time took on the important task of protecting the peace of the earth. The best two solders were ...原创 2019-09-10 20:01:01 · 173 阅读 · 0 评论