← November 2025 questions

NOVEMBER 2025 / INTERMEDIATE / QUESTION 3

Minimizing Workload

Archived question

Try the question in your own editor, then check your output below.

THE QUESTION

Text from the official booklet. Refer to the PDF for original mathematical notation, formatting, and linked input files. Printed samples and inputs are reproduced as published.

Chef Borgort runs a kitchen with w workers and b burgers. Each burger i takes ti
minutes to prepare. Each worker must make a contiguous sequence of burgers in
order.
Find the minimum possible maximum time any worker spends cooking.
Input format:
First line: Two integers w, b
Second line: b space-separated integers t1, t2, ..., tb
Output format:
Single integer: minimum possible maximum time
Sample Input:
3 7
2 3 5 1 4 2 3
Sample Output:
9
Final Input:
25 100
150 200 180 220 160 240 190 210 170 230 140 250
185 195 175 215 165 235 145 225 155 205 135 245
125 255 265 275 285 295 100 110 120 130 140 150
160 170 180 190 200 210 220 230 240 250 260 270
280 290 95 105 115 125 135 145 155 165 175 185
195 205 215 225 235 245 255 265 275 285 88 92
96 100 104 108 112 116 120 124 128 132 136 140
144 148 152 156 160 164 168 172 176 180 184 188
192 196 200 204

CHECK YOUR ANSWER

Try your answer.

Run your program in your own editor, then paste its output below. This checks the stated output; it does not assess your full program. Practice attempts do not affect competition scores.

Use the question input above. Enter only the output.

Reveal worked answer

Your output

820

Binary-search a maximum workload. Greedily form contiguous groups under that limit; accept a limit if it needs no more than 25 groups.

Source: Girls in Code SEA 2025 Fall Competition, 29 November 2025. Booklet created by Emily Xu and the GIC question authors. Shared for non-commercial educational use with attribution, as permitted in the booklet.