mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
16 lines
323 B
C++
16 lines
323 B
C++
#include <stdio.h>
|
|
int main ()
|
|
{
|
|
int n,s,d;
|
|
scanf ("%d",&n);
|
|
while (n--)
|
|
{
|
|
scanf ("%d%d",&s,&d);
|
|
if ((s+d)%2==0&&(s-d)%2==0&&(s+d)/2>=0&&(s-d)/2>=0)
|
|
printf ("%d %d",(s+d)/2,(s-d)/2);
|
|
else printf ("impossible");
|
|
printf ("\n");
|
|
}
|
|
return 0;
|
|
}
|