poj 2301(水题)
作者:互联网
#include<iostream> #include<cstdio> using namespace std; int main(){ int s,d,p,q,n; scanf("%d",&n); while(n--){ scanf("%d%d",&s,&d); if(d>s||(s-d)%2==1) printf("impossible\n"); else printf("%d %d\n",(s+d)/2,(s-d)/2); } return 0; }
标签:std,水题,2301,scanf,int,poj,printf,--,include 来源: https://www.cnblogs.com/stevenzrx/p/15084326.html