Problem 126 -- The Errant Physicist
Tips
This problem is straight forward but complicated. You must do all the dirty works of algebra behind the scene. Steps include:
The prasing and print-out steps involve many if or case statements.
Input
-yx8+9x3-1+y x5y+1+x3 1 1 0 0 0 1 -x+0 0-x -0+x 1 +0x1y10-0+3x0y9-x8y8-12x1y+3 x3y4+x2y5-1y4x9+x2y2-8-y #
Output
13 2 11 8 6 5 5 2 3 3 -x y - x y + 8x y + 9x - x y + x y + 8x + x y - 1 + y 1 0 0 2 x x 17 12 11 12 10 5 10 10 10 13 10 14 9 4 8 8 8 9 4 5 4 13 4 14 3 3 3 4 3 6 3 11 3 12 3 14 3 15 2 2 2 5 2 9 10 11 x y - x y + 12x y - x y - 4x y - x y - 3x y + 8x y + x y - 12x y + 3x y + x y - 12x y + 3x y - 12x y + 3x y + x y + 3x y + x y + 3x y + 3x y + 96xy + 12xy - 24xy - 11xy - xy - 24 - 3y