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 |
到底怎么错啊???高手们帮忙啊。难道我理解错了??还是。。。。。。。。。。。#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator