ZOJ Problem Set - 2059
Twin towers we see you standing tall, though a building's lost our faith will never fall.
Twin towers the world hears your call, though you're gone it only strengthens our resolve.
We couldn't make it through this without you Lord, through hard times we come together more. ...
Twin Towers - A Song for America
In memory of the tragic events that unfolded on the morning of September 11, 2001, five-year-old Rosie decids to rebuild a tallest Twin Towers by using the crystals her brother has collected for years. Will she succeed in building the two towers of the same height?
There are mutiple test cases.
One line forms a test case. The first integer N (N < 100) tells you the number of crystals her brother has collected. Then each of the next N integers describs the height of a certain crystal.
A negtive N indicats the end.
Note that all crytals are in cube shape. And the total height of crystals is smaller than 2000.
Author: HU, Shichao
Source: ZOJ Monthly, December 2003