{"abstract":"Exams placed in periods with no rooms booked pass the capacity check.","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":"An inclusive comparison flags periods exactly at capacity.","family":"w2-exam-timetabling-constraints-period-seat-capacity-missing-capacity","id":"FA-94711","implementations":{"attempt":{"sha256":"2db562365529b5d9200bb3d067ed8edb15000ba3b2d8c09d74b1f0d40b22a7d6","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: missing capacity 1', [[['s1', 'A', 1, False]], {0: 5}, {'A': 'paper'}], [[1, 1, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'BIO130', 2, False], ['s1', 'MATH101', 0, False], ['s5', 'MATH101H', 2, True],\n     ['s5', 'BIO130', 2, False], ['s2', 'MATH101H', 1, True], ['s5', 'MATH101H', 0, False],\n     ['s1', 'BIO130', 1, True]],\n    {0: 3, 1: 3}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online'}],\n   [[2, 4, 0]]),\n  ('partial repair guard 3',\n   [[['s2', 'CHEM120', 1, False], ['s4', 'PHYS110', 2, False], ['s5', 'MATH101', 0, False]],\n    {0: 4, 1: 1, 2: 4},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   []),\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   [[['s5', 'MATH101', 0, False], ['s5', 'MATH101', 2, False], ['s5', 'MATH101', 2, False]],\n    {0: 2, 1: 4, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('normal control 7',\n   [[['s1', 'BIO130', 2, True], ['s5', 'PHYS110', 1, False], ['s4', 'MATH101H', 1, True],\n     ['s2', 'MATH101H', 1, False], ['s5', 'BIO130', 0, False], ['s1', 'BIO130', 2, True]],\n    {0: 3, 1: 2, 2: 4}, {'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[1, 4, 2]]),\n  ('normal control 8',\n   [[['s1', 'PHYS110', 1, False], ['s4', 'PHYS110', 1, False], ['s1', 'PHYS110', 2, True],\n     ['s4', 'MATH101', 0, False], ['s4', 'MATH101H', 1, False], ['s1', 'CHEM120', 0, False],\n     ['s5', 'BIO130', 2, True], ['s2', 'PHYS110', 1, False], ['s4', 'MATH101H', 1, False]],\n    {1: 2, 2: 1}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],\n   [[0, 1, 0], [1, 4, 2], [2, 2, 1]])],\n [('regression: missing capacity 1',\n   [[['s3', 'BIO130', 0, False], ['s3', 'PHYS110', 2, True], ['s1', 'MATH101H', 1, False],\n     ['s1', 'MATH101H', 1, True], ['s1', 'PHYS110', 1, False], ['s3', 'BIO130', 0, False]],\n    {1: 3, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[0, 1, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'MATH101', 2, False], ['s1', 'PHYS110', 2, True], ['s2', 'BIO130', 0, False],\n     ['s5', 'MATH101', 2, False], ['s4', 'MATH101', 2, False], ['s2', 'CHEM120', 2, True],\n     ['s1', 'CHEM120', 1, False], ['s1', 'MATH101', 1, True], ['s4', 'PHYS110', 0, True],\n     ['s1', 'MATH101', 1, True]],\n    {1: 3, 2: 2},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 0], [2, 7, 2]]),\n  ('partial repair guard 3',\n   [[['s3', 'MATH101', 2, False], ['s3', 'BIO130', 1, False], ['s4', 'MATH101H', 2, False],\n     ['s5', 'BIO130', 0, False], ['s2', 'PHYS110', 1, False], ['s3', 'MATH101', 2, False]],\n    {1: 2, 2: 1}, {'MATH101': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 1, 0], [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   [[['s3', 'MATH101', 1, True], ['s4', 'BIO130', 0, True]], {0: 1, 1: 4, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 2, 1]]),\n  ('normal control 7',\n   [[['s5', 'BIO130', 2, False], ['s5', 'PHYS110', 0, False], ['s4', 'PHYS110', 0, True],\n     ['s2', 'CHEM120', 0, False], ['s5', 'BIO130', 2, False]],\n    {0: 1, 2: 4}, {'MATH101': 'online', 'PHYS110': 'online', 'CHEM120': 'paper'}],\n   []),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 0, False], ['s4', 'MATH101H', 0, True], ['s3', 'BIO130', 2, True],\n     ['s5', 'CHEM120', 1, False], ['s4', 'MATH101', 1, False], ['s5', 'MATH101', 1, True],\n     ['s4', 'CHEM120', 0, False], ['s4', 'MATH101H', 1, False], ['s4', 'MATH101H', 1, False]],\n    {0: 1, 1: 3, 2: 3}, {'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 3, 1]])],\n [('regression: missing capacity 1',\n   [[['s4', 'MATH101H', 1, False], ['s4', 'MATH101', 1, False], ['s5', 'CHEM120', 2, False],\n     ['s5', 'CHEM120', 2, True], ['s4', 'BIO130', 2, True], ['s1', 'PHYS110', 1, False],\n     ['s4', 'MATH101', 1, False], ['s2', 'PHYS110', 2, True], ['s5', 'CHEM120', 1, False],\n     ['s5', 'MATH101H', 2, False]],\n    {0: 2, 1: 1},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[1, 3, 1], [2, 6, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'MATH101', 0, False], ['s3', 'MATH101H', 2, False], ['s2', 'MATH101H', 2, False],\n     ['s5', 'BIO130', 2, False], ['s2', 'PHYS110', 0, False], ['s4', 'MATH101', 1, False],\n     ['s4', 'PHYS110', 0, False], ['s5', 'MATH101', 0, False], ['s4', 'CHEM120', 1, False],\n     ['s3', 'MATH101H', 2, False]],\n    {0: 1, 1: 4},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 2, 1], [2, 3, 0]]),\n  ('partial repair guard 3',\n   [[['s1', 'MATH101', 0, False], ['s4', 'BIO130', 1, False], ['s1', 'MATH101', 0, False]],\n    {0: 1, 1: 4, 2: 2}, {'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online'}],\n   []),\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', '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  ('normal control 7',\n   [[['s3', 'MATH101H', 2, False], ['s4', 'PHYS110', 1, False], ['s2', 'MATH101', 0, False],\n     ['s3', 'CHEM120', 2, False], ['s3', 'PHYS110', 2, False], ['s1', 'CHEM120', 1, False],\n     ['s1', 'PHYS110', 2, False], ['s4', 'MATH101', 1, False], ['s2', 'MATH101', 1, False]],\n    {0: 2, 1: 3, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[2, 2, 1]]),\n  ('normal control 8',\n   [[['s2', 'BIO130', 2, False], ['s1', 'MATH101H', 2, False], ['s4', 'PHYS110', 1, False],\n     ['s2', 'MATH101H', 1, False], ['s3', 'PHYS110', 0, True]],\n    {1: 3, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 2, 0]])],\n [('regression: missing capacity 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: missing capacity 2',\n   [[['s4', 'MATH101', 2, False], ['s1', 'CHEM120', 1, False], ['s5', 'MATH101H', 2, False],\n     ['s2', 'MATH101H', 2, True], ['s5', 'BIO130', 1, True], ['s5', 'BIO130', 2, False],\n     ['s5', 'PHYS110', 0, True]],\n    {1: 2, 2: 4}, {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 0]]),\n  ('partial repair guard 3',\n   [[['s2', 'PHYS110', 2, True], ['s2', 'MATH101H', 1, False], ['s2', 'CHEM120', 1, False],\n     ['s5', 'CHEM120', 0, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101', 2, False],\n     ['s2', 'MATH101H', 2, False], ['s5', 'MATH101', 0, False], ['s4', 'MATH101', 1, False]],\n    {0: 1, 1: 4, 2: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'online', 'BIO130': 'online'}],\n   []),\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   [[['s3', 'PHYS110', 0, False], ['s2', 'CHEM120', 1, False], ['s5', 'CHEM120', 0, True],\n     ['s2', 'BIO130', 1, True], ['s5', 'MATH101', 0, False], ['s1', 'PHYS110', 0, True],\n     ['s4', 'BIO130', 0, False], ['s1', 'MATH101', 2, False], ['s2', 'MATH101', 0, True],\n     ['s5', 'CHEM120', 0, True]],\n    {0: 3, 1: 1, 2: 4}, {'MATH101': 'paper', 'MATH101H': 'paper', 'BIO130': 'paper'}],\n   [[0, 9, 3], [1, 3, 1]]),\n  ('normal control 7',\n   [[['s1', 'BIO130', 1, True], ['s3', 'CHEM120', 2, True]], {0: 4, 1: 2, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online'}],\n   []),\n  ('normal control 8',\n   [[['s1', 'CHEM120', 1, False], ['s4', 'PHYS110', 0, False], ['s4', 'PHYS110', 0, False]],\n    {0: 4, 1: 2, 2: 4}, {'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'online'}],\n   [])],\n [('regression: missing capacity 1',\n   [[['s1', 'MATH101', 0, False], ['s1', 'MATH101', 0, True], ['s1', 'MATH101', 0, False],\n     ['s3', 'MATH101', 0, False], ['s3', 'BIO130', 1, False], ['s2', 'PHYS110', 1, False],\n     ['s2', 'CHEM120', 2, False], ['s5', 'MATH101H', 0, True], ['s3', 'PHYS110', 1, False]],\n    {1: 3},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 4, 0], [2, 1, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'MATH101', 0, False], ['s2', 'MATH101H', 1, True], ['s2', 'BIO130', 2, False],\n     ['s2', 'BIO130', 0, False], ['s3', 'MATH101H', 1, False], ['s2', 'MATH101H', 0, True],\n     ['s4', 'MATH101H', 2, True], ['s1', 'MATH101H', 1, False], ['s1', 'MATH101', 0, False]],\n    {1: 4, 2: 4}, {'MATH101': 'paper', 'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 1, 0]]),\n  ('partial repair guard 3',\n   [[['s3', 'MATH101H', 2, False], ['s1', 'CHEM120', 2, True], ['s4', 'BIO130', 1, False],\n     ['s4', 'MATH101', 1, False], ['s3', 'MATH101H', 1, False], ['s1', 'MATH101', 0, True],\n     ['s1', 'MATH101H', 0, True], ['s3', 'MATH101H', 1, False], ['s4', 'BIO130', 1, False]],\n    {0: 4, 1: 4, 2: 2}, {'MATH101': 'paper', 'MATH101H': 'paper', 'BIO130': 'paper'}],\n   [[2, 3, 2]]),\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   [[['s3', 'CHEM120', 2, False], ['s2', 'PHYS110', 0, False], ['s3', 'PHYS110', 2, False],\n     ['s2', 'BIO130', 1, False], ['s1', 'MATH101H', 2, False], ['s4', 'CHEM120', 2, False],\n     ['s4', 'CHEM120', 1, True], ['s5', 'MATH101H', 0, False], ['s1', 'MATH101H', 0, False],\n     ['s2', 'PHYS110', 0, False]],\n    {0: 2, 1: 1}, {'MATH101': 'paper', 'MATH101H': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[2, 4, 0]]),\n  ('normal control 7',\n   [[['s4', 'CHEM120', 2, False], ['s5', 'PHYS110', 1, False], ['s1', 'MATH101', 1, True],\n     ['s3', 'MATH101H', 2, True], ['s5', 'MATH101H', 1, False], ['s4', 'CHEM120', 2, False],\n     ['s3', 'MATH101H', 1, False]],\n    {0: 2, 1: 2}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],\n   [[2, 3, 0]]),\n  ('normal control 8',\n   [[['s1', 'BIO130', 0, False], ['s5', 'MATH101H', 0, True], ['s5', 'PHYS110', 0, False],\n     ['s3', 'MATH101', 0, True], ['s4', 'MATH101H', 2, False], ['s4', 'BIO130', 1, True]],\n    {0: 3, 1: 3, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'online'}],\n   [[0, 4, 3]])]]\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":"787c743dfa01bf0b0040f1b9bb73664e50607081a957dd1b2af8289fd42af18e","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, used[p])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: missing capacity 1', [[['s1', 'A', 1, False]], {0: 5}, {'A': 'paper'}], [[1, 1, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'BIO130', 2, False], ['s1', 'MATH101', 0, False], ['s5', 'MATH101H', 2, True],\n     ['s5', 'BIO130', 2, False], ['s2', 'MATH101H', 1, True], ['s5', 'MATH101H', 0, False],\n     ['s1', 'BIO130', 1, True]],\n    {0: 3, 1: 3}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online'}],\n   [[2, 4, 0]]),\n  ('partial repair guard 3',\n   [[['s2', 'CHEM120', 1, False], ['s4', 'PHYS110', 2, False], ['s5', 'MATH101', 0, False]],\n    {0: 4, 1: 1, 2: 4},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   []),\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   [[['s5', 'MATH101', 0, False], ['s5', 'MATH101', 2, False], ['s5', 'MATH101', 2, False]],\n    {0: 2, 1: 4, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('normal control 7',\n   [[['s1', 'BIO130', 2, True], ['s5', 'PHYS110', 1, False], ['s4', 'MATH101H', 1, True],\n     ['s2', 'MATH101H', 1, False], ['s5', 'BIO130', 0, False], ['s1', 'BIO130', 2, True]],\n    {0: 3, 1: 2, 2: 4}, {'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[1, 4, 2]]),\n  ('normal control 8',\n   [[['s1', 'PHYS110', 1, False], ['s4', 'PHYS110', 1, False], ['s1', 'PHYS110', 2, True],\n     ['s4', 'MATH101', 0, False], ['s4', 'MATH101H', 1, False], ['s1', 'CHEM120', 0, False],\n     ['s5', 'BIO130', 2, True], ['s2', 'PHYS110', 1, False], ['s4', 'MATH101H', 1, False]],\n    {1: 2, 2: 1}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],\n   [[0, 1, 0], [1, 4, 2], [2, 2, 1]])],\n [('regression: missing capacity 1',\n   [[['s3', 'BIO130', 0, False], ['s3', 'PHYS110', 2, True], ['s1', 'MATH101H', 1, False],\n     ['s1', 'MATH101H', 1, True], ['s1', 'PHYS110', 1, False], ['s3', 'BIO130', 0, False]],\n    {1: 3, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[0, 1, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'MATH101', 2, False], ['s1', 'PHYS110', 2, True], ['s2', 'BIO130', 0, False],\n     ['s5', 'MATH101', 2, False], ['s4', 'MATH101', 2, False], ['s2', 'CHEM120', 2, True],\n     ['s1', 'CHEM120', 1, False], ['s1', 'MATH101', 1, True], ['s4', 'PHYS110', 0, True],\n     ['s1', 'MATH101', 1, True]],\n    {1: 3, 2: 2},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 0], [2, 7, 2]]),\n  ('partial repair guard 3',\n   [[['s3', 'MATH101', 2, False], ['s3', 'BIO130', 1, False], ['s4', 'MATH101H', 2, False],\n     ['s5', 'BIO130', 0, False], ['s2', 'PHYS110', 1, False], ['s3', 'MATH101', 2, False]],\n    {1: 2, 2: 1}, {'MATH101': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 1, 0], [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   [[['s3', 'MATH101', 1, True], ['s4', 'BIO130', 0, True]], {0: 1, 1: 4, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 2, 1]]),\n  ('normal control 7',\n   [[['s5', 'BIO130', 2, False], ['s5', 'PHYS110', 0, False], ['s4', 'PHYS110', 0, True],\n     ['s2', 'CHEM120', 0, False], ['s5', 'BIO130', 2, False]],\n    {0: 1, 2: 4}, {'MATH101': 'online', 'PHYS110': 'online', 'CHEM120': 'paper'}],\n   []),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 0, False], ['s4', 'MATH101H', 0, True], ['s3', 'BIO130', 2, True],\n     ['s5', 'CHEM120', 1, False], ['s4', 'MATH101', 1, False], ['s5', 'MATH101', 1, True],\n     ['s4', 'CHEM120', 0, False], ['s4', 'MATH101H', 1, False], ['s4', 'MATH101H', 1, False]],\n    {0: 1, 1: 3, 2: 3}, {'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 3, 1]])],\n [('regression: missing capacity 1',\n   [[['s4', 'MATH101H', 1, False], ['s4', 'MATH101', 1, False], ['s5', 'CHEM120', 2, False],\n     ['s5', 'CHEM120', 2, True], ['s4', 'BIO130', 2, True], ['s1', 'PHYS110', 1, False],\n     ['s4', 'MATH101', 1, False], ['s2', 'PHYS110', 2, True], ['s5', 'CHEM120', 1, False],\n     ['s5', 'MATH101H', 2, False]],\n    {0: 2, 1: 1},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[1, 3, 1], [2, 6, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'MATH101', 0, False], ['s3', 'MATH101H', 2, False], ['s2', 'MATH101H', 2, False],\n     ['s5', 'BIO130', 2, False], ['s2', 'PHYS110', 0, False], ['s4', 'MATH101', 1, False],\n     ['s4', 'PHYS110', 0, False], ['s5', 'MATH101', 0, False], ['s4', 'CHEM120', 1, False],\n     ['s3', 'MATH101H', 2, False]],\n    {0: 1, 1: 4},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 2, 1], [2, 3, 0]]),\n  ('partial repair guard 3',\n   [[['s1', 'MATH101', 0, False], ['s4', 'BIO130', 1, False], ['s1', 'MATH101', 0, False]],\n    {0: 1, 1: 4, 2: 2}, {'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online'}],\n   []),\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', '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  ('normal control 7',\n   [[['s3', 'MATH101H', 2, False], ['s4', 'PHYS110', 1, False], ['s2', 'MATH101', 0, False],\n     ['s3', 'CHEM120', 2, False], ['s3', 'PHYS110', 2, False], ['s1', 'CHEM120', 1, False],\n     ['s1', 'PHYS110', 2, False], ['s4', 'MATH101', 1, False], ['s2', 'MATH101', 1, False]],\n    {0: 2, 1: 3, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[2, 2, 1]]),\n  ('normal control 8',\n   [[['s2', 'BIO130', 2, False], ['s1', 'MATH101H', 2, False], ['s4', 'PHYS110', 1, False],\n     ['s2', 'MATH101H', 1, False], ['s3', 'PHYS110', 0, True]],\n    {1: 3, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 2, 0]])],\n [('regression: missing capacity 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: missing capacity 2',\n   [[['s4', 'MATH101', 2, False], ['s1', 'CHEM120', 1, False], ['s5', 'MATH101H', 2, False],\n     ['s2', 'MATH101H', 2, True], ['s5', 'BIO130', 1, True], ['s5', 'BIO130', 2, False],\n     ['s5', 'PHYS110', 0, True]],\n    {1: 2, 2: 4}, {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 0]]),\n  ('partial repair guard 3',\n   [[['s2', 'PHYS110', 2, True], ['s2', 'MATH101H', 1, False], ['s2', 'CHEM120', 1, False],\n     ['s5', 'CHEM120', 0, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101', 2, False],\n     ['s2', 'MATH101H', 2, False], ['s5', 'MATH101', 0, False], ['s4', 'MATH101', 1, False]],\n    {0: 1, 1: 4, 2: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'online', 'BIO130': 'online'}],\n   []),\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   [[['s3', 'PHYS110', 0, False], ['s2', 'CHEM120', 1, False], ['s5', 'CHEM120', 0, True],\n     ['s2', 'BIO130', 1, True], ['s5', 'MATH101', 0, False], ['s1', 'PHYS110', 0, True],\n     ['s4', 'BIO130', 0, False], ['s1', 'MATH101', 2, False], ['s2', 'MATH101', 0, True],\n     ['s5', 'CHEM120', 0, True]],\n    {0: 3, 1: 1, 2: 4}, {'MATH101': 'paper', 'MATH101H': 'paper', 'BIO130': 'paper'}],\n   [[0, 9, 3], [1, 3, 1]]),\n  ('normal control 7',\n   [[['s1', 'BIO130', 1, True], ['s3', 'CHEM120', 2, True]], {0: 4, 1: 2, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online'}],\n   []),\n  ('normal control 8',\n   [[['s1', 'CHEM120', 1, False], ['s4', 'PHYS110', 0, False], ['s4', 'PHYS110', 0, False]],\n    {0: 4, 1: 2, 2: 4}, {'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'online'}],\n   [])],\n [('regression: missing capacity 1',\n   [[['s1', 'MATH101', 0, False], ['s1', 'MATH101', 0, True], ['s1', 'MATH101', 0, False],\n     ['s3', 'MATH101', 0, False], ['s3', 'BIO130', 1, False], ['s2', 'PHYS110', 1, False],\n     ['s2', 'CHEM120', 2, False], ['s5', 'MATH101H', 0, True], ['s3', 'PHYS110', 1, False]],\n    {1: 3},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 4, 0], [2, 1, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'MATH101', 0, False], ['s2', 'MATH101H', 1, True], ['s2', 'BIO130', 2, False],\n     ['s2', 'BIO130', 0, False], ['s3', 'MATH101H', 1, False], ['s2', 'MATH101H', 0, True],\n     ['s4', 'MATH101H', 2, True], ['s1', 'MATH101H', 1, False], ['s1', 'MATH101', 0, False]],\n    {1: 4, 2: 4}, {'MATH101': 'paper', 'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 1, 0]]),\n  ('partial repair guard 3',\n   [[['s3', 'MATH101H', 2, False], ['s1', 'CHEM120', 2, True], ['s4', 'BIO130', 1, False],\n     ['s4', 'MATH101', 1, False], ['s3', 'MATH101H', 1, False], ['s1', 'MATH101', 0, True],\n     ['s1', 'MATH101H', 0, True], ['s3', 'MATH101H', 1, False], ['s4', 'BIO130', 1, False]],\n    {0: 4, 1: 4, 2: 2}, {'MATH101': 'paper', 'MATH101H': 'paper', 'BIO130': 'paper'}],\n   [[2, 3, 2]]),\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   [[['s3', 'CHEM120', 2, False], ['s2', 'PHYS110', 0, False], ['s3', 'PHYS110', 2, False],\n     ['s2', 'BIO130', 1, False], ['s1', 'MATH101H', 2, False], ['s4', 'CHEM120', 2, False],\n     ['s4', 'CHEM120', 1, True], ['s5', 'MATH101H', 0, False], ['s1', 'MATH101H', 0, False],\n     ['s2', 'PHYS110', 0, False]],\n    {0: 2, 1: 1}, {'MATH101': 'paper', 'MATH101H': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[2, 4, 0]]),\n  ('normal control 7',\n   [[['s4', 'CHEM120', 2, False], ['s5', 'PHYS110', 1, False], ['s1', 'MATH101', 1, True],\n     ['s3', 'MATH101H', 2, True], ['s5', 'MATH101H', 1, False], ['s4', 'CHEM120', 2, False],\n     ['s3', 'MATH101H', 1, False]],\n    {0: 2, 1: 2}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],\n   [[2, 3, 0]]),\n  ('normal control 8',\n   [[['s1', 'BIO130', 0, False], ['s5', 'MATH101H', 0, True], ['s5', 'PHYS110', 0, False],\n     ['s3', 'MATH101', 0, True], ['s4', 'MATH101H', 2, False], ['s4', 'BIO130', 1, True]],\n    {0: 3, 1: 3, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'online'}],\n   [[0, 4, 3]])]]\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":"251b63f947a565cf393b9fe8500748e7409d26314b50c63684822ffa02e10e12","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: missing capacity 1', [[['s1', 'A', 1, False]], {0: 5}, {'A': 'paper'}], [[1, 1, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'BIO130', 2, False], ['s1', 'MATH101', 0, False], ['s5', 'MATH101H', 2, True],\n     ['s5', 'BIO130', 2, False], ['s2', 'MATH101H', 1, True], ['s5', 'MATH101H', 0, False],\n     ['s1', 'BIO130', 1, True]],\n    {0: 3, 1: 3}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online'}],\n   [[2, 4, 0]]),\n  ('partial repair guard 3',\n   [[['s2', 'CHEM120', 1, False], ['s4', 'PHYS110', 2, False], ['s5', 'MATH101', 0, False]],\n    {0: 4, 1: 1, 2: 4},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   []),\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   [[['s5', 'MATH101', 0, False], ['s5', 'MATH101', 2, False], ['s5', 'MATH101', 2, False]],\n    {0: 2, 1: 4, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   []),\n  ('normal control 7',\n   [[['s1', 'BIO130', 2, True], ['s5', 'PHYS110', 1, False], ['s4', 'MATH101H', 1, True],\n     ['s2', 'MATH101H', 1, False], ['s5', 'BIO130', 0, False], ['s1', 'BIO130', 2, True]],\n    {0: 3, 1: 2, 2: 4}, {'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[1, 4, 2]]),\n  ('normal control 8',\n   [[['s1', 'PHYS110', 1, False], ['s4', 'PHYS110', 1, False], ['s1', 'PHYS110', 2, True],\n     ['s4', 'MATH101', 0, False], ['s4', 'MATH101H', 1, False], ['s1', 'CHEM120', 0, False],\n     ['s5', 'BIO130', 2, True], ['s2', 'PHYS110', 1, False], ['s4', 'MATH101H', 1, False]],\n    {1: 2, 2: 1}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],\n   [[0, 1, 0], [1, 4, 2], [2, 2, 1]])],\n [('regression: missing capacity 1',\n   [[['s3', 'BIO130', 0, False], ['s3', 'PHYS110', 2, True], ['s1', 'MATH101H', 1, False],\n     ['s1', 'MATH101H', 1, True], ['s1', 'PHYS110', 1, False], ['s3', 'BIO130', 0, False]],\n    {1: 3, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[0, 1, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'MATH101', 2, False], ['s1', 'PHYS110', 2, True], ['s2', 'BIO130', 0, False],\n     ['s5', 'MATH101', 2, False], ['s4', 'MATH101', 2, False], ['s2', 'CHEM120', 2, True],\n     ['s1', 'CHEM120', 1, False], ['s1', 'MATH101', 1, True], ['s4', 'PHYS110', 0, True],\n     ['s1', 'MATH101', 1, True]],\n    {1: 3, 2: 2},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 0], [2, 7, 2]]),\n  ('partial repair guard 3',\n   [[['s3', 'MATH101', 2, False], ['s3', 'BIO130', 1, False], ['s4', 'MATH101H', 2, False],\n     ['s5', 'BIO130', 0, False], ['s2', 'PHYS110', 1, False], ['s3', 'MATH101', 2, False]],\n    {1: 2, 2: 1}, {'MATH101': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 1, 0], [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   [[['s3', 'MATH101', 1, True], ['s4', 'BIO130', 0, True]], {0: 1, 1: 4, 2: 3},\n    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 2, 1]]),\n  ('normal control 7',\n   [[['s5', 'BIO130', 2, False], ['s5', 'PHYS110', 0, False], ['s4', 'PHYS110', 0, True],\n     ['s2', 'CHEM120', 0, False], ['s5', 'BIO130', 2, False]],\n    {0: 1, 2: 4}, {'MATH101': 'online', 'PHYS110': 'online', 'CHEM120': 'paper'}],\n   []),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 0, False], ['s4', 'MATH101H', 0, True], ['s3', 'BIO130', 2, True],\n     ['s5', 'CHEM120', 1, False], ['s4', 'MATH101', 1, False], ['s5', 'MATH101', 1, True],\n     ['s4', 'CHEM120', 0, False], ['s4', 'MATH101H', 1, False], ['s4', 'MATH101H', 1, False]],\n    {0: 1, 1: 3, 2: 3}, {'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 3, 1]])],\n [('regression: missing capacity 1',\n   [[['s4', 'MATH101H', 1, False], ['s4', 'MATH101', 1, False], ['s5', 'CHEM120', 2, False],\n     ['s5', 'CHEM120', 2, True], ['s4', 'BIO130', 2, True], ['s1', 'PHYS110', 1, False],\n     ['s4', 'MATH101', 1, False], ['s2', 'PHYS110', 2, True], ['s5', 'CHEM120', 1, False],\n     ['s5', 'MATH101H', 2, False]],\n    {0: 2, 1: 1},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],\n   [[1, 3, 1], [2, 6, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'MATH101', 0, False], ['s3', 'MATH101H', 2, False], ['s2', 'MATH101H', 2, False],\n     ['s5', 'BIO130', 2, False], ['s2', 'PHYS110', 0, False], ['s4', 'MATH101', 1, False],\n     ['s4', 'PHYS110', 0, False], ['s5', 'MATH101', 0, False], ['s4', 'CHEM120', 1, False],\n     ['s3', 'MATH101H', 2, False]],\n    {0: 1, 1: 4},\n    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 2, 1], [2, 3, 0]]),\n  ('partial repair guard 3',\n   [[['s1', 'MATH101', 0, False], ['s4', 'BIO130', 1, False], ['s1', 'MATH101', 0, False]],\n    {0: 1, 1: 4, 2: 2}, {'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'online'}],\n   []),\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', '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  ('normal control 7',\n   [[['s3', 'MATH101H', 2, False], ['s4', 'PHYS110', 1, False], ['s2', 'MATH101', 0, False],\n     ['s3', 'CHEM120', 2, False], ['s3', 'PHYS110', 2, False], ['s1', 'CHEM120', 1, False],\n     ['s1', 'PHYS110', 2, False], ['s4', 'MATH101', 1, False], ['s2', 'MATH101', 1, False]],\n    {0: 2, 1: 3, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[2, 2, 1]]),\n  ('normal control 8',\n   [[['s2', 'BIO130', 2, False], ['s1', 'MATH101H', 2, False], ['s4', 'PHYS110', 1, False],\n     ['s2', 'MATH101H', 1, False], ['s3', 'PHYS110', 0, True]],\n    {1: 3, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 2, 0]])],\n [('regression: missing capacity 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: missing capacity 2',\n   [[['s4', 'MATH101', 2, False], ['s1', 'CHEM120', 1, False], ['s5', 'MATH101H', 2, False],\n     ['s2', 'MATH101H', 2, True], ['s5', 'BIO130', 1, True], ['s5', 'BIO130', 2, False],\n     ['s5', 'PHYS110', 0, True]],\n    {1: 2, 2: 4}, {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'BIO130': 'online'}],\n   [[0, 2, 0]]),\n  ('partial repair guard 3',\n   [[['s2', 'PHYS110', 2, True], ['s2', 'MATH101H', 1, False], ['s2', 'CHEM120', 1, False],\n     ['s5', 'CHEM120', 0, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101', 2, False],\n     ['s2', 'MATH101H', 2, False], ['s5', 'MATH101', 0, False], ['s4', 'MATH101', 1, False]],\n    {0: 1, 1: 4, 2: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'online', 'BIO130': 'online'}],\n   []),\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   [[['s3', 'PHYS110', 0, False], ['s2', 'CHEM120', 1, False], ['s5', 'CHEM120', 0, True],\n     ['s2', 'BIO130', 1, True], ['s5', 'MATH101', 0, False], ['s1', 'PHYS110', 0, True],\n     ['s4', 'BIO130', 0, False], ['s1', 'MATH101', 2, False], ['s2', 'MATH101', 0, True],\n     ['s5', 'CHEM120', 0, True]],\n    {0: 3, 1: 1, 2: 4}, {'MATH101': 'paper', 'MATH101H': 'paper', 'BIO130': 'paper'}],\n   [[0, 9, 3], [1, 3, 1]]),\n  ('normal control 7',\n   [[['s1', 'BIO130', 1, True], ['s3', 'CHEM120', 2, True]], {0: 4, 1: 2, 2: 4},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online'}],\n   []),\n  ('normal control 8',\n   [[['s1', 'CHEM120', 1, False], ['s4', 'PHYS110', 0, False], ['s4', 'PHYS110', 0, False]],\n    {0: 4, 1: 2, 2: 4}, {'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'online'}],\n   [])],\n [('regression: missing capacity 1',\n   [[['s1', 'MATH101', 0, False], ['s1', 'MATH101', 0, True], ['s1', 'MATH101', 0, False],\n     ['s3', 'MATH101', 0, False], ['s3', 'BIO130', 1, False], ['s2', 'PHYS110', 1, False],\n     ['s2', 'CHEM120', 2, False], ['s5', 'MATH101H', 0, True], ['s3', 'PHYS110', 1, False]],\n    {1: 3},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[0, 4, 0], [2, 1, 0]]),\n  ('regression variant: missing capacity 2',\n   [[['s1', 'MATH101', 0, False], ['s2', 'MATH101H', 1, True], ['s2', 'BIO130', 2, False],\n     ['s2', 'BIO130', 0, False], ['s3', 'MATH101H', 1, False], ['s2', 'MATH101H', 0, True],\n     ['s4', 'MATH101H', 2, True], ['s1', 'MATH101H', 1, False], ['s1', 'MATH101', 0, False]],\n    {1: 4, 2: 4}, {'MATH101': 'paper', 'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],\n   [[0, 1, 0]]),\n  ('partial repair guard 3',\n   [[['s3', 'MATH101H', 2, False], ['s1', 'CHEM120', 2, True], ['s4', 'BIO130', 1, False],\n     ['s4', 'MATH101', 1, False], ['s3', 'MATH101H', 1, False], ['s1', 'MATH101', 0, True],\n     ['s1', 'MATH101H', 0, True], ['s3', 'MATH101H', 1, False], ['s4', 'BIO130', 1, False]],\n    {0: 4, 1: 4, 2: 2}, {'MATH101': 'paper', 'MATH101H': 'paper', 'BIO130': 'paper'}],\n   [[2, 3, 2]]),\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   [[['s3', 'CHEM120', 2, False], ['s2', 'PHYS110', 0, False], ['s3', 'PHYS110', 2, False],\n     ['s2', 'BIO130', 1, False], ['s1', 'MATH101H', 2, False], ['s4', 'CHEM120', 2, False],\n     ['s4', 'CHEM120', 1, True], ['s5', 'MATH101H', 0, False], ['s1', 'MATH101H', 0, False],\n     ['s2', 'PHYS110', 0, False]],\n    {0: 2, 1: 1}, {'MATH101': 'paper', 'MATH101H': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],\n   [[2, 4, 0]]),\n  ('normal control 7',\n   [[['s4', 'CHEM120', 2, False], ['s5', 'PHYS110', 1, False], ['s1', 'MATH101', 1, True],\n     ['s3', 'MATH101H', 2, True], ['s5', 'MATH101H', 1, False], ['s4', 'CHEM120', 2, False],\n     ['s3', 'MATH101H', 1, False]],\n    {0: 2, 1: 2}, {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],\n   [[2, 3, 0]]),\n  ('normal control 8',\n   [[['s1', 'BIO130', 0, False], ['s5', 'MATH101H', 0, True], ['s5', 'PHYS110', 0, False],\n     ['s3', 'MATH101', 0, True], ['s4', 'MATH101H', 2, False], ['s4', 'BIO130', 1, True]],\n    {0: 3, 1: 3, 2: 1},\n    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'online'}],\n   [[0, 4, 3]])]]\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-missing-capacity","generated_at":"2026-09-29T14:52:06.949207+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":"Missing capacity means zero seats.","root_cause":"A missing capacity defaults to the seats used.","sha256":"2f9be99c452522b1ccc8090a718dceb2b38f006aa818f7f0b46a6902800b9331","title":"Period without configured capacity treated as unlimited · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.839,"exit_code":1,"observations":[{"actual":[[1,1,0]],"check":"regression: missing capacity 1","expected":[[1,1,0]],"passed":true},{"actual":[[2,4,0]],"check":"regression variant: missing capacity 2","expected":[[2,4,0]],"passed":true},{"actual":[[1,1,1]],"check":"partial repair guard 3","expected":[],"passed":false},{"actual":[[0,2,1]],"check":"boundary control 4","expected":[[0,2,1]],"passed":true},{"actual":[[0,1,1]],"check":"boundary control 5","expected":[],"passed":false},{"actual":[],"check":"normal control 6","expected":[],"passed":true},{"actual":[[1,4,2]],"check":"normal control 7","expected":[[1,4,2]],"passed":true},{"actual":[[0,1,0],[1,4,2],[2,2,1]],"check":"normal control 8","expected":[[0,1,0],[1,4,2],[2,2,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: missing capacity 1\", \"actual\": [[1, 1, 0]], \"expected\": [[1, 1, 0]], \"passed\": true}, {\"check\": \"regression variant: missing capacity 2\", \"actual\": [[2, 4, 0]], \"expected\": [[2, 4, 0]], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [[1, 1, 1]], \"expected\": [], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [[0, 2, 1]], \"expected\": [[0, 2, 1]], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [[0, 1, 1]], \"expected\": [], \"passed\": false}, {\"check\": \"normal control 6\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[1, 4, 2]], \"expected\": [[1, 4, 2]], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[0, 1, 0], [1, 4, 2], [2, 2, 1]], \"expected\": [[0, 1, 0], [1, 4, 2], [2, 2, 1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.215,"exit_code":1,"observations":[{"actual":[],"check":"regression: missing capacity 1","expected":[[1,1,0]],"passed":false},{"actual":[],"check":"regression variant: missing capacity 2","expected":[[2,4,0]],"passed":false},{"actual":[],"check":"partial repair guard 3","expected":[],"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":[],"check":"normal control 6","expected":[],"passed":true},{"actual":[[1,4,2]],"check":"normal control 7","expected":[[1,4,2]],"passed":true},{"actual":[[1,4,2],[2,2,1]],"check":"normal control 8","expected":[[0,1,0],[1,4,2],[2,2,1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: missing capacity 1\", \"actual\": [], \"expected\": [[1, 1, 0]], \"passed\": false}, {\"check\": \"regression variant: missing capacity 2\", \"actual\": [], \"expected\": [[2, 4, 0]], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [], \"expected\": [], \"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\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[1, 4, 2]], \"expected\": [[1, 4, 2]], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[1, 4, 2], [2, 2, 1]], \"expected\": [[0, 1, 0], [1, 4, 2], [2, 2, 1]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.147,"exit_code":0,"observations":[{"actual":[[1,1,0]],"check":"regression: missing capacity 1","expected":[[1,1,0]],"passed":true},{"actual":[[2,4,0]],"check":"regression variant: missing capacity 2","expected":[[2,4,0]],"passed":true},{"actual":[],"check":"partial repair guard 3","expected":[],"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":[],"check":"normal control 6","expected":[],"passed":true},{"actual":[[1,4,2]],"check":"normal control 7","expected":[[1,4,2]],"passed":true},{"actual":[[0,1,0],[1,4,2],[2,2,1]],"check":"normal control 8","expected":[[0,1,0],[1,4,2],[2,2,1]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: missing capacity 1\", \"actual\": [[1, 1, 0]], \"expected\": [[1, 1, 0]], \"passed\": true}, {\"check\": \"regression variant: missing capacity 2\", \"actual\": [[2, 4, 0]], \"expected\": [[2, 4, 0]], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [], \"expected\": [], \"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\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[1, 4, 2]], \"expected\": [[1, 4, 2]], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [[0, 1, 0], [1, 4, 2], [2, 2, 1]], \"expected\": [[0, 1, 0], [1, 4, 2], [2, 2, 1]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}