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