首页 > 代码库 > Codeforces 344B Simple Molecules

Codeforces 344B Simple Molecules

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    int ab=a+b-c,bc=b+c-a,ac=a+c-b;
    if(ab>=0&&bc>=0&&ac>=0&&ab%2==0&&bc%2==0&&ac%2==0)
        printf("%d %d %d\n",ab/2,bc/2,ac/2);
    else
        printf("Impossible\n");
    return 0;
}

Codeforces 344B Simple Molecules