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