Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: "Bloody Mary"
Description There is a mixture of water, alcohol and tomato juice in three vessels. The volume ratio of components in the first, second and third vessels is equal In what volume ratio is it necessary to take liquids from these vessels in order to create a mixture with a component ratio Input The input consists of four lines. The first line contains values of parameters Output The output contains a single line with the result. The result has the same format as the input data. If it is impossible to create necessary mixture, the output file should contain a single line with word 'impossible'. Sample Input 1:0:0 0:1:0 0:0:1 3:2:3 Sample Output 3:2:3 Hint Your outputs must fit in 64bit integers. Source Northeastern Europe 2001, Western Subregion |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator