题意:赤裸裸的威佐夫博奕(Wythoff Game)
思路:
代码:
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main(){
double GR=(sqrt(5)+1)/2;//黄金比例 golden ratio
int a,b;
int temp;
double a2;
while(~scanf("%d%d",&a,&b)){
if(a>b){
temp=a;
a=b;
b=temp;
}
a2=(b-a)*GR;
if(int(a2)==a){
printf("0\n");
}
else{
printf("1\n");
}
}
return 0;
}