摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1907 这个题在原来的基础上,加了一个条件,如果谁拿了最后一个,就被认为是输了 如果都是1的话,根据奇偶性来分,输出 拿的最后一个的 另一方 否则的话,还是我们印象中的NIM博弈 #include <bits/st 阅读全文
posted @ 2020-03-25 20:55 Hazelxcf 阅读(133) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; int n; int a[maxn] = {0,1},s[maxn]; int num = 1,alen = 1,jin = 1,slen = 1; int 阅读全文
posted @ 2020-03-25 07:59 Hazelxcf 阅读(385) 评论(0) 推荐(0) 编辑