Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int t,s,d,x,y;
- scanf("%d",&t);
- while(t--)
- {
- scanf("%d%d",&s,&d);
- if(0<s&&0<d)
- {
- x=(s+d)/2;
- y=(s-d)/2;
- if(0>x||0>y)
- {
- printf("Impossible");
- }
- else
- {
- printf("%d %d\n",x,y);
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement