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 DoWhile_SCUT at 2005-05-10 19:58:07 on Problem 1657
In Reply To:明明在自己的机子上运行很对,提交了就是wrong answer,各位帮帮忙啊,我是没辙了 Posted by:00448085_1 at 2005-03-18 15:45:22
#include<iostream.h>
#include<math.h>
void main()
{
	int ts,tsc,dx,dy;
	char x,y,xx,yy;
	cin>>tsc;
	for(ts=0;ts<tsc;ts++)
	{
		cin>>x>>y>>xx>>yy;
		dx=abs(x-xx);
		dy=abs(y-yy);
		if(dx||dy)
		{
			cout<<.../*屏蔽了最精华的一行,人格担保长度不超过80个字符*/
			if((dx-dy)%2)
				cout<<"Inf"<<endl;
			else
				cout<<(dx==dy?1:2)<<endl;
		}
		else
			cout<<"0 0 0 0"<<endl;
	}
}

这就AC了嘛~

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