ICPC (International Collegiate Programming Contest), as you might know, is a team programming contest for college students. Each team consists of exactly three students and they will work on a number of programming problems.
Andi, Budi and Chandra plan to participate in this year ICPC as a team. As for their team strategy, they come up with a simple one:
The first line of input contains an integer T
$(1 \le N \le 12)$
-->
(1
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/636.png"
ALT="$ \le$">N
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/636.png"
ALT="$ \le$">12)
$(1 \le A_{i} \le 300)$
-->
(1
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/636.png"
ALT="$ \le$">Ai
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/636.png"
ALT="$ \le$">300)
For each case, print in a single line containing the maximum total number of problem that can be solved by that team.
Explanation for 1st sample case:
Actually Andi could solve all the three problems alone, but the team has decided that none of them should work at the computer for more than one problem consecutively.
Explanation for 2nd sample case:
The team can solve all the problems. Here is one solution:
Overall, they need 100 + 50 + 30 + 100 = 280 minutes.
2
3
100 100 80
190 120 90
120 150 100
4
50 20 300 300
200 100 30 250
140 120 100 100
2
4
Migrated from old NTUJ.
ACM ICPC regional Jakarta site 2008
No. | Testdata Range | Score |
---|