{"abstract":"One-way bridge toll with frequent-user discount returns a wrong result when the tolled direction is hard-coded westbound.","category":"Toll and parking fee computation","checks":8,"contract":"Input {trips: [[month index, direction, occupancy]], toll_dir, base, threshold, discount_pct, carpool_min}. Only trips in toll_dir are tolled. Carpools (occupancy >= carpool_min) are free and do not count. Paid trips are counted per month index (no carry-over between months); trips beyond threshold in a month pay floor(base*(100-discount)/100).","evaluation_group":"w2-toll_and_parking_fee_computation-bridge-frequent","failed_approach":"Hard-coding westbound breaks bridges tolled eastbound.","family":"w2-toll_and_parking_fee_computation-bridge-frequent-direction","id":"FA-68641","implementations":{"attempt":{"sha256":"bbc4a63ce8025824a1dbedd425d9ed091b1e90ffce12afcafe14f7b75c610d01","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    counts = {}\n    total = 0\n    for month, d, occ in x['trips']:\n        if d != 'W':\n            continue\n        if occ >= x['carpool_min']:\n            continue\n        k = counts.get(month, 0) + 1\n        counts[month] = k\n        if k > x['threshold']:\n            total += x['base'] * (100 - x['discount_pct']) // 100\n        else:\n            total += x['base']\n    return total\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[1, 'W', 1], [13, 'E', 2], [2, 'E', 4]], 'toll_dir': 'W', 'base': 725, 'threshold': 3, 'discount_pct': 25, 'carpool_min': 3}, 725), ({'trips': [[13, 'E', 1], [13, 'W', 1], [13, 'W', 1], [1, 'W', 1], [2, 'E', 1], [13, 'E', 2], [1, 'W', 2], [2, 'W', 3], [2, 'W', 4], [13, 'E', 4], [1, 'E', 1], [1, 'W', 2], [1, 'W', 1], [13, 'W', 1], [2, 'E', 1], [1, 'E', 1]], 'toll_dir': 'E', 'base': 600, 'threshold': 5, 'discount_pct': 25, 'carpool_min': 2}, 3000), ({'trips': [[1, 'E', 3], [1, 'W', 3], [1, 'E', 1], [2, 'W', 1], [13, 'W', 1], [13, 'E', 1], [2, 'W', 3], [1, 'E', 1], [1, 'E', 1], [13, 'W', 1], [2, 'W', 4], [1, 'W', 4], [1, 'W', 2], [2, 'E', 1], [13, 'E', 1]], 'toll_dir': 'W', 'base': 600, 'threshold': 5, 'discount_pct': 25, 'carpool_min': 3}, 2400), ({'trips': [[1, 'E', 1], [13, 'W', 1], [1, 'W', 3], [13, 'E', 1]], 'toll_dir': 'E', 'base': 850, 'threshold': 5, 'discount_pct': 25, 'carpool_min': 2}, 1700), ({'trips': [[13, 'W', 1], [1, 'E', 2], [2, 'E', 3], [13, 'E', 2], [1, 'E', 3], [13, 'E', 3], [1, 'W', 3], [1, 'W', 1], [2, 'W', 2], [1, 'E', 1], [1, 'W', 2], [2, 'E', 2]], 'toll_dir': 'E', 'base': 600, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 2}, 600), ({'trips': [[1, 'W', 3], [1, 'W', 1], [1, 'W', 1], [1, 'E', 3], [1, 'E', 1], [2, 'W', 1], [13, 'E', 4], [1, 'E', 1], [13, 'E', 1], [2, 'W', 1], [13, 'E', 4], [1, 'E', 1]], 'toll_dir': 'E', 'base': 600, 'threshold': 4, 'discount_pct': 25, 'carpool_min': 3}, 2400), ({'trips': [[13, 'E', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1], [1, 'W', 3], [1, 'E', 4], [13, 'W', 4], [2, 'E', 1], [2, 'W', 4], [1, 'E', 1], [1, 'E', 1], [1, 'W', 1], [1, 'W', 1], [2, 'W', 4]], 'toll_dir': 'W', 'base': 725, 'threshold': 4, 'discount_pct': 40, 'carpool_min': 2}, 2900)], [({'trips': [[13, 'E', 1], [2, 'W', 2], [1, 'E', 1], [13, 'W', 3], [13, 'W', 2], [2, 'E', 2], [13, 'E', 2], [2, 'E', 1], [1, 'W', 1], [13, 'W', 2], [1, 'W', 1], [2, 'E', 1], [1, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 2}, 2900), ({'trips': [[2, 'E', 1], [2, 'E', 3], [1, 'W', 1], [1, 'E', 2], [1, 'E', 3], [1, 'W', 4], [1, 'W', 2], [1, 'E', 3]], 'toll_dir': 'E', 'base': 600, 'threshold': 1, 'discount_pct': 33, 'carpool_min': 2}, 600), ({'trips': [[2, 'W', 3], [1, 'E', 4], [1, 'W', 1], [1, 'W', 4], [13, 'W', 4], [1, 'E', 1], [1, 'W', 3], [2, 'W', 4], [2, 'E', 1], [2, 'W', 1], [13, 'W', 3]], 'toll_dir': 'W', 'base': 725, 'threshold': 1, 'discount_pct': 33, 'carpool_min': 2}, 1450), ({'trips': [[1, 'W', 3], [1, 'E', 1], [1, 'W', 2], [2, 'W', 4], [13, 'E', 1], [2, 'W', 4]], 'toll_dir': 'W', 'base': 850, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 2}, 0), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[1, 'E', 4], [1, 'E', 1], [2, 'E', 1], [2, 'E', 1], [1, 'W', 2], [1, 'E', 2]], 'toll_dir': 'E', 'base': 850, 'threshold': 3, 'discount_pct': 40, 'carpool_min': 2}, 2550), ({'trips': [[1, 'W', 1], [1, 'W', 4], [1, 'E', 2]], 'toll_dir': 'W', 'base': 850, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 850), ({'trips': [[13, 'E', 1], [2, 'W', 1], [2, 'W', 1], [13, 'E', 2]], 'toll_dir': 'W', 'base': 600, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 3}, 1200)], [({'trips': [[13, 'W', 4], [1, 'E', 1], [1, 'W', 3], [1, 'E', 2], [1, 'E', 2], [1, 'E', 2], [1, 'E', 1], [2, 'W', 2], [1, 'W', 3], [1, 'E', 3], [1, 'W', 4], [2, 'E', 3], [1, 'E', 1]], 'toll_dir': 'W', 'base': 600, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 3}, 600), ({'trips': [[2, 'E', 1], [1, 'E', 1], [2, 'E', 1], [1, 'E', 3], [13, 'E', 1], [2, 'E', 4], [1, 'W', 1], [1, 'E', 4]], 'toll_dir': 'E', 'base': 600, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 2400), ({'trips': [[1, 'E', 1], [1, 'E', 1], [13, 'E', 1], [2, 'E', 2], [13, 'W', 2], [1, 'E', 1], [1, 'E', 1], [1, 'W', 4], [2, 'E', 4]], 'toll_dir': 'E', 'base': 725, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 3}, 3770), ({'trips': [[1, 'W', 4], [13, 'W', 1], [1, 'E', 1], [13, 'E', 1], [2, 'W', 2], [2, 'E', 2], [1, 'E', 1], [1, 'W', 3], [2, 'W', 1], [13, 'E', 4], [1, 'W', 2], [2, 'E', 1], [1, 'W', 4], [2, 'W', 3], [13, 'W', 3], [1, 'E', 1]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 3}, 3400), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[13, 'W', 4], [13, 'E', 1], [1, 'W', 2]], 'toll_dir': 'W', 'base': 850, 'threshold': 1, 'discount_pct': 25, 'carpool_min': 3}, 850), ({'trips': [[1, 'E', 1], [1, 'W', 1], [1, 'W', 2], [2, 'E', 4], [13, 'E', 1], [13, 'E', 1], [2, 'E', 4], [1, 'W', 1], [1, 'W', 3], [13, 'E', 3]], 'toll_dir': 'E', 'base': 600, 'threshold': 5, 'discount_pct': 40, 'carpool_min': 3}, 1800), ({'trips': [[13, 'E', 3], [1, 'W', 1], [2, 'E', 1], [2, 'W', 1], [1, 'W', 2], [2, 'W', 4], [13, 'E', 1], [1, 'E', 2], [2, 'E', 4], [2, 'E', 4], [2, 'E', 2]], 'toll_dir': 'E', 'base': 725, 'threshold': 3, 'discount_pct': 40, 'carpool_min': 2}, 1450)], [({'trips': [[2, 'W', 3], [1, 'E', 1], [1, 'E', 4], [13, 'E', 1], [1, 'E', 1], [13, 'E', 3]], 'toll_dir': 'W', 'base': 850, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 0), ({'trips': [[1, 'W', 1], [1, 'E', 1], [1, 'E', 4], [13, 'E', 2], [2, 'W', 4], [13, 'W', 1], [2, 'E', 1], [1, 'E', 2], [1, 'W', 1], [2, 'W', 1], [2, 'E', 1], [13, 'W', 2], [1, 'E', 1], [1, 'W', 1], [1, 'E', 2], [1, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 1, 'discount_pct': 33, 'carpool_min': 2}, 2420), ({'trips': [[13, 'W', 1], [2, 'W', 1], [2, 'E', 1], [1, 'W', 1], [1, 'W', 4], [13, 'E', 4], [13, 'W', 1], [13, 'E', 1], [1, 'E', 1], [1, 'E', 2], [2, 'W', 2], [1, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 4, 'discount_pct': 25, 'carpool_min': 3}, 2900), ({'trips': [[1, 'E', 1], [1, 'E', 1], [2, 'E', 1], [1, 'W', 3], [2, 'W', 1], [2, 'E', 4], [13, 'W', 1], [1, 'W', 2]], 'toll_dir': 'W', 'base': 600, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 1800), ({'trips': [[1, 'E', 1], [13, 'E', 2], [1, 'W', 1], [1, 'W', 1], [13, 'W', 1], [2, 'W', 1], [1, 'E', 2], [1, 'E', 3], [1, 'W', 1], [1, 'E', 4], [2, 'W', 1], [1, 'W', 3]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 3}, 4760), ({'trips': [[1, 'E', 4], [13, 'E', 3], [1, 'E', 2], [2, 'W', 1], [1, 'E', 2], [2, 'E', 1], [13, 'E', 2], [1, 'E', 1], [13, 'W', 1], [13, 'E', 1], [2, 'W', 4], [2, 'W', 3], [1, 'W', 1], [1, 'E', 1], [1, 'W', 1]], 'toll_dir': 'W', 'base': 850, 'threshold': 1, 'discount_pct': 25, 'carpool_min': 2}, 3187), ({'trips': [[13, 'W', 1], [13, 'W', 1], [13, 'E', 1], [1, 'E', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 3}, 1450), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660)], [({'trips': [[13, 'W', 1], [13, 'E', 1], [2, 'E', 1], [2, 'W', 1], [1, 'W', 4], [1, 'W', 2], [1, 'W', 1], [2, 'W', 3], [2, 'W', 1], [1, 'E', 1], [13, 'E', 4], [13, 'E', 4], [13, 'W', 1], [1, 'E', 1], [13, 'E', 1], [1, 'W', 3]], 'toll_dir': 'W', 'base': 725, 'threshold': 3, 'discount_pct': 40, 'carpool_min': 2}, 3625), ({'trips': [[1, 'W', 1], [1, 'E', 1], [1, 'E', 3]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 2}, 850), ({'trips': [[13, 'E', 2], [1, 'W', 4], [1, 'E', 1], [1, 'W', 3], [1, 'W', 1], [1, 'W', 2], [1, 'E', 3], [13, 'W', 4], [13, 'W', 3], [1, 'W', 1], [2, 'E', 1], [13, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 1, 'discount_pct': 40, 'carpool_min': 2}, 1450), ({'trips': [[2, 'E', 1], [2, 'E', 1], [2, 'E', 1], [1, 'W', 1], [13, 'W', 3], [13, 'E', 3], [13, 'W', 2], [2, 'W', 2]], 'toll_dir': 'E', 'base': 600, 'threshold': 1, 'discount_pct': 25, 'carpool_min': 3}, 1500), ({'trips': [[2, 'W', 1], [1, 'E', 1], [2, 'E', 1], [2, 'W', 2], [13, 'W', 3], [13, 'E', 4], [13, 'W', 1], [13, 'W', 2], [13, 'E', 4]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 2}, 1700), ({'trips': [[1, 'E', 3], [13, 'E', 3], [13, 'W', 1], [13, 'W', 1], [2, 'E', 1], [1, 'E', 2], [1, 'W', 1], [2, 'W', 2], [13, 'E', 1], [2, 'E', 2], [13, 'E', 1], [2, 'W', 2], [1, 'W', 1], [1, 'W', 1], [13, 'E', 1], [1, 'E', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 1, 'discount_pct': 40, 'carpool_min': 3}, 3915), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[2, 'W', 4], [13, 'W', 1], [1, 'E', 3], [1, 'E', 1], [1, 'E', 4], [2, 'W', 1], [13, 'E', 3], [1, 'E', 2], [13, 'E', 4], [2, 'E', 3], [1, 'E', 3], [1, 'W', 1], [2, 'E', 1], [1, 'W', 3]], 'toll_dir': 'E', 'base': 850, 'threshold': 4, 'discount_pct': 25, 'carpool_min': 2}, 1700)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('fee oracle' + ' %d' % i, 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":"a0e72eeb18003731520a6541ce2f17c9a5747e3fded4036365ab57b4ab037446","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    counts = {}\n    total = 0\n    for month, d, occ in x['trips']:\n        if d == x['toll_dir']:\n            continue\n        if occ >= x['carpool_min']:\n            continue\n        k = counts.get(month, 0) + 1\n        counts[month] = k\n        if k > x['threshold']:\n            total += x['base'] * (100 - x['discount_pct']) // 100\n        else:\n            total += x['base']\n    return total\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[1, 'W', 1], [13, 'E', 2], [2, 'E', 4]], 'toll_dir': 'W', 'base': 725, 'threshold': 3, 'discount_pct': 25, 'carpool_min': 3}, 725), ({'trips': [[13, 'E', 1], [13, 'W', 1], [13, 'W', 1], [1, 'W', 1], [2, 'E', 1], [13, 'E', 2], [1, 'W', 2], [2, 'W', 3], [2, 'W', 4], [13, 'E', 4], [1, 'E', 1], [1, 'W', 2], [1, 'W', 1], [13, 'W', 1], [2, 'E', 1], [1, 'E', 1]], 'toll_dir': 'E', 'base': 600, 'threshold': 5, 'discount_pct': 25, 'carpool_min': 2}, 3000), ({'trips': [[1, 'E', 3], [1, 'W', 3], [1, 'E', 1], [2, 'W', 1], [13, 'W', 1], [13, 'E', 1], [2, 'W', 3], [1, 'E', 1], [1, 'E', 1], [13, 'W', 1], [2, 'W', 4], [1, 'W', 4], [1, 'W', 2], [2, 'E', 1], [13, 'E', 1]], 'toll_dir': 'W', 'base': 600, 'threshold': 5, 'discount_pct': 25, 'carpool_min': 3}, 2400), ({'trips': [[1, 'E', 1], [13, 'W', 1], [1, 'W', 3], [13, 'E', 1]], 'toll_dir': 'E', 'base': 850, 'threshold': 5, 'discount_pct': 25, 'carpool_min': 2}, 1700), ({'trips': [[13, 'W', 1], [1, 'E', 2], [2, 'E', 3], [13, 'E', 2], [1, 'E', 3], [13, 'E', 3], [1, 'W', 3], [1, 'W', 1], [2, 'W', 2], [1, 'E', 1], [1, 'W', 2], [2, 'E', 2]], 'toll_dir': 'E', 'base': 600, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 2}, 600), ({'trips': [[1, 'W', 3], [1, 'W', 1], [1, 'W', 1], [1, 'E', 3], [1, 'E', 1], [2, 'W', 1], [13, 'E', 4], [1, 'E', 1], [13, 'E', 1], [2, 'W', 1], [13, 'E', 4], [1, 'E', 1]], 'toll_dir': 'E', 'base': 600, 'threshold': 4, 'discount_pct': 25, 'carpool_min': 3}, 2400), ({'trips': [[13, 'E', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1], [1, 'W', 3], [1, 'E', 4], [13, 'W', 4], [2, 'E', 1], [2, 'W', 4], [1, 'E', 1], [1, 'E', 1], [1, 'W', 1], [1, 'W', 1], [2, 'W', 4]], 'toll_dir': 'W', 'base': 725, 'threshold': 4, 'discount_pct': 40, 'carpool_min': 2}, 2900)], [({'trips': [[13, 'E', 1], [2, 'W', 2], [1, 'E', 1], [13, 'W', 3], [13, 'W', 2], [2, 'E', 2], [13, 'E', 2], [2, 'E', 1], [1, 'W', 1], [13, 'W', 2], [1, 'W', 1], [2, 'E', 1], [1, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 2}, 2900), ({'trips': [[2, 'E', 1], [2, 'E', 3], [1, 'W', 1], [1, 'E', 2], [1, 'E', 3], [1, 'W', 4], [1, 'W', 2], [1, 'E', 3]], 'toll_dir': 'E', 'base': 600, 'threshold': 1, 'discount_pct': 33, 'carpool_min': 2}, 600), ({'trips': [[2, 'W', 3], [1, 'E', 4], [1, 'W', 1], [1, 'W', 4], [13, 'W', 4], [1, 'E', 1], [1, 'W', 3], [2, 'W', 4], [2, 'E', 1], [2, 'W', 1], [13, 'W', 3]], 'toll_dir': 'W', 'base': 725, 'threshold': 1, 'discount_pct': 33, 'carpool_min': 2}, 1450), ({'trips': [[1, 'W', 3], [1, 'E', 1], [1, 'W', 2], [2, 'W', 4], [13, 'E', 1], [2, 'W', 4]], 'toll_dir': 'W', 'base': 850, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 2}, 0), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[1, 'E', 4], [1, 'E', 1], [2, 'E', 1], [2, 'E', 1], [1, 'W', 2], [1, 'E', 2]], 'toll_dir': 'E', 'base': 850, 'threshold': 3, 'discount_pct': 40, 'carpool_min': 2}, 2550), ({'trips': [[1, 'W', 1], [1, 'W', 4], [1, 'E', 2]], 'toll_dir': 'W', 'base': 850, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 850), ({'trips': [[13, 'E', 1], [2, 'W', 1], [2, 'W', 1], [13, 'E', 2]], 'toll_dir': 'W', 'base': 600, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 3}, 1200)], [({'trips': [[13, 'W', 4], [1, 'E', 1], [1, 'W', 3], [1, 'E', 2], [1, 'E', 2], [1, 'E', 2], [1, 'E', 1], [2, 'W', 2], [1, 'W', 3], [1, 'E', 3], [1, 'W', 4], [2, 'E', 3], [1, 'E', 1]], 'toll_dir': 'W', 'base': 600, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 3}, 600), ({'trips': [[2, 'E', 1], [1, 'E', 1], [2, 'E', 1], [1, 'E', 3], [13, 'E', 1], [2, 'E', 4], [1, 'W', 1], [1, 'E', 4]], 'toll_dir': 'E', 'base': 600, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 2400), ({'trips': [[1, 'E', 1], [1, 'E', 1], [13, 'E', 1], [2, 'E', 2], [13, 'W', 2], [1, 'E', 1], [1, 'E', 1], [1, 'W', 4], [2, 'E', 4]], 'toll_dir': 'E', 'base': 725, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 3}, 3770), ({'trips': [[1, 'W', 4], [13, 'W', 1], [1, 'E', 1], [13, 'E', 1], [2, 'W', 2], [2, 'E', 2], [1, 'E', 1], [1, 'W', 3], [2, 'W', 1], [13, 'E', 4], [1, 'W', 2], [2, 'E', 1], [1, 'W', 4], [2, 'W', 3], [13, 'W', 3], [1, 'E', 1]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 3}, 3400), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[13, 'W', 4], [13, 'E', 1], [1, 'W', 2]], 'toll_dir': 'W', 'base': 850, 'threshold': 1, 'discount_pct': 25, 'carpool_min': 3}, 850), ({'trips': [[1, 'E', 1], [1, 'W', 1], [1, 'W', 2], [2, 'E', 4], [13, 'E', 1], [13, 'E', 1], [2, 'E', 4], [1, 'W', 1], [1, 'W', 3], [13, 'E', 3]], 'toll_dir': 'E', 'base': 600, 'threshold': 5, 'discount_pct': 40, 'carpool_min': 3}, 1800), ({'trips': [[13, 'E', 3], [1, 'W', 1], [2, 'E', 1], [2, 'W', 1], [1, 'W', 2], [2, 'W', 4], [13, 'E', 1], [1, 'E', 2], [2, 'E', 4], [2, 'E', 4], [2, 'E', 2]], 'toll_dir': 'E', 'base': 725, 'threshold': 3, 'discount_pct': 40, 'carpool_min': 2}, 1450)], [({'trips': [[2, 'W', 3], [1, 'E', 1], [1, 'E', 4], [13, 'E', 1], [1, 'E', 1], [13, 'E', 3]], 'toll_dir': 'W', 'base': 850, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 0), ({'trips': [[1, 'W', 1], [1, 'E', 1], [1, 'E', 4], [13, 'E', 2], [2, 'W', 4], [13, 'W', 1], [2, 'E', 1], [1, 'E', 2], [1, 'W', 1], [2, 'W', 1], [2, 'E', 1], [13, 'W', 2], [1, 'E', 1], [1, 'W', 1], [1, 'E', 2], [1, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 1, 'discount_pct': 33, 'carpool_min': 2}, 2420), ({'trips': [[13, 'W', 1], [2, 'W', 1], [2, 'E', 1], [1, 'W', 1], [1, 'W', 4], [13, 'E', 4], [13, 'W', 1], [13, 'E', 1], [1, 'E', 1], [1, 'E', 2], [2, 'W', 2], [1, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 4, 'discount_pct': 25, 'carpool_min': 3}, 2900), ({'trips': [[1, 'E', 1], [1, 'E', 1], [2, 'E', 1], [1, 'W', 3], [2, 'W', 1], [2, 'E', 4], [13, 'W', 1], [1, 'W', 2]], 'toll_dir': 'W', 'base': 600, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 1800), ({'trips': [[1, 'E', 1], [13, 'E', 2], [1, 'W', 1], [1, 'W', 1], [13, 'W', 1], [2, 'W', 1], [1, 'E', 2], [1, 'E', 3], [1, 'W', 1], [1, 'E', 4], [2, 'W', 1], [1, 'W', 3]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 3}, 4760), ({'trips': [[1, 'E', 4], [13, 'E', 3], [1, 'E', 2], [2, 'W', 1], [1, 'E', 2], [2, 'E', 1], [13, 'E', 2], [1, 'E', 1], [13, 'W', 1], [13, 'E', 1], [2, 'W', 4], [2, 'W', 3], [1, 'W', 1], [1, 'E', 1], [1, 'W', 1]], 'toll_dir': 'W', 'base': 850, 'threshold': 1, 'discount_pct': 25, 'carpool_min': 2}, 3187), ({'trips': [[13, 'W', 1], [13, 'W', 1], [13, 'E', 1], [1, 'E', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 3}, 1450), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660)], [({'trips': [[13, 'W', 1], [13, 'E', 1], [2, 'E', 1], [2, 'W', 1], [1, 'W', 4], [1, 'W', 2], [1, 'W', 1], [2, 'W', 3], [2, 'W', 1], [1, 'E', 1], [13, 'E', 4], [13, 'E', 4], [13, 'W', 1], [1, 'E', 1], [13, 'E', 1], [1, 'W', 3]], 'toll_dir': 'W', 'base': 725, 'threshold': 3, 'discount_pct': 40, 'carpool_min': 2}, 3625), ({'trips': [[1, 'W', 1], [1, 'E', 1], [1, 'E', 3]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 2}, 850), ({'trips': [[13, 'E', 2], [1, 'W', 4], [1, 'E', 1], [1, 'W', 3], [1, 'W', 1], [1, 'W', 2], [1, 'E', 3], [13, 'W', 4], [13, 'W', 3], [1, 'W', 1], [2, 'E', 1], [13, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 1, 'discount_pct': 40, 'carpool_min': 2}, 1450), ({'trips': [[2, 'E', 1], [2, 'E', 1], [2, 'E', 1], [1, 'W', 1], [13, 'W', 3], [13, 'E', 3], [13, 'W', 2], [2, 'W', 2]], 'toll_dir': 'E', 'base': 600, 'threshold': 1, 'discount_pct': 25, 'carpool_min': 3}, 1500), ({'trips': [[2, 'W', 1], [1, 'E', 1], [2, 'E', 1], [2, 'W', 2], [13, 'W', 3], [13, 'E', 4], [13, 'W', 1], [13, 'W', 2], [13, 'E', 4]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 2}, 1700), ({'trips': [[1, 'E', 3], [13, 'E', 3], [13, 'W', 1], [13, 'W', 1], [2, 'E', 1], [1, 'E', 2], [1, 'W', 1], [2, 'W', 2], [13, 'E', 1], [2, 'E', 2], [13, 'E', 1], [2, 'W', 2], [1, 'W', 1], [1, 'W', 1], [13, 'E', 1], [1, 'E', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 1, 'discount_pct': 40, 'carpool_min': 3}, 3915), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[2, 'W', 4], [13, 'W', 1], [1, 'E', 3], [1, 'E', 1], [1, 'E', 4], [2, 'W', 1], [13, 'E', 3], [1, 'E', 2], [13, 'E', 4], [2, 'E', 3], [1, 'E', 3], [1, 'W', 1], [2, 'E', 1], [1, 'W', 3]], 'toll_dir': 'E', 'base': 850, 'threshold': 4, 'discount_pct': 25, 'carpool_min': 2}, 1700)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('fee oracle' + ' %d' % i, 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":"833cbc998f11a4e7e11acefcd2513f0a3eea03f47d14ef069a60feb5f34220e5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    counts = {}\n    total = 0\n    for month, d, occ in x['trips']:\n        if d != x['toll_dir']:\n            continue\n        if occ >= x['carpool_min']:\n            continue\n        k = counts.get(month, 0) + 1\n        counts[month] = k\n        if k > x['threshold']:\n            total += x['base'] * (100 - x['discount_pct']) // 100\n        else:\n            total += x['base']\n    return total\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[1, 'W', 1], [13, 'E', 2], [2, 'E', 4]], 'toll_dir': 'W', 'base': 725, 'threshold': 3, 'discount_pct': 25, 'carpool_min': 3}, 725), ({'trips': [[13, 'E', 1], [13, 'W', 1], [13, 'W', 1], [1, 'W', 1], [2, 'E', 1], [13, 'E', 2], [1, 'W', 2], [2, 'W', 3], [2, 'W', 4], [13, 'E', 4], [1, 'E', 1], [1, 'W', 2], [1, 'W', 1], [13, 'W', 1], [2, 'E', 1], [1, 'E', 1]], 'toll_dir': 'E', 'base': 600, 'threshold': 5, 'discount_pct': 25, 'carpool_min': 2}, 3000), ({'trips': [[1, 'E', 3], [1, 'W', 3], [1, 'E', 1], [2, 'W', 1], [13, 'W', 1], [13, 'E', 1], [2, 'W', 3], [1, 'E', 1], [1, 'E', 1], [13, 'W', 1], [2, 'W', 4], [1, 'W', 4], [1, 'W', 2], [2, 'E', 1], [13, 'E', 1]], 'toll_dir': 'W', 'base': 600, 'threshold': 5, 'discount_pct': 25, 'carpool_min': 3}, 2400), ({'trips': [[1, 'E', 1], [13, 'W', 1], [1, 'W', 3], [13, 'E', 1]], 'toll_dir': 'E', 'base': 850, 'threshold': 5, 'discount_pct': 25, 'carpool_min': 2}, 1700), ({'trips': [[13, 'W', 1], [1, 'E', 2], [2, 'E', 3], [13, 'E', 2], [1, 'E', 3], [13, 'E', 3], [1, 'W', 3], [1, 'W', 1], [2, 'W', 2], [1, 'E', 1], [1, 'W', 2], [2, 'E', 2]], 'toll_dir': 'E', 'base': 600, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 2}, 600), ({'trips': [[1, 'W', 3], [1, 'W', 1], [1, 'W', 1], [1, 'E', 3], [1, 'E', 1], [2, 'W', 1], [13, 'E', 4], [1, 'E', 1], [13, 'E', 1], [2, 'W', 1], [13, 'E', 4], [1, 'E', 1]], 'toll_dir': 'E', 'base': 600, 'threshold': 4, 'discount_pct': 25, 'carpool_min': 3}, 2400), ({'trips': [[13, 'E', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1], [1, 'W', 3], [1, 'E', 4], [13, 'W', 4], [2, 'E', 1], [2, 'W', 4], [1, 'E', 1], [1, 'E', 1], [1, 'W', 1], [1, 'W', 1], [2, 'W', 4]], 'toll_dir': 'W', 'base': 725, 'threshold': 4, 'discount_pct': 40, 'carpool_min': 2}, 2900)], [({'trips': [[13, 'E', 1], [2, 'W', 2], [1, 'E', 1], [13, 'W', 3], [13, 'W', 2], [2, 'E', 2], [13, 'E', 2], [2, 'E', 1], [1, 'W', 1], [13, 'W', 2], [1, 'W', 1], [2, 'E', 1], [1, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 2}, 2900), ({'trips': [[2, 'E', 1], [2, 'E', 3], [1, 'W', 1], [1, 'E', 2], [1, 'E', 3], [1, 'W', 4], [1, 'W', 2], [1, 'E', 3]], 'toll_dir': 'E', 'base': 600, 'threshold': 1, 'discount_pct': 33, 'carpool_min': 2}, 600), ({'trips': [[2, 'W', 3], [1, 'E', 4], [1, 'W', 1], [1, 'W', 4], [13, 'W', 4], [1, 'E', 1], [1, 'W', 3], [2, 'W', 4], [2, 'E', 1], [2, 'W', 1], [13, 'W', 3]], 'toll_dir': 'W', 'base': 725, 'threshold': 1, 'discount_pct': 33, 'carpool_min': 2}, 1450), ({'trips': [[1, 'W', 3], [1, 'E', 1], [1, 'W', 2], [2, 'W', 4], [13, 'E', 1], [2, 'W', 4]], 'toll_dir': 'W', 'base': 850, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 2}, 0), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[1, 'E', 4], [1, 'E', 1], [2, 'E', 1], [2, 'E', 1], [1, 'W', 2], [1, 'E', 2]], 'toll_dir': 'E', 'base': 850, 'threshold': 3, 'discount_pct': 40, 'carpool_min': 2}, 2550), ({'trips': [[1, 'W', 1], [1, 'W', 4], [1, 'E', 2]], 'toll_dir': 'W', 'base': 850, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 850), ({'trips': [[13, 'E', 1], [2, 'W', 1], [2, 'W', 1], [13, 'E', 2]], 'toll_dir': 'W', 'base': 600, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 3}, 1200)], [({'trips': [[13, 'W', 4], [1, 'E', 1], [1, 'W', 3], [1, 'E', 2], [1, 'E', 2], [1, 'E', 2], [1, 'E', 1], [2, 'W', 2], [1, 'W', 3], [1, 'E', 3], [1, 'W', 4], [2, 'E', 3], [1, 'E', 1]], 'toll_dir': 'W', 'base': 600, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 3}, 600), ({'trips': [[2, 'E', 1], [1, 'E', 1], [2, 'E', 1], [1, 'E', 3], [13, 'E', 1], [2, 'E', 4], [1, 'W', 1], [1, 'E', 4]], 'toll_dir': 'E', 'base': 600, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 2400), ({'trips': [[1, 'E', 1], [1, 'E', 1], [13, 'E', 1], [2, 'E', 2], [13, 'W', 2], [1, 'E', 1], [1, 'E', 1], [1, 'W', 4], [2, 'E', 4]], 'toll_dir': 'E', 'base': 725, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 3}, 3770), ({'trips': [[1, 'W', 4], [13, 'W', 1], [1, 'E', 1], [13, 'E', 1], [2, 'W', 2], [2, 'E', 2], [1, 'E', 1], [1, 'W', 3], [2, 'W', 1], [13, 'E', 4], [1, 'W', 2], [2, 'E', 1], [1, 'W', 4], [2, 'W', 3], [13, 'W', 3], [1, 'E', 1]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 3}, 3400), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[13, 'W', 4], [13, 'E', 1], [1, 'W', 2]], 'toll_dir': 'W', 'base': 850, 'threshold': 1, 'discount_pct': 25, 'carpool_min': 3}, 850), ({'trips': [[1, 'E', 1], [1, 'W', 1], [1, 'W', 2], [2, 'E', 4], [13, 'E', 1], [13, 'E', 1], [2, 'E', 4], [1, 'W', 1], [1, 'W', 3], [13, 'E', 3]], 'toll_dir': 'E', 'base': 600, 'threshold': 5, 'discount_pct': 40, 'carpool_min': 3}, 1800), ({'trips': [[13, 'E', 3], [1, 'W', 1], [2, 'E', 1], [2, 'W', 1], [1, 'W', 2], [2, 'W', 4], [13, 'E', 1], [1, 'E', 2], [2, 'E', 4], [2, 'E', 4], [2, 'E', 2]], 'toll_dir': 'E', 'base': 725, 'threshold': 3, 'discount_pct': 40, 'carpool_min': 2}, 1450)], [({'trips': [[2, 'W', 3], [1, 'E', 1], [1, 'E', 4], [13, 'E', 1], [1, 'E', 1], [13, 'E', 3]], 'toll_dir': 'W', 'base': 850, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 0), ({'trips': [[1, 'W', 1], [1, 'E', 1], [1, 'E', 4], [13, 'E', 2], [2, 'W', 4], [13, 'W', 1], [2, 'E', 1], [1, 'E', 2], [1, 'W', 1], [2, 'W', 1], [2, 'E', 1], [13, 'W', 2], [1, 'E', 1], [1, 'W', 1], [1, 'E', 2], [1, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 1, 'discount_pct': 33, 'carpool_min': 2}, 2420), ({'trips': [[13, 'W', 1], [2, 'W', 1], [2, 'E', 1], [1, 'W', 1], [1, 'W', 4], [13, 'E', 4], [13, 'W', 1], [13, 'E', 1], [1, 'E', 1], [1, 'E', 2], [2, 'W', 2], [1, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 4, 'discount_pct': 25, 'carpool_min': 3}, 2900), ({'trips': [[1, 'E', 1], [1, 'E', 1], [2, 'E', 1], [1, 'W', 3], [2, 'W', 1], [2, 'E', 4], [13, 'W', 1], [1, 'W', 2]], 'toll_dir': 'W', 'base': 600, 'threshold': 3, 'discount_pct': 33, 'carpool_min': 3}, 1800), ({'trips': [[1, 'E', 1], [13, 'E', 2], [1, 'W', 1], [1, 'W', 1], [13, 'W', 1], [2, 'W', 1], [1, 'E', 2], [1, 'E', 3], [1, 'W', 1], [1, 'E', 4], [2, 'W', 1], [1, 'W', 3]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 3}, 4760), ({'trips': [[1, 'E', 4], [13, 'E', 3], [1, 'E', 2], [2, 'W', 1], [1, 'E', 2], [2, 'E', 1], [13, 'E', 2], [1, 'E', 1], [13, 'W', 1], [13, 'E', 1], [2, 'W', 4], [2, 'W', 3], [1, 'W', 1], [1, 'E', 1], [1, 'W', 1]], 'toll_dir': 'W', 'base': 850, 'threshold': 1, 'discount_pct': 25, 'carpool_min': 2}, 3187), ({'trips': [[13, 'W', 1], [13, 'W', 1], [13, 'E', 1], [1, 'E', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 3}, 1450), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660)], [({'trips': [[13, 'W', 1], [13, 'E', 1], [2, 'E', 1], [2, 'W', 1], [1, 'W', 4], [1, 'W', 2], [1, 'W', 1], [2, 'W', 3], [2, 'W', 1], [1, 'E', 1], [13, 'E', 4], [13, 'E', 4], [13, 'W', 1], [1, 'E', 1], [13, 'E', 1], [1, 'W', 3]], 'toll_dir': 'W', 'base': 725, 'threshold': 3, 'discount_pct': 40, 'carpool_min': 2}, 3625), ({'trips': [[1, 'W', 1], [1, 'E', 1], [1, 'E', 3]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 25, 'carpool_min': 2}, 850), ({'trips': [[13, 'E', 2], [1, 'W', 4], [1, 'E', 1], [1, 'W', 3], [1, 'W', 1], [1, 'W', 2], [1, 'E', 3], [13, 'W', 4], [13, 'W', 3], [1, 'W', 1], [2, 'E', 1], [13, 'W', 1]], 'toll_dir': 'E', 'base': 725, 'threshold': 1, 'discount_pct': 40, 'carpool_min': 2}, 1450), ({'trips': [[2, 'E', 1], [2, 'E', 1], [2, 'E', 1], [1, 'W', 1], [13, 'W', 3], [13, 'E', 3], [13, 'W', 2], [2, 'W', 2]], 'toll_dir': 'E', 'base': 600, 'threshold': 1, 'discount_pct': 25, 'carpool_min': 3}, 1500), ({'trips': [[2, 'W', 1], [1, 'E', 1], [2, 'E', 1], [2, 'W', 2], [13, 'W', 3], [13, 'E', 4], [13, 'W', 1], [13, 'W', 2], [13, 'E', 4]], 'toll_dir': 'W', 'base': 850, 'threshold': 2, 'discount_pct': 40, 'carpool_min': 2}, 1700), ({'trips': [[1, 'E', 3], [13, 'E', 3], [13, 'W', 1], [13, 'W', 1], [2, 'E', 1], [1, 'E', 2], [1, 'W', 1], [2, 'W', 2], [13, 'E', 1], [2, 'E', 2], [13, 'E', 1], [2, 'W', 2], [1, 'W', 1], [1, 'W', 1], [13, 'E', 1], [1, 'E', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 1, 'discount_pct': 40, 'carpool_min': 3}, 3915), ({'trips': [[1, 'W', 1], [1, 'W', 1], [1, 'W', 3], [1, 'W', 1], [13, 'W', 1]], 'toll_dir': 'W', 'base': 725, 'threshold': 2, 'discount_pct': 33, 'carpool_min': 3}, 2660), ({'trips': [[2, 'W', 4], [13, 'W', 1], [1, 'E', 3], [1, 'E', 1], [1, 'E', 4], [2, 'W', 1], [13, 'E', 3], [1, 'E', 2], [13, 'E', 4], [2, 'E', 3], [1, 'E', 3], [1, 'W', 1], [2, 'E', 1], [1, 'W', 3]], 'toll_dir': 'E', 'base': 850, 'threshold': 4, 'discount_pct': 25, 'carpool_min': 2}, 1700)]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check('fee oracle' + ' %d' % i, 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":"A deterministic, bounded toy model with a stipulated contract; it makes no claim of conformance to any agency manual or standard. 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-toll_and_parking_fee_computation-bridge-frequent-direction","generated_at":"2026-09-29T14:48:04.141863+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Fee engines bill customers in integer cents; a wrong boundary, rounding stage or cap scope silently over- or under-charges.","repair":"Restore the tolled direction rule so that the step reads `if d != x['toll_dir']:`.","root_cause":"The direction test is inverted, charging the free direction.","sha256":"7211676061e297d8e6261a7a3a2e2a5fe6265e75e086ed7f8465f2993627d019","title":"One-way bridge toll with frequent-user discount: the tolled direction is hard-coded westbound · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.139,"exit_code":1,"observations":[{"actual":2660,"check":"fee oracle 0","expected":2660,"passed":true},{"actual":725,"check":"fee oracle 1","expected":725,"passed":true},{"actual":3000,"check":"fee oracle 2","expected":3000,"passed":true},{"actual":2400,"check":"fee oracle 3","expected":2400,"passed":true},{"actual":850,"check":"fee oracle 4","expected":1700,"passed":false},{"actual":1200,"check":"fee oracle 5","expected":600,"passed":false},{"actual":2400,"check":"fee oracle 6","expected":2400,"passed":true},{"actual":2900,"check":"fee oracle 7","expected":2900,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 2660, \"expected\": 2660, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": 725, \"expected\": 725, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 3000, \"expected\": 3000, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 2400, \"expected\": 2400, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": 850, \"expected\": 1700, \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": 1200, \"expected\": 600, \"passed\": false}, {\"check\": \"fee oracle 6\", \"actual\": 2400, \"expected\": 2400, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 2900, \"expected\": 2900, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.53,"exit_code":1,"observations":[{"actual":0,"check":"fee oracle 0","expected":2660,"passed":false},{"actual":725,"check":"fee oracle 1","expected":725,"passed":true},{"actual":3000,"check":"fee oracle 2","expected":3000,"passed":true},{"actual":3600,"check":"fee oracle 3","expected":2400,"passed":false},{"actual":850,"check":"fee oracle 4","expected":1700,"passed":false},{"actual":1200,"check":"fee oracle 5","expected":600,"passed":false},{"actual":2400,"check":"fee oracle 6","expected":2400,"passed":true},{"actual":2900,"check":"fee oracle 7","expected":2900,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 0, \"expected\": 2660, \"passed\": false}, {\"check\": \"fee oracle 1\", \"actual\": 725, \"expected\": 725, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 3000, \"expected\": 3000, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 3600, \"expected\": 2400, \"passed\": false}, {\"check\": \"fee oracle 4\", \"actual\": 850, \"expected\": 1700, \"passed\": false}, {\"check\": \"fee oracle 5\", \"actual\": 1200, \"expected\": 600, \"passed\": false}, {\"check\": \"fee oracle 6\", \"actual\": 2400, \"expected\": 2400, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 2900, \"expected\": 2900, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.969,"exit_code":0,"observations":[{"actual":2660,"check":"fee oracle 0","expected":2660,"passed":true},{"actual":725,"check":"fee oracle 1","expected":725,"passed":true},{"actual":3000,"check":"fee oracle 2","expected":3000,"passed":true},{"actual":2400,"check":"fee oracle 3","expected":2400,"passed":true},{"actual":1700,"check":"fee oracle 4","expected":1700,"passed":true},{"actual":600,"check":"fee oracle 5","expected":600,"passed":true},{"actual":2400,"check":"fee oracle 6","expected":2400,"passed":true},{"actual":2900,"check":"fee oracle 7","expected":2900,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fee oracle 0\", \"actual\": 2660, \"expected\": 2660, \"passed\": true}, {\"check\": \"fee oracle 1\", \"actual\": 725, \"expected\": 725, \"passed\": true}, {\"check\": \"fee oracle 2\", \"actual\": 3000, \"expected\": 3000, \"passed\": true}, {\"check\": \"fee oracle 3\", \"actual\": 2400, \"expected\": 2400, \"passed\": true}, {\"check\": \"fee oracle 4\", \"actual\": 1700, \"expected\": 1700, \"passed\": true}, {\"check\": \"fee oracle 5\", \"actual\": 600, \"expected\": 600, \"passed\": true}, {\"check\": \"fee oracle 6\", \"actual\": 2400, \"expected\": 2400, \"passed\": true}, {\"check\": \"fee oracle 7\", \"actual\": 2900, \"expected\": 2900, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}