{"abstract":"The pair cache sees (b,a) one frame and (a,b) the next, restarting contacts.","category":"Collision detection broadphase","checks":8,"contract":"solve(boxes): boxes [id,minx,miny,maxx,maxy] with closed intervals (touching overlaps). Sweep x endpoints sorted by (coord, begin-before-end); on each begin, test y against every active box. Return sorted [min id, max id] pairs overlapping on both axes.","evaluation_group":"w2-collision_detection_broadphase-sort-and-sweep-2d","failed_approach":"Emitting [new, active] is still event-order dependent.","family":"w2-collision_detection_broadphase-sort-and-sweep-2d-pair-orientation","id":"FA-87351","implementations":{"attempt":{"sha256":"a4918e0165081825b7c645fa4461231d1a93970edb2fa1a19b450763c0ecfc41","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes):\n    ev = []\n    for b in boxes:\n        ev.append((b[1], 0, b[0]))\n        ev.append((b[3], 1, b[0]))\n    ev.sort()\n    byid = {b[0]: b for b in boxes}\n    active = []\n    pairs = []\n    for x, kind, i in ev:\n        if kind == 0:\n            bi = byid[i]\n            for j in active:\n                bj = byid[j]\n                if bi[2] <= bj[4] and bj[2] <= bi[4]:\n                    pairs.append([i, j])\n            active.append(i)\n        else:\n            active.remove(i)\n    pairs.sort()\n    return pairs\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[22, -2.0, 2.0, 2.0, 3.0], [29, -5.0, 1.0, -4.0, 2.0], [4, -5.0, -2.0, -2.0, 1.0]]], [[4, 29]]], [[[[5, 0.0, 3.0, 2.0, 5.0], [15, -2.0, 3.0, -1.0, 6.0], [34, -3.0, 6.0, -2.0, 6.0], [20, -2.0, 1.0, 2.0, 4.0], [23, -2.0, -1.0, -2.0, -1.0], [1, 4.0, -5.0, 6.0, -2.0], [25, 0.0, 5.0, 1.0, 9.0]]], [[5, 20], [5, 25], [15, 20], [15, 34]]], [[[[20, 4.0, -5.0, 6.0, -3.0], [38, 0.0, 4.0, 1.0, 4.0], [22, 3.0, -6.0, 5.0, -5.0], [3, -1.0, -5.0, 0.0, -4.0], [35, -6.0, 3.0, -2.0, 7.0], [7, 2.0, -6.0, 5.0, -6.0], [28, -2.0, 1.0, 2.0, 3.0]]], [[7, 22], [20, 22], [28, 35]]], [[[[39, 5.0, 0.0, 9.0, 3.0], [27, 3.0, -1.0, 3.0, 0.0], [37, -6.0, 5.0, -2.0, 5.0], [22, -5.0, 1.0, -2.0, 1.0], [26, 6.0, 1.0, 8.0, 3.0], [24, 2.0, -3.0, 6.0, -1.0]]], [[24, 27], [26, 39]]], [[[[14, 0.0, -1.0, 3.0, -1.0], [30, -4.0, -3.0, -4.0, 0.0], [15, -3.0, 1.0, 0.0, 4.0]]], []], [[[[28, 6.0, -4.0, 7.0, -3.0], [32, 6.0, -4.0, 9.0, -1.0], [8, 1.0, 4.0, 3.0, 7.0], [9, 3.0, -6.0, 7.0, -4.0], [37, -6.0, 3.0, -2.0, 6.0]]], [[9, 28], [9, 32], [28, 32]]], [[[[17, 1.0, 6.0, 2.0, 7.0], [20, 6.0, 2.0, 6.0, 6.0], [4, 6.0, -6.0, 10.0, -4.0], [38, -6.0, -6.0, -3.0, -2.0], [19, 6.0, 1.0, 8.0, 5.0], [35, 4.0, -1.0, 8.0, -1.0]]], [[19, 20]]], [[[[14, 1.0, -4.0, 4.0, -1.0], [6, 0.0, -1.0, 4.0, 3.0], [32, -2.0, -3.0, 2.0, -1.0], [15, -4.0, 0.0, -4.0, 4.0], [7, -4.0, -2.0, -1.0, -2.0]]], [[6, 14], [6, 32], [7, 32], [14, 32]]]], [[[[[13, 5.0, -3.0, 6.0, -2.0], [34, 3.0, 3.0, 5.0, 4.0], [8, -4.0, 5.0, -3.0, 6.0], [10, 0.0, 1.0, 3.0, 4.0], [27, 2.0, 3.0, 2.0, 5.0], [4, -5.0, -2.0, -5.0, 2.0], [22, -6.0, 0.0, -5.0, 1.0]]], [[4, 22], [10, 27], [10, 34]]], [[[[4, -5.0, 2.0, -4.0, 6.0], [14, 0.0, -3.0, 4.0, -3.0], [5, 5.0, -1.0, 6.0, 1.0], [32, 3.0, 0.0, 6.0, 2.0], [27, 0.0, 4.0, 2.0, 5.0], [30, 5.0, -1.0, 5.0, 1.0], [35, 2.0, 3.0, 6.0, 3.0]]], [[5, 30], [5, 32], [30, 32]]], [[[[9, -6.0, 0.0, -3.0, 4.0], [11, -5.0, 0.0, -5.0, 3.0], [31, 0.0, -3.0, 4.0, -2.0], [5, -4.0, 3.0, 0.0, 3.0], [12, 5.0, 3.0, 9.0, 4.0], [26, 5.0, -2.0, 7.0, 1.0], [33, -3.0, -4.0, -2.0, -4.0]]], [[5, 9], [9, 11]]], [[[[6, 6.0, -1.0, 8.0, 0.0], [35, -2.0, 2.0, -1.0, 3.0], [24, 1.0, 0.0, 4.0, 0.0]]], []], [[[[16, 2.0, 6.0, 2.0, 10.0], [6, 2.0, -4.0, 4.0, -2.0], [22, 0.0, 2.0, 1.0, 4.0], [3, 2.0, -4.0, 2.0, -1.0], [17, -2.0, -4.0, -1.0, -3.0], [30, -6.0, -6.0, -2.0, -6.0], [34, 4.0, -5.0, 5.0, -1.0], [14, -1.0, 3.0, -1.0, 7.0]]], [[3, 6], [6, 34]]], [[[[15, 3.0, -5.0, 7.0, -2.0], [21, 0.0, 4.0, 3.0, 6.0], [29, 3.0, -6.0, 4.0, -5.0], [7, 0.0, 5.0, 4.0, 6.0], [34, 1.0, 4.0, 5.0, 8.0]]], [[7, 21], [7, 34], [15, 29], [21, 34]]], [[[[5, 3.0, 4.0, 4.0, 8.0], [37, 2.0, 1.0, 6.0, 4.0]]], [[5, 37]]], [[[[39, -6.0, 3.0, -3.0, 4.0], [4, 4.0, 0.0, 4.0, 1.0], [5, 4.0, 2.0, 6.0, 6.0], [24, -6.0, 1.0, -3.0, 5.0], [7, 5.0, 6.0, 9.0, 6.0]]], [[5, 7], [24, 39]]]], [[[[[30, 1.0, -3.0, 5.0, -2.0], [12, 6.0, 0.0, 10.0, 1.0], [4, -6.0, -5.0, -4.0, -1.0], [23, -3.0, 6.0, -3.0, 9.0], [17, -2.0, 1.0, -2.0, 4.0], [5, -4.0, -5.0, -4.0, -2.0], [8, -1.0, -2.0, 3.0, -2.0], [37, 6.0, -2.0, 6.0, -2.0]]], [[4, 5], [8, 30]]], [[[[3, 3.0, 6.0, 3.0, 8.0], [1, 0.0, 5.0, 1.0, 7.0], [14, 0.0, 0.0, 1.0, 2.0], [5, 4.0, -2.0, 8.0, 2.0], [31, -5.0, -1.0, -5.0, 1.0], [21, 6.0, 0.0, 7.0, 4.0], [25, 5.0, 2.0, 9.0, 2.0]]], [[5, 21], [5, 25], [21, 25]]], [[[[34, 6.0, 0.0, 9.0, 1.0], [24, -2.0, -3.0, 2.0, -3.0]]], []], [[[[38, 0.0, 6.0, 1.0, 7.0], [33, -2.0, 5.0, 2.0, 6.0], [3, -6.0, -1.0, -6.0, 0.0], [24, 0.0, -1.0, 3.0, 2.0], [19, -2.0, 3.0, 2.0, 3.0], [29, -4.0, 2.0, 0.0, 2.0]]], [[24, 29], [33, 38]]], [[[[20, -2.0, -6.0, -1.0, -4.0], [28, 0.0, -2.0, 4.0, 0.0], [16, -6.0, 1.0, -2.0, 4.0], [29, 0.0, 5.0, 4.0, 7.0], [27, -5.0, 2.0, -5.0, 4.0], [15, 2.0, 5.0, 4.0, 6.0]]], [[15, 29], [16, 27]]], [[[[5, -6.0, 5.0, -6.0, 6.0], [36, -2.0, -3.0, -2.0, -2.0], [27, 2.0, 5.0, 5.0, 6.0], [13, 6.0, 1.0, 7.0, 5.0], [14, 6.0, 5.0, 8.0, 9.0], [16, -6.0, -4.0, -5.0, 0.0], [12, 5.0, 6.0, 7.0, 8.0]]], [[12, 14], [12, 27], [13, 14]]], [[[[24, 1.0, -4.0, 4.0, -1.0], [32, -2.0, 4.0, 2.0, 6.0], [18, -5.0, -5.0, -2.0, -2.0]]], []], [[[[10, -2.0, 1.0, -1.0, 4.0], [13, -1.0, -4.0, 3.0, -1.0], [24, -3.0, 3.0, 1.0, 7.0]]], [[10, 24]]]], [[[[[27, -5.0, -4.0, -5.0, -2.0], [34, 4.0, 0.0, 6.0, 2.0], [14, 1.0, -5.0, 1.0, -5.0]]], []], [[[[11, -2.0, 0.0, -2.0, 1.0], [27, -4.0, 0.0, -2.0, 3.0]]], [[11, 27]]], [[[[18, -5.0, -4.0, -4.0, -1.0], [32, -1.0, -5.0, 2.0, -3.0], [22, -6.0, 2.0, -2.0, 6.0], [28, 6.0, 5.0, 7.0, 8.0], [12, -5.0, 4.0, -5.0, 7.0], [33, 5.0, 5.0, 9.0, 7.0], [39, -3.0, 3.0, -2.0, 4.0], [11, -5.0, -4.0, -4.0, 0.0]]], [[11, 18], [12, 22], [22, 39], [28, 33]]], [[[[34, -2.0, -6.0, -1.0, -6.0], [39, 5.0, -4.0, 7.0, -3.0], [9, 1.0, -3.0, 2.0, -2.0], [38, 2.0, 5.0, 4.0, 6.0], [8, -5.0, 1.0, -3.0, 4.0], [26, -2.0, -2.0, 2.0, 0.0], [4, 5.0, -5.0, 6.0, -3.0], [35, 3.0, 1.0, 6.0, 2.0], [10, -4.0, 6.0, -2.0, 6.0], [31, 2.0, 1.0, 5.0, 3.0]]], [[4, 39], [9, 26], [31, 35]]], [[[[1, -4.0, -5.0, -3.0, -1.0], [7, -2.0, 5.0, 1.0, 9.0], [9, -4.0, -6.0, -4.0, -6.0]]], []], [[[[1, -5.0, 6.0, -1.0, 6.0], [7, 5.0, -2.0, 9.0, -1.0], [28, -4.0, 0.0, -2.0, 2.0], [2, -1.0, -5.0, -1.0, -2.0], [3, 6.0, -1.0, 7.0, 2.0], [13, -4.0, 5.0, -2.0, 5.0], [14, 3.0, 6.0, 4.0, 6.0], [15, -4.0, 6.0, -1.0, 10.0], [35, -5.0, 1.0, -4.0, 4.0]]], [[1, 15], [3, 7], [28, 35]]], [[[[35, 3.0, -6.0, 4.0, -2.0], [13, 0.0, -2.0, 1.0, 2.0], [20, -3.0, 0.0, -1.0, 4.0], [23, -3.0, 6.0, -1.0, 10.0], [33, 2.0, -3.0, 5.0, -2.0], [38, 5.0, -2.0, 8.0, 2.0], [26, -2.0, 5.0, -2.0, 6.0]]], [[23, 26], [33, 35], [33, 38]]], [[[[25, -6.0, -6.0, -3.0, -5.0], [23, 5.0, -2.0, 7.0, -1.0], [3, 1.0, -3.0, 5.0, 1.0]]], [[3, 23]]]], [[[[[17, 6.0, -4.0, 7.0, -3.0], [1, 6.0, -3.0, 9.0, 1.0], [34, 6.0, -3.0, 10.0, 1.0], [15, 4.0, 2.0, 7.0, 6.0], [13, 0.0, -5.0, 0.0, -3.0], [14, 4.0, -6.0, 4.0, -5.0], [32, -5.0, -5.0, -3.0, -3.0], [20, -2.0, -4.0, 1.0, -4.0], [8, -6.0, 1.0, -2.0, 2.0], [11, 3.0, 6.0, 5.0, 8.0]]], [[1, 17], [1, 34], [11, 15], [13, 20], [17, 34]]], [[[[14, -6.0, -5.0, -2.0, -3.0], [29, -2.0, -1.0, -2.0, 0.0]]], []], [[[[5, 2.0, 6.0, 5.0, 6.0], [12, -3.0, 3.0, -2.0, 4.0], [35, -2.0, -4.0, -1.0, -4.0], [22, 6.0, 6.0, 9.0, 6.0], [28, 1.0, -6.0, 1.0, -2.0], [3, -2.0, -2.0, -2.0, 2.0], [16, 6.0, 5.0, 6.0, 5.0], [11, -3.0, 4.0, -3.0, 6.0], [37, -4.0, 3.0, -1.0, 7.0], [32, -5.0, -2.0, -1.0, -2.0], [18, 0.0, -5.0, 0.0, -2.0]]], [[3, 32], [11, 12], [11, 37], [12, 37]]], [[[[26, -2.0, 2.0, -2.0, 4.0], [32, 1.0, -6.0, 4.0, -5.0], [5, -3.0, -4.0, 1.0, -1.0], [39, -2.0, 3.0, -1.0, 3.0]]], [[26, 39]]], [[[[23, 1.0, -4.0, 2.0, -1.0], [14, 3.0, -3.0, 5.0, -2.0], [39, 4.0, 6.0, 4.0, 9.0], [20, -5.0, -1.0, -5.0, 1.0], [5, 4.0, 4.0, 7.0, 6.0], [7, -5.0, 5.0, -4.0, 5.0], [33, -5.0, -4.0, -1.0, -3.0], [26, -2.0, 3.0, 2.0, 5.0], [19, 5.0, 1.0, 7.0, 4.0]]], [[5, 19], [5, 39]]], [[[[36, -5.0, -4.0, -2.0, -2.0], [2, 6.0, 3.0, 9.0, 5.0], [7, 4.0, -2.0, 8.0, 1.0], [28, 1.0, -4.0, 3.0, -1.0], [25, 1.0, -6.0, 1.0, -2.0], [3, 0.0, 2.0, 0.0, 2.0], [38, 2.0, 6.0, 4.0, 6.0], [5, 6.0, 0.0, 10.0, 3.0], [14, -5.0, -5.0, -3.0, -2.0], [39, -3.0, 5.0, 0.0, 8.0]]], [[2, 5], [5, 7], [14, 36], [25, 28]]], [[[[35, -2.0, -1.0, 1.0, 2.0], [7, 6.0, 3.0, 10.0, 7.0], [18, 1.0, -2.0, 1.0, 1.0], [13, 3.0, -1.0, 3.0, 0.0], [12, -3.0, -1.0, -1.0, 2.0], [24, 2.0, 2.0, 2.0, 6.0], [36, 4.0, -4.0, 8.0, -3.0]]], [[12, 35], [18, 35]]], [[[[11, -1.0, -5.0, -1.0, -4.0], [25, -3.0, 2.0, -1.0, 3.0], [15, -5.0, -3.0, -3.0, 1.0], [27, -5.0, -6.0, -4.0, -4.0], [20, 0.0, -3.0, 0.0, -2.0], [39, 5.0, 3.0, 7.0, 5.0], [33, -3.0, -6.0, 0.0, -6.0], [28, -4.0, 6.0, -1.0, 6.0], [13, 1.0, -2.0, 1.0, 0.0]]], []]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %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":"24d5f280b18268c4ff43bc37f8e11abb44cc370ef3fbcea8651cb2e7d7d8cac4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes):\n    ev = []\n    for b in boxes:\n        ev.append((b[1], 0, b[0]))\n        ev.append((b[3], 1, b[0]))\n    ev.sort()\n    byid = {b[0]: b for b in boxes}\n    active = []\n    pairs = []\n    for x, kind, i in ev:\n        if kind == 0:\n            bi = byid[i]\n            for j in active:\n                bj = byid[j]\n                if bi[2] <= bj[4] and bj[2] <= bi[4]:\n                    pairs.append([j, i])\n            active.append(i)\n        else:\n            active.remove(i)\n    pairs.sort()\n    return pairs\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[22, -2.0, 2.0, 2.0, 3.0], [29, -5.0, 1.0, -4.0, 2.0], [4, -5.0, -2.0, -2.0, 1.0]]], [[4, 29]]], [[[[5, 0.0, 3.0, 2.0, 5.0], [15, -2.0, 3.0, -1.0, 6.0], [34, -3.0, 6.0, -2.0, 6.0], [20, -2.0, 1.0, 2.0, 4.0], [23, -2.0, -1.0, -2.0, -1.0], [1, 4.0, -5.0, 6.0, -2.0], [25, 0.0, 5.0, 1.0, 9.0]]], [[5, 20], [5, 25], [15, 20], [15, 34]]], [[[[20, 4.0, -5.0, 6.0, -3.0], [38, 0.0, 4.0, 1.0, 4.0], [22, 3.0, -6.0, 5.0, -5.0], [3, -1.0, -5.0, 0.0, -4.0], [35, -6.0, 3.0, -2.0, 7.0], [7, 2.0, -6.0, 5.0, -6.0], [28, -2.0, 1.0, 2.0, 3.0]]], [[7, 22], [20, 22], [28, 35]]], [[[[39, 5.0, 0.0, 9.0, 3.0], [27, 3.0, -1.0, 3.0, 0.0], [37, -6.0, 5.0, -2.0, 5.0], [22, -5.0, 1.0, -2.0, 1.0], [26, 6.0, 1.0, 8.0, 3.0], [24, 2.0, -3.0, 6.0, -1.0]]], [[24, 27], [26, 39]]], [[[[14, 0.0, -1.0, 3.0, -1.0], [30, -4.0, -3.0, -4.0, 0.0], [15, -3.0, 1.0, 0.0, 4.0]]], []], [[[[28, 6.0, -4.0, 7.0, -3.0], [32, 6.0, -4.0, 9.0, -1.0], [8, 1.0, 4.0, 3.0, 7.0], [9, 3.0, -6.0, 7.0, -4.0], [37, -6.0, 3.0, -2.0, 6.0]]], [[9, 28], [9, 32], [28, 32]]], [[[[17, 1.0, 6.0, 2.0, 7.0], [20, 6.0, 2.0, 6.0, 6.0], [4, 6.0, -6.0, 10.0, -4.0], [38, -6.0, -6.0, -3.0, -2.0], [19, 6.0, 1.0, 8.0, 5.0], [35, 4.0, -1.0, 8.0, -1.0]]], [[19, 20]]], [[[[14, 1.0, -4.0, 4.0, -1.0], [6, 0.0, -1.0, 4.0, 3.0], [32, -2.0, -3.0, 2.0, -1.0], [15, -4.0, 0.0, -4.0, 4.0], [7, -4.0, -2.0, -1.0, -2.0]]], [[6, 14], [6, 32], [7, 32], [14, 32]]]], [[[[[13, 5.0, -3.0, 6.0, -2.0], [34, 3.0, 3.0, 5.0, 4.0], [8, -4.0, 5.0, -3.0, 6.0], [10, 0.0, 1.0, 3.0, 4.0], [27, 2.0, 3.0, 2.0, 5.0], [4, -5.0, -2.0, -5.0, 2.0], [22, -6.0, 0.0, -5.0, 1.0]]], [[4, 22], [10, 27], [10, 34]]], [[[[4, -5.0, 2.0, -4.0, 6.0], [14, 0.0, -3.0, 4.0, -3.0], [5, 5.0, -1.0, 6.0, 1.0], [32, 3.0, 0.0, 6.0, 2.0], [27, 0.0, 4.0, 2.0, 5.0], [30, 5.0, -1.0, 5.0, 1.0], [35, 2.0, 3.0, 6.0, 3.0]]], [[5, 30], [5, 32], [30, 32]]], [[[[9, -6.0, 0.0, -3.0, 4.0], [11, -5.0, 0.0, -5.0, 3.0], [31, 0.0, -3.0, 4.0, -2.0], [5, -4.0, 3.0, 0.0, 3.0], [12, 5.0, 3.0, 9.0, 4.0], [26, 5.0, -2.0, 7.0, 1.0], [33, -3.0, -4.0, -2.0, -4.0]]], [[5, 9], [9, 11]]], [[[[6, 6.0, -1.0, 8.0, 0.0], [35, -2.0, 2.0, -1.0, 3.0], [24, 1.0, 0.0, 4.0, 0.0]]], []], [[[[16, 2.0, 6.0, 2.0, 10.0], [6, 2.0, -4.0, 4.0, -2.0], [22, 0.0, 2.0, 1.0, 4.0], [3, 2.0, -4.0, 2.0, -1.0], [17, -2.0, -4.0, -1.0, -3.0], [30, -6.0, -6.0, -2.0, -6.0], [34, 4.0, -5.0, 5.0, -1.0], [14, -1.0, 3.0, -1.0, 7.0]]], [[3, 6], [6, 34]]], [[[[15, 3.0, -5.0, 7.0, -2.0], [21, 0.0, 4.0, 3.0, 6.0], [29, 3.0, -6.0, 4.0, -5.0], [7, 0.0, 5.0, 4.0, 6.0], [34, 1.0, 4.0, 5.0, 8.0]]], [[7, 21], [7, 34], [15, 29], [21, 34]]], [[[[5, 3.0, 4.0, 4.0, 8.0], [37, 2.0, 1.0, 6.0, 4.0]]], [[5, 37]]], [[[[39, -6.0, 3.0, -3.0, 4.0], [4, 4.0, 0.0, 4.0, 1.0], [5, 4.0, 2.0, 6.0, 6.0], [24, -6.0, 1.0, -3.0, 5.0], [7, 5.0, 6.0, 9.0, 6.0]]], [[5, 7], [24, 39]]]], [[[[[30, 1.0, -3.0, 5.0, -2.0], [12, 6.0, 0.0, 10.0, 1.0], [4, -6.0, -5.0, -4.0, -1.0], [23, -3.0, 6.0, -3.0, 9.0], [17, -2.0, 1.0, -2.0, 4.0], [5, -4.0, -5.0, -4.0, -2.0], [8, -1.0, -2.0, 3.0, -2.0], [37, 6.0, -2.0, 6.0, -2.0]]], [[4, 5], [8, 30]]], [[[[3, 3.0, 6.0, 3.0, 8.0], [1, 0.0, 5.0, 1.0, 7.0], [14, 0.0, 0.0, 1.0, 2.0], [5, 4.0, -2.0, 8.0, 2.0], [31, -5.0, -1.0, -5.0, 1.0], [21, 6.0, 0.0, 7.0, 4.0], [25, 5.0, 2.0, 9.0, 2.0]]], [[5, 21], [5, 25], [21, 25]]], [[[[34, 6.0, 0.0, 9.0, 1.0], [24, -2.0, -3.0, 2.0, -3.0]]], []], [[[[38, 0.0, 6.0, 1.0, 7.0], [33, -2.0, 5.0, 2.0, 6.0], [3, -6.0, -1.0, -6.0, 0.0], [24, 0.0, -1.0, 3.0, 2.0], [19, -2.0, 3.0, 2.0, 3.0], [29, -4.0, 2.0, 0.0, 2.0]]], [[24, 29], [33, 38]]], [[[[20, -2.0, -6.0, -1.0, -4.0], [28, 0.0, -2.0, 4.0, 0.0], [16, -6.0, 1.0, -2.0, 4.0], [29, 0.0, 5.0, 4.0, 7.0], [27, -5.0, 2.0, -5.0, 4.0], [15, 2.0, 5.0, 4.0, 6.0]]], [[15, 29], [16, 27]]], [[[[5, -6.0, 5.0, -6.0, 6.0], [36, -2.0, -3.0, -2.0, -2.0], [27, 2.0, 5.0, 5.0, 6.0], [13, 6.0, 1.0, 7.0, 5.0], [14, 6.0, 5.0, 8.0, 9.0], [16, -6.0, -4.0, -5.0, 0.0], [12, 5.0, 6.0, 7.0, 8.0]]], [[12, 14], [12, 27], [13, 14]]], [[[[24, 1.0, -4.0, 4.0, -1.0], [32, -2.0, 4.0, 2.0, 6.0], [18, -5.0, -5.0, -2.0, -2.0]]], []], [[[[10, -2.0, 1.0, -1.0, 4.0], [13, -1.0, -4.0, 3.0, -1.0], [24, -3.0, 3.0, 1.0, 7.0]]], [[10, 24]]]], [[[[[27, -5.0, -4.0, -5.0, -2.0], [34, 4.0, 0.0, 6.0, 2.0], [14, 1.0, -5.0, 1.0, -5.0]]], []], [[[[11, -2.0, 0.0, -2.0, 1.0], [27, -4.0, 0.0, -2.0, 3.0]]], [[11, 27]]], [[[[18, -5.0, -4.0, -4.0, -1.0], [32, -1.0, -5.0, 2.0, -3.0], [22, -6.0, 2.0, -2.0, 6.0], [28, 6.0, 5.0, 7.0, 8.0], [12, -5.0, 4.0, -5.0, 7.0], [33, 5.0, 5.0, 9.0, 7.0], [39, -3.0, 3.0, -2.0, 4.0], [11, -5.0, -4.0, -4.0, 0.0]]], [[11, 18], [12, 22], [22, 39], [28, 33]]], [[[[34, -2.0, -6.0, -1.0, -6.0], [39, 5.0, -4.0, 7.0, -3.0], [9, 1.0, -3.0, 2.0, -2.0], [38, 2.0, 5.0, 4.0, 6.0], [8, -5.0, 1.0, -3.0, 4.0], [26, -2.0, -2.0, 2.0, 0.0], [4, 5.0, -5.0, 6.0, -3.0], [35, 3.0, 1.0, 6.0, 2.0], [10, -4.0, 6.0, -2.0, 6.0], [31, 2.0, 1.0, 5.0, 3.0]]], [[4, 39], [9, 26], [31, 35]]], [[[[1, -4.0, -5.0, -3.0, -1.0], [7, -2.0, 5.0, 1.0, 9.0], [9, -4.0, -6.0, -4.0, -6.0]]], []], [[[[1, -5.0, 6.0, -1.0, 6.0], [7, 5.0, -2.0, 9.0, -1.0], [28, -4.0, 0.0, -2.0, 2.0], [2, -1.0, -5.0, -1.0, -2.0], [3, 6.0, -1.0, 7.0, 2.0], [13, -4.0, 5.0, -2.0, 5.0], [14, 3.0, 6.0, 4.0, 6.0], [15, -4.0, 6.0, -1.0, 10.0], [35, -5.0, 1.0, -4.0, 4.0]]], [[1, 15], [3, 7], [28, 35]]], [[[[35, 3.0, -6.0, 4.0, -2.0], [13, 0.0, -2.0, 1.0, 2.0], [20, -3.0, 0.0, -1.0, 4.0], [23, -3.0, 6.0, -1.0, 10.0], [33, 2.0, -3.0, 5.0, -2.0], [38, 5.0, -2.0, 8.0, 2.0], [26, -2.0, 5.0, -2.0, 6.0]]], [[23, 26], [33, 35], [33, 38]]], [[[[25, -6.0, -6.0, -3.0, -5.0], [23, 5.0, -2.0, 7.0, -1.0], [3, 1.0, -3.0, 5.0, 1.0]]], [[3, 23]]]], [[[[[17, 6.0, -4.0, 7.0, -3.0], [1, 6.0, -3.0, 9.0, 1.0], [34, 6.0, -3.0, 10.0, 1.0], [15, 4.0, 2.0, 7.0, 6.0], [13, 0.0, -5.0, 0.0, -3.0], [14, 4.0, -6.0, 4.0, -5.0], [32, -5.0, -5.0, -3.0, -3.0], [20, -2.0, -4.0, 1.0, -4.0], [8, -6.0, 1.0, -2.0, 2.0], [11, 3.0, 6.0, 5.0, 8.0]]], [[1, 17], [1, 34], [11, 15], [13, 20], [17, 34]]], [[[[14, -6.0, -5.0, -2.0, -3.0], [29, -2.0, -1.0, -2.0, 0.0]]], []], [[[[5, 2.0, 6.0, 5.0, 6.0], [12, -3.0, 3.0, -2.0, 4.0], [35, -2.0, -4.0, -1.0, -4.0], [22, 6.0, 6.0, 9.0, 6.0], [28, 1.0, -6.0, 1.0, -2.0], [3, -2.0, -2.0, -2.0, 2.0], [16, 6.0, 5.0, 6.0, 5.0], [11, -3.0, 4.0, -3.0, 6.0], [37, -4.0, 3.0, -1.0, 7.0], [32, -5.0, -2.0, -1.0, -2.0], [18, 0.0, -5.0, 0.0, -2.0]]], [[3, 32], [11, 12], [11, 37], [12, 37]]], [[[[26, -2.0, 2.0, -2.0, 4.0], [32, 1.0, -6.0, 4.0, -5.0], [5, -3.0, -4.0, 1.0, -1.0], [39, -2.0, 3.0, -1.0, 3.0]]], [[26, 39]]], [[[[23, 1.0, -4.0, 2.0, -1.0], [14, 3.0, -3.0, 5.0, -2.0], [39, 4.0, 6.0, 4.0, 9.0], [20, -5.0, -1.0, -5.0, 1.0], [5, 4.0, 4.0, 7.0, 6.0], [7, -5.0, 5.0, -4.0, 5.0], [33, -5.0, -4.0, -1.0, -3.0], [26, -2.0, 3.0, 2.0, 5.0], [19, 5.0, 1.0, 7.0, 4.0]]], [[5, 19], [5, 39]]], [[[[36, -5.0, -4.0, -2.0, -2.0], [2, 6.0, 3.0, 9.0, 5.0], [7, 4.0, -2.0, 8.0, 1.0], [28, 1.0, -4.0, 3.0, -1.0], [25, 1.0, -6.0, 1.0, -2.0], [3, 0.0, 2.0, 0.0, 2.0], [38, 2.0, 6.0, 4.0, 6.0], [5, 6.0, 0.0, 10.0, 3.0], [14, -5.0, -5.0, -3.0, -2.0], [39, -3.0, 5.0, 0.0, 8.0]]], [[2, 5], [5, 7], [14, 36], [25, 28]]], [[[[35, -2.0, -1.0, 1.0, 2.0], [7, 6.0, 3.0, 10.0, 7.0], [18, 1.0, -2.0, 1.0, 1.0], [13, 3.0, -1.0, 3.0, 0.0], [12, -3.0, -1.0, -1.0, 2.0], [24, 2.0, 2.0, 2.0, 6.0], [36, 4.0, -4.0, 8.0, -3.0]]], [[12, 35], [18, 35]]], [[[[11, -1.0, -5.0, -1.0, -4.0], [25, -3.0, 2.0, -1.0, 3.0], [15, -5.0, -3.0, -3.0, 1.0], [27, -5.0, -6.0, -4.0, -4.0], [20, 0.0, -3.0, 0.0, -2.0], [39, 5.0, 3.0, 7.0, 5.0], [33, -3.0, -6.0, 0.0, -6.0], [28, -4.0, 6.0, -1.0, 6.0], [13, 1.0, -2.0, 1.0, 0.0]]], []]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %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":"767882f0f1ac51627f4c5fbdc66b4e935012f0bb7c579c036ecd01ba37ccd162","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(boxes):\n    ev = []\n    for b in boxes:\n        ev.append((b[1], 0, b[0]))\n        ev.append((b[3], 1, b[0]))\n    ev.sort()\n    byid = {b[0]: b for b in boxes}\n    active = []\n    pairs = []\n    for x, kind, i in ev:\n        if kind == 0:\n            bi = byid[i]\n            for j in active:\n                bj = byid[j]\n                if bi[2] <= bj[4] and bj[2] <= bi[4]:\n                    pairs.append([min(i, j), max(i, j)])\n            active.append(i)\n        else:\n            active.remove(i)\n    pairs.sort()\n    return pairs\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[22, -2.0, 2.0, 2.0, 3.0], [29, -5.0, 1.0, -4.0, 2.0], [4, -5.0, -2.0, -2.0, 1.0]]], [[4, 29]]], [[[[5, 0.0, 3.0, 2.0, 5.0], [15, -2.0, 3.0, -1.0, 6.0], [34, -3.0, 6.0, -2.0, 6.0], [20, -2.0, 1.0, 2.0, 4.0], [23, -2.0, -1.0, -2.0, -1.0], [1, 4.0, -5.0, 6.0, -2.0], [25, 0.0, 5.0, 1.0, 9.0]]], [[5, 20], [5, 25], [15, 20], [15, 34]]], [[[[20, 4.0, -5.0, 6.0, -3.0], [38, 0.0, 4.0, 1.0, 4.0], [22, 3.0, -6.0, 5.0, -5.0], [3, -1.0, -5.0, 0.0, -4.0], [35, -6.0, 3.0, -2.0, 7.0], [7, 2.0, -6.0, 5.0, -6.0], [28, -2.0, 1.0, 2.0, 3.0]]], [[7, 22], [20, 22], [28, 35]]], [[[[39, 5.0, 0.0, 9.0, 3.0], [27, 3.0, -1.0, 3.0, 0.0], [37, -6.0, 5.0, -2.0, 5.0], [22, -5.0, 1.0, -2.0, 1.0], [26, 6.0, 1.0, 8.0, 3.0], [24, 2.0, -3.0, 6.0, -1.0]]], [[24, 27], [26, 39]]], [[[[14, 0.0, -1.0, 3.0, -1.0], [30, -4.0, -3.0, -4.0, 0.0], [15, -3.0, 1.0, 0.0, 4.0]]], []], [[[[28, 6.0, -4.0, 7.0, -3.0], [32, 6.0, -4.0, 9.0, -1.0], [8, 1.0, 4.0, 3.0, 7.0], [9, 3.0, -6.0, 7.0, -4.0], [37, -6.0, 3.0, -2.0, 6.0]]], [[9, 28], [9, 32], [28, 32]]], [[[[17, 1.0, 6.0, 2.0, 7.0], [20, 6.0, 2.0, 6.0, 6.0], [4, 6.0, -6.0, 10.0, -4.0], [38, -6.0, -6.0, -3.0, -2.0], [19, 6.0, 1.0, 8.0, 5.0], [35, 4.0, -1.0, 8.0, -1.0]]], [[19, 20]]], [[[[14, 1.0, -4.0, 4.0, -1.0], [6, 0.0, -1.0, 4.0, 3.0], [32, -2.0, -3.0, 2.0, -1.0], [15, -4.0, 0.0, -4.0, 4.0], [7, -4.0, -2.0, -1.0, -2.0]]], [[6, 14], [6, 32], [7, 32], [14, 32]]]], [[[[[13, 5.0, -3.0, 6.0, -2.0], [34, 3.0, 3.0, 5.0, 4.0], [8, -4.0, 5.0, -3.0, 6.0], [10, 0.0, 1.0, 3.0, 4.0], [27, 2.0, 3.0, 2.0, 5.0], [4, -5.0, -2.0, -5.0, 2.0], [22, -6.0, 0.0, -5.0, 1.0]]], [[4, 22], [10, 27], [10, 34]]], [[[[4, -5.0, 2.0, -4.0, 6.0], [14, 0.0, -3.0, 4.0, -3.0], [5, 5.0, -1.0, 6.0, 1.0], [32, 3.0, 0.0, 6.0, 2.0], [27, 0.0, 4.0, 2.0, 5.0], [30, 5.0, -1.0, 5.0, 1.0], [35, 2.0, 3.0, 6.0, 3.0]]], [[5, 30], [5, 32], [30, 32]]], [[[[9, -6.0, 0.0, -3.0, 4.0], [11, -5.0, 0.0, -5.0, 3.0], [31, 0.0, -3.0, 4.0, -2.0], [5, -4.0, 3.0, 0.0, 3.0], [12, 5.0, 3.0, 9.0, 4.0], [26, 5.0, -2.0, 7.0, 1.0], [33, -3.0, -4.0, -2.0, -4.0]]], [[5, 9], [9, 11]]], [[[[6, 6.0, -1.0, 8.0, 0.0], [35, -2.0, 2.0, -1.0, 3.0], [24, 1.0, 0.0, 4.0, 0.0]]], []], [[[[16, 2.0, 6.0, 2.0, 10.0], [6, 2.0, -4.0, 4.0, -2.0], [22, 0.0, 2.0, 1.0, 4.0], [3, 2.0, -4.0, 2.0, -1.0], [17, -2.0, -4.0, -1.0, -3.0], [30, -6.0, -6.0, -2.0, -6.0], [34, 4.0, -5.0, 5.0, -1.0], [14, -1.0, 3.0, -1.0, 7.0]]], [[3, 6], [6, 34]]], [[[[15, 3.0, -5.0, 7.0, -2.0], [21, 0.0, 4.0, 3.0, 6.0], [29, 3.0, -6.0, 4.0, -5.0], [7, 0.0, 5.0, 4.0, 6.0], [34, 1.0, 4.0, 5.0, 8.0]]], [[7, 21], [7, 34], [15, 29], [21, 34]]], [[[[5, 3.0, 4.0, 4.0, 8.0], [37, 2.0, 1.0, 6.0, 4.0]]], [[5, 37]]], [[[[39, -6.0, 3.0, -3.0, 4.0], [4, 4.0, 0.0, 4.0, 1.0], [5, 4.0, 2.0, 6.0, 6.0], [24, -6.0, 1.0, -3.0, 5.0], [7, 5.0, 6.0, 9.0, 6.0]]], [[5, 7], [24, 39]]]], [[[[[30, 1.0, -3.0, 5.0, -2.0], [12, 6.0, 0.0, 10.0, 1.0], [4, -6.0, -5.0, -4.0, -1.0], [23, -3.0, 6.0, -3.0, 9.0], [17, -2.0, 1.0, -2.0, 4.0], [5, -4.0, -5.0, -4.0, -2.0], [8, -1.0, -2.0, 3.0, -2.0], [37, 6.0, -2.0, 6.0, -2.0]]], [[4, 5], [8, 30]]], [[[[3, 3.0, 6.0, 3.0, 8.0], [1, 0.0, 5.0, 1.0, 7.0], [14, 0.0, 0.0, 1.0, 2.0], [5, 4.0, -2.0, 8.0, 2.0], [31, -5.0, -1.0, -5.0, 1.0], [21, 6.0, 0.0, 7.0, 4.0], [25, 5.0, 2.0, 9.0, 2.0]]], [[5, 21], [5, 25], [21, 25]]], [[[[34, 6.0, 0.0, 9.0, 1.0], [24, -2.0, -3.0, 2.0, -3.0]]], []], [[[[38, 0.0, 6.0, 1.0, 7.0], [33, -2.0, 5.0, 2.0, 6.0], [3, -6.0, -1.0, -6.0, 0.0], [24, 0.0, -1.0, 3.0, 2.0], [19, -2.0, 3.0, 2.0, 3.0], [29, -4.0, 2.0, 0.0, 2.0]]], [[24, 29], [33, 38]]], [[[[20, -2.0, -6.0, -1.0, -4.0], [28, 0.0, -2.0, 4.0, 0.0], [16, -6.0, 1.0, -2.0, 4.0], [29, 0.0, 5.0, 4.0, 7.0], [27, -5.0, 2.0, -5.0, 4.0], [15, 2.0, 5.0, 4.0, 6.0]]], [[15, 29], [16, 27]]], [[[[5, -6.0, 5.0, -6.0, 6.0], [36, -2.0, -3.0, -2.0, -2.0], [27, 2.0, 5.0, 5.0, 6.0], [13, 6.0, 1.0, 7.0, 5.0], [14, 6.0, 5.0, 8.0, 9.0], [16, -6.0, -4.0, -5.0, 0.0], [12, 5.0, 6.0, 7.0, 8.0]]], [[12, 14], [12, 27], [13, 14]]], [[[[24, 1.0, -4.0, 4.0, -1.0], [32, -2.0, 4.0, 2.0, 6.0], [18, -5.0, -5.0, -2.0, -2.0]]], []], [[[[10, -2.0, 1.0, -1.0, 4.0], [13, -1.0, -4.0, 3.0, -1.0], [24, -3.0, 3.0, 1.0, 7.0]]], [[10, 24]]]], [[[[[27, -5.0, -4.0, -5.0, -2.0], [34, 4.0, 0.0, 6.0, 2.0], [14, 1.0, -5.0, 1.0, -5.0]]], []], [[[[11, -2.0, 0.0, -2.0, 1.0], [27, -4.0, 0.0, -2.0, 3.0]]], [[11, 27]]], [[[[18, -5.0, -4.0, -4.0, -1.0], [32, -1.0, -5.0, 2.0, -3.0], [22, -6.0, 2.0, -2.0, 6.0], [28, 6.0, 5.0, 7.0, 8.0], [12, -5.0, 4.0, -5.0, 7.0], [33, 5.0, 5.0, 9.0, 7.0], [39, -3.0, 3.0, -2.0, 4.0], [11, -5.0, -4.0, -4.0, 0.0]]], [[11, 18], [12, 22], [22, 39], [28, 33]]], [[[[34, -2.0, -6.0, -1.0, -6.0], [39, 5.0, -4.0, 7.0, -3.0], [9, 1.0, -3.0, 2.0, -2.0], [38, 2.0, 5.0, 4.0, 6.0], [8, -5.0, 1.0, -3.0, 4.0], [26, -2.0, -2.0, 2.0, 0.0], [4, 5.0, -5.0, 6.0, -3.0], [35, 3.0, 1.0, 6.0, 2.0], [10, -4.0, 6.0, -2.0, 6.0], [31, 2.0, 1.0, 5.0, 3.0]]], [[4, 39], [9, 26], [31, 35]]], [[[[1, -4.0, -5.0, -3.0, -1.0], [7, -2.0, 5.0, 1.0, 9.0], [9, -4.0, -6.0, -4.0, -6.0]]], []], [[[[1, -5.0, 6.0, -1.0, 6.0], [7, 5.0, -2.0, 9.0, -1.0], [28, -4.0, 0.0, -2.0, 2.0], [2, -1.0, -5.0, -1.0, -2.0], [3, 6.0, -1.0, 7.0, 2.0], [13, -4.0, 5.0, -2.0, 5.0], [14, 3.0, 6.0, 4.0, 6.0], [15, -4.0, 6.0, -1.0, 10.0], [35, -5.0, 1.0, -4.0, 4.0]]], [[1, 15], [3, 7], [28, 35]]], [[[[35, 3.0, -6.0, 4.0, -2.0], [13, 0.0, -2.0, 1.0, 2.0], [20, -3.0, 0.0, -1.0, 4.0], [23, -3.0, 6.0, -1.0, 10.0], [33, 2.0, -3.0, 5.0, -2.0], [38, 5.0, -2.0, 8.0, 2.0], [26, -2.0, 5.0, -2.0, 6.0]]], [[23, 26], [33, 35], [33, 38]]], [[[[25, -6.0, -6.0, -3.0, -5.0], [23, 5.0, -2.0, 7.0, -1.0], [3, 1.0, -3.0, 5.0, 1.0]]], [[3, 23]]]], [[[[[17, 6.0, -4.0, 7.0, -3.0], [1, 6.0, -3.0, 9.0, 1.0], [34, 6.0, -3.0, 10.0, 1.0], [15, 4.0, 2.0, 7.0, 6.0], [13, 0.0, -5.0, 0.0, -3.0], [14, 4.0, -6.0, 4.0, -5.0], [32, -5.0, -5.0, -3.0, -3.0], [20, -2.0, -4.0, 1.0, -4.0], [8, -6.0, 1.0, -2.0, 2.0], [11, 3.0, 6.0, 5.0, 8.0]]], [[1, 17], [1, 34], [11, 15], [13, 20], [17, 34]]], [[[[14, -6.0, -5.0, -2.0, -3.0], [29, -2.0, -1.0, -2.0, 0.0]]], []], [[[[5, 2.0, 6.0, 5.0, 6.0], [12, -3.0, 3.0, -2.0, 4.0], [35, -2.0, -4.0, -1.0, -4.0], [22, 6.0, 6.0, 9.0, 6.0], [28, 1.0, -6.0, 1.0, -2.0], [3, -2.0, -2.0, -2.0, 2.0], [16, 6.0, 5.0, 6.0, 5.0], [11, -3.0, 4.0, -3.0, 6.0], [37, -4.0, 3.0, -1.0, 7.0], [32, -5.0, -2.0, -1.0, -2.0], [18, 0.0, -5.0, 0.0, -2.0]]], [[3, 32], [11, 12], [11, 37], [12, 37]]], [[[[26, -2.0, 2.0, -2.0, 4.0], [32, 1.0, -6.0, 4.0, -5.0], [5, -3.0, -4.0, 1.0, -1.0], [39, -2.0, 3.0, -1.0, 3.0]]], [[26, 39]]], [[[[23, 1.0, -4.0, 2.0, -1.0], [14, 3.0, -3.0, 5.0, -2.0], [39, 4.0, 6.0, 4.0, 9.0], [20, -5.0, -1.0, -5.0, 1.0], [5, 4.0, 4.0, 7.0, 6.0], [7, -5.0, 5.0, -4.0, 5.0], [33, -5.0, -4.0, -1.0, -3.0], [26, -2.0, 3.0, 2.0, 5.0], [19, 5.0, 1.0, 7.0, 4.0]]], [[5, 19], [5, 39]]], [[[[36, -5.0, -4.0, -2.0, -2.0], [2, 6.0, 3.0, 9.0, 5.0], [7, 4.0, -2.0, 8.0, 1.0], [28, 1.0, -4.0, 3.0, -1.0], [25, 1.0, -6.0, 1.0, -2.0], [3, 0.0, 2.0, 0.0, 2.0], [38, 2.0, 6.0, 4.0, 6.0], [5, 6.0, 0.0, 10.0, 3.0], [14, -5.0, -5.0, -3.0, -2.0], [39, -3.0, 5.0, 0.0, 8.0]]], [[2, 5], [5, 7], [14, 36], [25, 28]]], [[[[35, -2.0, -1.0, 1.0, 2.0], [7, 6.0, 3.0, 10.0, 7.0], [18, 1.0, -2.0, 1.0, 1.0], [13, 3.0, -1.0, 3.0, 0.0], [12, -3.0, -1.0, -1.0, 2.0], [24, 2.0, 2.0, 2.0, 6.0], [36, 4.0, -4.0, 8.0, -3.0]]], [[12, 35], [18, 35]]], [[[[11, -1.0, -5.0, -1.0, -4.0], [25, -3.0, 2.0, -1.0, 3.0], [15, -5.0, -3.0, -3.0, 1.0], [27, -5.0, -6.0, -4.0, -4.0], [20, 0.0, -3.0, 0.0, -2.0], [39, 5.0, 3.0, 7.0, 5.0], [33, -3.0, -6.0, 0.0, -6.0], [28, -4.0, 6.0, -1.0, 6.0], [13, 1.0, -2.0, 1.0, 0.0]]], []]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"case %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 teaching model with stipulated toy conventions; not a production physics engine or spatial index. 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-collision_detection_broadphase-sort-and-sweep-2d-pair-orientation","generated_at":"2026-09-29T14:50:57.964683+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Broadphase stages decide which object pairs ever reach narrowphase; a wrong boundary, ordering or bookkeeping rule silently drops real contacts or floods the solver with false candidates.","repair":"Emit [min id, max id].","root_cause":"Pairs are appended as [active, new] without canonical ordering.","sha256":"3e6b52295d345fa27f56590a50f71bdc12d3663ab221b607a8b3ba5d2a7e85b6","title":"Sweep reports pairs in active-list order · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.536,"exit_code":1,"observations":[{"actual":[[29,4]],"check":"case 0","expected":[[4,29]],"passed":false},{"actual":[[5,20],[15,34],[20,15],[25,5]],"check":"case 1","expected":[[5,20],[5,25],[15,20],[15,34]],"passed":false},{"actual":[[20,22],[22,7],[28,35]],"check":"case 2","expected":[[7,22],[20,22],[28,35]],"passed":false},{"actual":[[26,39],[27,24]],"check":"case 3","expected":[[24,27],[26,39]],"passed":false},{"actual":[],"check":"case 4","expected":[],"passed":true},{"actual":[[28,9],[32,9],[32,28]],"check":"case 5","expected":[[9,28],[9,32],[28,32]],"passed":false},{"actual":[[20,19]],"check":"case 6","expected":[[19,20]],"passed":false},{"actual":[[6,32],[14,6],[14,32],[32,7]],"check":"case 7","expected":[[6,14],[6,32],[7,32],[14,32]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[29, 4]], \"expected\": [[4, 29]], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [[5, 20], [15, 34], [20, 15], [25, 5]], \"expected\": [[5, 20], [5, 25], [15, 20], [15, 34]], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [[20, 22], [22, 7], [28, 35]], \"expected\": [[7, 22], [20, 22], [28, 35]], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [[26, 39], [27, 24]], \"expected\": [[24, 27], [26, 39]], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [[28, 9], [32, 9], [32, 28]], \"expected\": [[9, 28], [9, 32], [28, 32]], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [[20, 19]], \"expected\": [[19, 20]], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [[6, 32], [14, 6], [14, 32], [32, 7]], \"expected\": [[6, 14], [6, 32], [7, 32], [14, 32]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.74,"exit_code":1,"observations":[{"actual":[[4,29]],"check":"case 0","expected":[[4,29]],"passed":true},{"actual":[[5,25],[15,20],[20,5],[34,15]],"check":"case 1","expected":[[5,20],[5,25],[15,20],[15,34]],"passed":false},{"actual":[[7,22],[22,20],[35,28]],"check":"case 2","expected":[[7,22],[20,22],[28,35]],"passed":false},{"actual":[[24,27],[39,26]],"check":"case 3","expected":[[24,27],[26,39]],"passed":false},{"actual":[],"check":"case 4","expected":[],"passed":true},{"actual":[[9,28],[9,32],[28,32]],"check":"case 5","expected":[[9,28],[9,32],[28,32]],"passed":true},{"actual":[[19,20]],"check":"case 6","expected":[[19,20]],"passed":true},{"actual":[[6,14],[7,32],[32,6],[32,14]],"check":"case 7","expected":[[6,14],[6,32],[7,32],[14,32]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[4, 29]], \"expected\": [[4, 29]], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[5, 25], [15, 20], [20, 5], [34, 15]], \"expected\": [[5, 20], [5, 25], [15, 20], [15, 34]], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [[7, 22], [22, 20], [35, 28]], \"expected\": [[7, 22], [20, 22], [28, 35]], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [[24, 27], [39, 26]], \"expected\": [[24, 27], [26, 39]], \"passed\": false}, {\"check\": \"case 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [[9, 28], [9, 32], [28, 32]], \"expected\": [[9, 28], [9, 32], [28, 32]], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[19, 20]], \"expected\": [[19, 20]], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [[6, 14], [7, 32], [32, 6], [32, 14]], \"expected\": [[6, 14], [6, 32], [7, 32], [14, 32]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.242,"exit_code":0,"observations":[{"actual":[[4,29]],"check":"case 0","expected":[[4,29]],"passed":true},{"actual":[[5,20],[5,25],[15,20],[15,34]],"check":"case 1","expected":[[5,20],[5,25],[15,20],[15,34]],"passed":true},{"actual":[[7,22],[20,22],[28,35]],"check":"case 2","expected":[[7,22],[20,22],[28,35]],"passed":true},{"actual":[[24,27],[26,39]],"check":"case 3","expected":[[24,27],[26,39]],"passed":true},{"actual":[],"check":"case 4","expected":[],"passed":true},{"actual":[[9,28],[9,32],[28,32]],"check":"case 5","expected":[[9,28],[9,32],[28,32]],"passed":true},{"actual":[[19,20]],"check":"case 6","expected":[[19,20]],"passed":true},{"actual":[[6,14],[6,32],[7,32],[14,32]],"check":"case 7","expected":[[6,14],[6,32],[7,32],[14,32]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[4, 29]], \"expected\": [[4, 29]], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[5, 20], [5, 25], [15, 20], [15, 34]], \"expected\": [[5, 20], [5, 25], [15, 20], [15, 34]], \"passed\": true}, {\"check\": \"case 2\", \"actual\": [[7, 22], [20, 22], [28, 35]], \"expected\": [[7, 22], [20, 22], [28, 35]], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [[24, 27], [26, 39]], \"expected\": [[24, 27], [26, 39]], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"case 5\", \"actual\": [[9, 28], [9, 32], [28, 32]], \"expected\": [[9, 28], [9, 32], [28, 32]], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[19, 20]], \"expected\": [[19, 20]], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [[6, 14], [6, 32], [7, 32], [14, 32]], \"expected\": [[6, 14], [6, 32], [7, 32], [14, 32]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}