Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

最怕博弈论了,呵呵

Posted by 13408100238 at 2014-08-10 16:49:06 on Problem 1067
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator