cf B. Simple Molecules

http://codeforces.com/contest/344/problem/B

 #include <cstdio>
#include <cstring>
using namespace std; int main()
{
int a,b,c;
int t1=,t2=,t3=;
while(scanf("%d%d%d",&a,&b,&c)!=EOF)
{
bool flag=false;
for(int i=; i<=a; i++)
{
t1=i;
if(b-i>=)
{
t2=b-i;
if(c-(b-i)==a-i)
{
flag=true;
t3=c-(b-i);
break;
}
}
}
if(flag)
printf("%d %d %d\n",t1,t2,t3);
else
printf("Impossible\n");
}
return ;
}
上一篇:I. Max answer(RMQ预处理前缀和)


下一篇:PhotoShop中画圆角矩形最简单方法(图文并茂)!