随笔分类 -  数学—博弈

摘要:题目大意是给定长度为n的数组a,两个人轮流从中选一个正数将其减1。且有k个限制形如limitxi=yi,即xi在数组中最多出现yi次。判负的情况为: 数组全为0 操作后的数组不满足某个限制。 问谁会赢。 首先可以手玩一下,设数组为 a=[3,4],$limit_ 阅读全文
posted @ 2022-11-10 12:01 脂环 阅读(236) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> #define N 300005 using namespace std; int n, a, b, da, db; int head[N], ver[2 * N], Next[2 * N], tot = 0; int p1, p2, mxd = 0 阅读全文
posted @ 2022-11-02 21:11 脂环 阅读(23) 评论(0) 推荐(0) 编辑
摘要:Grammy is playing a game with her roommate Alice on a sequence 𝐴A with 𝑛n non-negative integers 𝐴1,𝐴2,…,𝐴𝑛A1,A2,…,An. The rules of the game are 阅读全文
posted @ 2021-11-08 21:14 脂环 阅读(175) 评论(0) 推荐(0) 编辑
摘要:Problem Description Alice and Bob are playing a game. They take turns to operate. There are n numbers, a1 , a2 , ... , an. Every time, the player play 阅读全文
posted @ 2021-08-12 17:45 脂环 阅读(218) 评论(0) 推荐(0) 编辑
摘要:Problem Description Now it's time for lunch. Today's menu is chocolate! Though every baby likes chocolate, the appetites of babies are little. After l 阅读全文
posted @ 2021-05-05 21:39 脂环 阅读(195) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/problem/51073 来源:牛客网 题目描述 Urej loves to play various types of dull games. He usually asks other people to play with him 阅读全文
posted @ 2021-05-05 10:08 脂环 阅读(80) 评论(0) 推荐(0) 编辑
摘要:Problem Description Nim is a two-player mathematic game of strategy in which players take turns removing objects from distinct heaps. On each turn, a 阅读全文
posted @ 2021-05-04 23:43 脂环 阅读(49) 评论(0) 推荐(0) 编辑
摘要:题目描述 小约翰经常和他的哥哥玩一个非常有趣的游戏:桌子上有 n 堆石子,小约翰和他的哥哥轮流取石子,每个人取的时候,可以随意选择一堆石子,在这堆石子中取走任意多的石子,但不能一粒石子也不取,我们规定取到最后一粒石子的人算输。 小约翰相当固执,他坚持认为先取的人有很大的优势,所以他总是先取石子,而他 阅读全文
posted @ 2021-05-04 20:09 脂环 阅读(71) 评论(0) 推荐(0) 编辑
摘要:Ayush and Ashish play a game on an unrooted tree consisting of nn nodes numbered 11 to nn. Players make the following move in turns: Select any leaf n 阅读全文
posted @ 2020-06-01 20:43 脂环 阅读(306) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示
主题色彩