杭电1527的代码通不过。
AC的代码:
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main()
{
int a, b;
double k = (sqrt(5.0) + 1.0) / 2.0;
while(cin >> a >> b)
{
if(a > b)
swap(a, b);
int j = b - a;
int i = floor(j * k);
if(i == a)
cout << 0 << endl;
else
cout << 1 << endl;
}
return 0;
}