摘要: 原题链接 思路: 直接dfs会MLE,需要打表,根据行列奇偶性判断是否能胜,由打表得当n%2==1&&m%2==1时必败. 1 #include <iostream> 2 #include <cstring> 3 using namespace std; 4 int n,m; 5 int main( 阅读全文
posted @ 2021-03-21 17:11 acmloser 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 原题链接 考察:博弈论 思路: 当往上走不能再前进时sg(x,y) = 0.在sg函数里模拟行走,记录sg函数的值.最后结果是n个骑士坐标异或 1 #include <iostream> 2 #include <cstdio> 3 #include <set> 4 #include <cstring 阅读全文
posted @ 2021-03-21 16:47 acmloser 阅读(15) 评论(0) 推荐(0) 编辑