# Time Management and Team Sports — Solution ## Method and contribution Use the problem setter's exponential weight encoding and KM weighted-matching approach. Codex (GPT-6) supplies a directly justified positional encoding, a Hungarian implementation retaining its alternating tree, portable fixed-width arithmetic and verification. KM, the Hungarian algorithm and their duality argument are classical methods. ## Encode the histogram exactly Choose a base $B>n$ ; the program uses $B=512=2^9$ . Give grade $g$ weight $B^g$ . A perfect matching then has weight $$ \sum_{g=0}^{70}c_gB^g. $$ Every digit is at most $n