cychester

随笔分类 -  博弈论

BZOJ 1874 取石子游戏 - SG函数
摘要:Description $N$堆石子, $M$种取石子的方式, 最后取石子的人赢, 问先手是否必胜 $A_i <= 1000$,$ B_i <= 10$ Solution 由于数据很小, 直接暴力求SG函数即可判断。 Code 1 #include<cstdio> 2 #include<cstrin 阅读全文

posted @ 2018-09-13 06:20 cychester 阅读(295) 评论(0) 推荐(0)

Luogu 2575 高手过招-SG函数
摘要:Solution SG函数跑一遍就过了ouo Code 1 #include<cstring> 2 #include<cstdio> 3 #include<algorithm> 4 #define rd read() 5 #define cl(a) memset(a, 0, sizeof(a)); 阅读全文

posted @ 2018-09-07 19:21 cychester 阅读(189) 评论(0) 推荐(0)

导航