301819: CF344B. Simple Molecules
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Simple Molecules
题意翻译
有一个具有三个顶点的无向图,给出每个顶点的度(即与这个顶点相连的边的数目) 如果有一种连接边的方式,使得每个顶点的度都等于给出的数字,请输出这种方案: 输出格式: - 输出共$1$行,三个整数,用空格分开; - 三个整数分别为第$1$和第$2$,第$2$和第$3$,第$3$和第$1$顶点之间的边数; 否则输出`Impossible`。题目描述
Mad scientist Mike is busy carrying out experiments in chemistry. Today he will attempt to join three atoms into one molecule. A molecule consists of atoms, with some pairs of atoms connected by atomic bonds. Each atom has a valence number — the number of bonds the atom must form with other atoms. An atom can form one or multiple bonds with any other atom, but it cannot form a bond with itself. The number of bonds of an atom in the molecule must be equal to its valence number. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF344B/e6377325271b4515d315f9767d5c5b94bf56f174.png)Mike knows valence numbers of the three atoms. Find a molecule that can be built from these atoms according to the stated rules, or determine that it is impossible.输入输出格式
输入格式
The single line of the input contains three space-separated integers $ a $ , $ b $ and $ c $ ( $ 1<=a,b,c<=10^{6} $ ) — the valence numbers of the given atoms.
输出格式
If such a molecule can be built, print three space-separated integers — the number of bonds between the 1-st and the 2-nd, the 2-nd and the 3-rd, the 3-rd and the 1-st atoms, correspondingly. If there are multiple solutions, output any of them. If there is no solution, print "Impossible" (without the quotes).
输入输出样例
输入样例 #1
1 1 2
输出样例 #1
0 1 1
输入样例 #2
3 4 5
输出样例 #2
1 3 2
输入样例 #3
4 1 1
输出样例 #3
Impossible