Question
A weekly bake-off scores several candidate models on eval sets of different sizes, so comparing them by floored percentages is too coarse. Given results, a non-empty list where results[i] = [correct_i, total_i] with total_i >= 1, return the index of the model with the highest exact accuracy correct_i / total_i. Compare two models with integer cross-multiplication: model i beats model j when correct_i * total_j > correct_j * total_i. If several models tie for best, return the smallest index. Example: results = [[45, 50], [90, 100], [8, 10]] returns 0 (0.9 ties 0.9, earlier index wins).
best_model(results: list[list[int]]) → int[[[45,50],[90,100],[8,10]]]out0State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.