2018 / Day 24
Immune System Simulator 20XX
Read the original puzzle on adventofcode.com ↗
The solution
solution.c
1#include "aoc.h"
2
3typedef struct {
4 slice s;
5 size_t i;
6} Parser;
7
8static int space(uint8_t c) {
9 return c == ' ' || c == '\t' || c == '\r' || c == '\n';
10}
11
12static void ws(Parser *p) {
13 while (p->i < p->s.l && space(p->s.p[p->i])) {
14 p->i++;
15 }
16}
17
18static void text(Parser *p, const char *s) {
19 size_t n = strlen(s);
20 aoc_assert(n <= p->s.l - p->i && !memcmp(p->s.p + p->i, s, n), "bad input");
21 p->i += n;
22}
23
24static int64_t number(Parser *p, int64_t cap) {
25 int neg = 0;
26 int64_t v = 0;
27 if (p->i < p->s.l && (p->s.p[p->i] == '-' || p->s.p[p->i] == '+')) {
28 neg = p->s.p[p->i++] == '-';
29 }
30 size_t start = p->i;
31 while (p->i < p->s.l && p->s.p[p->i] >= '0' && p->s.p[p->i] <= '9') {
32 int d = p->s.p[p->i++] - '0';
33 aoc_assert(v <= (cap - d) / 10 && d <= cap, "integer exceeds cap");
34 v = v * 10 + d;
35 }
36 aoc_assert(p->i > start, "expected integer");
37 return neg ? -v : v;
38}
39
40static void finish(Parser *p) {
41 ws(p);
42 aoc_assert(p->i == p->s.l, "trailing input");
43}
44
45static slice line(Parser *p) {
46 size_t b = p->i;
47 while (p->i < p->s.l && p->s.p[p->i] != '\n') {
48 p->i++;
49 }
50 size_t e = p->i;
51 if (e > b && p->s.p[e - 1] == '\r') {
52 e--;
53 }
54 if (p->i < p->s.l) {
55 p->i++;
56 }
57 return (slice){b ? p->s.p + b : p->s.p, e - b};
58}
59
60typedef struct {
61 int64_t units, hp, attack;
62 int type, initiative, army;
63 uint32_t weak, immune;
64} Group;
65
66/* The boost is not binary-searched. Choosing a target can change as
67 * the boost changes, so a win need not be monotone, and boosts are
68 * tried from 0 through BOOST. Targets are chosen by effective power,
69 * initiative breaking the tie, then attacks go in initiative order
70 * using the units still alive. Zero damage never selects a target. A
71 * round that kills nothing is a stalemate, not a win.
72 *
73 * The file is assumed to name both armies, at most GROUPS groups and
74 * TYPES damage types of at most TYPELEN letters, with units, attack,
75 * and initiative inside STAT and hit points inside HP. Each battle is
76 * assumed to end inside ROUNDS rounds, and the trials together inside
77 * WORK comparisons. A bad line, a repeated army, modifier, or
78 * initiative, or a missing army is refused ("bad input", "integer
79 * exceeds cap", "expected integer", "trailing input", "bad damage
80 * type", "too many damage types", "duplicate army", "bad group count",
81 * "duplicate damage modifier", "nonpositive group attribute",
82 * "duplicate initiative", "both armies required"). A stall or a boost
83 * past BOOST is "army stalemate", "army rounds exceed cap", "army
84 * search exceeds cap", or "boost exceeds cap". GROUPS is 64, so a round
85 * is a sort of those groups, not a search over assignments.
86 *
87 * The real file is 20 groups. Units run from 89 to 5513, hit points up to
88 * 51205, damage from 6 to 815, initiatives from 1 through 20, and there are
89 * five damage words. A round is a sort of those 20. GROUPS = 64 and HP =
90 * 1000000000 are the refusals above them.
91 */
92enum { GROUPS = 64 };
93
94enum { TYPES = 16 };
95
96enum { TYPELEN = 16 };
97
98enum { STAT = 1000000 };
99
100enum { HP = 1000000000 };
101
102enum { BOOST = 10000 };
103
104enum { ROUNDS = 10000 };
105
106enum { WORK = 30000000 };
107
108static Group original[GROUPS], groups[GROUPS];
109static uint8_t names[TYPES][TYPELEN];
110static int lengths[TYPES], types, n, work;
111
112static int type(Parser *p) {
113 size_t b = p->i;
114 while (p->i < p->s.l && p->s.p[p->i] >= 'a' && p->s.p[p->i] <= 'z') {
115 p->i++;
116 }
117 size_t len = p->i - b;
118 aoc_assert(len && len <= TYPELEN, "bad damage type");
119 for (int i = 0; i < types; i++) {
120 if (lengths[i] == (int)len && !memcmp(names[i], p->s.p + b, len)) {
121 return i;
122 }
123 }
124 aoc_assert(types < TYPES, "too many damage types");
125 memcpy(names[types], p->s.p + b, len);
126 lengths[types] = (int)len;
127 return types++;
128}
129
130static inline __attribute__((always_inline)) void
131read_damage_types(Parser *q_ref, Group *g_ref, int immune) {
132 for (;;) {
133 int t = type(q_ref);
134 uint32_t bit = 1U << t;
135 aoc_assert(!((g_ref->immune | g_ref->weak) & bit),
136 "duplicate damage modifier");
137 if (immune) {
138 g_ref->immune |= bit;
139 } else {
140 g_ref->weak |= bit;
141 }
142 if (q_ref->i < q_ref->s.l && q_ref->s.p[q_ref->i] == ',') {
143 text(q_ref, ", ");
144 continue;
145 }
146 break;
147 }
148}
149
150static inline __attribute__((always_inline)) void
151read_defense_clauses(Parser *q_ref, Group *g_ref) {
152 for (;;) {
153 int immune = q_ref->i < q_ref->s.l && q_ref->s.p[q_ref->i] == 'i';
154 text(q_ref, immune ? "immune to " : "weak to ");
155 read_damage_types(q_ref, g_ref, immune);
156 if (q_ref->i < q_ref->s.l && q_ref->s.p[q_ref->i] == ';') {
157 text(q_ref, "; ");
158 continue;
159 }
160 text(q_ref, ") ");
161 break;
162 }
163}
164
165static inline __attribute__((always_inline)) void
166check_unique_initiative(Group g) {
167 for (int i = 0; i < n; i++) {
168 aoc_assert(original[i].initiative != g.initiative,
169 "duplicate initiative");
170 }
171}
172
173static void load(slice in) {
174 Parser p = {in, 0};
175 n = types = 0;
176 int army = -1, seen = 0;
177 while (p.i < in.l) {
178 Parser q = {line(&p), 0};
179 if (!q.s.l) {
180 continue;
181 }
182 if (q.s.l == 14 && !memcmp(q.s.p, "Immune System:", 14)) {
183 aoc_assert(!(seen & 1), "duplicate army");
184 army = 0;
185 seen |= 1;
186 continue;
187 }
188 if (q.s.l == 10 && !memcmp(q.s.p, "Infection:", 10)) {
189 aoc_assert(!(seen & 2), "duplicate army");
190 army = 1;
191 seen |= 2;
192 continue;
193 }
194 aoc_assert(army >= 0 && n < GROUPS, "bad group count");
195 Group g = {0};
196 g.army = army;
197 g.units = number(&q, STAT);
198 text(&q, " units each with ");
199 g.hp = number(&q, HP);
200 text(&q, " hit points ");
201 if (q.i < q.s.l && q.s.p[q.i] == '(') {
202 q.i++;
203 read_defense_clauses(&q, &g);
204 }
205 text(&q, "with an attack that does ");
206 g.attack = number(&q, STAT);
207 text(&q, " ");
208 g.type = type(&q);
209 text(&q, " damage at initiative ");
210 g.initiative = (int)number(&q, STAT);
211 finish(&q);
212 aoc_assert(g.units > 0 && g.hp > 0 && g.attack > 0 && g.initiative > 0,
213 "nonpositive group attribute");
214 check_unique_initiative(g);
215 original[n++] = g;
216 }
217 aoc_assert(seen == 3 && n, "both armies required");
218}
219
220static int64_t powers[GROUPS];
221
222static inline __attribute__((always_inline)) int64_t power(int i) {
223 return groups[i].units * groups[i].attack;
224}
225
226static inline __attribute__((always_inline)) int64_t damage(int a, int b) {
227 uint32_t type_ = 1U << groups[a].type;
228 return groups[b].immune & type_
229 ? 0
230 : power(a) * (groups[b].weak & type_ ? 2 : 1);
231}
232
233static inline __attribute__((always_inline)) int select_first(int a, int b) {
234 return powers[a] > powers[b] ||
235 (powers[a] == powers[b] &&
236 groups[a].initiative > groups[b].initiative);
237}
238
239/* Returns winner, or -1 for a stalemate. */
240static inline __attribute__((always_inline)) void cache_army_power(void) {
241 for (int i = 0; i < n; i++) {
242 powers[i] = power(i);
243 }
244}
245
246static inline __attribute__((always_inline)) int
247insert_target_selection_order(int order[GROUPS], int i, int j) {
248 while (j && select_first(i, order[j - 1])) {
249 order[j] = order[j - 1];
250 j--;
251 }
252
253 return j;
254}
255
256static inline __attribute__((always_inline)) int
257prepare_target_selection(int count[2], int order[GROUPS], int live,
258 int target[GROUPS], uint64_t available[2],
259 int64_t sums[2]) {
260 for (int i = 0; i < n; i++) {
261 target[i] = -1;
262 if (groups[i].units > 0) {
263 available[groups[i].army] |= 1ULL << i;
264 count[groups[i].army]++;
265 sums[groups[i].army] += groups[i].units;
266 int j = live++;
267 j = insert_target_selection_order(order, i, j);
268 order[j] = i;
269 }
270 }
271
272 return live;
273}
274
275static inline __attribute__((always_inline)) void
276choose_enemy_target(int a, int *best_ref, int64_t *most_ref,
277 uint64_t *choices_ref) {
278 while ((*choices_ref)) {
279 int b = __builtin_ctzll((*choices_ref));
280 (*choices_ref) &= (*choices_ref) - 1;
281 uint32_t mask = 1U << groups[a].type;
282 int64_t hit = (groups[b].immune & mask)
283 ? 0
284 : powers[a] * ((groups[b].weak & mask) ? 2 : 1);
285 if (hit > (*most_ref) ||
286 (hit && hit == (*most_ref) &&
287 (powers[b] > powers[(*best_ref)] ||
288 (powers[b] == powers[(*best_ref)] &&
289 groups[b].initiative > groups[(*best_ref)].initiative)))) {
290 (*best_ref) = b;
291 (*most_ref) = hit;
292 }
293 }
294}
295
296static inline __attribute__((always_inline)) void
297select_army_targets(int order[GROUPS], int live, int target[GROUPS],
298 uint64_t available[2]) {
299 for (int k = 0; k < live; k++) {
300 int a = order[k], best = -1;
301 int64_t most = 0;
302 uint64_t choices = available[1 - groups[a].army];
303 choose_enemy_target(a, &best, &most, &choices);
304 target[a] = best;
305 if (best >= 0) {
306 available[groups[best].army] &= ~(1ULL << best);
307 }
308 }
309}
310
311static inline __attribute__((always_inline)) int
312insert_attack_order(int order[GROUPS], int a, int j) {
313 while (j && groups[a].initiative > groups[order[j - 1]].initiative) {
314 order[j] = order[j - 1];
315 j--;
316 }
317
318 return j;
319}
320
321static inline __attribute__((always_inline)) void
322sort_attack_order(int order[GROUPS], int live) {
323 for (int i = 1; i < live; i++) {
324 int a = order[i], j = i;
325 j = insert_attack_order(order, a, j);
326 order[j] = a;
327 }
328}
329
330static inline __attribute__((always_inline)) int64_t resolve_army_attacks(
331 int order[GROUPS], int live, int target[GROUPS], int64_t killed) {
332 for (int k = 0; k < live; k++) {
333 int a = order[k], b = target[a];
334 if (!groups[a].units || b < 0) {
335 continue;
336 }
337 int64_t dead = damage(a, b) / groups[b].hp;
338 if (dead > groups[b].units) {
339 dead = groups[b].units;
340 }
341 groups[b].units -= dead;
342 killed += dead;
343 }
344
345 return killed;
346}
347
348static int battle(int boost, int64_t *remaining) {
349 memcpy(groups, original, (size_t)n * sizeof groups[0]);
350 for (int i = 0; i < n; i++) {
351 if (!groups[i].army) {
352 groups[i].attack += boost;
353 }
354 }
355 for (int round = 0; round < ROUNDS; round++) {
356 cache_army_power();
357 int count[2] = {0}, order[GROUPS], live = 0, target[GROUPS];
358 uint64_t available[2] = {0};
359 int64_t sums[2] = {0};
360 live = prepare_target_selection(count, order, live, target, available,
361 sums);
362 if (!count[0] || !count[1]) {
363 int winner = count[0] ? 0 : 1;
364 *remaining = sums[winner];
365 return winner;
366 }
367 work += live * n;
368 aoc_assert(work <= WORK, "army search exceeds cap");
369 select_army_targets(order, live, target, available);
370 sort_attack_order(order, live);
371 int64_t killed = 0;
372 killed = resolve_army_attacks(order, live, target, killed);
373 if (!killed) {
374 return -1;
375 }
376 }
377 aoc_assert(0, "army rounds exceed cap");
378 return -1;
379}
380
381slice part1(slice in) {
382 load(in);
383 work = 0;
384 int64_t remaining = 0;
385 int winner = battle(0, &remaining);
386 aoc_assert(winner >= 0, "army stalemate");
387 return slice_from_i64(remaining);
388}
389
390slice part2(slice in) {
391 load(in);
392 work = 0;
393 for (int boost = 0; boost <= BOOST; boost++) {
394 int64_t remaining = 0;
395 if (battle(boost, &remaining) == 0) {
396 return slice_from_i64(remaining);
397 }
398 }
399 aoc_assert(0, "boost exceeds cap");
400}
401
402const struct aoc_method aoc_methods[] = {
403 {0, 0},
404};aoc.h
1#ifndef AOC_H
2#define AOC_H
3
4#include <stdarg.h>
5#include <stddef.h>
6#include <stdint.h>
7#include <stdlib.h>
8#include <string.h>
9
10/* The only required boundary between infra and a solution.
11 * `input` is read-only and is not owned by the solution.
12 * The returned slice is allocated with malloc. It is the only
13 * block still live when the function returns. Infra copies it
14 * and then frees it.
15 */
16typedef struct {
17 uint8_t *p;
18 size_t l;
19} slice;
20
21/* p is null and l is 0. Infra uses this when a run has no output. */
22static const slice empty_slice = {0};
23
24typedef slice (*aoc_fn)(slice);
25
26/* One named method. The name is a C identifier, at most 31
27 * characters, and it is the URL suffix: /YYYY/D/P/<name>.
28 * estimate and span are examples, not a fixed list. A day
29 * exports as many as it wants. The array ends with {0, 0}.
30 * part1 and part2 are not entries in this list.
31 */
32struct aoc_method {
33 const char *name;
34 aoc_fn fn;
35};
36
37slice part1(slice input);
38slice part2(slice input);
39
40extern const struct aoc_method aoc_methods[];
41
42/* Provided by the runtime. Records msg and returns. */
43void aoc_fail(const char *msg);
44
45/* Stops the run when cond is false and reports msg. */
46_Noreturn void aoc_assert_fail(const char *msg);
47#ifndef aoc_assert
48#define aoc_assert(cond, msg) \
49 do { \
50 if (!(cond)) { \
51 aoc_assert_fail(msg); \
52 } \
53 } while (0)
54#endif
55
56/* Decimal text of a uint64_t is at most 20 digits. A sign and a
57 * little spare fit here. Size a number buffer from this.
58 */
59enum { AOC_I64_TEXT = 32 };
60
61/* Decimal digits of v. No sign. d has room for 20 digits. */
62static inline char *aoc_u64_text(char *d, uint64_t v) {
63 char tmp[AOC_I64_TEXT];
64 char *end = tmp + AOC_I64_TEXT;
65 char *p = end;
66 size_t n;
67 do {
68 *--p = (char)('0' + (v % 10ull));
69 v /= 10ull;
70 } while (v);
71 n = (size_t)(end - p);
72 memcpy(d, p, n);
73 return d + n;
74}
75
76/* Decimal digits of v. The minimum int64_t is not negated. */
77static inline char *aoc_i64_text(char *d, int64_t v) {
78 uint64_t u;
79 if (v < 0) {
80 *d++ = '-';
81 u = (uint64_t)(-(v + 1)) + 1ull;
82 } else {
83 u = (uint64_t)v;
84 }
85 return aoc_u64_text(d, u);
86}
87
88/* n values, one space between them. The author knows the order. */
89static inline char *aoc_u64s(char *d, const uint64_t *v, size_t n) {
90 size_t i;
91 for (i = 0; i < n; i++) {
92 if (i) {
93 *d++ = ' ';
94 }
95 d = aoc_u64_text(d, v[i]);
96 }
97 return d;
98}
99
100static inline char *aoc_i64s(char *d, const int64_t *v, size_t n) {
101 size_t i;
102 for (i = 0; i < n; i++) {
103 if (i) {
104 *d++ = ' ';
105 }
106 d = aoc_i64_text(d, v[i]);
107 }
108 return d;
109}
110
111static inline char *aoc_ints(char *d, const int *v, size_t n) {
112 size_t i;
113 for (i = 0; i < n; i++) {
114 if (i) {
115 *d++ = ' ';
116 }
117 d = aoc_i64_text(d, (int64_t)v[i]);
118 }
119 return d;
120}
121
122/* Write fmt at buf. Return the cursor for the next call.
123 * %d takes int. %i takes int64_t. %u takes uint64_t.
124 * %s takes a C string. %% is a percent sign.
125 * A literal run is memcpy.
126 * %D takes (int *, size_t). %I takes (int64_t *, size_t).
127 * %U takes (uint64_t *, size_t). One space between values.
128 */
129static inline char *aoc_vprintf(const char *fmt, char *buf, va_list ap) {
130 while (*fmt) {
131 const char *lit = fmt;
132 size_t n;
133 while (*fmt && *fmt != '%') {
134 fmt++;
135 }
136 n = (size_t)(fmt - lit);
137 if (n) {
138 memcpy(buf, lit, n);
139 buf += n;
140 }
141 if (*fmt != '%') {
142 break;
143 }
144 fmt++;
145 if (*fmt == '%') {
146 *buf++ = '%';
147 fmt++;
148 continue;
149 }
150 if (*fmt == 's') {
151 const char *s = va_arg(ap, const char *);
152 n = strlen(s);
153 if (n) {
154 memcpy(buf, s, n);
155 buf += n;
156 }
157 fmt++;
158 continue;
159 }
160 if (*fmt == 'd') {
161 buf = aoc_i64_text(buf, (int64_t)va_arg(ap, int));
162 fmt++;
163 continue;
164 }
165 if (*fmt == 'i') {
166 buf = aoc_i64_text(buf, va_arg(ap, int64_t));
167 fmt++;
168 continue;
169 }
170 if (*fmt == 'u') {
171 buf = aoc_u64_text(buf, va_arg(ap, uint64_t));
172 fmt++;
173 continue;
174 }
175 if (*fmt == 'D') {
176 const int *v = va_arg(ap, int *);
177 buf = aoc_ints(buf, v, va_arg(ap, size_t));
178 fmt++;
179 continue;
180 }
181 if (*fmt == 'I') {
182 const int64_t *v = va_arg(ap, int64_t *);
183 buf = aoc_i64s(buf, v, va_arg(ap, size_t));
184 fmt++;
185 continue;
186 }
187 if (*fmt == 'U') {
188 const uint64_t *v = va_arg(ap, uint64_t *);
189 buf = aoc_u64s(buf, v, va_arg(ap, size_t));
190 fmt++;
191 continue;
192 }
193 aoc_assert(0, "bad format");
194 }
195 return buf;
196}
197
198static inline char *aoc_printf(const char *fmt, char *buf, ...) {
199 va_list ap;
200 va_start(ap, buf);
201 buf = aoc_vprintf(fmt, buf, ap);
202 va_end(ap);
203 return buf;
204}
205
206/* Copy n bytes of text into a malloc'd slice. */
207static inline slice slice_from_text(const char *s, size_t n) {
208 uint8_t *p = malloc(n);
209 aoc_assert(p, "out of memory");
210 if (n) {
211 memcpy(p, s, n);
212 }
213 return (slice){p, n};
214}
215
216/* Decimal text of v, allocated at AOC_I64_TEXT. The minimum
217 * int64_t is not negated. slice.l is the bytes written.
218 */
219static inline slice slice_from_i64(int64_t v) {
220 char tmp[AOC_I64_TEXT];
221 char *d;
222 uint8_t *p;
223 size_t n;
224 d = aoc_printf("%i", tmp, v);
225 n = (size_t)(d - tmp);
226 p = malloc(AOC_I64_TEXT);
227 aoc_assert(p, "out of memory");
228 memcpy(p, tmp, n);
229 return (slice){p, n};
230}
231
232/* Parse one decimal slice into *out. A leading '-' is allowed.
233 * Returns 1 on success, 0 for invalid text or int64_t overflow.
234 */
235static inline int slice_to_i64(slice s, int64_t *out) {
236 size_t i = 0;
237 int neg = 0;
238 uint64_t u = 0;
239 if (!s.p || s.l == 0 || !out) {
240 return 0;
241 }
242 if (s.p[0] == '-') {
243 neg = 1;
244 i = 1;
245 if (s.l == 1) {
246 return 0;
247 }
248 }
249 for (; i < s.l; i++) {
250 uint8_t c = s.p[i];
251 if (c < '0' || c > '9') {
252 return 0;
253 }
254 uint64_t digit = (uint64_t)(c - '0');
255 uint64_t limit = (uint64_t)INT64_MAX + (uint64_t)neg;
256 if (u > (limit - digit) / 10u) {
257 return 0;
258 }
259 u = u * 10u + digit;
260 }
261 if (neg) {
262 *out = u == (uint64_t)INT64_MAX + 1u ? INT64_MIN : -(int64_t)u;
263 } else {
264 *out = (int64_t)u;
265 }
266 return 1;
267}
268
269#endifThe aha moment
Another battle, but this one has no map. The local armies contain 41,390 units altogether, which sounds expensive until we notice that they are organized into only twenty groups. Every unit in a group has the same properties, and damage removes whole units. A group therefore needs a remaining count, not thousands of individual records. This representation turns a round into a few sorts and at most a few hundred group comparisons.
The story separates target selection from attacking. Preserve that separation. First order the attackers by effective power, with initiative breaking ties. Each chooses an unclaimed enemy target by potential damage, then the defender's effective power, then the defender's initiative. A target receiving zero damage is not selected. Potential damage is compared before limiting it to the defender's remaining health, so choosing the target with the greatest number of possible kills would implement a different rule.
After every target has been reserved, switch to decreasing initiative order for attacks. Do not keep using the selection order. Also recompute an attacker's damage from the units still alive when its turn arrives. A group weakened earlier in the round hits less hard than it promised during target selection; a group wiped out before its turn does not attack at all. Its selected target does not get reassigned to someone else mid-round.
The arithmetic is simpler than day fifteen's individual hit points. If a group of ten units takes 75 damage and each unit has ten hit points, it loses seven units. The remaining three units are at full health. There is no leftover five damage to carry into the next round. This detail will matter again when a battle stops making progress.
The local groups range from 89 through 5,513 units, with hit points up to 51,205 and per-unit damage from six through 815. The unboosted simulation ends after 556 rounds. Twenty groups make that quite manageable. A reliable solve comes from checking the first sample round's selections and attacks separately, where a wrong tie-break or stale damage value can be located immediately, rather than treating the final survivor total as a mysterious checksum.
Part two boosts each immune unit's attack damage. It does not add the boost once to a group's total power: a group of n surviving units gains n times the boost in effective power. And unlike day fifteen, casualties are allowed. Stopping a trial at the first immune loss would reject valid victories.
Try boosts from zero upward and restart the battle each time. Binary search is tempting, but it needs a proof that success is monotone. Boost changes effective powers, target-selection order, and sometimes which groups attack which enemies; “more damage sounds better” is not that proof. The local first victory is at boost 45, so only 46 trials are required. The implementation's conservative comparison accounting totals about 11.2 million across them. At this scale, an ordered exhaustive search is a defensible way to guarantee the smallest successful boost.
Some trials can become stalemates. If a whole round kills no units, every group's count and attributes are unchanged, partial damage has been discarded, and the next deterministic round will be identical. We can stop that trial immediately with a proof that waiting will not help. A stalemate is not an immune victory and must not make the boost search hang.
The implementation supports 64 groups, sixteen damage types of at most sixteen letters, positive unit counts, damage and initiatives through one million, and hit points through one billion. Initiatives must be distinct. It allows ten thousand rounds per battle, a shared thirty-million comparison budget, and boosts from zero through ten thousand. Exhausting the boost range is an explicit limit, not a claim that no larger boost could win. Once the grouped model and two-phase rules are right, simulation plus a measured, bounded sweep supplies the answer.
See also
Categories for 2015–2024 adapted from u/Boojum’s 500 Stars: A Categorization and Mega-Guide ↗. A day can belong to several categories. Tags from 2025 onward are our additions.
Try your input
One POST, one reply. Your input is not saved.