{"abstract":"Return shipments between two regions find no zone.","category":"Shipping rate zone lookup","checks":8,"contract":"origin and dest are five-digit ZIP strings. Same ZIP3 -> zone 1. regions [[lo3, hi3, region]] inclusive. Unknown region -> \"NO_ZONE\". Same region -> zone 2. Otherwise the matrix [[region_a, region_b, zone]] lists each pair once and applies in both directions; unlisted pair -> \"NO_ZONE\".","evaluation_group":"w2-shipping-zone-region-matrix","failed_approach":"Matching only the reversed direction breaks outbound shipments instead.","family":"w2-shipping-zone-region-matrix-matrix-symmetry","id":"FA-95746","implementations":{"attempt":{"sha256":"24aaae2521b22e77be0c545ca51421be25756633d12f97d24ac7341ea5aa4ecb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(origin, dest, regions, matrix):\n    def region(z3):\n        for lo, hi, r in regions:\n            if lo <= z3 <= hi:\n                return r\n        return None\n    o = int(origin[:3])\n    d = int(dest[:3])\n    if o == d:\n        return 1\n    ro, rd = region(o), region(d)\n    if ro is None or rd is None:\n        return 'NO_ZONE'\n    if ro == rd:\n        return 2\n    for a, b, zone in matrix:\n        if (a, b) == (rd, ro):\n            return zone\n    return 'NO_ZONE'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['generated mix 6', ['20001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 14', ['60001', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2]], [['generated mix 32', ['39999', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 35', ['19901', '40001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['generated mix 8', ['96001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 16', ['79901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 73', ['80001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 8], ['generated mix 49', ['20001', '40001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 27', ['96001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 18', ['59901', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['generated mix 67', ['19999', '89901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 8], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 31', ['59901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 39', ['60001', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2]], [['generated mix 40', ['89901', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['generated mix 11', ['30001', '40001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 43', ['80001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 51', ['10001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4]]]\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":"718744530e5aed9853487277e8f7da1c53ae408b42bb4bea124580c573f6be3f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(origin, dest, regions, matrix):\n    def region(z3):\n        for lo, hi, r in regions:\n            if lo <= z3 <= hi:\n                return r\n        return None\n    o = int(origin[:3])\n    d = int(dest[:3])\n    if o == d:\n        return 1\n    ro, rd = region(o), region(d)\n    if ro is None or rd is None:\n        return 'NO_ZONE'\n    if ro == rd:\n        return 2\n    for a, b, zone in matrix:\n        if (a, b) == (ro, rd):\n            return zone\n    return 'NO_ZONE'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['generated mix 6', ['20001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 14', ['60001', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2]], [['generated mix 32', ['39999', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 35', ['19901', '40001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['generated mix 8', ['96001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 16', ['79901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 73', ['80001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 8], ['generated mix 49', ['20001', '40001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 27', ['96001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 18', ['59901', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['generated mix 67', ['19999', '89901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 8], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 31', ['59901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 39', ['60001', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2]], [['generated mix 40', ['89901', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['generated mix 11', ['30001', '40001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 43', ['80001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 51', ['10001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4]]]\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":"f78941d918249f148c5870dba9d3afa138abcb7024bc46529f91fd95d1a15bd7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(origin, dest, regions, matrix):\n    def region(z3):\n        for lo, hi, r in regions:\n            if lo <= z3 <= hi:\n                return r\n        return None\n    o = int(origin[:3])\n    d = int(dest[:3])\n    if o == d:\n        return 1\n    ro, rd = region(o), region(d)\n    if ro is None or rd is None:\n        return 'NO_ZONE'\n    if ro == rd:\n        return 2\n    for a, b, zone in matrix:\n        if (a, b) == (ro, rd) or (a, b) == (rd, ro):\n            return zone\n    return 'NO_ZONE'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['generated mix 6', ['20001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 14', ['60001', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2]], [['generated mix 32', ['39999', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 35', ['19901', '40001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['generated mix 8', ['96001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 16', ['79901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 73', ['80001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 8], ['generated mix 49', ['20001', '40001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 19', ['96001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 27', ['96001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE']], [['generated mix 18', ['59901', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['generated mix 67', ['19999', '89901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 8], ['same region', ['10001', '19999', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2], ['reverse pair', ['30001', '10001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['reverse listing', ['80001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['local outside regions', ['96001', '96002', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['generated mix 31', ['59901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 39', ['60001', '79901', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 2]], [['generated mix 40', ['89901', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 5], ['generated mix 11', ['30001', '40001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['region edges', ['19901', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['unlisted pair', ['10001', '60001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['same zip3', ['10001', '10099', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 1], ['listed pair', ['10001', '30001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4], ['generated mix 43', ['80001', '96001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 'NO_ZONE'], ['generated mix 51', ['10001', '20001', [[0, 199, 'NE'], [200, 399, 'SE'], [400, 599, 'MW'], [600, 799, 'SC'], [800, 899, 'W']], [['NE', 'SE', 4], ['NE', 'MW', 5], ['NE', 'W', 8], ['SE', 'MW', 4], ['MW', 'W', 6], ['SE', 'W', 7], ['SC', 'W', 5]]], 4]]]\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 regions and matrix. 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-shipping-zone-region-matrix-matrix-symmetry","generated_at":"2026-09-29T14:52:16.474314+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Regional carriers rate by origin and destination region matrices.","repair":"Match matrix pairs in either direction.","root_cause":"The matrix lookup only matches (origin region, destination region).","sha256":"5310241c680deb5bf7c0b5a66f81c653c43f27a7b60314957b00e0a227eb1bb6","title":"Region matrix: pair only found in listed direction · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.611,"exit_code":1,"observations":[{"actual":4,"check":"reverse pair","expected":4,"passed":true},{"actual":"NO_ZONE","check":"region edges","expected":4,"passed":false},{"actual":1,"check":"same zip3","expected":1,"passed":true},{"actual":"NO_ZONE","check":"listed pair","expected":4,"passed":false},{"actual":"NO_ZONE","check":"unlisted pair","expected":"NO_ZONE","passed":true},{"actual":2,"check":"same region","expected":2,"passed":true},{"actual":1,"check":"generated mix 6","expected":1,"passed":true},{"actual":2,"check":"generated mix 14","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"region edges\", \"actual\": \"NO_ZONE\", \"expected\": 4, \"passed\": false}, {\"check\": \"same zip3\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"listed pair\", \"actual\": \"NO_ZONE\", \"expected\": 4, \"passed\": false}, {\"check\": \"unlisted pair\", \"actual\": \"NO_ZONE\", \"expected\": \"NO_ZONE\", \"passed\": true}, {\"check\": \"same region\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"generated mix 14\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.61,"exit_code":1,"observations":[{"actual":"NO_ZONE","check":"reverse pair","expected":4,"passed":false},{"actual":4,"check":"region edges","expected":4,"passed":true},{"actual":1,"check":"same zip3","expected":1,"passed":true},{"actual":4,"check":"listed pair","expected":4,"passed":true},{"actual":"NO_ZONE","check":"unlisted pair","expected":"NO_ZONE","passed":true},{"actual":2,"check":"same region","expected":2,"passed":true},{"actual":1,"check":"generated mix 6","expected":1,"passed":true},{"actual":2,"check":"generated mix 14","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse pair\", \"actual\": \"NO_ZONE\", \"expected\": 4, \"passed\": false}, {\"check\": \"region edges\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"same zip3\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"listed pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"unlisted pair\", \"actual\": \"NO_ZONE\", \"expected\": \"NO_ZONE\", \"passed\": true}, {\"check\": \"same region\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"generated mix 14\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.067,"exit_code":0,"observations":[{"actual":4,"check":"reverse pair","expected":4,"passed":true},{"actual":4,"check":"region edges","expected":4,"passed":true},{"actual":1,"check":"same zip3","expected":1,"passed":true},{"actual":4,"check":"listed pair","expected":4,"passed":true},{"actual":"NO_ZONE","check":"unlisted pair","expected":"NO_ZONE","passed":true},{"actual":2,"check":"same region","expected":2,"passed":true},{"actual":1,"check":"generated mix 6","expected":1,"passed":true},{"actual":2,"check":"generated mix 14","expected":2,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"reverse pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"region edges\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"same zip3\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"listed pair\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"unlisted pair\", \"actual\": \"NO_ZONE\", \"expected\": \"NO_ZONE\", \"passed\": true}, {\"check\": \"same region\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"generated mix 14\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}