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:纪念我的第100题,HOHO Posted by:304988557 at 2006-09-14 20:52:49 #include<iostream> using namespace std; int main() { int n; int sum; int mul; cin>>n; for(int i =0; i<n; i++) { cin>>sum>>mul; if(sum<mul) cout<<"impossible"<<endl; else if((sum-mul)%2==0) cout<<(sum+mul)/2<<" "<<(sum-mul)/2<<endl; else cout<<"impossible"<<endl;//如果s-d是奇数也是impossible…… } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator