背下来的一个概念题没什么好说的
有一堆石子,两个顶尖聪明的人玩游戏,先取者可以取走任意多个,但不能全取完,以后每人取的石子数不能超过上个人的两倍,当石子数为斐波那契数 ,先手输,反之先手赢
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int a = min(n, m);
int b = max(n, m);
int d = b-a;
double r = (sqrt(5)+1)/2;
if ((int)(r*d) == a)
cout << "0" << endl;
else
cout << "1" << endl;
return 0;
}