博弈论 遇到奇异对盘时那么先拿着必输;
不知道奇异对决的点 这里
#include <iostream>
#include <cmath>
typedef long long ll;
using namespace std;
int judge(int a,int b)
{
int k;
k = fabs(a - b);
a = min(a,b);
int ak = floor(k * ((1.0 + sqrt(5.0)) / 2.0));
if(ak == a)
return 0;
else
return 1;
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
int x,y;
while(cin >> x >> y)
{
ll p = judge(x,y);
if(p)cout << 1 << endl;
else cout << 0 << endl;
}
return 0;
}