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 frkstyc at 2005-05-10 20:06:20 on Problem 1657
In Reply To:汗,用得着写那么长吗? Posted by:DoWhile_SCUT at 2005-05-10 19:58:07
> #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