Circle and Marble UVALive - 6803 (SG函数+nim博弈)
普通的SG博弈
就是对每个可操作的部分算一个mex 也就是SG值
然后把所有能操作的部分的sg值异或起来
为0则先手必输 不为0则先手必胜#include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <queue>
#include <cstdio>
#include <map>
#
原创
2018-04-06 13:10:22 ·
316 阅读 ·
1 评论