标签:style blog http io color os ar sp div
1 #include<cstdio> 2 #include<algorithm> 3 using namespace std; 4 int main(){ 5 int x,y,c; 6 while(~scanf("%d%d%d",&x,&y,&c)){ 7 if(x+y<c){ 8 puts("Impossible"); 9 continue; 10 } 11 int a,b; 12 bool s=false; 13 if(x>y){ 14 s=true; 15 swap(x,y); 16 } 17 if(x>=c){ 18 a=c; 19 b=0; 20 } 21 else{ 22 a=x; 23 b=c-x; 24 } 25 if(s) swap(a,b); 26 printf("%d %d\n",a,b); 27 } 28 return 0; 29 }
end
标签:style blog http io color os ar sp div
原文地址:http://www.cnblogs.com/gaolzzxin/p/4066511.html