#include <stdio.h> int main() { int n,a,b,x,y; scanf("%d",&n); while (n--) { scanf("%d%d",&a,&b); x=a+b; y=a-b; if (a<b || x%2==1 || y%2==1) printf("impossible\n"); else printf("%d %d\n",x/2,y/2); } return 0; }
Sunday, April 24, 2016
Unknown
Studying at Shahjalal University of Science and Technology, Sylhet.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment