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