Problem description is available here.
Please Note that is this NTUJ version, you do NOT have to (in fact, you're not allowed to..) output the execution expression (see the pdf for details). Once again, output the optimal time only and do NOT output the expression, but still include the new line after each cases.
see sample for more detail.
4 5 5 10000 2 1 1 1 2 3 1 1 1 3 4 1 2 1 4 1 2 3 4 1 5 1 2 1 01 31 1 2 1 1 3 5 5 10100 3 1 1 1 2 1 1 3 1 4 3 2 4 2 1 5 1 3 3 100 1 1 1 1 2 0 0 0
Case 1: 7 Case 2: 31 Case 3: 6 Case 4: -1
Migrated from old NTUJ.
Wuhan Regional 2009
No. | Testdata Range | Score |
---|