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

100b不到的代码怎么写的,180极限了

Posted by kyogre at 2017-09-17 00:10:43 on Problem 1067
#include <iostream>
#include <cmath>
using namespace std;
#define u (sqrt(5.0)+1)/2
int main()
{
	int a,b;
	while(cin>>a>>b)
	{
		if(a>b){swap(a,b);}
		cout<<((floor((b-a)*u)==a)?"0":"1")<<endl;
	}
	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