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 yueyue at 2006-08-16 00:28:34 on Problem 1067
#include<iostream>
using namespace std;
int main()
{
	int temp,m,t,n;
	while(cin>>n>>m)  
	{
		if(n<m)
		{
			temp=m;
			m=n;
			n=temp;
		}
		t=n-m;
		if((m!=3&&n!=5&&t==2)||(n!=2&&m!=1&&t==1)||(m!=4&&n!=7&&t==3)||(t>=4&&m>=1)||t==0)		
				cout<<1<<endl;	
			else
				cout<<0<<endl;		
		
	}while(1);
	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