The PDF version of this problem can be downloaded here.
3 5 3 4 15 3 1 10 2 2 7 3 3 100 1 1 100 1 2
4 3 50
Migrated from old NTUJ.
2013 ACM Arab Collegiate Programming Contest