hdu3595 - 博弈论(every-sg游戏)

题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3595

题解参考:https://blog.csdn.net/u012139398/article/details/38000613

代码如下:

#include
#include
#include
#include
#include
#include
#include
#include
#define ll long long
using namespace std;
const int N=1005;
int sg[N][N],step[N][N];

int every_sg(int a,int b){
    if(sg[a][b]!=-1)return sg[a][b];
    if(a>b)swap(a,b);//a

 

你可能感兴趣的:(hdu3595 - 博弈论(every-sg游戏))