#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <vector>
#include <cstdio>
using namespace std;
int main(){
//freopen("in.txt", "r", stdin);
int a, b;
while(cin >> a >> b){
if(a > b)
swap(a, b);
int d = (b - a) * ((sqrt(5) + 1) / 2.0);
if(d == a)
cout << 0 << endl;
else
cout << 1 << endl;
}
return 0;
}
HDOJ-1527 取石子游戏(威佐夫博奕)
最新推荐文章于 2020-08-18 20:28:58 发布