设x<y,设z=(int)((sqrt(5)+1)/2*z),若x=z,先手必败,反之先手必胜。
#include <bits/stdc++.h>
using namespace std;
int main(){
int x, y;
scanf("%d%d", &x, &y);
if(x > y) swap(x, y);
int z = y-x;
z = (int)((sqrt(5)+1)/2*z);
if(z == x) printf("0\n");
else printf("1\n");
return 0;
}