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 <stdio.h> int main() { int cases,a,b; scanf("%d",&cases); while(cases--) { scanf("%d %d",&a,&b); if(b>a||(a%2==0&&b%2==1)||(a%2==1&&b%2==0)) printf("impossible\n"); else printf("%d %d\n",(a+b)/2,(a-b)/2); } return 1; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator