POJ_1067,威佐夫博弈(Wythoff Game),取石子问题,计算“必败态”,参考博客
#include <iostream>
#include <cmath>
using namespace std;
int main(){
long x,y,k;
while(cin>>x>>y){
k=min(x,y); y=max(x,y); x=k; k=y-x;
if(x==long(k*(1+sqrt(5))/2)) cout<<0<<endl;
else cout<<1<<endl;
}
return 0;
}