标签:
尼姆博弈(Nimm Game)
http://baike.baidu.com/link?url=QITS5sNMwXZsoxh5tAwYBsa-_GgUd66Vb4fjreoKkqlXmXSyPEE5qVXfxnq1IGRe4AgTxC6lFwROoKx7hZNwbK
威佐夫博弈(Wythoff Game)
http://baike.baidu.com/link?url=X8KSAgEQ2b86gs6bFxYZpro--y-LrbR5aT6KPuFK5lCeoigV_YaPmaBws2X6HcLwOBelnLfmZIn0LruYreVsZa
poj1067
#include<iostream> #include<algorithm> #include<cmath> using namespace std; #define p (sqrt(5.0)+1)/2.0 int main(){ int a,b; while(cin>>a>>b){ if(a>b){ swap(a,b); } int k=b-a; if(a==(int)(k*p)){ cout<<0<<endl; } else{ cout<<1<<endl; } } return 0; }
巴什博弈(Bash
Game)
http://baike.baidu.com/link?url=N7FkjhNRf6xSG-lcnZ_ohw-cpr44B2vHMN_GDG6U19aoAfY6S0uiWIQOog0NVApLz4a8FpumItGD3XvcGX0GUq
标签:
原文地址:http://blog.csdn.net/my_acm/article/details/43485841