{"abstract":"Travelling south-to-north needs no time because only north|south is stored.","category":"Exam timetabling constraints","checks":8,"contract":"sits [student, exam, start, end], campus exam -> campus, travel \"X|Y\" -> minutes stored in either order. For each student's consecutive sittings by start, the needed gap is the travel time between different campuses (0 for the same campus); if the gap from previous end to next start is smaller, report [student, previous exam, next exam, shortfall].","evaluation_group":"w2-exam-timetabling-constraints-inter-campus-travel-gap","failed_approach":"Looking up only the reverse direction fails the other way.","family":"w2-exam-timetabling-constraints-inter-campus-travel-gap-symmetric-travel-lookup","id":"FA-94606","implementations":{"attempt":{"sha256":"8eaad1f422711619172fab0bcca8eb3c41484ca269d2d060fcccd99278c11e26","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sits, campus, travel):\n    by = {}\n    for st, ex, s, e in sits:\n        by.setdefault(st, []).append((s, e, ex))\n    out = []\n    for st in sorted(by):\n        seq = sorted(by[st])\n        for (s1, e1, x1), (s2, e2, x2) in zip(seq, seq[1:]):\n            gap = s2 - e1\n            c1, c2 = campus[x1], campus[x2]\n            need = 0\n            if c1 != c2:\n                need = travel.get(c2 + '|' + c1, 0)\n            if gap < need:\n                out.append([st, x1, x2, need - gap])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: symmetric travel lookup 1',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s4', 'CHEM120', 869, 989], ['s4', 'HIST140', 600, 660], ['s4', 'BIO130', 750, 840],\n     ['s4', 'PHYS110', 1019, 1139]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'BIO130', 'CHEM120', 31], ['s4', 'CHEM120', 'PHYS110', 30]]),\n  ('partial repair guard 3',\n   [[['s1', 'ECON150', 600, 720], ['s4', 'PHYS110', 600, 720], ['s4', 'BIO130', 765, 825],\n     ['s4', 'CHEM120', 854, 974], ['s1', 'MATH101', 540, 630], ['s4', 'MATH101H', 989, 1109]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 90], ['s4', 'BIO130', 'CHEM120', 16], ['s4', 'CHEM120', 'MATH101H', 45]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 6',\n   [[['s3', 'CHEM120', 900, 990], ['s4', 'MATH101', 630, 720], ['s4', 'BIO130', 540, 660],\n     ['s3', 'PHYS110', 780, 840], ['s3', 'BIO130', 645, 735], ['s3', 'ECON150', 540, 630]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s3', 'ECON150', 'BIO130', 45], ['s3', 'BIO130', 'PHYS110', 15], ['s4', 'BIO130', 'MATH101', 75]]),\n  ('normal control 7',\n   [[['s3', 'BIO130', 600, 720], ['s1', 'MATH101H', 540, 600], ['s1', 'MATH101', 720, 780],\n     ['s1', 'BIO130', 570, 690], ['s3', 'CHEM120', 780, 870]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101H', 'BIO130', 75]]),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 631, 721], ['s2', 'BIO130', 540, 600], ['s2', 'CHEM120', 781, 901],\n     ['s2', 'MATH101H', 901, 991]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [])],\n [('regression: symmetric travel lookup 1',\n   [[['s3', 'ECON150', 839, 929], ['s1', 'MATH101H', 540, 660], ['s3', 'CHEM120', 960, 1050],\n     ['s1', 'ECON150', 765, 885], ['s4', 'BIO130', 600, 660], ['s1', 'HIST140', 630, 750],\n     ['s3', 'MATH101', 750, 810], ['s4', 'ECON150', 660, 720], ['s3', 'BIO130', 600, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101H', 'HIST140', 60], ['s1', 'HIST140', 'ECON150', 15]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s4', 'MATH101', 600, 660], ['s4', 'HIST140', 705, 795], ['s1', 'CHEM120', 660, 720],\n     ['s3', 'BIO130', 600, 720], ['s3', 'PHYS110', 750, 810], ['s4', 'ECON150', 765, 885],\n     ['s3', 'ECON150', 780, 900], ['s1', 'BIO130', 600, 660], ['s1', 'ECON150', 735, 795]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'CHEM120', 'ECON150', 15], ['s3', 'PHYS110', 'ECON150', 75], ['s4', 'HIST140', 'ECON150', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'BIO130', 540, 660], ['s1', 'MATH101H', 719, 839], ['s1', 'HIST140', 689, 749],\n     ['s4', 'ECON150', 870, 930], ['s4', 'HIST140', 600, 690], ['s4', 'CHEM120', 735, 855],\n     ['s2', 'MATH101H', 660, 750], ['s2', 'MATH101', 720, 810], ['s4', 'BIO130', 930, 1020],\n     ['s1', 'MATH101', 540, 660]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'HIST140', 'MATH101H', 60], ['s2', 'BIO130', 'MATH101H', 30], ['s2', 'MATH101H', 'MATH101', 75],\n    ['s4', 'ECON150', 'BIO130', 30]]),\n  ('boundary control 4', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('boundary control 5',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('normal control 6',\n   [[['s2', 'ECON150', 540, 660], ['s5', 'MATH101', 600, 660], ['s3', 'PHYS110', 600, 690],\n     ['s2', 'BIO130', 720, 810], ['s3', 'CHEM120', 719, 809], ['s5', 'HIST140', 824, 944],\n     ['s5', 'MATH101H', 689, 779]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'MATH101H', 'HIST140', 15]]),\n  ('normal control 7',\n   [[['s5', 'HIST140', 780, 900], ['s4', 'BIO130', 690, 780], ['s5', 'MATH101H', 540, 600],\n     ['s3', 'CHEM120', 645, 705], ['s5', 'PHYS110', 900, 1020], ['s3', 'HIST140', 540, 600],\n     ['s4', 'ECON150', 600, 720], ['s5', 'CHEM120', 690, 810]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'ECON150', 'BIO130', 30], ['s5', 'CHEM120', 'HIST140', 30], ['s5', 'HIST140', 'PHYS110', 45]]),\n  ('normal control 8',\n   [[['s4', 'MATH101H', 540, 600], ['s5', 'HIST140', 750, 840], ['s5', 'ECON150', 600, 720],\n     ['s5', 'MATH101H', 990, 1110], ['s4', 'HIST140', 570, 690], ['s5', 'PHYS110', 870, 990],\n     ['s3', 'PHYS110', 540, 630], ['s3', 'BIO130', 660, 780], ['s3', 'ECON150', 840, 900]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s4', 'MATH101H', 'HIST140', 30]])],\n [('regression: symmetric travel lookup 1',\n   [[['s2', 'MATH101', 915, 1035], ['s2', 'PHYS110', 735, 855], ['s2', 'ECON150', 600, 720],\n     ['s1', 'ECON150', 870, 930], ['s2', 'CHEM120', 1005, 1095], ['s1', 'MATH101', 780, 900],\n     ['s1', 'HIST140', 600, 720]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 75], ['s2', 'MATH101', 'CHEM120', 90]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s3', 'ECON150', 689, 749], ['s3', 'MATH101H', 600, 660], ['s3', 'MATH101', 749, 839]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s3', 'MATH101H', 'ECON150', 31], ['s3', 'ECON150', 'MATH101', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'HIST140', 630, 690], ['s2', 'CHEM120', 600, 660], ['s2', 'BIO130', 719, 809]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'CHEM120', 'HIST140', 30], ['s2', 'HIST140', 'BIO130', 1]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('boundary control 5', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('normal control 6',\n   [[['s5', 'BIO130', 930, 1050], ['s5', 'PHYS110', 810, 900], ['s5', 'CHEM120', 600, 720]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'PHYS110', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s2', 'CHEM120', 780, 900], ['s5', 'ECON150', 600, 660], ['s2', 'PHYS110', 540, 660],\n     ['s1', 'CHEM120', 1019, 1079], ['s2', 'MATH101H', 930, 1050], ['s1', 'MATH101H', 780, 900],\n     ['s5', 'BIO130', 689, 779], ['s2', 'BIO130', 660, 720], ['s1', 'ECON150', 930, 990],\n     ['s1', 'HIST140', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'ECON150', 'CHEM120', 16], ['s2', 'PHYS110', 'BIO130', 45], ['s5', 'ECON150', 'BIO130', 16]]),\n  ('normal control 8',\n   [[['s5', 'ECON150', 600, 720], ['s3', 'ECON150', 735, 855], ['s5', 'CHEM120', 690, 750],\n     ['s2', 'CHEM120', 600, 720], ['s5', 'BIO130', 750, 810], ['s5', 'PHYS110', 825, 885],\n     ['s2', 'BIO130', 690, 750], ['s3', 'CHEM120', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'CHEM120', 'BIO130', 30], ['s5', 'ECON150', 'CHEM120', 30]])],\n [('regression: symmetric travel lookup 1',\n   [[['s4', 'MATH101', 630, 720], ['s2', 'PHYS110', 615, 675], ['s2', 'MATH101H', 645, 765],\n     ['s4', 'MATH101H', 540, 600], ['s4', 'BIO130', 751, 841], ['s2', 'CHEM120', 825, 945],\n     ['s2', 'MATH101', 540, 600]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'MATH101', 'PHYS110', 15], ['s2', 'PHYS110', 'MATH101H', 30]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s3', 'CHEM120', 781, 901], ['s1', 'BIO130', 689, 809], ['s5', 'HIST140', 600, 660],\n     ['s3', 'ECON150', 661, 721], ['s1', 'PHYS110', 600, 660], ['s3', 'HIST140', 540, 630],\n     ['s5', 'MATH101', 900, 1020], ['s3', 'BIO130', 691, 751], ['s5', 'MATH101H', 720, 840]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s3', 'ECON150', 'BIO130', 75], ['s3', 'BIO130', 'CHEM120', 15]]),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 931, 1051], ['s5', 'PHYS110', 630, 720], ['s1', 'CHEM120', 841, 961],\n     ['s5', 'BIO130', 540, 600], ['s2', 'MATH101', 840, 900], ['s1', 'MATH101', 600, 660],\n     ['s1', 'MATH101H', 691, 811], ['s5', 'HIST140', 690, 780], ['s2', 'HIST140', 720, 780],\n     ['s5', 'CHEM120', 811, 931], ['s2', 'ECON150', 600, 690]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'MATH101H', 'CHEM120', 30], ['s1', 'CHEM120', 'PHYS110', 90], ['s5', 'PHYS110', 'HIST140', 30]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('normal control 6',\n   [[['s4', 'ECON150', 540, 660], ['s1', 'PHYS110', 765, 855], ['s4', 'MATH101', 765, 825],\n     ['s1', 'MATH101', 600, 660], ['s4', 'HIST140', 630, 720], ['s1', 'CHEM120', 705, 765]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'ECON150', 'HIST140', 60]]),\n  ('normal control 7',\n   [[['s1', 'MATH101H', 600, 690], ['s1', 'HIST140', 705, 765]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   []),\n  ('normal control 8',\n   [[['s5', 'MATH101H', 600, 720], ['s1', 'BIO130', 540, 600], ['s5', 'ECON150', 540, 630],\n     ['s1', 'MATH101H', 690, 810], ['s3', 'MATH101', 765, 885], ['s3', 'MATH101H', 975, 1095],\n     ['s3', 'HIST140', 1185, 1275], ['s5', 'BIO130', 900, 990], ['s3', 'CHEM120', 600, 720],\n     ['s1', 'HIST140', 810, 900], ['s5', 'CHEM120', 735, 855], ['s1', 'MATH101', 990, 1110]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101H', 'HIST140', 45], ['s5', 'ECON150', 'MATH101H', 30],\n    ['s5', 'MATH101H', 'CHEM120', 45]])],\n [('regression: symmetric travel lookup 1',\n   [[['s5', 'MATH101', 750, 870], ['s2', 'ECON150', 690, 780], ['s5', 'CHEM120', 540, 660],\n     ['s5', 'ECON150', 630, 750], ['s2', 'MATH101', 540, 660], ['s5', 'PHYS110', 960, 1020]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'MATH101', 'ECON150', 30], ['s5', 'CHEM120', 'ECON150', 90], ['s5', 'ECON150', 'MATH101', 60]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s1', 'PHYS110', 944, 1034], ['s5', 'HIST140', 540, 600], ['s5', 'CHEM120', 796, 916],\n     ['s1', 'MATH101H', 824, 944], ['s5', 'PHYS110', 631, 691], ['s5', 'MATH101', 736, 826],\n     ['s3', 'HIST140', 540, 660], ['s1', 'MATH101', 600, 660], ['s1', 'ECON150', 689, 809],\n     ['s3', 'MATH101', 856, 946], ['s3', 'BIO130', 691, 811], ['s3', 'ECON150', 991, 1051]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101', 'ECON150', 1], ['s1', 'ECON150', 'MATH101H', 15], ['s5', 'MATH101', 'CHEM120', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'MATH101H', 840, 930], ['s5', 'CHEM120', 600, 660], ['s2', 'CHEM120', 690, 810],\n     ['s2', 'ECON150', 540, 630], ['s2', 'BIO130', 630, 690], ['s5', 'BIO130', 691, 781]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'ECON150', 'BIO130', 60]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 6',\n   [[['s4', 'MATH101H', 540, 600], ['s2', 'PHYS110', 690, 750], ['s1', 'HIST140', 870, 990],\n     ['s1', 'MATH101', 540, 630], ['s1', 'ECON150', 660, 750], ['s2', 'BIO130', 600, 690],\n     ['s1', 'MATH101H', 750, 810], ['s2', 'CHEM120', 779, 869], ['s2', 'MATH101H', 540, 630],\n     ['s4', 'CHEM120', 825, 945], ['s4', 'HIST140', 645, 735]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'MATH101H', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s5', 'HIST140', 540, 630], ['s4', 'ECON150', 750, 870], ['s4', 'BIO130', 540, 660],\n     ['s5', 'PHYS110', 690, 810]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\n  ('normal control 8',\n   [[['s4', 'HIST140', 540, 660], ['s4', 'ECON150', 660, 750]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [])]]\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":"881571ec4bf5cfba82977a9ee453f901d38b7971c69e521c1cd710e447f38c08","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sits, campus, travel):\n    by = {}\n    for st, ex, s, e in sits:\n        by.setdefault(st, []).append((s, e, ex))\n    out = []\n    for st in sorted(by):\n        seq = sorted(by[st])\n        for (s1, e1, x1), (s2, e2, x2) in zip(seq, seq[1:]):\n            gap = s2 - e1\n            c1, c2 = campus[x1], campus[x2]\n            need = 0\n            if c1 != c2:\n                need = travel.get(c1 + '|' + c2, 0)\n            if gap < need:\n                out.append([st, x1, x2, need - gap])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: symmetric travel lookup 1',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s4', 'CHEM120', 869, 989], ['s4', 'HIST140', 600, 660], ['s4', 'BIO130', 750, 840],\n     ['s4', 'PHYS110', 1019, 1139]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'BIO130', 'CHEM120', 31], ['s4', 'CHEM120', 'PHYS110', 30]]),\n  ('partial repair guard 3',\n   [[['s1', 'ECON150', 600, 720], ['s4', 'PHYS110', 600, 720], ['s4', 'BIO130', 765, 825],\n     ['s4', 'CHEM120', 854, 974], ['s1', 'MATH101', 540, 630], ['s4', 'MATH101H', 989, 1109]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 90], ['s4', 'BIO130', 'CHEM120', 16], ['s4', 'CHEM120', 'MATH101H', 45]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 6',\n   [[['s3', 'CHEM120', 900, 990], ['s4', 'MATH101', 630, 720], ['s4', 'BIO130', 540, 660],\n     ['s3', 'PHYS110', 780, 840], ['s3', 'BIO130', 645, 735], ['s3', 'ECON150', 540, 630]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s3', 'ECON150', 'BIO130', 45], ['s3', 'BIO130', 'PHYS110', 15], ['s4', 'BIO130', 'MATH101', 75]]),\n  ('normal control 7',\n   [[['s3', 'BIO130', 600, 720], ['s1', 'MATH101H', 540, 600], ['s1', 'MATH101', 720, 780],\n     ['s1', 'BIO130', 570, 690], ['s3', 'CHEM120', 780, 870]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101H', 'BIO130', 75]]),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 631, 721], ['s2', 'BIO130', 540, 600], ['s2', 'CHEM120', 781, 901],\n     ['s2', 'MATH101H', 901, 991]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [])],\n [('regression: symmetric travel lookup 1',\n   [[['s3', 'ECON150', 839, 929], ['s1', 'MATH101H', 540, 660], ['s3', 'CHEM120', 960, 1050],\n     ['s1', 'ECON150', 765, 885], ['s4', 'BIO130', 600, 660], ['s1', 'HIST140', 630, 750],\n     ['s3', 'MATH101', 750, 810], ['s4', 'ECON150', 660, 720], ['s3', 'BIO130', 600, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101H', 'HIST140', 60], ['s1', 'HIST140', 'ECON150', 15]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s4', 'MATH101', 600, 660], ['s4', 'HIST140', 705, 795], ['s1', 'CHEM120', 660, 720],\n     ['s3', 'BIO130', 600, 720], ['s3', 'PHYS110', 750, 810], ['s4', 'ECON150', 765, 885],\n     ['s3', 'ECON150', 780, 900], ['s1', 'BIO130', 600, 660], ['s1', 'ECON150', 735, 795]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'CHEM120', 'ECON150', 15], ['s3', 'PHYS110', 'ECON150', 75], ['s4', 'HIST140', 'ECON150', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'BIO130', 540, 660], ['s1', 'MATH101H', 719, 839], ['s1', 'HIST140', 689, 749],\n     ['s4', 'ECON150', 870, 930], ['s4', 'HIST140', 600, 690], ['s4', 'CHEM120', 735, 855],\n     ['s2', 'MATH101H', 660, 750], ['s2', 'MATH101', 720, 810], ['s4', 'BIO130', 930, 1020],\n     ['s1', 'MATH101', 540, 660]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'HIST140', 'MATH101H', 60], ['s2', 'BIO130', 'MATH101H', 30], ['s2', 'MATH101H', 'MATH101', 75],\n    ['s4', 'ECON150', 'BIO130', 30]]),\n  ('boundary control 4', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('boundary control 5',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('normal control 6',\n   [[['s2', 'ECON150', 540, 660], ['s5', 'MATH101', 600, 660], ['s3', 'PHYS110', 600, 690],\n     ['s2', 'BIO130', 720, 810], ['s3', 'CHEM120', 719, 809], ['s5', 'HIST140', 824, 944],\n     ['s5', 'MATH101H', 689, 779]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'MATH101H', 'HIST140', 15]]),\n  ('normal control 7',\n   [[['s5', 'HIST140', 780, 900], ['s4', 'BIO130', 690, 780], ['s5', 'MATH101H', 540, 600],\n     ['s3', 'CHEM120', 645, 705], ['s5', 'PHYS110', 900, 1020], ['s3', 'HIST140', 540, 600],\n     ['s4', 'ECON150', 600, 720], ['s5', 'CHEM120', 690, 810]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'ECON150', 'BIO130', 30], ['s5', 'CHEM120', 'HIST140', 30], ['s5', 'HIST140', 'PHYS110', 45]]),\n  ('normal control 8',\n   [[['s4', 'MATH101H', 540, 600], ['s5', 'HIST140', 750, 840], ['s5', 'ECON150', 600, 720],\n     ['s5', 'MATH101H', 990, 1110], ['s4', 'HIST140', 570, 690], ['s5', 'PHYS110', 870, 990],\n     ['s3', 'PHYS110', 540, 630], ['s3', 'BIO130', 660, 780], ['s3', 'ECON150', 840, 900]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s4', 'MATH101H', 'HIST140', 30]])],\n [('regression: symmetric travel lookup 1',\n   [[['s2', 'MATH101', 915, 1035], ['s2', 'PHYS110', 735, 855], ['s2', 'ECON150', 600, 720],\n     ['s1', 'ECON150', 870, 930], ['s2', 'CHEM120', 1005, 1095], ['s1', 'MATH101', 780, 900],\n     ['s1', 'HIST140', 600, 720]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 75], ['s2', 'MATH101', 'CHEM120', 90]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s3', 'ECON150', 689, 749], ['s3', 'MATH101H', 600, 660], ['s3', 'MATH101', 749, 839]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s3', 'MATH101H', 'ECON150', 31], ['s3', 'ECON150', 'MATH101', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'HIST140', 630, 690], ['s2', 'CHEM120', 600, 660], ['s2', 'BIO130', 719, 809]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'CHEM120', 'HIST140', 30], ['s2', 'HIST140', 'BIO130', 1]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('boundary control 5', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('normal control 6',\n   [[['s5', 'BIO130', 930, 1050], ['s5', 'PHYS110', 810, 900], ['s5', 'CHEM120', 600, 720]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'PHYS110', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s2', 'CHEM120', 780, 900], ['s5', 'ECON150', 600, 660], ['s2', 'PHYS110', 540, 660],\n     ['s1', 'CHEM120', 1019, 1079], ['s2', 'MATH101H', 930, 1050], ['s1', 'MATH101H', 780, 900],\n     ['s5', 'BIO130', 689, 779], ['s2', 'BIO130', 660, 720], ['s1', 'ECON150', 930, 990],\n     ['s1', 'HIST140', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'ECON150', 'CHEM120', 16], ['s2', 'PHYS110', 'BIO130', 45], ['s5', 'ECON150', 'BIO130', 16]]),\n  ('normal control 8',\n   [[['s5', 'ECON150', 600, 720], ['s3', 'ECON150', 735, 855], ['s5', 'CHEM120', 690, 750],\n     ['s2', 'CHEM120', 600, 720], ['s5', 'BIO130', 750, 810], ['s5', 'PHYS110', 825, 885],\n     ['s2', 'BIO130', 690, 750], ['s3', 'CHEM120', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'CHEM120', 'BIO130', 30], ['s5', 'ECON150', 'CHEM120', 30]])],\n [('regression: symmetric travel lookup 1',\n   [[['s4', 'MATH101', 630, 720], ['s2', 'PHYS110', 615, 675], ['s2', 'MATH101H', 645, 765],\n     ['s4', 'MATH101H', 540, 600], ['s4', 'BIO130', 751, 841], ['s2', 'CHEM120', 825, 945],\n     ['s2', 'MATH101', 540, 600]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'MATH101', 'PHYS110', 15], ['s2', 'PHYS110', 'MATH101H', 30]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s3', 'CHEM120', 781, 901], ['s1', 'BIO130', 689, 809], ['s5', 'HIST140', 600, 660],\n     ['s3', 'ECON150', 661, 721], ['s1', 'PHYS110', 600, 660], ['s3', 'HIST140', 540, 630],\n     ['s5', 'MATH101', 900, 1020], ['s3', 'BIO130', 691, 751], ['s5', 'MATH101H', 720, 840]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s3', 'ECON150', 'BIO130', 75], ['s3', 'BIO130', 'CHEM120', 15]]),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 931, 1051], ['s5', 'PHYS110', 630, 720], ['s1', 'CHEM120', 841, 961],\n     ['s5', 'BIO130', 540, 600], ['s2', 'MATH101', 840, 900], ['s1', 'MATH101', 600, 660],\n     ['s1', 'MATH101H', 691, 811], ['s5', 'HIST140', 690, 780], ['s2', 'HIST140', 720, 780],\n     ['s5', 'CHEM120', 811, 931], ['s2', 'ECON150', 600, 690]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'MATH101H', 'CHEM120', 30], ['s1', 'CHEM120', 'PHYS110', 90], ['s5', 'PHYS110', 'HIST140', 30]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('normal control 6',\n   [[['s4', 'ECON150', 540, 660], ['s1', 'PHYS110', 765, 855], ['s4', 'MATH101', 765, 825],\n     ['s1', 'MATH101', 600, 660], ['s4', 'HIST140', 630, 720], ['s1', 'CHEM120', 705, 765]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'ECON150', 'HIST140', 60]]),\n  ('normal control 7',\n   [[['s1', 'MATH101H', 600, 690], ['s1', 'HIST140', 705, 765]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   []),\n  ('normal control 8',\n   [[['s5', 'MATH101H', 600, 720], ['s1', 'BIO130', 540, 600], ['s5', 'ECON150', 540, 630],\n     ['s1', 'MATH101H', 690, 810], ['s3', 'MATH101', 765, 885], ['s3', 'MATH101H', 975, 1095],\n     ['s3', 'HIST140', 1185, 1275], ['s5', 'BIO130', 900, 990], ['s3', 'CHEM120', 600, 720],\n     ['s1', 'HIST140', 810, 900], ['s5', 'CHEM120', 735, 855], ['s1', 'MATH101', 990, 1110]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101H', 'HIST140', 45], ['s5', 'ECON150', 'MATH101H', 30],\n    ['s5', 'MATH101H', 'CHEM120', 45]])],\n [('regression: symmetric travel lookup 1',\n   [[['s5', 'MATH101', 750, 870], ['s2', 'ECON150', 690, 780], ['s5', 'CHEM120', 540, 660],\n     ['s5', 'ECON150', 630, 750], ['s2', 'MATH101', 540, 660], ['s5', 'PHYS110', 960, 1020]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'MATH101', 'ECON150', 30], ['s5', 'CHEM120', 'ECON150', 90], ['s5', 'ECON150', 'MATH101', 60]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s1', 'PHYS110', 944, 1034], ['s5', 'HIST140', 540, 600], ['s5', 'CHEM120', 796, 916],\n     ['s1', 'MATH101H', 824, 944], ['s5', 'PHYS110', 631, 691], ['s5', 'MATH101', 736, 826],\n     ['s3', 'HIST140', 540, 660], ['s1', 'MATH101', 600, 660], ['s1', 'ECON150', 689, 809],\n     ['s3', 'MATH101', 856, 946], ['s3', 'BIO130', 691, 811], ['s3', 'ECON150', 991, 1051]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101', 'ECON150', 1], ['s1', 'ECON150', 'MATH101H', 15], ['s5', 'MATH101', 'CHEM120', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'MATH101H', 840, 930], ['s5', 'CHEM120', 600, 660], ['s2', 'CHEM120', 690, 810],\n     ['s2', 'ECON150', 540, 630], ['s2', 'BIO130', 630, 690], ['s5', 'BIO130', 691, 781]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'ECON150', 'BIO130', 60]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 6',\n   [[['s4', 'MATH101H', 540, 600], ['s2', 'PHYS110', 690, 750], ['s1', 'HIST140', 870, 990],\n     ['s1', 'MATH101', 540, 630], ['s1', 'ECON150', 660, 750], ['s2', 'BIO130', 600, 690],\n     ['s1', 'MATH101H', 750, 810], ['s2', 'CHEM120', 779, 869], ['s2', 'MATH101H', 540, 630],\n     ['s4', 'CHEM120', 825, 945], ['s4', 'HIST140', 645, 735]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'MATH101H', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s5', 'HIST140', 540, 630], ['s4', 'ECON150', 750, 870], ['s4', 'BIO130', 540, 660],\n     ['s5', 'PHYS110', 690, 810]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\n  ('normal control 8',\n   [[['s4', 'HIST140', 540, 660], ['s4', 'ECON150', 660, 750]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [])]]\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":"1b41cfc97cb7d7b2ff79e84041554f0f1cf4086a901afdfe3764552094f2384a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sits, campus, travel):\n    by = {}\n    for st, ex, s, e in sits:\n        by.setdefault(st, []).append((s, e, ex))\n    out = []\n    for st in sorted(by):\n        seq = sorted(by[st])\n        for (s1, e1, x1), (s2, e2, x2) in zip(seq, seq[1:]):\n            gap = s2 - e1\n            c1, c2 = campus[x1], campus[x2]\n            need = 0\n            if c1 != c2:\n                need = travel.get(c1 + '|' + c2, travel.get(c2 + '|' + c1, 0))\n            if gap < need:\n                out.append([st, x1, x2, need - gap])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: symmetric travel lookup 1',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s4', 'CHEM120', 869, 989], ['s4', 'HIST140', 600, 660], ['s4', 'BIO130', 750, 840],\n     ['s4', 'PHYS110', 1019, 1139]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'BIO130', 'CHEM120', 31], ['s4', 'CHEM120', 'PHYS110', 30]]),\n  ('partial repair guard 3',\n   [[['s1', 'ECON150', 600, 720], ['s4', 'PHYS110', 600, 720], ['s4', 'BIO130', 765, 825],\n     ['s4', 'CHEM120', 854, 974], ['s1', 'MATH101', 540, 630], ['s4', 'MATH101H', 989, 1109]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 90], ['s4', 'BIO130', 'CHEM120', 16], ['s4', 'CHEM120', 'MATH101H', 45]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 6',\n   [[['s3', 'CHEM120', 900, 990], ['s4', 'MATH101', 630, 720], ['s4', 'BIO130', 540, 660],\n     ['s3', 'PHYS110', 780, 840], ['s3', 'BIO130', 645, 735], ['s3', 'ECON150', 540, 630]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s3', 'ECON150', 'BIO130', 45], ['s3', 'BIO130', 'PHYS110', 15], ['s4', 'BIO130', 'MATH101', 75]]),\n  ('normal control 7',\n   [[['s3', 'BIO130', 600, 720], ['s1', 'MATH101H', 540, 600], ['s1', 'MATH101', 720, 780],\n     ['s1', 'BIO130', 570, 690], ['s3', 'CHEM120', 780, 870]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101H', 'BIO130', 75]]),\n  ('normal control 8',\n   [[['s2', 'PHYS110', 631, 721], ['s2', 'BIO130', 540, 600], ['s2', 'CHEM120', 781, 901],\n     ['s2', 'MATH101H', 901, 991]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [])],\n [('regression: symmetric travel lookup 1',\n   [[['s3', 'ECON150', 839, 929], ['s1', 'MATH101H', 540, 660], ['s3', 'CHEM120', 960, 1050],\n     ['s1', 'ECON150', 765, 885], ['s4', 'BIO130', 600, 660], ['s1', 'HIST140', 630, 750],\n     ['s3', 'MATH101', 750, 810], ['s4', 'ECON150', 660, 720], ['s3', 'BIO130', 600, 660]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101H', 'HIST140', 60], ['s1', 'HIST140', 'ECON150', 15]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s4', 'MATH101', 600, 660], ['s4', 'HIST140', 705, 795], ['s1', 'CHEM120', 660, 720],\n     ['s3', 'BIO130', 600, 720], ['s3', 'PHYS110', 750, 810], ['s4', 'ECON150', 765, 885],\n     ['s3', 'ECON150', 780, 900], ['s1', 'BIO130', 600, 660], ['s1', 'ECON150', 735, 795]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'CHEM120', 'ECON150', 15], ['s3', 'PHYS110', 'ECON150', 75], ['s4', 'HIST140', 'ECON150', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'BIO130', 540, 660], ['s1', 'MATH101H', 719, 839], ['s1', 'HIST140', 689, 749],\n     ['s4', 'ECON150', 870, 930], ['s4', 'HIST140', 600, 690], ['s4', 'CHEM120', 735, 855],\n     ['s2', 'MATH101H', 660, 750], ['s2', 'MATH101', 720, 810], ['s4', 'BIO130', 930, 1020],\n     ['s1', 'MATH101', 540, 660]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'city',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'HIST140', 'MATH101H', 60], ['s2', 'BIO130', 'MATH101H', 30], ['s2', 'MATH101H', 'MATH101', 75],\n    ['s4', 'ECON150', 'BIO130', 30]]),\n  ('boundary control 4', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('boundary control 5',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('normal control 6',\n   [[['s2', 'ECON150', 540, 660], ['s5', 'MATH101', 600, 660], ['s3', 'PHYS110', 600, 690],\n     ['s2', 'BIO130', 720, 810], ['s3', 'CHEM120', 719, 809], ['s5', 'HIST140', 824, 944],\n     ['s5', 'MATH101H', 689, 779]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'MATH101H', 'HIST140', 15]]),\n  ('normal control 7',\n   [[['s5', 'HIST140', 780, 900], ['s4', 'BIO130', 690, 780], ['s5', 'MATH101H', 540, 600],\n     ['s3', 'CHEM120', 645, 705], ['s5', 'PHYS110', 900, 1020], ['s3', 'HIST140', 540, 600],\n     ['s4', 'ECON150', 600, 720], ['s5', 'CHEM120', 690, 810]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s4', 'ECON150', 'BIO130', 30], ['s5', 'CHEM120', 'HIST140', 30], ['s5', 'HIST140', 'PHYS110', 45]]),\n  ('normal control 8',\n   [[['s4', 'MATH101H', 540, 600], ['s5', 'HIST140', 750, 840], ['s5', 'ECON150', 600, 720],\n     ['s5', 'MATH101H', 990, 1110], ['s4', 'HIST140', 570, 690], ['s5', 'PHYS110', 870, 990],\n     ['s3', 'PHYS110', 540, 630], ['s3', 'BIO130', 660, 780], ['s3', 'ECON150', 840, 900]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s4', 'MATH101H', 'HIST140', 30]])],\n [('regression: symmetric travel lookup 1',\n   [[['s2', 'MATH101', 915, 1035], ['s2', 'PHYS110', 735, 855], ['s2', 'ECON150', 600, 720],\n     ['s1', 'ECON150', 870, 930], ['s2', 'CHEM120', 1005, 1095], ['s1', 'MATH101', 780, 900],\n     ['s1', 'HIST140', 600, 720]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101', 'ECON150', 75], ['s2', 'MATH101', 'CHEM120', 90]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s3', 'ECON150', 689, 749], ['s3', 'MATH101H', 600, 660], ['s3', 'MATH101', 749, 839]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s3', 'MATH101H', 'ECON150', 31], ['s3', 'ECON150', 'MATH101', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'HIST140', 630, 690], ['s2', 'CHEM120', 600, 660], ['s2', 'BIO130', 719, 809]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'CHEM120', 'HIST140', 30], ['s2', 'HIST140', 'BIO130', 1]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('boundary control 5', [[['s1', 'A', 540, 600], ['s1', 'B', 590, 700]], {'A': 'north', 'B': 'north'}, {}],\n   [['s1', 'A', 'B', 10]]),\n  ('normal control 6',\n   [[['s5', 'BIO130', 930, 1050], ['s5', 'PHYS110', 810, 900], ['s5', 'CHEM120', 600, 720]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s5', 'PHYS110', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s2', 'CHEM120', 780, 900], ['s5', 'ECON150', 600, 660], ['s2', 'PHYS110', 540, 660],\n     ['s1', 'CHEM120', 1019, 1079], ['s2', 'MATH101H', 930, 1050], ['s1', 'MATH101H', 780, 900],\n     ['s5', 'BIO130', 689, 779], ['s2', 'BIO130', 660, 720], ['s1', 'ECON150', 930, 990],\n     ['s1', 'HIST140', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'city',\n     'PHYS110': 'north',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s1', 'ECON150', 'CHEM120', 16], ['s2', 'PHYS110', 'BIO130', 45], ['s5', 'ECON150', 'BIO130', 16]]),\n  ('normal control 8',\n   [[['s5', 'ECON150', 600, 720], ['s3', 'ECON150', 735, 855], ['s5', 'CHEM120', 690, 750],\n     ['s2', 'CHEM120', 600, 720], ['s5', 'BIO130', 750, 810], ['s5', 'PHYS110', 825, 885],\n     ['s2', 'BIO130', 690, 750], ['s3', 'CHEM120', 600, 690]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'CHEM120', 'BIO130', 30], ['s5', 'ECON150', 'CHEM120', 30]])],\n [('regression: symmetric travel lookup 1',\n   [[['s4', 'MATH101', 630, 720], ['s2', 'PHYS110', 615, 675], ['s2', 'MATH101H', 645, 765],\n     ['s4', 'MATH101H', 540, 600], ['s4', 'BIO130', 751, 841], ['s2', 'CHEM120', 825, 945],\n     ['s2', 'MATH101', 540, 600]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'MATH101', 'PHYS110', 15], ['s2', 'PHYS110', 'MATH101H', 30]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s3', 'CHEM120', 781, 901], ['s1', 'BIO130', 689, 809], ['s5', 'HIST140', 600, 660],\n     ['s3', 'ECON150', 661, 721], ['s1', 'PHYS110', 600, 660], ['s3', 'HIST140', 540, 630],\n     ['s5', 'MATH101', 900, 1020], ['s3', 'BIO130', 691, 751], ['s5', 'MATH101H', 720, 840]],\n    {'MATH101': 'north',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s3', 'ECON150', 'BIO130', 75], ['s3', 'BIO130', 'CHEM120', 15]]),\n  ('partial repair guard 3',\n   [[['s1', 'PHYS110', 931, 1051], ['s5', 'PHYS110', 630, 720], ['s1', 'CHEM120', 841, 961],\n     ['s5', 'BIO130', 540, 600], ['s2', 'MATH101', 840, 900], ['s1', 'MATH101', 600, 660],\n     ['s1', 'MATH101H', 691, 811], ['s5', 'HIST140', 690, 780], ['s2', 'HIST140', 720, 780],\n     ['s5', 'CHEM120', 811, 931], ['s2', 'ECON150', 600, 690]],\n    {'MATH101': 'city',\n     'MATH101H': 'city',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'south',\n     'HIST140': 'south',\n     'ECON150': 'south'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s1', 'MATH101H', 'CHEM120', 30], ['s1', 'CHEM120', 'PHYS110', 90], ['s5', 'PHYS110', 'HIST140', 30]]),\n  ('boundary control 4',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 629, 700]], {'A': 'south', 'B': 'north'}, {'north|south': 30}],\n   [['s1', 'A', 'B', 1]]),\n  ('normal control 6',\n   [[['s4', 'ECON150', 540, 660], ['s1', 'PHYS110', 765, 855], ['s4', 'MATH101', 765, 825],\n     ['s1', 'MATH101', 600, 660], ['s4', 'HIST140', 630, 720], ['s1', 'CHEM120', 705, 765]],\n    {'MATH101': 'north',\n     'MATH101H': 'city',\n     'PHYS110': 'south',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s4', 'ECON150', 'HIST140', 60]]),\n  ('normal control 7',\n   [[['s1', 'MATH101H', 600, 690], ['s1', 'HIST140', 705, 765]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   []),\n  ('normal control 8',\n   [[['s5', 'MATH101H', 600, 720], ['s1', 'BIO130', 540, 600], ['s5', 'ECON150', 540, 630],\n     ['s1', 'MATH101H', 690, 810], ['s3', 'MATH101', 765, 885], ['s3', 'MATH101H', 975, 1095],\n     ['s3', 'HIST140', 1185, 1275], ['s5', 'BIO130', 900, 990], ['s3', 'CHEM120', 600, 720],\n     ['s1', 'HIST140', 810, 900], ['s5', 'CHEM120', 735, 855], ['s1', 'MATH101', 990, 1110]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'north',\n     'CHEM120': 'city',\n     'BIO130': 'city',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [['s1', 'MATH101H', 'HIST140', 45], ['s5', 'ECON150', 'MATH101H', 30],\n    ['s5', 'MATH101H', 'CHEM120', 45]])],\n [('regression: symmetric travel lookup 1',\n   [[['s5', 'MATH101', 750, 870], ['s2', 'ECON150', 690, 780], ['s5', 'CHEM120', 540, 660],\n     ['s5', 'ECON150', 630, 750], ['s2', 'MATH101', 540, 660], ['s5', 'PHYS110', 960, 1020]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'city',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'MATH101', 'ECON150', 30], ['s5', 'CHEM120', 'ECON150', 90], ['s5', 'ECON150', 'MATH101', 60]]),\n  ('regression variant: symmetric travel lookup 2',\n   [[['s1', 'PHYS110', 944, 1034], ['s5', 'HIST140', 540, 600], ['s5', 'CHEM120', 796, 916],\n     ['s1', 'MATH101H', 824, 944], ['s5', 'PHYS110', 631, 691], ['s5', 'MATH101', 736, 826],\n     ['s3', 'HIST140', 540, 660], ['s1', 'MATH101', 600, 660], ['s1', 'ECON150', 689, 809],\n     ['s3', 'MATH101', 856, 946], ['s3', 'BIO130', 691, 811], ['s3', 'ECON150', 991, 1051]],\n    {'MATH101': 'south',\n     'MATH101H': 'south',\n     'PHYS110': 'south',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'south',\n     'ECON150': 'north'},\n    {'north|south': 30, 'city|north': 30}],\n   [['s1', 'MATH101', 'ECON150', 1], ['s1', 'ECON150', 'MATH101H', 15], ['s5', 'MATH101', 'CHEM120', 60]]),\n  ('partial repair guard 3',\n   [[['s2', 'MATH101H', 840, 930], ['s5', 'CHEM120', 600, 660], ['s2', 'CHEM120', 690, 810],\n     ['s2', 'ECON150', 540, 630], ['s2', 'BIO130', 630, 690], ['s5', 'BIO130', 691, 781]],\n    {'MATH101': 'south',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'north',\n     'BIO130': 'north',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 30, 'city|north': 60}],\n   [['s2', 'ECON150', 'BIO130', 60]]),\n  ('boundary control 4',\n   [[['s1', 'B', 700, 760], ['s1', 'A', 540, 600]], {'A': 'north', 'B': 'city'}, {'city|north': 60}], []),\n  ('boundary control 5',\n   [[['s1', 'A', 540, 600], ['s1', 'B', 630, 700]], {'A': 'north', 'B': 'south'}, {'north|south': 30}], []),\n  ('normal control 6',\n   [[['s4', 'MATH101H', 540, 600], ['s2', 'PHYS110', 690, 750], ['s1', 'HIST140', 870, 990],\n     ['s1', 'MATH101', 540, 630], ['s1', 'ECON150', 660, 750], ['s2', 'BIO130', 600, 690],\n     ['s1', 'MATH101H', 750, 810], ['s2', 'CHEM120', 779, 869], ['s2', 'MATH101H', 540, 630],\n     ['s4', 'CHEM120', 825, 945], ['s4', 'HIST140', 645, 735]],\n    {'MATH101': 'city',\n     'MATH101H': 'south',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'city',\n     'ECON150': 'city'},\n    {'north|south': 45, 'city|north': 30}],\n   [['s2', 'MATH101H', 'BIO130', 30]]),\n  ('normal control 7',\n   [[['s5', 'HIST140', 540, 630], ['s4', 'ECON150', 750, 870], ['s4', 'BIO130', 540, 660],\n     ['s5', 'PHYS110', 690, 810]],\n    {'MATH101': 'north',\n     'MATH101H': 'north',\n     'PHYS110': 'city',\n     'CHEM120': 'south',\n     'BIO130': 'south',\n     'HIST140': 'north',\n     'ECON150': 'south'},\n    {'north|south': 45, 'city|north': 60}],\n   []),\n  ('normal control 8',\n   [[['s4', 'HIST140', 540, 660], ['s4', 'ECON150', 660, 750]],\n    {'MATH101': 'city',\n     'MATH101H': 'north',\n     'PHYS110': 'south',\n     'CHEM120': 'south',\n     'BIO130': 'city',\n     'HIST140': 'north',\n     'ECON150': 'north'},\n    {'north|south': 45, 'city|north': 60}],\n   [])]]\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-inter-campus-travel-gap-symmetric-travel-lookup","generated_at":"2026-09-29T14:52:05.899975+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Multi-campus exam timetables must leave travel time between a student's consecutive sittings.","repair":"Look up both orderings of the campus pair.","root_cause":"The travel table is looked up in one direction only.","sha256":"1cc565c576500d55ebb833dd958d88e3bfd230d14aefce38374f43d7cd08392f","title":"Travel time found only in the stored direction · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.578,"exit_code":1,"observations":[{"actual":[["s1","A","B",1]],"check":"regression: symmetric travel lookup 1","expected":[["s1","A","B",1]],"passed":true},{"actual":[["s4","BIO130","CHEM120",31]],"check":"regression variant: symmetric travel lookup 2","expected":[["s4","BIO130","CHEM120",31],["s4","CHEM120","PHYS110",30]],"passed":false},{"actual":[["s1","MATH101","ECON150",30],["s4","BIO130","CHEM120",16],["s4","CHEM120","MATH101H",45]],"check":"partial repair guard 3","expected":[["s1","MATH101","ECON150",90],["s4","BIO130","CHEM120",16],["s4","CHEM120","MATH101H",45]],"passed":false},{"actual":[],"check":"boundary control 4","expected":[],"passed":true},{"actual":[],"check":"boundary control 5","expected":[],"passed":true},{"actual":[["s3","BIO130","PHYS110",15],["s4","BIO130","MATH101",30]],"check":"normal control 6","expected":[["s3","ECON150","BIO130",45],["s3","BIO130","PHYS110",15],["s4","BIO130","MATH101",75]],"passed":false},{"actual":[["s1","MATH101H","BIO130",30]],"check":"normal control 7","expected":[["s1","MATH101H","BIO130",75]],"passed":false},{"actual":[],"check":"normal control 8","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: symmetric travel lookup 1\", \"actual\": [[\"s1\", \"A\", \"B\", 1]], \"expected\": [[\"s1\", \"A\", \"B\", 1]], \"passed\": true}, {\"check\": \"regression variant: symmetric travel lookup 2\", \"actual\": [[\"s4\", \"BIO130\", \"CHEM120\", 31]], \"expected\": [[\"s4\", \"BIO130\", \"CHEM120\", 31], [\"s4\", \"CHEM120\", \"PHYS110\", 30]], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"s1\", \"MATH101\", \"ECON150\", 30], [\"s4\", \"BIO130\", \"CHEM120\", 16], [\"s4\", \"CHEM120\", \"MATH101H\", 45]], \"expected\": [[\"s1\", \"MATH101\", \"ECON150\", 90], [\"s4\", \"BIO130\", \"CHEM120\", 16], [\"s4\", \"CHEM120\", \"MATH101H\", 45]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[\"s3\", \"BIO130\", \"PHYS110\", 15], [\"s4\", \"BIO130\", \"MATH101\", 30]], \"expected\": [[\"s3\", \"ECON150\", \"BIO130\", 45], [\"s3\", \"BIO130\", \"PHYS110\", 15], [\"s4\", \"BIO130\", \"MATH101\", 75]], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [[\"s1\", \"MATH101H\", \"BIO130\", 30]], \"expected\": [[\"s1\", \"MATH101H\", \"BIO130\", 75]], \"passed\": false}, {\"check\": \"normal control 8\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.449,"exit_code":1,"observations":[{"actual":[],"check":"regression: symmetric travel lookup 1","expected":[["s1","A","B",1]],"passed":false},{"actual":[["s4","CHEM120","PHYS110",30]],"check":"regression variant: symmetric travel lookup 2","expected":[["s4","BIO130","CHEM120",31],["s4","CHEM120","PHYS110",30]],"passed":false},{"actual":[["s1","MATH101","ECON150",90]],"check":"partial repair guard 3","expected":[["s1","MATH101","ECON150",90],["s4","BIO130","CHEM120",16],["s4","CHEM120","MATH101H",45]],"passed":false},{"actual":[],"check":"boundary control 4","expected":[],"passed":true},{"actual":[],"check":"boundary control 5","expected":[],"passed":true},{"actual":[["s3","ECON150","BIO130",45],["s4","BIO130","MATH101",75]],"check":"normal control 6","expected":[["s3","ECON150","BIO130",45],["s3","BIO130","PHYS110",15],["s4","BIO130","MATH101",75]],"passed":false},{"actual":[["s1","MATH101H","BIO130",75]],"check":"normal control 7","expected":[["s1","MATH101H","BIO130",75]],"passed":true},{"actual":[],"check":"normal control 8","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: symmetric travel lookup 1\", \"actual\": [], \"expected\": [[\"s1\", \"A\", \"B\", 1]], \"passed\": false}, {\"check\": \"regression variant: symmetric travel lookup 2\", \"actual\": [[\"s4\", \"CHEM120\", \"PHYS110\", 30]], \"expected\": [[\"s4\", \"BIO130\", \"CHEM120\", 31], [\"s4\", \"CHEM120\", \"PHYS110\", 30]], \"passed\": false}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"s1\", \"MATH101\", \"ECON150\", 90]], \"expected\": [[\"s1\", \"MATH101\", \"ECON150\", 90], [\"s4\", \"BIO130\", \"CHEM120\", 16], [\"s4\", \"CHEM120\", \"MATH101H\", 45]], \"passed\": false}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[\"s3\", \"ECON150\", \"BIO130\", 45], [\"s4\", \"BIO130\", \"MATH101\", 75]], \"expected\": [[\"s3\", \"ECON150\", \"BIO130\", 45], [\"s3\", \"BIO130\", \"PHYS110\", 15], [\"s4\", \"BIO130\", \"MATH101\", 75]], \"passed\": false}, {\"check\": \"normal control 7\", \"actual\": [[\"s1\", \"MATH101H\", \"BIO130\", 75]], \"expected\": [[\"s1\", \"MATH101H\", \"BIO130\", 75]], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.477,"exit_code":0,"observations":[{"actual":[["s1","A","B",1]],"check":"regression: symmetric travel lookup 1","expected":[["s1","A","B",1]],"passed":true},{"actual":[["s4","BIO130","CHEM120",31],["s4","CHEM120","PHYS110",30]],"check":"regression variant: symmetric travel lookup 2","expected":[["s4","BIO130","CHEM120",31],["s4","CHEM120","PHYS110",30]],"passed":true},{"actual":[["s1","MATH101","ECON150",90],["s4","BIO130","CHEM120",16],["s4","CHEM120","MATH101H",45]],"check":"partial repair guard 3","expected":[["s1","MATH101","ECON150",90],["s4","BIO130","CHEM120",16],["s4","CHEM120","MATH101H",45]],"passed":true},{"actual":[],"check":"boundary control 4","expected":[],"passed":true},{"actual":[],"check":"boundary control 5","expected":[],"passed":true},{"actual":[["s3","ECON150","BIO130",45],["s3","BIO130","PHYS110",15],["s4","BIO130","MATH101",75]],"check":"normal control 6","expected":[["s3","ECON150","BIO130",45],["s3","BIO130","PHYS110",15],["s4","BIO130","MATH101",75]],"passed":true},{"actual":[["s1","MATH101H","BIO130",75]],"check":"normal control 7","expected":[["s1","MATH101H","BIO130",75]],"passed":true},{"actual":[],"check":"normal control 8","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: symmetric travel lookup 1\", \"actual\": [[\"s1\", \"A\", \"B\", 1]], \"expected\": [[\"s1\", \"A\", \"B\", 1]], \"passed\": true}, {\"check\": \"regression variant: symmetric travel lookup 2\", \"actual\": [[\"s4\", \"BIO130\", \"CHEM120\", 31], [\"s4\", \"CHEM120\", \"PHYS110\", 30]], \"expected\": [[\"s4\", \"BIO130\", \"CHEM120\", 31], [\"s4\", \"CHEM120\", \"PHYS110\", 30]], \"passed\": true}, {\"check\": \"partial repair guard 3\", \"actual\": [[\"s1\", \"MATH101\", \"ECON150\", 90], [\"s4\", \"BIO130\", \"CHEM120\", 16], [\"s4\", \"CHEM120\", \"MATH101H\", 45]], \"expected\": [[\"s1\", \"MATH101\", \"ECON150\", 90], [\"s4\", \"BIO130\", \"CHEM120\", 16], [\"s4\", \"CHEM120\", \"MATH101H\", 45]], \"passed\": true}, {\"check\": \"boundary control 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"boundary control 5\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"normal control 6\", \"actual\": [[\"s3\", \"ECON150\", \"BIO130\", 45], [\"s3\", \"BIO130\", \"PHYS110\", 15], [\"s4\", \"BIO130\", \"MATH101\", 75]], \"expected\": [[\"s3\", \"ECON150\", \"BIO130\", 45], [\"s3\", \"BIO130\", \"PHYS110\", 15], [\"s4\", \"BIO130\", \"MATH101\", 75]], \"passed\": true}, {\"check\": \"normal control 7\", \"actual\": [[\"s1\", \"MATH101H\", \"BIO130\", 75]], \"expected\": [[\"s1\", \"MATH101H\", \"BIO130\", 75]], \"passed\": true}, {\"check\": \"normal control 8\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}