求解三元一次不定方程
http://acm.tju.edu.cn/toj/showp2869.html求三元一次不定方程 ax+by-cz=n
的一组正整数解,Special Judge,给出任意一组解都可以。
Input
The input consists of several test cases. Each test case consists of four integers x, y, z, n in a single line. (0 ≤ x, y, z, n ≤ 200)
The input will terminated by the end of file.
Output
For each input test case, if nuanran can get n stones, output a single line with the times of getting x stones, the times of getting y stones and the times of throwing z stones, separated by spaces. Otherwise output -1 in a single line.
Please note your answer must fit into 32 signed bits.
Sample Input
2 4 3 5
2 4 2 5
Sample Output
2 1 1
-1