标签:
题意:Wythoff Game
思路:Wythoff Game
#include<iostream> #include<stdio.h> #include<math.h> using namespace std; int main(){ int a,b,t; double gr=(sqrt(5)+1)/2;//黄金比例 golden ratio double a2; while(~scanf("%d%d",&a,&b)){ if(a>b){ t=a; a=b; b=t; } a2=(b-a)*gr; if(a!=int(a2))printf("1\n"); else printf("0\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/bofengyu/p/4734603.html