{"abstract":"Periods with online exams appear over capacity.","category":"Exam timetabling constraints","checks":8,"contract":"sits [student, exam, period, access]; cap period -> seats (missing = 0); mode exam -> paper/online (missing = paper). Each distinct (student, exam) uses one seat, two with an access arrangement, and none for online exams. Return [period, used, capacity] for periods over capacity, by period.","evaluation_group":"w2-exam-timetabling-constraints-period-seat-capacity","failed_approach":"Defaulting unknown modes to online drops paper exams missing from the mode table.","family":"w2-exam-timetabling-constraints-period-seat-capacity-online-seats","id":"FA-94696","implementations":{"attempt":{"sha256":"adbd9abfc0f62b962555261f5169c3ce49c8a45abaeb8cb2dff6babddb9c51d7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sits, cap, mode):\n    seen = set()\n    used = {}\n    for st, ex, p, acc in sits:\n        if (st, ex) in seen:\n            continue\n        seen.add((st, ex))\n        if mode.get(ex, 'online') == 'online':\n            continue\n        used[p] = used.get(p, 0) + (2 if acc else 1)\n    return [[p, used[p], cap.get(p, 0)] for p in sorted(used) if used[p] > cap.get(p, 0)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: online seats 1', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}],\n   []),\n  ('regression variant: online seats 2',\n   [[['s1', 'MATH101', 1, True], ['s1', 'CHEM120', 0, False], ['s5', 'PHYS110', 0, False],\n     ['s5', 'CHEM120', 0, False], ['s3', 'PHYS110', 1, False], ['s3', 'MATH101H', 0, False],\n     ['s1', 'CHEM120', 1, False], ['s1', 'CHEM120', 0, False], ['s3', 'CHEM120', 2, False],\n     ['s3', 'PHYS110', 2, False], ['s3', 'PHYS110', 1, False]],\n    {0: 3, 1: 2, 2: 4}, {'MATH101': 'online', 'MATH101H': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   []),\n  ('partial repair guard 3',\n   [[['s3', 'MATH101', 0, False], ['s3', 'BIO130', 2, False], ['s2', 'MATH101H', 0, False],\n     ['s2', 'MATH101H', 2, False], ['s3', 'BIO130', 2, False]],\n    {0: 1, 1: 2, 2: 3}, {'MATH101': 'paper', 'PHYS110': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 1]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),\n  ('normal control 6',\n   [[['s1', 'BIO130', 1, False], ['s2', 'PHYS110', 1, False]], {0: 1, 1: 1, 2: 2},\n    {'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[1, 2, 1]]),\n  ('normal control 7',\n   [[['s2', 'PHYS110', 0, False], ['s5', 'PHYS110', 2, False], ['s5', 'BIO130', 2, True],\n     ['s1', 'MATH101H', 1, False], ['s5', 'BIO130', 2, True]],\n    {0: 4, 1: 3, 2: 3},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('normal control 8',\n   [[['s3', 'BIO130', 1, False], ['s5', 'PHYS110', 2, False], ['s3', 'MATH101H', 1, False],\n     ['s3', 'MATH101H', 0, False], ['s4', 'MATH101H', 1, True], ['s1', 'CHEM120', 2, False],\n     ['s3', 'MATH101H', 1, False], ['s1', 'BIO130', 1, False]],\n    {0: 3, 1: 4, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online'}],\n   [[1, 5, 4]])],\n [('regression: online seats 1',\n   [[['s4', 'MATH101H', 0, False], ['s5', 'CHEM120', 1, False], ['s5', 'MATH101H', 1, False],\n     ['s5', 'MATH101H', 2, False], ['s4', 'MATH101H', 2, False], ['s2', 'CHEM120', 1, False],\n     ['s3', 'MATH101', 0, False], ['s2', 'MATH101', 2, False], ['s2', 'BIO130', 1, False],\n     ['s2', 'MATH101H', 0, False]],\n    {0: 3, 1: 1, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper'}],\n   [[1, 3, 1]]),\n  ('regression variant: online seats 2',\n   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101H', 2, False],\n     ['s5', 'MATH101', 1, True], ['s5', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],\n     ['s4', 'MATH101H', 2, False]],\n    {1: 2, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online'}],\n   [[2, 4, 1]]),\n  ('partial repair guard 3',\n   [[['s2', 'MATH101H', 2, True], ['s4', 'MATH101', 0, False], ['s3', 'CHEM120', 0, True],\n     ['s1', 'MATH101', 2, False], ['s2', 'PHYS110', 1, True], ['s4', 'BIO130', 0, True],\n     ['s3', 'CHEM120', 2, False], ['s4', 'BIO130', 0, True]],\n    {0: 2, 1: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper'}],\n   [[0, 5, 2], [2, 1, 0]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),\n  ('normal control 6',\n   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101', 1, False], ['s4', 'MATH101', 1, False]], {1: 1, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('normal control 7',\n   [[['s5', 'BIO130', 0, False], ['s5', 'PHYS110', 1, False], ['s1', 'PHYS110', 0, False],\n     ['s5', 'MATH101', 1, False], ['s3', 'MATH101', 2, False]],\n    {0: 4, 1: 4, 2: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online'}],\n   []),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 1, False], ['s4', 'MATH101', 2, False], ['s5', 'MATH101', 0, True],\n     ['s4', 'MATH101', 0, True], ['s1', 'MATH101', 2, True], ['s2', 'MATH101', 0, False],\n     ['s2', 'BIO130', 2, True], ['s4', 'BIO130', 2, False], ['s2', 'MATH101H', 2, False],\n     ['s3', 'BIO130', 1, False]],\n    {0: 1, 1: 2, 2: 1}, {'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[0, 3, 1], [2, 7, 1]])],\n [('regression: online seats 1',\n   [[['s3', 'MATH101H', 2, False], ['s3', 'MATH101H', 0, False], ['s5', 'PHYS110', 0, False],\n     ['s2', 'MATH101H', 0, False], ['s4', 'MATH101H', 0, False], ['s3', 'PHYS110', 1, False],\n     ['s2', 'MATH101', 1, False], ['s5', 'PHYS110', 0, False], ['s4', 'CHEM120', 0, False],\n     ['s3', 'MATH101H', 1, True]],\n    {0: 1, 2: 1},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 1], [1, 1, 0]]),\n  ('regression variant: online seats 2',\n   [[['s4', 'PHYS110', 1, False], ['s1', 'MATH101H', 1, True], ['s3', 'BIO130', 1, False],\n     ['s1', 'MATH101H', 1, False], ['s4', 'MATH101H', 1, False], ['s1', 'MATH101H', 1, True]],\n    {0: 2, 1: 2, 2: 4},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper'}],\n   []),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101H', 2, False],\n     ['s5', 'MATH101', 1, True], ['s5', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],\n     ['s4', 'MATH101H', 2, False]],\n    {1: 2, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online'}],\n   [[2, 4, 1]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),\n  ('normal control 6',\n   [[['s4', 'CHEM120', 1, True], ['s5', 'CHEM120', 0, False], ['s3', 'MATH101', 0, False],\n     ['s4', 'BIO130', 0, False], ['s4', 'MATH101', 1, False], ['s3', 'MATH101H', 1, False],\n     ['s4', 'MATH101', 1, False], ['s1', 'MATH101', 0, True]],\n    {0: 4, 1: 4, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   []),\n  ('normal control 7',\n   [[['s5', 'PHYS110', 0, True], ['s2', 'MATH101', 0, False], ['s3', 'PHYS110', 0, False],\n     ['s4', 'BIO130', 2, False], ['s2', 'MATH101', 0, False]],\n    {1: 4, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[0, 3, 0]]),\n  ('normal control 8',\n   [[['s3', 'PHYS110', 2, True], ['s5', 'MATH101', 1, True], ['s5', 'CHEM120', 0, True],\n     ['s4', 'CHEM120', 2, False], ['s4', 'PHYS110', 0, False], ['s2', 'MATH101H', 0, True],\n     ['s3', 'PHYS110', 1, True], ['s5', 'MATH101', 1, True]],\n    {0: 3, 1: 3, 2: 3},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'online'}],\n   [])],\n [('regression: online seats 1',\n   [[['s5', 'CHEM120', 0, False], ['s2', 'MATH101H', 2, True], ['s5', 'PHYS110', 2, False],\n     ['s3', 'PHYS110', 0, False], ['s3', 'MATH101', 1, False], ['s1', 'MATH101H', 1, True],\n     ['s2', 'MATH101H', 0, True], ['s3', 'MATH101', 2, False], ['s4', 'PHYS110', 2, False],\n     ['s3', 'MATH101', 2, False]],\n    {0: 3, 1: 2, 2: 1}, {'MATH101': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[2, 4, 1]]),\n  ('regression variant: online seats 2',\n   [[['s4', 'PHYS110', 1, False], ['s1', 'CHEM120', 2, False], ['s1', 'CHEM120', 0, True],\n     ['s2', 'MATH101H', 1, False], ['s3', 'CHEM120', 0, False], ['s5', 'PHYS110', 0, True],\n     ['s1', 'PHYS110', 1, True], ['s1', 'MATH101H', 0, True], ['s1', 'BIO130', 0, True],\n     ['s4', 'MATH101', 1, False]],\n    {0: 3, 1: 2, 2: 1}, {'MATH101': 'online', 'MATH101H': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 5, 3], [1, 4, 2]]),\n  ('partial repair guard 3',\n   [[['s2', 'BIO130', 1, False], ['s2', 'BIO130', 0, False], ['s2', 'MATH101', 2, False],\n     ['s4', 'MATH101H', 2, False], ['s2', 'MATH101', 2, False], ['s3', 'CHEM120', 0, False],\n     ['s3', 'MATH101H', 1, False], ['s2', 'MATH101H', 1, False], ['s5', 'BIO130', 2, False],\n     ['s4', 'MATH101', 1, True]],\n    {0: 1, 1: 4, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper'}],\n   [[2, 2, 1]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),\n  ('normal control 6',\n   [[['s1', 'CHEM120', 2, False], ['s3', 'BIO130', 0, True], ['s1', 'MATH101', 1, True],\n     ['s5', 'BIO130', 1, False], ['s3', 'BIO130', 0, True]],\n    {0: 1, 1: 2}, {'MATH101': 'online', 'CHEM120': 'online', 'BIO130': 'online'}],\n   []),\n  ('normal control 7',\n   [[['s3', 'BIO130', 1, False], ['s2', 'PHYS110', 0, False], ['s2', 'MATH101H', 2, False],\n     ['s5', 'CHEM120', 0, False], ['s4', 'MATH101', 1, False], ['s3', 'CHEM120', 0, True],\n     ['s1', 'PHYS110', 1, False]],\n    {0: 2, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 4, 2], [1, 2, 0]]),\n  ('normal control 8',\n   [[['s1', 'PHYS110', 1, False], ['s3', 'CHEM120', 2, False], ['s4', 'MATH101H', 1, False],\n     ['s3', 'MATH101H', 0, False]],\n    {0: 2, 1: 2, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [])],\n [('regression: online seats 1',\n   [[['s5', 'BIO130', 1, False], ['s2', 'MATH101H', 2, False], ['s5', 'BIO130', 1, False],\n     ['s3', 'MATH101H', 2, False], ['s2', 'MATH101', 2, False], ['s2', 'PHYS110', 0, False],\n     ['s3', 'PHYS110', 1, False], ['s1', 'BIO130', 1, False], ['s2', 'CHEM120', 1, True],\n     ['s1', 'PHYS110', 2, False], ['s1', 'PHYS110', 2, False]],\n    {0: 2, 1: 2},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[1, 3, 2], [2, 2, 0]]),\n  ('regression variant: online seats 2',\n   [[['s1', 'PHYS110', 0, False], ['s2', 'CHEM120', 1, False], ['s1', 'PHYS110', 2, False],\n     ['s1', 'CHEM120', 2, False], ['s1', 'CHEM120', 1, False], ['s2', 'PHYS110', 0, False],\n     ['s4', 'MATH101H', 0, False]],\n    {0: 1, 1: 3, 2: 2},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 0, True], ['s1', 'PHYS110', 1, False], ['s3', 'MATH101H', 0, True],\n     ['s4', 'MATH101', 1, True], ['s4', 'BIO130', 2, False], ['s3', 'MATH101', 2, False],\n     ['s1', 'PHYS110', 1, False]],\n    {0: 1, 1: 2}, {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online'}],\n   [[0, 2, 1], [2, 2, 0]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),\n  ('normal control 6',\n   [[['s2', 'PHYS110', 0, False], ['s1', 'MATH101H', 1, False], ['s2', 'MATH101', 1, False],\n     ['s4', 'CHEM120', 0, False]],\n    {0: 1, 1: 3, 2: 2}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper'}],\n   [[0, 2, 1]]),\n  ('normal control 7',\n   [[['s3', 'PHYS110', 2, False], ['s2', 'MATH101', 2, False]], {0: 1, 1: 4},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'BIO130': 'online'}],\n   [[2, 2, 0]]),\n  ('normal control 8',\n   [[['s1', 'MATH101H', 2, False], ['s3', 'MATH101H', 1, True], ['s1', 'BIO130', 1, False],\n     ['s5', 'MATH101H', 2, False], ['s2', 'PHYS110', 0, False], ['s5', 'CHEM120', 1, True],\n     ['s1', 'MATH101', 1, False]],\n    {0: 2, 1: 2, 2: 2},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[1, 3, 2]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"16177774624d7b1ecad98fabd5dcc9ae0356f7d6bbdb0afe47a82a40ad70dce1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sits, cap, mode):\n    seen = set()\n    used = {}\n    for st, ex, p, acc in sits:\n        if (st, ex) in seen:\n            continue\n        seen.add((st, ex))\n        used[p] = used.get(p, 0) + (2 if acc else 1)\n    return [[p, used[p], cap.get(p, 0)] for p in sorted(used) if used[p] > cap.get(p, 0)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: online seats 1', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}],\n   []),\n  ('regression variant: online seats 2',\n   [[['s1', 'MATH101', 1, True], ['s1', 'CHEM120', 0, False], ['s5', 'PHYS110', 0, False],\n     ['s5', 'CHEM120', 0, False], ['s3', 'PHYS110', 1, False], ['s3', 'MATH101H', 0, False],\n     ['s1', 'CHEM120', 1, False], ['s1', 'CHEM120', 0, False], ['s3', 'CHEM120', 2, False],\n     ['s3', 'PHYS110', 2, False], ['s3', 'PHYS110', 1, False]],\n    {0: 3, 1: 2, 2: 4}, {'MATH101': 'online', 'MATH101H': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   []),\n  ('partial repair guard 3',\n   [[['s3', 'MATH101', 0, False], ['s3', 'BIO130', 2, False], ['s2', 'MATH101H', 0, False],\n     ['s2', 'MATH101H', 2, False], ['s3', 'BIO130', 2, False]],\n    {0: 1, 1: 2, 2: 3}, {'MATH101': 'paper', 'PHYS110': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 1]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),\n  ('normal control 6',\n   [[['s1', 'BIO130', 1, False], ['s2', 'PHYS110', 1, False]], {0: 1, 1: 1, 2: 2},\n    {'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[1, 2, 1]]),\n  ('normal control 7',\n   [[['s2', 'PHYS110', 0, False], ['s5', 'PHYS110', 2, False], ['s5', 'BIO130', 2, True],\n     ['s1', 'MATH101H', 1, False], ['s5', 'BIO130', 2, True]],\n    {0: 4, 1: 3, 2: 3},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('normal control 8',\n   [[['s3', 'BIO130', 1, False], ['s5', 'PHYS110', 2, False], ['s3', 'MATH101H', 1, False],\n     ['s3', 'MATH101H', 0, False], ['s4', 'MATH101H', 1, True], ['s1', 'CHEM120', 2, False],\n     ['s3', 'MATH101H', 1, False], ['s1', 'BIO130', 1, False]],\n    {0: 3, 1: 4, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online'}],\n   [[1, 5, 4]])],\n [('regression: online seats 1',\n   [[['s4', 'MATH101H', 0, False], ['s5', 'CHEM120', 1, False], ['s5', 'MATH101H', 1, False],\n     ['s5', 'MATH101H', 2, False], ['s4', 'MATH101H', 2, False], ['s2', 'CHEM120', 1, False],\n     ['s3', 'MATH101', 0, False], ['s2', 'MATH101', 2, False], ['s2', 'BIO130', 1, False],\n     ['s2', 'MATH101H', 0, False]],\n    {0: 3, 1: 1, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper'}],\n   [[1, 3, 1]]),\n  ('regression variant: online seats 2',\n   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101H', 2, False],\n     ['s5', 'MATH101', 1, True], ['s5', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],\n     ['s4', 'MATH101H', 2, False]],\n    {1: 2, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online'}],\n   [[2, 4, 1]]),\n  ('partial repair guard 3',\n   [[['s2', 'MATH101H', 2, True], ['s4', 'MATH101', 0, False], ['s3', 'CHEM120', 0, True],\n     ['s1', 'MATH101', 2, False], ['s2', 'PHYS110', 1, True], ['s4', 'BIO130', 0, True],\n     ['s3', 'CHEM120', 2, False], ['s4', 'BIO130', 0, True]],\n    {0: 2, 1: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper'}],\n   [[0, 5, 2], [2, 1, 0]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),\n  ('normal control 6',\n   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101', 1, False], ['s4', 'MATH101', 1, False]], {1: 1, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('normal control 7',\n   [[['s5', 'BIO130', 0, False], ['s5', 'PHYS110', 1, False], ['s1', 'PHYS110', 0, False],\n     ['s5', 'MATH101', 1, False], ['s3', 'MATH101', 2, False]],\n    {0: 4, 1: 4, 2: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online'}],\n   []),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 1, False], ['s4', 'MATH101', 2, False], ['s5', 'MATH101', 0, True],\n     ['s4', 'MATH101', 0, True], ['s1', 'MATH101', 2, True], ['s2', 'MATH101', 0, False],\n     ['s2', 'BIO130', 2, True], ['s4', 'BIO130', 2, False], ['s2', 'MATH101H', 2, False],\n     ['s3', 'BIO130', 1, False]],\n    {0: 1, 1: 2, 2: 1}, {'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[0, 3, 1], [2, 7, 1]])],\n [('regression: online seats 1',\n   [[['s3', 'MATH101H', 2, False], ['s3', 'MATH101H', 0, False], ['s5', 'PHYS110', 0, False],\n     ['s2', 'MATH101H', 0, False], ['s4', 'MATH101H', 0, False], ['s3', 'PHYS110', 1, False],\n     ['s2', 'MATH101', 1, False], ['s5', 'PHYS110', 0, False], ['s4', 'CHEM120', 0, False],\n     ['s3', 'MATH101H', 1, True]],\n    {0: 1, 2: 1},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 1], [1, 1, 0]]),\n  ('regression variant: online seats 2',\n   [[['s4', 'PHYS110', 1, False], ['s1', 'MATH101H', 1, True], ['s3', 'BIO130', 1, False],\n     ['s1', 'MATH101H', 1, False], ['s4', 'MATH101H', 1, False], ['s1', 'MATH101H', 1, True]],\n    {0: 2, 1: 2, 2: 4},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper'}],\n   []),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101H', 2, False],\n     ['s5', 'MATH101', 1, True], ['s5', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],\n     ['s4', 'MATH101H', 2, False]],\n    {1: 2, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online'}],\n   [[2, 4, 1]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),\n  ('normal control 6',\n   [[['s4', 'CHEM120', 1, True], ['s5', 'CHEM120', 0, False], ['s3', 'MATH101', 0, False],\n     ['s4', 'BIO130', 0, False], ['s4', 'MATH101', 1, False], ['s3', 'MATH101H', 1, False],\n     ['s4', 'MATH101', 1, False], ['s1', 'MATH101', 0, True]],\n    {0: 4, 1: 4, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   []),\n  ('normal control 7',\n   [[['s5', 'PHYS110', 0, True], ['s2', 'MATH101', 0, False], ['s3', 'PHYS110', 0, False],\n     ['s4', 'BIO130', 2, False], ['s2', 'MATH101', 0, False]],\n    {1: 4, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[0, 3, 0]]),\n  ('normal control 8',\n   [[['s3', 'PHYS110', 2, True], ['s5', 'MATH101', 1, True], ['s5', 'CHEM120', 0, True],\n     ['s4', 'CHEM120', 2, False], ['s4', 'PHYS110', 0, False], ['s2', 'MATH101H', 0, True],\n     ['s3', 'PHYS110', 1, True], ['s5', 'MATH101', 1, True]],\n    {0: 3, 1: 3, 2: 3},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'online'}],\n   [])],\n [('regression: online seats 1',\n   [[['s5', 'CHEM120', 0, False], ['s2', 'MATH101H', 2, True], ['s5', 'PHYS110', 2, False],\n     ['s3', 'PHYS110', 0, False], ['s3', 'MATH101', 1, False], ['s1', 'MATH101H', 1, True],\n     ['s2', 'MATH101H', 0, True], ['s3', 'MATH101', 2, False], ['s4', 'PHYS110', 2, False],\n     ['s3', 'MATH101', 2, False]],\n    {0: 3, 1: 2, 2: 1}, {'MATH101': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[2, 4, 1]]),\n  ('regression variant: online seats 2',\n   [[['s4', 'PHYS110', 1, False], ['s1', 'CHEM120', 2, False], ['s1', 'CHEM120', 0, True],\n     ['s2', 'MATH101H', 1, False], ['s3', 'CHEM120', 0, False], ['s5', 'PHYS110', 0, True],\n     ['s1', 'PHYS110', 1, True], ['s1', 'MATH101H', 0, True], ['s1', 'BIO130', 0, True],\n     ['s4', 'MATH101', 1, False]],\n    {0: 3, 1: 2, 2: 1}, {'MATH101': 'online', 'MATH101H': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 5, 3], [1, 4, 2]]),\n  ('partial repair guard 3',\n   [[['s2', 'BIO130', 1, False], ['s2', 'BIO130', 0, False], ['s2', 'MATH101', 2, False],\n     ['s4', 'MATH101H', 2, False], ['s2', 'MATH101', 2, False], ['s3', 'CHEM120', 0, False],\n     ['s3', 'MATH101H', 1, False], ['s2', 'MATH101H', 1, False], ['s5', 'BIO130', 2, False],\n     ['s4', 'MATH101', 1, True]],\n    {0: 1, 1: 4, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper'}],\n   [[2, 2, 1]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),\n  ('normal control 6',\n   [[['s1', 'CHEM120', 2, False], ['s3', 'BIO130', 0, True], ['s1', 'MATH101', 1, True],\n     ['s5', 'BIO130', 1, False], ['s3', 'BIO130', 0, True]],\n    {0: 1, 1: 2}, {'MATH101': 'online', 'CHEM120': 'online', 'BIO130': 'online'}],\n   []),\n  ('normal control 7',\n   [[['s3', 'BIO130', 1, False], ['s2', 'PHYS110', 0, False], ['s2', 'MATH101H', 2, False],\n     ['s5', 'CHEM120', 0, False], ['s4', 'MATH101', 1, False], ['s3', 'CHEM120', 0, True],\n     ['s1', 'PHYS110', 1, False]],\n    {0: 2, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 4, 2], [1, 2, 0]]),\n  ('normal control 8',\n   [[['s1', 'PHYS110', 1, False], ['s3', 'CHEM120', 2, False], ['s4', 'MATH101H', 1, False],\n     ['s3', 'MATH101H', 0, False]],\n    {0: 2, 1: 2, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [])],\n [('regression: online seats 1',\n   [[['s5', 'BIO130', 1, False], ['s2', 'MATH101H', 2, False], ['s5', 'BIO130', 1, False],\n     ['s3', 'MATH101H', 2, False], ['s2', 'MATH101', 2, False], ['s2', 'PHYS110', 0, False],\n     ['s3', 'PHYS110', 1, False], ['s1', 'BIO130', 1, False], ['s2', 'CHEM120', 1, True],\n     ['s1', 'PHYS110', 2, False], ['s1', 'PHYS110', 2, False]],\n    {0: 2, 1: 2},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[1, 3, 2], [2, 2, 0]]),\n  ('regression variant: online seats 2',\n   [[['s1', 'PHYS110', 0, False], ['s2', 'CHEM120', 1, False], ['s1', 'PHYS110', 2, False],\n     ['s1', 'CHEM120', 2, False], ['s1', 'CHEM120', 1, False], ['s2', 'PHYS110', 0, False],\n     ['s4', 'MATH101H', 0, False]],\n    {0: 1, 1: 3, 2: 2},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 0, True], ['s1', 'PHYS110', 1, False], ['s3', 'MATH101H', 0, True],\n     ['s4', 'MATH101', 1, True], ['s4', 'BIO130', 2, False], ['s3', 'MATH101', 2, False],\n     ['s1', 'PHYS110', 1, False]],\n    {0: 1, 1: 2}, {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online'}],\n   [[0, 2, 1], [2, 2, 0]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),\n  ('normal control 6',\n   [[['s2', 'PHYS110', 0, False], ['s1', 'MATH101H', 1, False], ['s2', 'MATH101', 1, False],\n     ['s4', 'CHEM120', 0, False]],\n    {0: 1, 1: 3, 2: 2}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper'}],\n   [[0, 2, 1]]),\n  ('normal control 7',\n   [[['s3', 'PHYS110', 2, False], ['s2', 'MATH101', 2, False]], {0: 1, 1: 4},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'BIO130': 'online'}],\n   [[2, 2, 0]]),\n  ('normal control 8',\n   [[['s1', 'MATH101H', 2, False], ['s3', 'MATH101H', 1, True], ['s1', 'BIO130', 1, False],\n     ['s5', 'MATH101H', 2, False], ['s2', 'PHYS110', 0, False], ['s5', 'CHEM120', 1, True],\n     ['s1', 'MATH101', 1, False]],\n    {0: 2, 1: 2, 2: 2},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[1, 3, 2]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"1d9103e9c9209152622134ec29be12e294175ccaed8c9d20e5b0c7fa40befe55","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sits, cap, mode):\n    seen = set()\n    used = {}\n    for st, ex, p, acc in sits:\n        if (st, ex) in seen:\n            continue\n        seen.add((st, ex))\n        if mode.get(ex) == 'online':\n            continue\n        used[p] = used.get(p, 0) + (2 if acc else 1)\n    return [[p, used[p], cap.get(p, 0)] for p in sorted(used) if used[p] > cap.get(p, 0)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: online seats 1', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}],\n   []),\n  ('regression variant: online seats 2',\n   [[['s1', 'MATH101', 1, True], ['s1', 'CHEM120', 0, False], ['s5', 'PHYS110', 0, False],\n     ['s5', 'CHEM120', 0, False], ['s3', 'PHYS110', 1, False], ['s3', 'MATH101H', 0, False],\n     ['s1', 'CHEM120', 1, False], ['s1', 'CHEM120', 0, False], ['s3', 'CHEM120', 2, False],\n     ['s3', 'PHYS110', 2, False], ['s3', 'PHYS110', 1, False]],\n    {0: 3, 1: 2, 2: 4}, {'MATH101': 'online', 'MATH101H': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   []),\n  ('partial repair guard 3',\n   [[['s3', 'MATH101', 0, False], ['s3', 'BIO130', 2, False], ['s2', 'MATH101H', 0, False],\n     ['s2', 'MATH101H', 2, False], ['s3', 'BIO130', 2, False]],\n    {0: 1, 1: 2, 2: 3}, {'MATH101': 'paper', 'PHYS110': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 1]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),\n  ('normal control 6',\n   [[['s1', 'BIO130', 1, False], ['s2', 'PHYS110', 1, False]], {0: 1, 1: 1, 2: 2},\n    {'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[1, 2, 1]]),\n  ('normal control 7',\n   [[['s2', 'PHYS110', 0, False], ['s5', 'PHYS110', 2, False], ['s5', 'BIO130', 2, True],\n     ['s1', 'MATH101H', 1, False], ['s5', 'BIO130', 2, True]],\n    {0: 4, 1: 3, 2: 3},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('normal control 8',\n   [[['s3', 'BIO130', 1, False], ['s5', 'PHYS110', 2, False], ['s3', 'MATH101H', 1, False],\n     ['s3', 'MATH101H', 0, False], ['s4', 'MATH101H', 1, True], ['s1', 'CHEM120', 2, False],\n     ['s3', 'MATH101H', 1, False], ['s1', 'BIO130', 1, False]],\n    {0: 3, 1: 4, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online'}],\n   [[1, 5, 4]])],\n [('regression: online seats 1',\n   [[['s4', 'MATH101H', 0, False], ['s5', 'CHEM120', 1, False], ['s5', 'MATH101H', 1, False],\n     ['s5', 'MATH101H', 2, False], ['s4', 'MATH101H', 2, False], ['s2', 'CHEM120', 1, False],\n     ['s3', 'MATH101', 0, False], ['s2', 'MATH101', 2, False], ['s2', 'BIO130', 1, False],\n     ['s2', 'MATH101H', 0, False]],\n    {0: 3, 1: 1, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper'}],\n   [[1, 3, 1]]),\n  ('regression variant: online seats 2',\n   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101H', 2, False],\n     ['s5', 'MATH101', 1, True], ['s5', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],\n     ['s4', 'MATH101H', 2, False]],\n    {1: 2, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online'}],\n   [[2, 4, 1]]),\n  ('partial repair guard 3',\n   [[['s2', 'MATH101H', 2, True], ['s4', 'MATH101', 0, False], ['s3', 'CHEM120', 0, True],\n     ['s1', 'MATH101', 2, False], ['s2', 'PHYS110', 1, True], ['s4', 'BIO130', 0, True],\n     ['s3', 'CHEM120', 2, False], ['s4', 'BIO130', 0, True]],\n    {0: 2, 1: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper'}],\n   [[0, 5, 2], [2, 1, 0]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),\n  ('normal control 6',\n   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101', 1, False], ['s4', 'MATH101', 1, False]], {1: 1, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('normal control 7',\n   [[['s5', 'BIO130', 0, False], ['s5', 'PHYS110', 1, False], ['s1', 'PHYS110', 0, False],\n     ['s5', 'MATH101', 1, False], ['s3', 'MATH101', 2, False]],\n    {0: 4, 1: 4, 2: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online'}],\n   []),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 1, False], ['s4', 'MATH101', 2, False], ['s5', 'MATH101', 0, True],\n     ['s4', 'MATH101', 0, True], ['s1', 'MATH101', 2, True], ['s2', 'MATH101', 0, False],\n     ['s2', 'BIO130', 2, True], ['s4', 'BIO130', 2, False], ['s2', 'MATH101H', 2, False],\n     ['s3', 'BIO130', 1, False]],\n    {0: 1, 1: 2, 2: 1}, {'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[0, 3, 1], [2, 7, 1]])],\n [('regression: online seats 1',\n   [[['s3', 'MATH101H', 2, False], ['s3', 'MATH101H', 0, False], ['s5', 'PHYS110', 0, False],\n     ['s2', 'MATH101H', 0, False], ['s4', 'MATH101H', 0, False], ['s3', 'PHYS110', 1, False],\n     ['s2', 'MATH101', 1, False], ['s5', 'PHYS110', 0, False], ['s4', 'CHEM120', 0, False],\n     ['s3', 'MATH101H', 1, True]],\n    {0: 1, 2: 1},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 1], [1, 1, 0]]),\n  ('regression variant: online seats 2',\n   [[['s4', 'PHYS110', 1, False], ['s1', 'MATH101H', 1, True], ['s3', 'BIO130', 1, False],\n     ['s1', 'MATH101H', 1, False], ['s4', 'MATH101H', 1, False], ['s1', 'MATH101H', 1, True]],\n    {0: 2, 1: 2, 2: 4},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper'}],\n   []),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101H', 2, False],\n     ['s5', 'MATH101', 1, True], ['s5', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],\n     ['s4', 'MATH101H', 2, False]],\n    {1: 2, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online'}],\n   [[2, 4, 1]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),\n  ('normal control 6',\n   [[['s4', 'CHEM120', 1, True], ['s5', 'CHEM120', 0, False], ['s3', 'MATH101', 0, False],\n     ['s4', 'BIO130', 0, False], ['s4', 'MATH101', 1, False], ['s3', 'MATH101H', 1, False],\n     ['s4', 'MATH101', 1, False], ['s1', 'MATH101', 0, True]],\n    {0: 4, 1: 4, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   []),\n  ('normal control 7',\n   [[['s5', 'PHYS110', 0, True], ['s2', 'MATH101', 0, False], ['s3', 'PHYS110', 0, False],\n     ['s4', 'BIO130', 2, False], ['s2', 'MATH101', 0, False]],\n    {1: 4, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[0, 3, 0]]),\n  ('normal control 8',\n   [[['s3', 'PHYS110', 2, True], ['s5', 'MATH101', 1, True], ['s5', 'CHEM120', 0, True],\n     ['s4', 'CHEM120', 2, False], ['s4', 'PHYS110', 0, False], ['s2', 'MATH101H', 0, True],\n     ['s3', 'PHYS110', 1, True], ['s5', 'MATH101', 1, True]],\n    {0: 3, 1: 3, 2: 3},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'online'}],\n   [])],\n [('regression: online seats 1',\n   [[['s5', 'CHEM120', 0, False], ['s2', 'MATH101H', 2, True], ['s5', 'PHYS110', 2, False],\n     ['s3', 'PHYS110', 0, False], ['s3', 'MATH101', 1, False], ['s1', 'MATH101H', 1, True],\n     ['s2', 'MATH101H', 0, True], ['s3', 'MATH101', 2, False], ['s4', 'PHYS110', 2, False],\n     ['s3', 'MATH101', 2, False]],\n    {0: 3, 1: 2, 2: 1}, {'MATH101': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[2, 4, 1]]),\n  ('regression variant: online seats 2',\n   [[['s4', 'PHYS110', 1, False], ['s1', 'CHEM120', 2, False], ['s1', 'CHEM120', 0, True],\n     ['s2', 'MATH101H', 1, False], ['s3', 'CHEM120', 0, False], ['s5', 'PHYS110', 0, True],\n     ['s1', 'PHYS110', 1, True], ['s1', 'MATH101H', 0, True], ['s1', 'BIO130', 0, True],\n     ['s4', 'MATH101', 1, False]],\n    {0: 3, 1: 2, 2: 1}, {'MATH101': 'online', 'MATH101H': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 5, 3], [1, 4, 2]]),\n  ('partial repair guard 3',\n   [[['s2', 'BIO130', 1, False], ['s2', 'BIO130', 0, False], ['s2', 'MATH101', 2, False],\n     ['s4', 'MATH101H', 2, False], ['s2', 'MATH101', 2, False], ['s3', 'CHEM120', 0, False],\n     ['s3', 'MATH101H', 1, False], ['s2', 'MATH101H', 1, False], ['s5', 'BIO130', 2, False],\n     ['s4', 'MATH101', 1, True]],\n    {0: 1, 1: 4, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper'}],\n   [[2, 2, 1]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),\n  ('normal control 6',\n   [[['s1', 'CHEM120', 2, False], ['s3', 'BIO130', 0, True], ['s1', 'MATH101', 1, True],\n     ['s5', 'BIO130', 1, False], ['s3', 'BIO130', 0, True]],\n    {0: 1, 1: 2}, {'MATH101': 'online', 'CHEM120': 'online', 'BIO130': 'online'}],\n   []),\n  ('normal control 7',\n   [[['s3', 'BIO130', 1, False], ['s2', 'PHYS110', 0, False], ['s2', 'MATH101H', 2, False],\n     ['s5', 'CHEM120', 0, False], ['s4', 'MATH101', 1, False], ['s3', 'CHEM120', 0, True],\n     ['s1', 'PHYS110', 1, False]],\n    {0: 2, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 4, 2], [1, 2, 0]]),\n  ('normal control 8',\n   [[['s1', 'PHYS110', 1, False], ['s3', 'CHEM120', 2, False], ['s4', 'MATH101H', 1, False],\n     ['s3', 'MATH101H', 0, False]],\n    {0: 2, 1: 2, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [])],\n [('regression: online seats 1',\n   [[['s5', 'BIO130', 1, False], ['s2', 'MATH101H', 2, False], ['s5', 'BIO130', 1, False],\n     ['s3', 'MATH101H', 2, False], ['s2', 'MATH101', 2, False], ['s2', 'PHYS110', 0, False],\n     ['s3', 'PHYS110', 1, False], ['s1', 'BIO130', 1, False], ['s2', 'CHEM120', 1, True],\n     ['s1', 'PHYS110', 2, False], ['s1', 'PHYS110', 2, False]],\n    {0: 2, 1: 2},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[1, 3, 2], [2, 2, 0]]),\n  ('regression variant: online seats 2',\n   [[['s1', 'PHYS110', 0, False], ['s2', 'CHEM120', 1, False], ['s1', 'PHYS110', 2, False],\n     ['s1', 'CHEM120', 2, False], ['s1', 'CHEM120', 1, False], ['s2', 'PHYS110', 0, False],\n     ['s4', 'MATH101H', 0, False]],\n    {0: 1, 1: 3, 2: 2},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 0, True], ['s1', 'PHYS110', 1, False], ['s3', 'MATH101H', 0, True],\n     ['s4', 'MATH101', 1, True], ['s4', 'BIO130', 2, False], ['s3', 'MATH101', 2, False],\n     ['s1', 'PHYS110', 1, False]],\n    {0: 1, 1: 2}, {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online'}],\n   [[0, 2, 1], [2, 2, 0]]),\n  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),\n  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),\n  ('normal control 6',\n   [[['s2', 'PHYS110', 0, False], ['s1', 'MATH101H', 1, False], ['s2', 'MATH101', 1, False],\n     ['s4', 'CHEM120', 0, False]],\n    {0: 1, 1: 3, 2: 2}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper'}],\n   [[0, 2, 1]]),\n  ('normal control 7',\n   [[['s3', 'PHYS110', 2, False], ['s2', 'MATH101', 2, False]], {0: 1, 1: 4},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'BIO130': 'online'}],\n   [[2, 2, 0]]),\n  ('normal control 8',\n   [[['s1', 'MATH101H', 2, False], ['s3', 'MATH101H', 1, True], ['s1', 'BIO130', 1, False],\n     ['s5', 'MATH101H', 2, False], ['s2', 'PHYS110', 0, False], ['s5', 'CHEM120', 1, True],\n     ['s1', 'MATH101', 1, False]],\n    {0: 2, 1: 2, 2: 2},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[1, 3, 2]])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Stipulated toy exam-timetabling rule set for a bounded model; it does not claim conformance with any institution's regulations or a benchmark specification, and it performs no search or optimisation. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-exam-timetabling-constraints-period-seat-capacity-online-seats","generated_at":"2026-09-29T14:52:06.732124+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Seat capacity per period is a hard constraint on which periods can take large exams.","repair":"Skip online exams when counting seats.","root_cause":"Online sittings are not excluded from seat counts.","sha256":"e06e044683f6beffe02af53ccdce7f9c079d401c5c6ab7988428dc57545e982f","title":"Online exam candidates consume hall seats · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.1,"exit_code":1,"observations":[{"actual":[],"check":"regression: online seats 1","expected":[],"passed":true},{"actual":[],"check":"regression variant: online seats 2","expected":[],"passed":true},{"actual":[],"check":"partial repair guard 3","expected":[[0,2,1]],"passed":false},{"actual":[],"check":"boundary control 4","expected":[[0,2,1]],"passed":false},{"actual":[],"check":"boundary control 5","expected":[],"passed":true},{"actual":[[1,2,1]],"check":"normal control 6","expected":[[1,2,1]],"passed":true},{"actual":[],"check":"normal control 7","expected":[],"passed":true},{"actual":[],"check":"normal control 8","expected":[[1,5,4]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: online seats 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression variant: online seats 2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [], \"expected\": [[0, 2, 1]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [[0, 2, 1]], \"passed\": false}, {\"check\": \"boundary control 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[1, 2, 1]], \"expected\": [[1, 2, 1]], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [], \"expected\": [[1, 5, 4]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.365,"exit_code":1,"observations":[{"actual":[[0,2,1]],"check":"regression: online seats 1","expected":[],"passed":false},{"actual":[[0,4,3],[1,3,2]],"check":"regression variant: online seats 2","expected":[],"passed":false},{"actual":[[0,2,1]],"check":"partial repair guard 3","expected":[[0,2,1]],"passed":true},{"actual":[[0,2,1]],"check":"boundary control 4","expected":[[0,2,1]],"passed":true},{"actual":[],"check":"boundary control 5","expected":[],"passed":true},{"actual":[[1,2,1]],"check":"normal control 6","expected":[[1,2,1]],"passed":true},{"actual":[],"check":"normal control 7","expected":[],"passed":true},{"actual":[[1,5,4],[2,2,1]],"check":"normal control 8","expected":[[1,5,4]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: online seats 1\", \"actual\": [[0, 2, 1]], \"expected\": [], \"passed\": false}, {\"check\": \"regression variant: online seats 2\", \"actual\": [[0, 4, 3], [1, 3, 2]], \"expected\": [], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[0, 2, 1]], \"expected\": [[0, 2, 1]], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [[0, 2, 1]], \"expected\": [[0, 2, 1]], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[1, 2, 1]], \"expected\": [[1, 2, 1]], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[1, 5, 4], [2, 2, 1]], \"expected\": [[1, 5, 4]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.705,"exit_code":0,"observations":[{"actual":[],"check":"regression: online seats 1","expected":[],"passed":true},{"actual":[],"check":"regression variant: online seats 2","expected":[],"passed":true},{"actual":[[0,2,1]],"check":"partial repair guard 3","expected":[[0,2,1]],"passed":true},{"actual":[[0,2,1]],"check":"boundary control 4","expected":[[0,2,1]],"passed":true},{"actual":[],"check":"boundary control 5","expected":[],"passed":true},{"actual":[[1,2,1]],"check":"normal control 6","expected":[[1,2,1]],"passed":true},{"actual":[],"check":"normal control 7","expected":[],"passed":true},{"actual":[[1,5,4]],"check":"normal control 8","expected":[[1,5,4]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: online seats 1\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression variant: online seats 2\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [[0, 2, 1]], \"expected\": [[0, 2, 1]], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [[0, 2, 1]], \"expected\": [[0, 2, 1]], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[1, 2, 1]], \"expected\": [[1, 2, 1]], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[1, 5, 4]], \"expected\": [[1, 5, 4]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}