Question
Your on-call runbook pages the ML team when a spam filter's weekly accuracy drops too far. Each week is summarized as [correct, total] with total >= 1. Accuracy dropped too far when acc_a - acc_b > max_drop_pct / 100, where acc_a = correct_a / total_a is last week and acc_b is this week. Check this exactly with integers: return true when 100 * (correct_a * total_b - correct_b * total_a) > max_drop_pct * total_a * total_b, else false. Do not use floating point. Example: week_a = [90, 100], week_b = [80, 100], max_drop_pct = 5 returns true (a 10-point drop).
accuracy_dropped(week_a: list[int], week_b: list[int], max_drop_pct: int) → bool[[90,100],[80,100],5]outtrueState 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.