The PDF version of this problem can be downloaded here. The whole problemset as one file can be downloaded here.
4 720000 120000 50000 60000 130000 50000 1200000 150000 3 5000000 7 5000000 30 63000000 24
Case 1: 120000 Case 2: 110000 Case 3: IMPOSSIBLE
Migrated from old NTUJ.
2011 ICPC Phuket