Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
汗,用得着写那么长吗?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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator