{"abstract":"Boundary-aligned objects pile up in parent nodes and inflate every query.","category":"Collision detection broadphase","checks":8,"contract":"solve(objs, cap, max_depth, q): quadtree over [0,16]^2. Insert [id,minx,miny,maxx,maxy] in order. A node splits when it holds more than cap objects and depth<max_depth; children are ordered cy*2+cx. An object goes to a child only if it fits entirely: maxx<mid -> left, minx>=mid -> right (same for y); straddlers stay. On split all node objects are re-inserted. Query returns [sorted ids of objects in nodes whose closed bounds overlap q, total node count, max depth].","contract_signature":"objs, cap, max_depth, q","evaluation_group":"w2-collision_detection_broadphase-quadtree-straddle","failed_approach":"Letting maxx == mid go left assigns objects touching the right half to the left child.","family":"w2-collision_detection_broadphase-quadtree-straddle-midline-ownership","id":"FA-87476","implementations":{"attempt":{"sha256":"30550fb5b5f13728f6aa4e126978d6b11fb85c7265025af676c7c50084eac947","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(objs, cap, max_depth, q):\n    def make(x, y, s, d):\n        return {'x': x, 'y': y, 's': s, 'd': d, 'objs': [], 'kids': None}\n    def child_index(n, o):\n        h = n['s'] / 2\n        mx, my = n['x'] + h, n['y'] + h\n        if o[3] <= mx:\n            cx = 0\n        elif o[1] >= mx:\n            cx = 1\n        else:\n            return -1\n        if o[4] < my:\n            cy = 0\n        elif o[2] >= my:\n            cy = 1\n        else:\n            return -1\n        return cy * 2 + cx\n    def split(n):\n        h = n['s'] / 2\n        n['kids'] = [make(n['x'] + (k % 2) * h, n['y'] + (k // 2) * h, h, n['d'] + 1) for k in range(4)]\n        old, n['objs'] = n['objs'], []\n        for o in old:\n            insert(n, o)\n    def insert(n, o):\n        if n['kids'] is not None:\n            k = child_index(n, o)\n            if k >= 0:\n                insert(n['kids'][k], o)\n                return\n        n['objs'].append(o)\n        if n['kids'] is None and len(n['objs']) > cap and n['d'] < max_depth:\n            split(n)\n    root = make(0, 0, 16, 0)\n    for o in objs:\n        insert(root, o)\n    found, count, deep = [], 0, 0\n    stack = [root]\n    while stack:\n        n = stack.pop()\n        count += 1\n        deep = max(deep, n['d'])\n        if n['kids']:\n            stack.extend(n['kids'])\n        if n['x'] <= q[2] and q[0] <= n['x'] + n['s'] and n['y'] <= q[3] and q[1] <= n['y'] + n['s']:\n            found.extend(o[0] for o in n['objs'])\n    return [sorted(found), count, deep]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[8, 7, 2, 8, 5], [41, 12, 8, 14, 11], [5, 2, 6, 2, 9], [38, 10, 5, 12, 5], [9, 0, 3, 1, 5], [24, 4, 0, 6, 3]], 2, 3, [11, 10, 12, 12]], [[5, 8, 41], 5, 1]], [[[[49, 7, 3, 10, 3], [38, 8, 0, 8, 2], [11, 12, 4, 12, 4], [5, 4, 10, 4, 11], [3, 12, 6, 15, 7], [21, 0, 13, 1, 14], [35, 10, 7, 10, 10], [9, 9, 10, 12, 12]], 2, 2, [9, 2, 10, 7]], [[35, 38, 49], 9, 2]], [[[[2, 13, 0, 16, 1], [21, 1, 6, 1, 6], [5, 5, 8, 8, 8], [39, 10, 6, 11, 9]], 2, 2, [14, 1, 19, 6]], [[2, 5, 39], 5, 1]], [[[[28, 10, 6, 13, 7], [40, 6, 0, 9, 2], [9, 1, 14, 3, 16]], 3, 2, [13, 2, 13, 7]], [[9, 28, 40], 1, 0]], [[[[41, 8, 14, 11, 16], [7, 7, 6, 8, 8], [38, 10, 10, 10, 13], [17, 7, 9, 8, 11], [2, 6, 3, 9, 4], [6, 12, 10, 12, 10], [30, 9, 12, 10, 12]], 3, 3, [1, 4, 1, 6]], [[2, 7, 17], 9, 2]], [[[[3, 15, 7, 16, 7], [5, 1, 8, 3, 10], [28, 2, 13, 3, 14], [8, 13, 13, 14, 14], [16, 8, 14, 11, 16], [42, 11, 14, 14, 14], [17, 0, 15, 1, 15]], 1, 1, [3, 9, 5, 14]], [[5, 17, 28], 5, 1]], [[[[40, 9, 14, 12, 15], [14, 9, 1, 10, 2], [37, 8, 7, 10, 7], [45, 7, 10, 7, 13], [11, 4, 1, 6, 4], [18, 10, 14, 11, 16]], 2, 2, [11, 14, 14, 15]], [[18, 40], 5, 1]], [[[[11, 13, 14, 15, 15], [7, 15, 15, 16, 16], [21, 2, 5, 2, 5], [5, 13, 14, 13, 15], [37, 14, 6, 15, 7]], 2, 2, [13, 10, 18, 12]], [[5, 7, 11], 9, 2]]], [[[[[10, 3, 15, 4, 15], [48, 15, 10, 15, 12], [19, 15, 9, 15, 12], [6, 7, 11, 8, 13], [45, 5, 14, 5, 16], [30, 13, 9, 14, 11], [25, 14, 13, 14, 13], [34, 15, 1, 15, 1]], 2, 1, [13, 2, 16, 2]], [[6, 34], 5, 1]], [[[[27, 11, 13, 14, 16], [22, 12, 7, 15, 7]], 3, 1, [2, 4, 7, 5]], [[22, 27], 1, 0]], [[[[2, 13, 13, 14, 13], [39, 12, 5, 12, 7], [33, 14, 5, 15, 7]], 3, 1, [12, 1, 17, 4]], [[2, 33, 39], 1, 0]], [[[[14, 10, 6, 10, 6], [3, 8, 10, 9, 10], [42, 13, 1, 15, 1], [46, 12, 1, 13, 1], [40, 14, 11, 14, 11], [27, 7, 4, 10, 4], [19, 9, 12, 12, 13]], 3, 2, [3, 6, 4, 7]], [[27], 5, 1]], [[[[20, 2, 5, 2, 5], [1, 4, 5, 4, 6], [36, 1, 1, 1, 1], [15, 3, 12, 3, 13], [9, 4, 6, 6, 7], [33, 14, 11, 16, 14], [24, 0, 4, 3, 5], [34, 6, 0, 9, 0]], 1, 3, [4, 4, 5, 5]], [[1, 9, 20, 24, 34, 36], 17, 3]], [[[[1, 4, 0, 5, 3], [17, 10, 15, 12, 16]], 2, 2, [13, 9, 14, 14]], [[1, 17], 1, 0]], [[[[28, 9, 14, 12, 16], [29, 2, 3, 2, 6], [23, 8, 0, 8, 2], [17, 2, 9, 5, 11], [33, 15, 5, 16, 7], [46, 14, 15, 16, 16], [14, 13, 0, 16, 3]], 2, 2, [0, 14, 1, 18]], [[17], 9, 2]], [[[[45, 15, 11, 16, 11], [24, 11, 4, 12, 5], [3, 1, 6, 1, 9], [37, 12, 8, 15, 11], [44, 7, 10, 9, 11], [9, 13, 4, 16, 5], [27, 11, 11, 11, 14]], 1, 3, [7, 13, 9, 15]], [[3, 27, 44], 17, 3]]], [[[[[1, 6, 9, 9, 12], [46, 1, 14, 4, 15], [45, 4, 13, 4, 16], [40, 3, 7, 6, 8], [24, 8, 12, 8, 13], [21, 4, 15, 4, 16], [7, 9, 11, 11, 14], [34, 11, 7, 13, 10]], 2, 2, [1, 9, 4, 14]], [[1, 21, 34, 40, 45, 46], 9, 2]], [[[[27, 0, 2, 3, 3], [21, 0, 12, 2, 14], [38, 0, 2, 2, 5], [2, 0, 5, 3, 5], [31, 10, 9, 10, 12], [20, 10, 2, 11, 5]], 2, 2, [2, 10, 6, 14]], [[21], 9, 2]], [[[[25, 2, 2, 3, 2], [19, 13, 7, 14, 7], [28, 4, 8, 7, 11], [18, 11, 3, 11, 3]], 2, 1, [11, 12, 14, 17]], [[], 5, 1]], [[[[42, 9, 0, 12, 2], [33, 14, 15, 15, 15], [46, 5, 9, 7, 12], [36, 11, 0, 13, 2], [43, 10, 3, 13, 4], [41, 4, 1, 6, 3], [49, 12, 12, 12, 14], [1, 10, 2, 12, 3], [11, 9, 7, 11, 10], [4, 8, 2, 8, 2]], 2, 1, [13, 13, 15, 15]], [[11, 33, 49], 5, 1]], [[[[33, 4, 12, 4, 12], [26, 7, 15, 8, 15], [29, 8, 7, 10, 7], [4, 15, 0, 15, 3], [15, 7, 13, 7, 14], [16, 7, 6, 10, 9], [5, 8, 3, 8, 3], [31, 14, 15, 14, 16], [22, 3, 2, 5, 3]], 3, 1, [3, 7, 5, 11]], [[15, 16, 22, 26, 33], 5, 1]], [[[[30, 9, 5, 12, 7], [25, 13, 6, 13, 6], [20, 0, 3, 1, 5], [10, 11, 13, 11, 15], [33, 6, 3, 9, 6], [17, 9, 9, 10, 11], [45, 3, 9, 4, 11], [5, 10, 4, 11, 6], [43, 8, 9, 9, 12], [39, 7, 15, 10, 16]], 1, 1, [1, 10, 5, 11]], [[33, 39, 45], 5, 1]], [[[[46, 4, 0, 4, 0], [7, 14, 13, 16, 14], [25, 10, 11, 11, 14], [33, 14, 8, 16, 10], [9, 12, 5, 15, 8], [19, 2, 12, 3, 14], [42, 2, 13, 2, 13], [13, 15, 15, 16, 15], [34, 15, 7, 15, 10], [5, 8, 10, 9, 10]], 1, 3, [4, 3, 8, 7]], [[9, 34, 46], 21, 3]], [[[[7, 12, 2, 12, 5], [38, 9, 14, 9, 16], [5, 5, 12, 7, 13], [14, 11, 3, 11, 3], [26, 0, 4, 3, 5], [6, 12, 1, 12, 1], [27, 7, 3, 10, 5], [22, 14, 1, 15, 2]], 2, 2, [5, 10, 10, 13]], [[5, 27, 38], 9, 2]]], [[[[[28, 6, 13, 6, 15], [12, 0, 1, 0, 3], [30, 1, 2, 2, 2], [9, 14, 12, 16, 13], [7, 5, 11, 8, 12]], 1, 3, [8, 2, 12, 3]], [[7], 13, 3]], [[[[46, 13, 3, 16, 4], [35, 8, 3, 9, 3], [29, 9, 8, 12, 9], [9, 4, 15, 6, 16], [32, 2, 6, 3, 6], [23, 1, 1, 2, 3], [49, 9, 11, 10, 12], [27, 2, 5, 5, 8]], 1, 2, [0, 13, 4, 15]], [[9, 27], 17, 2]], [[[[13, 10, 13, 11, 13], [3, 2, 3, 3, 4], [39, 8, 13, 9, 13], [43, 1, 1, 2, 3], [31, 3, 13, 5, 14], [4, 15, 12, 16, 13], [17, 6, 8, 7, 8], [24, 3, 3, 6, 6], [15, 11, 6, 11, 6]], 3, 3, [14, 14, 17, 16]], [[4, 13, 39], 5, 1]], [[[[17, 6, 9, 8, 12], [37, 8, 2, 10, 2], [42, 11, 14, 12, 14], [39, 9, 8, 10, 9], [34, 7, 2, 7, 5], [32, 13, 4, 16, 7], [23, 2, 9, 2, 10], [1, 4, 10, 7, 13], [40, 4, 2, 4, 3], [29, 4, 11, 6, 14]], 2, 2, [0, 9, 3, 13]], [[1, 17, 23, 29], 9, 2]], [[[[17, 1, 10, 4, 12], [11, 9, 3, 9, 4], [36, 1, 13, 3, 15], [49, 3, 14, 5, 16], [7, 8, 0, 10, 0], [39, 1, 15, 2, 16], [23, 1, 12, 2, 15], [8, 6, 14, 8, 16], [43, 11, 13, 11, 16], [29, 11, 8, 12, 9], [32, 7, 5, 9, 8]], 3, 3, [3, 2, 3, 3]], [[8, 32], 9, 2]], [[[[7, 13, 7, 14, 10], [49, 6, 5, 9, 6], [35, 8, 9, 10, 9]], 2, 3, [0, 10, 0, 13]], [[7, 49], 5, 1]], [[[[12, 0, 8, 0, 10], [34, 13, 6, 15, 9], [33, 15, 14, 16, 16]], 2, 2, [12, 8, 16, 9]], [[33, 34], 5, 1]], [[[[12, 4, 4, 5, 4], [36, 13, 8, 13, 10], [9, 15, 1, 16, 2], [43, 9, 11, 12, 14], [17, 7, 15, 7, 15]], 1, 1, [11, 0, 13, 2]], [[9], 5, 1]]], [[[[[49, 11, 1, 11, 4], [4, 9, 14, 12, 16], [3, 1, 4, 2, 7], [11, 10, 4, 10, 5], [25, 6, 12, 9, 12], [26, 11, 14, 13, 15], [36, 3, 14, 6, 16], [18, 3, 1, 3, 2], [6, 15, 5, 16, 7], [31, 3, 11, 3, 12], [40, 2, 6, 4, 9]], 3, 3, [11, 14, 15, 14]], [[4, 25, 26, 40], 5, 1]], [[[[4, 15, 8, 16, 9], [30, 1, 0, 2, 0], [35, 15, 6, 16, 9], [12, 10, 4, 13, 7], [1, 2, 14, 5, 15], [28, 5, 2, 5, 5], [20, 15, 1, 15, 4], [46, 9, 0, 12, 0], [19, 4, 5, 5, 5], [43, 0, 9, 2, 11], [38, 6, 1, 9, 3], [7, 15, 6, 16, 8]], 3, 2, [14, 9, 16, 11]], [[4, 7, 35, 38], 5, 1]], [[[[29, 6, 0, 8, 3], [20, 11, 15, 11, 16], [27, 6, 12, 9, 15], [38, 0, 9, 2, 11], [30, 10, 9, 10, 10], [7, 2, 9, 3, 11], [48, 8, 11, 11, 14], [9, 2, 7, 2, 10]], 1, 2, [1, 4, 2, 6]], [[9, 27, 29], 13, 2]], [[[[27, 4, 14, 7, 14], [36, 6, 1, 8, 4], [10, 8, 9, 10, 11], [15, 13, 4, 13, 5], [24, 9, 5, 12, 7], [48, 11, 0, 14, 1], [20, 5, 6, 7, 9], [47, 1, 11, 1, 12]], 3, 3, [6, 7, 6, 7]], [[20, 36], 5, 1]], [[[[4, 7, 3, 10, 5], [26, 13, 7, 14, 7], [19, 14, 7, 14, 10], [23, 14, 7, 15, 10], [10, 7, 12, 10, 15], [11, 14, 7, 16, 8], [17, 8, 6, 8, 9], [13, 15, 9, 15, 11], [34, 5, 9, 8, 9], [9, 5, 7, 6, 10], [2, 7, 6, 8, 9], [14, 4, 8, 7, 8]], 2, 3, [3, 0, 3, 3]], [[2, 4, 9, 10, 11, 17, 19, 23, 34], 5, 1]], [[[[34, 13, 8, 16, 9], [35, 0, 9, 2, 12], [8, 11, 12, 13, 13], [43, 12, 9, 15, 9], [42, 12, 3, 15, 5], [21, 13, 3, 13, 3], [27, 12, 0, 12, 3], [37, 6, 2, 8, 5], [25, 0, 9, 2, 12]], 2, 3, [10, 6, 10, 11]], [[8, 37, 42], 13, 2]], [[[[2, 6, 3, 8, 4], [12, 0, 8, 0, 8], [38, 9, 13, 11, 16], [4, 4, 1, 4, 3], [36, 14, 3, 15, 3], [48, 8, 14, 9, 16], [22, 4, 3, 5, 5], [3, 10, 9, 10, 12], [26, 6, 6, 7, 6], [11, 4, 15, 6, 16], [18, 9, 3, 12, 4], [27, 12, 1, 14, 2]], 1, 2, [1, 4, 2, 5]], [[2, 22], 21, 2]], [[[[41, 9, 3, 12, 4], [48, 3, 6, 4, 7], [28, 8, 15, 8, 15]], 3, 3, [10, 1, 13, 6]], [[28, 41, 48], 1, 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":"e4dbdc3097d59b9f4f141e962b47ecc8ed9ff57a8a556af2b23404066f2841ea","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(objs, cap, max_depth, q):\n    def make(x, y, s, d):\n        return {'x': x, 'y': y, 's': s, 'd': d, 'objs': [], 'kids': None}\n    def child_index(n, o):\n        h = n['s'] / 2\n        mx, my = n['x'] + h, n['y'] + h\n        if o[3] < mx:\n            cx = 0\n        elif o[1] > mx:\n            cx = 1\n        else:\n            return -1\n        if o[4] < my:\n            cy = 0\n        elif o[2] >= my:\n            cy = 1\n        else:\n            return -1\n        return cy * 2 + cx\n    def split(n):\n        h = n['s'] / 2\n        n['kids'] = [make(n['x'] + (k % 2) * h, n['y'] + (k // 2) * h, h, n['d'] + 1) for k in range(4)]\n        old, n['objs'] = n['objs'], []\n        for o in old:\n            insert(n, o)\n    def insert(n, o):\n        if n['kids'] is not None:\n            k = child_index(n, o)\n            if k >= 0:\n                insert(n['kids'][k], o)\n                return\n        n['objs'].append(o)\n        if n['kids'] is None and len(n['objs']) > cap and n['d'] < max_depth:\n            split(n)\n    root = make(0, 0, 16, 0)\n    for o in objs:\n        insert(root, o)\n    found, count, deep = [], 0, 0\n    stack = [root]\n    while stack:\n        n = stack.pop()\n        count += 1\n        deep = max(deep, n['d'])\n        if n['kids']:\n            stack.extend(n['kids'])\n        if n['x'] <= q[2] and q[0] <= n['x'] + n['s'] and n['y'] <= q[3] and q[1] <= n['y'] + n['s']:\n            found.extend(o[0] for o in n['objs'])\n    return [sorted(found), count, deep]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[[8, 7, 2, 8, 5], [41, 12, 8, 14, 11], [5, 2, 6, 2, 9], [38, 10, 5, 12, 5], [9, 0, 3, 1, 5], [24, 4, 0, 6, 3]], 2, 3, [11, 10, 12, 12]], [[5, 8, 41], 5, 1]], [[[[49, 7, 3, 10, 3], [38, 8, 0, 8, 2], [11, 12, 4, 12, 4], [5, 4, 10, 4, 11], [3, 12, 6, 15, 7], [21, 0, 13, 1, 14], [35, 10, 7, 10, 10], [9, 9, 10, 12, 12]], 2, 2, [9, 2, 10, 7]], [[35, 38, 49], 9, 2]], [[[[2, 13, 0, 16, 1], [21, 1, 6, 1, 6], [5, 5, 8, 8, 8], [39, 10, 6, 11, 9]], 2, 2, [14, 1, 19, 6]], [[2, 5, 39], 5, 1]], [[[[28, 10, 6, 13, 7], [40, 6, 0, 9, 2], [9, 1, 14, 3, 16]], 3, 2, [13, 2, 13, 7]], [[9, 28, 40], 1, 0]], [[[[41, 8, 14, 11, 16], [7, 7, 6, 8, 8], [38, 10, 10, 10, 13], [17, 7, 9, 8, 11], [2, 6, 3, 9, 4], [6, 12, 10, 12, 10], [30, 9, 12, 10, 12]], 3, 3, [1, 4, 1, 6]], [[2, 7, 17], 9, 2]], [[[[3, 15, 7, 16, 7], [5, 1, 8, 3, 10], [28, 2, 13, 3, 14], [8, 13, 13, 14, 14], [16, 8, 14, 11, 16], [42, 11, 14, 14, 14], [17, 0, 15, 1, 15]], 1, 1, [3, 9, 5, 14]], [[5, 17, 28], 5, 1]], [[[[40, 9, 14, 12, 15], [14, 9, 1, 10, 2], [37, 8, 7, 10, 7], [45, 7, 10, 7, 13], [11, 4, 1, 6, 4], [18, 10, 14, 11, 16]], 2, 2, [11, 14, 14, 15]], [[18, 40], 5, 1]], [[[[11, 13, 14, 15, 15], [7, 15, 15, 16, 16], [21, 2, 5, 2, 5], [5, 13, 14, 13, 15], [37, 14, 6, 15, 7]], 2, 2, [13, 10, 18, 12]], [[5, 7, 11], 9, 2]]], [[[[[10, 3, 15, 4, 15], [48, 15, 10, 15, 12], [19, 15, 9, 15, 12], [6, 7, 11, 8, 13], [45, 5, 14, 5, 16], [30, 13, 9, 14, 11], [25, 14, 13, 14, 13], [34, 15, 1, 15, 1]], 2, 1, [13, 2, 16, 2]], [[6, 34], 5, 1]], [[[[27, 11, 13, 14, 16], [22, 12, 7, 15, 7]], 3, 1, [2, 4, 7, 5]], [[22, 27], 1, 0]], [[[[2, 13, 13, 14, 13], [39, 12, 5, 12, 7], [33, 14, 5, 15, 7]], 3, 1, [12, 1, 17, 4]], [[2, 33, 39], 1, 0]], [[[[14, 10, 6, 10, 6], [3, 8, 10, 9, 10], [42, 13, 1, 15, 1], [46, 12, 1, 13, 1], [40, 14, 11, 14, 11], [27, 7, 4, 10, 4], [19, 9, 12, 12, 13]], 3, 2, [3, 6, 4, 7]], [[27], 5, 1]], [[[[20, 2, 5, 2, 5], [1, 4, 5, 4, 6], [36, 1, 1, 1, 1], [15, 3, 12, 3, 13], [9, 4, 6, 6, 7], [33, 14, 11, 16, 14], [24, 0, 4, 3, 5], [34, 6, 0, 9, 0]], 1, 3, [4, 4, 5, 5]], [[1, 9, 20, 24, 34, 36], 17, 3]], [[[[1, 4, 0, 5, 3], [17, 10, 15, 12, 16]], 2, 2, [13, 9, 14, 14]], [[1, 17], 1, 0]], [[[[28, 9, 14, 12, 16], [29, 2, 3, 2, 6], [23, 8, 0, 8, 2], [17, 2, 9, 5, 11], [33, 15, 5, 16, 7], [46, 14, 15, 16, 16], [14, 13, 0, 16, 3]], 2, 2, [0, 14, 1, 18]], [[17], 9, 2]], [[[[45, 15, 11, 16, 11], [24, 11, 4, 12, 5], [3, 1, 6, 1, 9], [37, 12, 8, 15, 11], [44, 7, 10, 9, 11], [9, 13, 4, 16, 5], [27, 11, 11, 11, 14]], 1, 3, [7, 13, 9, 15]], [[3, 27, 44], 17, 3]]], [[[[[1, 6, 9, 9, 12], [46, 1, 14, 4, 15], [45, 4, 13, 4, 16], [40, 3, 7, 6, 8], [24, 8, 12, 8, 13], [21, 4, 15, 4, 16], [7, 9, 11, 11, 14], [34, 11, 7, 13, 10]], 2, 2, [1, 9, 4, 14]], [[1, 21, 34, 40, 45, 46], 9, 2]], [[[[27, 0, 2, 3, 3], [21, 0, 12, 2, 14], [38, 0, 2, 2, 5], [2, 0, 5, 3, 5], [31, 10, 9, 10, 12], [20, 10, 2, 11, 5]], 2, 2, [2, 10, 6, 14]], [[21], 9, 2]], [[[[25, 2, 2, 3, 2], [19, 13, 7, 14, 7], [28, 4, 8, 7, 11], [18, 11, 3, 11, 3]], 2, 1, [11, 12, 14, 17]], [[], 5, 1]], [[[[42, 9, 0, 12, 2], [33, 14, 15, 15, 15], [46, 5, 9, 7, 12], [36, 11, 0, 13, 2], [43, 10, 3, 13, 4], [41, 4, 1, 6, 3], [49, 12, 12, 12, 14], [1, 10, 2, 12, 3], [11, 9, 7, 11, 10], [4, 8, 2, 8, 2]], 2, 1, [13, 13, 15, 15]], [[11, 33, 49], 5, 1]], [[[[33, 4, 12, 4, 12], [26, 7, 15, 8, 15], [29, 8, 7, 10, 7], [4, 15, 0, 15, 3], [15, 7, 13, 7, 14], [16, 7, 6, 10, 9], [5, 8, 3, 8, 3], [31, 14, 15, 14, 16], [22, 3, 2, 5, 3]], 3, 1, [3, 7, 5, 11]], [[15, 16, 22, 26, 33], 5, 1]], [[[[30, 9, 5, 12, 7], [25, 13, 6, 13, 6], [20, 0, 3, 1, 5], [10, 11, 13, 11, 15], [33, 6, 3, 9, 6], [17, 9, 9, 10, 11], [45, 3, 9, 4, 11], [5, 10, 4, 11, 6], [43, 8, 9, 9, 12], [39, 7, 15, 10, 16]], 1, 1, [1, 10, 5, 11]], [[33, 39, 45], 5, 1]], [[[[46, 4, 0, 4, 0], [7, 14, 13, 16, 14], [25, 10, 11, 11, 14], [33, 14, 8, 16, 10], [9, 12, 5, 15, 8], [19, 2, 12, 3, 14], [42, 2, 13, 2, 13], [13, 15, 15, 16, 15], [34, 15, 7, 15, 10], [5, 8, 10, 9, 10]], 1, 3, [4, 3, 8, 7]], [[9, 34, 46], 21, 3]], [[[[7, 12, 2, 12, 5], [38, 9, 14, 9, 16], [5, 5, 12, 7, 13], [14, 11, 3, 11, 3], [26, 0, 4, 3, 5], [6, 12, 1, 12, 1], [27, 7, 3, 10, 5], [22, 14, 1, 15, 2]], 2, 2, [5, 10, 10, 13]], [[5, 27, 38], 9, 2]]], [[[[[28, 6, 13, 6, 15], [12, 0, 1, 0, 3], [30, 1, 2, 2, 2], [9, 14, 12, 16, 13], [7, 5, 11, 8, 12]], 1, 3, [8, 2, 12, 3]], [[7], 13, 3]], [[[[46, 13, 3, 16, 4], [35, 8, 3, 9, 3], [29, 9, 8, 12, 9], [9, 4, 15, 6, 16], [32, 2, 6, 3, 6], [23, 1, 1, 2, 3], [49, 9, 11, 10, 12], [27, 2, 5, 5, 8]], 1, 2, [0, 13, 4, 15]], [[9, 27], 17, 2]], [[[[13, 10, 13, 11, 13], [3, 2, 3, 3, 4], [39, 8, 13, 9, 13], [43, 1, 1, 2, 3], [31, 3, 13, 5, 14], [4, 15, 12, 16, 13], [17, 6, 8, 7, 8], [24, 3, 3, 6, 6], [15, 11, 6, 11, 6]], 3, 3, [14, 14, 17, 16]], [[4, 13, 39], 5, 1]], [[[[17, 6, 9, 8, 12], [37, 8, 2, 10, 2], [42, 11, 14, 12, 14], [39, 9, 8, 10, 9], [34, 7, 2, 7, 5], [32, 13, 4, 16, 7], [23, 2, 9, 2, 10], [1, 4, 10, 7, 13], [40, 4, 2, 4, 3], [29, 4, 11, 6, 14]], 2, 2, [0, 9, 3, 13]], [[1, 17, 23, 29], 9, 2]], [[[[17, 1, 10, 4, 12], [11, 9, 3, 9, 4], [36, 1, 13, 3, 15], [49, 3, 14, 5, 16], [7, 8, 0, 10, 0], [39, 1, 15, 2, 16], [23, 1, 12, 2, 15], [8, 6, 14, 8, 16], [43, 11, 13, 11, 16], [29, 11, 8, 12, 9], [32, 7, 5, 9, 8]], 3, 3, [3, 2, 3, 3]], [[8, 32], 9, 2]], [[[[7, 13, 7, 14, 10], [49, 6, 5, 9, 6], [35, 8, 9, 10, 9]], 2, 3, [0, 10, 0, 13]], [[7, 49], 5, 1]], [[[[12, 0, 8, 0, 10], [34, 13, 6, 15, 9], [33, 15, 14, 16, 16]], 2, 2, [12, 8, 16, 9]], [[33, 34], 5, 1]], [[[[12, 4, 4, 5, 4], [36, 13, 8, 13, 10], [9, 15, 1, 16, 2], [43, 9, 11, 12, 14], [17, 7, 15, 7, 15]], 1, 1, [11, 0, 13, 2]], [[9], 5, 1]]], [[[[[49, 11, 1, 11, 4], [4, 9, 14, 12, 16], [3, 1, 4, 2, 7], [11, 10, 4, 10, 5], [25, 6, 12, 9, 12], [26, 11, 14, 13, 15], [36, 3, 14, 6, 16], [18, 3, 1, 3, 2], [6, 15, 5, 16, 7], [31, 3, 11, 3, 12], [40, 2, 6, 4, 9]], 3, 3, [11, 14, 15, 14]], [[4, 25, 26, 40], 5, 1]], [[[[4, 15, 8, 16, 9], [30, 1, 0, 2, 0], [35, 15, 6, 16, 9], [12, 10, 4, 13, 7], [1, 2, 14, 5, 15], [28, 5, 2, 5, 5], [20, 15, 1, 15, 4], [46, 9, 0, 12, 0], [19, 4, 5, 5, 5], [43, 0, 9, 2, 11], [38, 6, 1, 9, 3], [7, 15, 6, 16, 8]], 3, 2, [14, 9, 16, 11]], [[4, 7, 35, 38], 5, 1]], [[[[29, 6, 0, 8, 3], [20, 11, 15, 11, 16], [27, 6, 12, 9, 15], [38, 0, 9, 2, 11], [30, 10, 9, 10, 10], [7, 2, 9, 3, 11], [48, 8, 11, 11, 14], [9, 2, 7, 2, 10]], 1, 2, [1, 4, 2, 6]], [[9, 27, 29], 13, 2]], [[[[27, 4, 14, 7, 14], [36, 6, 1, 8, 4], [10, 8, 9, 10, 11], [15, 13, 4, 13, 5], [24, 9, 5, 12, 7], [48, 11, 0, 14, 1], [20, 5, 6, 7, 9], [47, 1, 11, 1, 12]], 3, 3, [6, 7, 6, 7]], [[20, 36], 5, 1]], [[[[4, 7, 3, 10, 5], [26, 13, 7, 14, 7], [19, 14, 7, 14, 10], [23, 14, 7, 15, 10], [10, 7, 12, 10, 15], [11, 14, 7, 16, 8], [17, 8, 6, 8, 9], [13, 15, 9, 15, 11], [34, 5, 9, 8, 9], [9, 5, 7, 6, 10], [2, 7, 6, 8, 9], [14, 4, 8, 7, 8]], 2, 3, [3, 0, 3, 3]], [[2, 4, 9, 10, 11, 17, 19, 23, 34], 5, 1]], [[[[34, 13, 8, 16, 9], [35, 0, 9, 2, 12], [8, 11, 12, 13, 13], [43, 12, 9, 15, 9], [42, 12, 3, 15, 5], [21, 13, 3, 13, 3], [27, 12, 0, 12, 3], [37, 6, 2, 8, 5], [25, 0, 9, 2, 12]], 2, 3, [10, 6, 10, 11]], [[8, 37, 42], 13, 2]], [[[[2, 6, 3, 8, 4], [12, 0, 8, 0, 8], [38, 9, 13, 11, 16], [4, 4, 1, 4, 3], [36, 14, 3, 15, 3], [48, 8, 14, 9, 16], [22, 4, 3, 5, 5], [3, 10, 9, 10, 12], [26, 6, 6, 7, 6], [11, 4, 15, 6, 16], [18, 9, 3, 12, 4], [27, 12, 1, 14, 2]], 1, 2, [1, 4, 2, 5]], [[2, 22], 21, 2]], [[[[41, 9, 3, 12, 4], [48, 3, 6, 4, 7], [28, 8, 15, 8, 15]], 3, 3, [10, 1, 13, 6]], [[28, 41, 48], 1, 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-quadtree-straddle-midline-ownership","generated_at":"2026-09-29T14:50:59.176760+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.","root_cause":"The right-child test is minx > mid.","sha256":"6905352383d7b71a1d3b3b6b0dd18b2c3401a3f7a085a06065475e025143f7c2","title":"Objects starting exactly on the midline are treated as straddlers · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.838,"exit_code":1,"observations":[{"actual":[[5,41],9,2],"check":"case 0","expected":[[5,8,41],5,1],"passed":false},{"actual":[[3,11,35,49],5,1],"check":"case 1","expected":[[35,38,49],9,2],"passed":false},{"actual":[[2,39],5,1],"check":"case 2","expected":[[2,5,39],5,1],"passed":false},{"actual":[[9,28,40],1,0],"check":"case 3","expected":[[9,28,40],1,0],"passed":true},{"actual":[[2,7],9,2],"check":"case 4","expected":[[2,7,17],9,2],"passed":false},{"actual":[[5,17,28],5,1],"check":"case 5","expected":[[5,17,28],5,1],"passed":true},{"actual":[[18,40],5,1],"check":"case 6","expected":[[18,40],5,1],"passed":true},{"actual":[[5,7,11],9,2],"check":"case 7","expected":[[5,7,11],9,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[5, 41], 9, 2], \"expected\": [[5, 8, 41], 5, 1], \"passed\": false}, {\"check\": \"case 1\", \"actual\": [[3, 11, 35, 49], 5, 1], \"expected\": [[35, 38, 49], 9, 2], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [[2, 39], 5, 1], \"expected\": [[2, 5, 39], 5, 1], \"passed\": false}, {\"check\": \"case 3\", \"actual\": [[9, 28, 40], 1, 0], \"expected\": [[9, 28, 40], 1, 0], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [[2, 7], 9, 2], \"expected\": [[2, 7, 17], 9, 2], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [[5, 17, 28], 5, 1], \"expected\": [[5, 17, 28], 5, 1], \"passed\": true}, {\"check\": \"case 6\", \"actual\": [[18, 40], 5, 1], \"expected\": [[18, 40], 5, 1], \"passed\": true}, {\"check\": \"case 7\", \"actual\": [[5, 7, 11], 9, 2], \"expected\": [[5, 7, 11], 9, 2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.186,"exit_code":1,"observations":[{"actual":[[5,8,41],5,1],"check":"case 0","expected":[[5,8,41],5,1],"passed":true},{"actual":[[3,11,35,38,49],5,1],"check":"case 1","expected":[[35,38,49],9,2],"passed":false},{"actual":[[2,5,39],5,1],"check":"case 2","expected":[[2,5,39],5,1],"passed":true},{"actual":[[9,28,40],1,0],"check":"case 3","expected":[[9,28,40],1,0],"passed":true},{"actual":[[2,7,17,41],5,1],"check":"case 4","expected":[[2,7,17],9,2],"passed":false},{"actual":[[5,16,17,28],5,1],"check":"case 5","expected":[[5,17,28],5,1],"passed":false},{"actual":[[18,37,40],5,1],"check":"case 6","expected":[[18,40],5,1],"passed":false},{"actual":[[5,7,11],9,2],"check":"case 7","expected":[[5,7,11],9,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"case 0\", \"actual\": [[5, 8, 41], 5, 1], \"expected\": [[5, 8, 41], 5, 1], \"passed\": true}, {\"check\": \"case 1\", \"actual\": [[3, 11, 35, 38, 49], 5, 1], \"expected\": [[35, 38, 49], 9, 2], \"passed\": false}, {\"check\": \"case 2\", \"actual\": [[2, 5, 39], 5, 1], \"expected\": [[2, 5, 39], 5, 1], \"passed\": true}, {\"check\": \"case 3\", \"actual\": [[9, 28, 40], 1, 0], \"expected\": [[9, 28, 40], 1, 0], \"passed\": true}, {\"check\": \"case 4\", \"actual\": [[2, 7, 17, 41], 5, 1], \"expected\": [[2, 7, 17], 9, 2], \"passed\": false}, {\"check\": \"case 5\", \"actual\": [[5, 16, 17, 28], 5, 1], \"expected\": [[5, 17, 28], 5, 1], \"passed\": false}, {\"check\": \"case 6\", \"actual\": [[18, 37, 40], 5, 1], \"expected\": [[18, 40], 5, 1], \"passed\": false}, {\"check\": \"case 7\", \"actual\": [[5, 7, 11], 9, 2], \"expected\": [[5, 7, 11], 9, 2], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}