I am very confused by this problem, especially with the third test case.
http://mirror.codeforces.com/contest/127/problem/C
It says the answer is
76 54
I am wondering why isn't the answer
114 81
Both gives the same final temperature
(143*114 + 81 * 456)/(114 + 81)
273.015384615
(143 * 76 + 456 * 54) / (76 + 54)
273.015384615
Since the temperature is same i thought that the higher values for y1 and y2 should be chosen since that will fill up faster. So, i thought 114 and 81 should be the optimal answer. Please help with this dilemma. I appreciate it!!