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 smilezhen at 2005-08-10 16:23:49 on Problem 2301
#include <iostream.h>

int main(void){
	unsigned long long t, s, d;
	cin >> t;
	while(t--){
		cin>> s>>d;
		if(s<d)  cout<<"impossible"<<endl;
		else {
			if(s%2 ==0) cout <<(s/2+d/2)<<' '<<(s-d)/2<<endl;
			else cout <<((s-1)/2+(d+1)/2)<<' '<<(s-d)/2<< 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