Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
最怕博弈论了,呵呵#include<iostream> #include<cmath> using namespace std; double p=(sqrt((double)5)+1)/double(2); int main (){ int a,b,c; while(scanf("%d%d",&a,&b)!=EOF){ c=abs(a-b); a=a>b?b:a; if(a==(int)(p*c)) printf("0\n"); else printf("1\n"); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator