broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 17
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
            longest = max(longest, dist)
        else:
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: blocked field goal penalty',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [9, 50]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 17}]],
   [3, 40]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 31}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [15, 50]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 45},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 39]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 12},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [8, 51]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [4, 39]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [7, 49])],
 [('regression: blocked field goal penalty', [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}]], [0, 0]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [-1, 0]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [-1, 0]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}]],
   [5, 49]),
  ('normal control 2', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [1, 0]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [12, 50])],
 [('regression: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 20}, {'result': 'missed', 'type': 'fg', 'yardline': 5},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 16}]],
   [0, 33]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [3, 50]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 2}, {'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [3, 19]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [10, 50]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [6, 51]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [11, 49]),
  ('normal control 4', [[{'result': 'made', 'type': 'fg', 'yardline': 23}]], [4, 40])],
 [('regression: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 38},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [12, 55]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 23}]],
   [1, 39]),
  ('second regression', [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}]], [0, 0]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 3}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 3},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [0, 20]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [7, 49])],
 [('regression: blocked field goal penalty',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 12}]],
   [6, 40]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [8, 50]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [8, 50]),
  ('normal control 1', [[{'result': 'made', 'type': 'fg', 'yardline': 32}]], [4, 49]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 49]),
  ('normal control 3',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [2, 39]),
  ('normal control 4', [[{'result': 'made', 'type': 'fg', 'yardline': 23}]], [4, 40])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 17
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
            longest = max(longest, dist)
        elif k['result'] != 'made' and dist <= 39:
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: blocked field goal penalty',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [9, 50]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 17}]],
   [3, 40]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 31}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [15, 50]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 45},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 39]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 12},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [8, 51]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [4, 39]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [7, 49])],
 [('regression: blocked field goal penalty', [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}]], [0, 0]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [-1, 0]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [-1, 0]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}]],
   [5, 49]),
  ('normal control 2', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [1, 0]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [12, 50])],
 [('regression: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 20}, {'result': 'missed', 'type': 'fg', 'yardline': 5},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 16}]],
   [0, 33]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [3, 50]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 2}, {'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [3, 19]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [10, 50]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [6, 51]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [11, 49]),
  ('normal control 4', [[{'result': 'made', 'type': 'fg', 'yardline': 23}]], [4, 40])],
 [('regression: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 38},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [12, 55]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 23}]],
   [1, 39]),
  ('second regression', [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}]], [0, 0]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 3}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 3},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [0, 20]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [7, 49])],
 [('regression: blocked field goal penalty',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 12}]],
   [6, 40]),
  ('partial repair probe: blocked field goal penalty',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [8, 50]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [8, 50]),
  ('normal control 1', [[{'result': 'made', 'type': 'fg', 'yardline': 32}]], [4, 49]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 49]),
  ('normal control 3',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [2, 39]),
  ('normal control 4', [[{'result': 'made', 'type': 'fg', 'yardline': 23}]], [4, 40])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
A kicker whose 30-yard attempt is blocked loses 2 points.

Score a kicker. Kick distance is the line-of-scrimmage yardline plus 17 (10 yards of end zone and a 7-yard hold). Made FG: <=39 yards 3, 40-49 4, 50+ 5. Missed FG: <=39 -2, 40-49 -1, 50+ 0. Blocked FG and blocked PAT score 0. PAT made +1, missed -1. Return [points, longest made FG distance or 0].

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
        dist = k['yardline'] + 17
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
            longest = max(longest, dist)
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [4, 50]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [8, 50]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 36}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [7, 53]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 28}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 43}]],
   [8, 60]),
  ('normal control 2', [[{'result': 'made', 'type': 'fg', 'yardline': 33}]], [5, 50]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 4}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [6, 39]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 2}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [12, 51])],
 [('regression: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 2},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [2, 40]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [6, 40]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 25}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22}]],
   [0, 0]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [4, 40]),
  ('normal control 2',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 6}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [-1, 39]),
  ('normal control 3', [[{'result': 'missed', 'type': 'fg', 'yardline': 34}]], [0, 0]),
  ('normal control 4', [[{'result': 'missed', 'type': 'fg', 'yardline': 22}]], [-2, 0])],
 [('regression: extra point fallthrough',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [2, 0]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [2, 39]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [14, 51]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [-2, 0]),
  ('normal control 2', [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}]], [0, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 11},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [13, 51]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [4, 51])],
 [('regression: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [10, 50]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [6, 49]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [8, 51]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [5, 50]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [7, 50]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [4, 40])],
 [('regression: extra point fallthrough',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 30}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [4, 40]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [-2, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [2, 0]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [4, 40]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [0, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [0, 0]),
  ('normal control 4',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 21},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [0, 38])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            if k['result'] == 'made':
                continue
        dist = k['yardline'] + 17
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
            longest = max(longest, dist)
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [4, 50]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [8, 50]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 36}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [7, 53]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 28}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 43}]],
   [8, 60]),
  ('normal control 2', [[{'result': 'made', 'type': 'fg', 'yardline': 33}]], [5, 50]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 4}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [6, 39]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 2}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [12, 51])],
 [('regression: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 2},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [2, 40]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [6, 40]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 25}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22}]],
   [0, 0]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [4, 40]),
  ('normal control 2',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 6}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [-1, 39]),
  ('normal control 3', [[{'result': 'missed', 'type': 'fg', 'yardline': 34}]], [0, 0]),
  ('normal control 4', [[{'result': 'missed', 'type': 'fg', 'yardline': 22}]], [-2, 0])],
 [('regression: extra point fallthrough',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [2, 0]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [2, 39]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [14, 51]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [-2, 0]),
  ('normal control 2', [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}]], [0, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 11},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [13, 51]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [4, 51])],
 [('regression: extra point fallthrough',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [10, 50]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [6, 49]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [8, 51]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [5, 50]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [7, 50]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [4, 40])],
 [('regression: extra point fallthrough',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 30}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [4, 40]),
  ('partial repair probe: extra point fallthrough',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [-2, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [2, 0]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [4, 40]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [0, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [0, 0]),
  ('normal control 4',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 21},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [0, 38])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Each made PAT also scores as a 32-yard field goal.

Score a kicker. Kick distance is the line-of-scrimmage yardline plus 17 (10 yards of end zone and a 7-yard hold). Made FG: <=39 yards 3, 40-49 4, 50+ 5. Missed FG: <=39 -2, 40-49 -1, 50+ 0. Blocked FG and blocked PAT score 0. PAT made +1, missed -1. Return [points, longest made FG distance or 0].

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 17
        longest = max(longest, dist)
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: longest made kick tracking',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [0, 0]),
  ('partial repair probe: longest made kick tracking',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 16}]],
   [-1, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 40}, {'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 41},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [8, 57]),
  ('normal control 1', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [7, 50]),
  ('normal control 3', [[{'result': 'made', 'type': 'fg', 'yardline': 34}]], [5, 51]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [4, 40])],
 [('regression: longest made kick tracking',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [6, 50]),
  ('partial repair probe: longest made kick tracking',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [3, 40]),
  ('second regression',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [4, 50]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [2, 0]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [8, 51]),
  ('normal control 3',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [3, 40]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [5, 50])],
 [('regression: longest made kick tracking',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [3, 39]),
  ('partial repair probe: longest made kick tracking',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 27}, {'result': 'blocked', 'type': 'fg', 'yardline': 35},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [4, 40]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [2, 39]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 19}]],
   [9, 51]),
  ('normal control 2', [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}]], [0, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [8, 50]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [7, 51])],
 [('regression: longest made kick tracking',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('partial repair probe: longest made kick tracking', [[{'result': 'missed', 'type': 'fg', 'yardline': 34}]],
   [0, 0]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [4, 39]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}]],
   [5, 49]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [15, 51]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 6}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [5, 40]),
  ('normal control 4',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 28}]],
   [4, 50])],
 [('regression: longest made kick tracking',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [2, 0]),
  ('partial repair probe: longest made kick tracking', [[{'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [-2, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'fg', 'yardline': 36},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [14, 51]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 8},
     {'result': 'made', 'type': 'fg', 'yardline': 1}, {'result': 'blocked', 'type': 'fg', 'yardline': 22}]],
   [12, 50]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 27}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 44]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [2, 0]),
  ('normal control 4', [[{'result': 'made', 'type': 'fg', 'yardline': 40}]], [5, 57])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 17
        if k['result'] != 'blocked':
            longest = max(longest, dist)
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: longest made kick tracking',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [0, 0]),
  ('partial repair probe: longest made kick tracking',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 16}]],
   [-1, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 40}, {'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 41},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [8, 57]),
  ('normal control 1', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [7, 50]),
  ('normal control 3', [[{'result': 'made', 'type': 'fg', 'yardline': 34}]], [5, 51]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [4, 40])],
 [('regression: longest made kick tracking',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [6, 50]),
  ('partial repair probe: longest made kick tracking',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [3, 40]),
  ('second regression',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [4, 50]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [2, 0]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [8, 51]),
  ('normal control 3',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [3, 40]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [5, 50])],
 [('regression: longest made kick tracking',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [3, 39]),
  ('partial repair probe: longest made kick tracking',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 27}, {'result': 'blocked', 'type': 'fg', 'yardline': 35},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [4, 40]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [2, 39]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 19}]],
   [9, 51]),
  ('normal control 2', [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}]], [0, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [8, 50]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [7, 51])],
 [('regression: longest made kick tracking',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('partial repair probe: longest made kick tracking', [[{'result': 'missed', 'type': 'fg', 'yardline': 34}]],
   [0, 0]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [4, 39]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}]],
   [5, 49]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [15, 51]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 6}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [5, 40]),
  ('normal control 4',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 28}]],
   [4, 50])],
 [('regression: longest made kick tracking',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [2, 0]),
  ('partial repair probe: longest made kick tracking', [[{'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [-2, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'fg', 'yardline': 36},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [14, 51]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 8},
     {'result': 'made', 'type': 'fg', 'yardline': 1}, {'result': 'blocked', 'type': 'fg', 'yardline': 22}]],
   [12, 50]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 27}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 44]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [2, 0]),
  ('normal control 4', [[{'result': 'made', 'type': 'fg', 'yardline': 40}]], [5, 57])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
A missed 58-yarder is reported as the kicker's longest field goal.

Score a kicker. Kick distance is the line-of-scrimmage yardline plus 17 (10 yards of end zone and a 7-yard hold). Made FG: <=39 yards 3, 40-49 4, 50+ 5. Missed FG: <=39 -2, 40-49 -1, 50+ 0. Blocked FG and blocked PAT score 0. PAT made +1, missed -1. Return [points, longest made FG distance or 0].

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 17
        if k['result'] == 'made':
            pts += 3 if dist < 39 else 4 if dist < 49 else 5
            longest = max(longest, dist)
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: made distance bands',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 34}]],
   [8, 40]),
  ('partial repair probe: made distance bands',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 30}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [6, 49]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 45}, {'result': 'made', 'type': 'fg', 'yardline': 18}]],
   [12, 51]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [15, 51]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [8, 40]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [2, 50]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [5, 50])],
 [('regression: made distance bands',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [3, 39]),
  ('partial repair probe: made distance bands', [[{'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [4, 49]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [13, 40]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 39}]],
   [4, 56]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 40]),
  ('normal control 3', [[{'result': 'made', 'type': 'fg', 'yardline': 34}]], [5, 51]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 23},
     {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [1, 0])],
 [('regression: made distance bands',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [2, 39]),
  ('partial repair probe: made distance bands',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [8, 49]),
  ('second regression', [[{'result': 'made', 'type': 'fg', 'yardline': 32}]], [4, 49]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 4', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0])],
 [('regression: made distance bands',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [9, 50]),
  ('partial repair probe: made distance bands',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 28}]],
   [4, 49]),
  ('second regression',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [0, 39]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [7, 50]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [5, 50]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [-1, 0])],
 [('regression: made distance bands',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [6, 50]),
  ('partial repair probe: made distance bands',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [4, 49]),
  ('second regression',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [11, 50]),
  ('normal control 1', [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}]], [0, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 14},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}]],
   [-2, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [5, 50]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 15}]],
   [3, 32])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 17
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist < 49 else 5
            longest = max(longest, dist)
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: made distance bands',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 34}]],
   [8, 40]),
  ('partial repair probe: made distance bands',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 30}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [6, 49]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 45}, {'result': 'made', 'type': 'fg', 'yardline': 18}]],
   [12, 51]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [15, 51]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [8, 40]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [2, 50]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [5, 50])],
 [('regression: made distance bands',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [3, 39]),
  ('partial repair probe: made distance bands', [[{'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [4, 49]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [13, 40]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 39}]],
   [4, 56]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 40]),
  ('normal control 3', [[{'result': 'made', 'type': 'fg', 'yardline': 34}]], [5, 51]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 23},
     {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [1, 0])],
 [('regression: made distance bands',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [2, 39]),
  ('partial repair probe: made distance bands',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [8, 49]),
  ('second regression', [[{'result': 'made', 'type': 'fg', 'yardline': 32}]], [4, 49]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 4', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0])],
 [('regression: made distance bands',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [9, 50]),
  ('partial repair probe: made distance bands',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 28}]],
   [4, 49]),
  ('second regression',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [0, 39]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [7, 50]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [5, 50]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [-1, 0])],
 [('regression: made distance bands',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [6, 50]),
  ('partial repair probe: made distance bands',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [4, 49]),
  ('second regression',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [11, 50]),
  ('normal control 1', [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}]], [0, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 14},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}]],
   [-2, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [5, 50]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 15}]],
   [3, 32])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
A 39-yard make earns 4 points and a 49-yard make earns 5.

Score a kicker. Kick distance is the line-of-scrimmage yardline plus 17 (10 yards of end zone and a 7-yard hold). Made FG: <=39 yards 3, 40-49 4, 50+ 5. Missed FG: <=39 -2, 40-49 -1, 50+ 0. Blocked FG and blocked PAT score 0. PAT made +1, missed -1. Return [points, longest made FG distance or 0].

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 17
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
            longest = max(longest, dist)
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: long miss exemption',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [4, 51]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 39]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'fg', 'yardline': 45},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [8, 51]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 3}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [8, 50]),
  ('normal control 2', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'made', 'type': 'fg', 'yardline': 4}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [16, 50]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 21},
     {'result': 'made', 'type': 'fg', 'yardline': 9}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [16, 51])],
 [('regression: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [1, 39]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [14, 51]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [4, 39]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [8, 49]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 31},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [-1, 0]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [5, 50])],
 [('regression: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [9, 50]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [0, 0]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}]],
   [0, 0]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [5, 40]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 13},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 7}]],
   [4, 40]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [10, 50]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [11, 51])],
 [('regression: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [6, 50]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 30}]],
   [-1, 0]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('normal control 2', [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}]], [0, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-2, 0]),
  ('normal control 4', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0])],
 [('regression: long miss exemption',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 43}]],
   [-2, 0]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [13, 51]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [12, 50]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [3, 49]),
  ('normal control 2',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('normal control 3',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 17
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
            longest = max(longest, dist)
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1 if dist <= 50 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: long miss exemption',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [4, 51]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [5, 39]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'fg', 'yardline': 45},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [8, 51]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'fg', 'yardline': 3}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [8, 50]),
  ('normal control 2', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'made', 'type': 'fg', 'yardline': 4}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [16, 50]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'made', 'type': 'fg', 'yardline': 21},
     {'result': 'made', 'type': 'fg', 'yardline': 9}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [16, 51])],
 [('regression: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [1, 39]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [14, 51]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [4, 39]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [8, 49]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 31},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [-1, 0]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [5, 50])],
 [('regression: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33}]],
   [9, 50]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [0, 0]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 34}]],
   [0, 0]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 23}]],
   [5, 40]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 13},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 7}]],
   [4, 40]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [10, 50]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [11, 51])],
 [('regression: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [6, 50]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'fg', 'yardline': 30}]],
   [-1, 0]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('normal control 2', [[{'result': 'blocked', 'type': 'fg', 'yardline': 22}]], [0, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-2, 0]),
  ('normal control 4', [[{'result': 'made', 'type': 'pat', 'yardline': 15}]], [1, 0])],
 [('regression: long miss exemption',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 43}]],
   [-2, 0]),
  ('partial repair probe: long miss exemption',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [13, 51]),
  ('second regression',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 33},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'fg', 'yardline': 33}]],
   [12, 50]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [3, 49]),
  ('normal control 2',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('normal control 3',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-1, 0]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Kickers lose a point for missing a 55-yard attempt that the league exempts.

Score a kicker. Kick distance is the line-of-scrimmage yardline plus 17 (10 yards of end zone and a 7-yard hold). Made FG: <=39 yards 3, 40-49 4, 50+ 5. Missed FG: <=39 -2, 40-49 -1, 50+ 0. Blocked FG and blocked PAT score 0. PAT made +1, missed -1. Return [points, longest made FG distance or 0].

split: open-access