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

N = 1
observations = []
def solve(stats, fmt, pos):
    def unit(y, per):
        q = abs(y) // per
        return q if y >= 0 else -q
    rec_val = {'std': 0, 'half': 50, 'ppr': 100}[fmt]
    if pos == 'TE':
        rec_val += 50
    pts = 0
    pts += unit(stats['pass_yds'], 25) * 100
    pts += stats['pass_td'] * 400
    pts -= stats['int'] * 200
    pts += unit(stats['rush_yds'] + stats['rec_yds'], 10) * 100
    pts += stats['rush_td'] * 600
    pts += stats['rec'] * rec_val
    pts += stats['rec_td'] * 600
    pts -= stats['fum_lost'] * 200
    pts += stats['two_pt'] * 200
    pts += stats['first_downs'] * 25
    if stats['pass_yds'] >= 300:
        pts += 300
    if stats['rush_yds'] >= 100:
        pts += 300
    if stats['rec_yds'] >= 100:
        pts += 300
    t = (abs(pts) + 5) // 10
    sign = '-' if pts < 0 and t else ''
    return {'hundredths': pts, 'display': '%s%d.%d' % (sign, t // 10, t % 10)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: yards from scrimmage merged',
   [{'first_downs': 3,
     'fum': 2,
     'fum_lost': 2,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 7,
     'rec_td': 0,
     'rec_yds': -4,
     'rush_td': 0,
     'rush_yds': 93,
     'two_pt': 1},
    'half', 'WR'],
   {'display': '33.3', 'hundredths': 3325}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 7,
     'fum': 3,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 0,
     'rec_td': 1,
     'rec_yds': 27,
     'rush_td': 0,
     'rush_yds': 2,
     'two_pt': 0},
    'std', 'TE'],
   {'display': '20.8', 'hundredths': 2075}),
  ('second regression',
   [{'first_downs': 8,
     'fum': 2,
     'fum_lost': 2,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 158,
     'rec': 8,
     'rec_td': 2,
     'rec_yds': 99,
     'rush_td': 1,
     'rush_yds': 122,
     'two_pt': 0},
    'half', 'TE'],
   {'display': '52.0', 'hundredths': 5200}),
  ('normal control 1',
   [{'first_downs': 1,
     'fum': 2,
     'fum_lost': 2,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 39,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 8,
     'two_pt': 0},
    'half', 'TE'],
   {'display': '-8.8', 'hundredths': -875}),
  ('normal control 2',
   [{'first_downs': 8,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 2,
     'pass_yds': -3,
     'rec': 1,
     'rec_td': 1,
     'rec_yds': 100,
     'rush_td': 2,
     'rush_yds': 52,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '44.0', 'hundredths': 4400}),
  ('normal control 3',
   [{'first_downs': 3,
     'fum': 2,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 417,
     'rec': 10,
     'rec_td': 0,
     'rec_yds': 44,
     'rush_td': 1,
     'rush_yds': 91,
     'two_pt': 0},
    'ppr', 'RB'],
   {'display': '40.8', 'hundredths': 4075}),
  ('normal control 4',
   [{'first_downs': 3,
     'fum': 1,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 1,
     'pass_yds': 6,
     'rec': 2,
     'rec_td': 1,
     'rec_yds': -4,
     'rush_td': 0,
     'rush_yds': 1,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '4.8', 'hundredths': 475})],
 [('regression: yards from scrimmage merged',
   [{'first_downs': 9,
     'fum': 1,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 3,
     'pass_yds': 412,
     'rec': 1,
     'rec_td': 1,
     'rec_yds': 19,
     'rush_td': 1,
     'rush_yds': 9,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '42.8', 'hundredths': 4275}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 0,
     'fum': 2,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 6,
     'rec_td': 1,
     'rec_yds': 66,
     'rush_td': 2,
     'rush_yds': 143,
     'two_pt': 1},
    'std', 'TE'],
   {'display': '66.0', 'hundredths': 6600}),
  ('second regression',
   [{'first_downs': 0,
     'fum': 3,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 4,
     'pass_yds': 24,
     'rec': 5,
     'rec_td': 1,
     'rec_yds': 107,
     'rush_td': 1,
     'rush_yds': 10,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '40.0', 'hundredths': 4000}),
  ('normal control 1',
   [{'first_downs': 1,
     'fum': 2,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 2,
     'pass_yds': 24,
     'rec': 5,
     'rec_td': 0,
     'rec_yds': 20,
     'rush_td': 1,
     'rush_yds': 95,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '30.8', 'hundredths': 3075}),
  ('normal control 2',
   [{'first_downs': 9,
     'fum': 2,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 17,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': -1,
     'two_pt': 0},
    'half', 'WR'],
   {'display': '-3.8', 'hundredths': -375}),
  ('normal control 3',
   [{'first_downs': 6,
     'fum': 1,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 3,
     'pass_yds': 187,
     'rec': 8,
     'rec_td': 2,
     'rec_yds': 54,
     'rush_td': 2,
     'rush_yds': 10,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '62.5', 'hundredths': 6250}),
  ('normal control 4',
   [{'first_downs': 9,
     'fum': 3,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 3,
     'pass_yds': 103,
     'rec': 6,
     'rec_td': 1,
     'rec_yds': 20,
     'rush_td': 0,
     'rush_yds': 100,
     'two_pt': 1},
    'half', 'TE'],
   {'display': '45.3', 'hundredths': 4525})],
 [('regression: yards from scrimmage merged',
   [{'first_downs': 4,
     'fum': 3,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 156,
     'rec': 2,
     'rec_td': 1,
     'rec_yds': 141,
     'rush_td': 2,
     'rush_yds': -15,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '35.0', 'hundredths': 3500}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 2,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 2,
     'pass_yds': 274,
     'rec': 3,
     'rec_td': 1,
     'rec_yds': 106,
     'rush_td': 1,
     'rush_yds': -13,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '40.0', 'hundredths': 4000}),
  ('second regression',
   [{'first_downs': 9,
     'fum': 2,
     'fum_lost': 2,
     'int': 0,
     'pass_td': 3,
     'pass_yds': -3,
     'rec': 9,
     'rec_td': 1,
     'rec_yds': 99,
     'rush_td': 2,
     'rush_yds': 9,
     'two_pt': 1},
    'ppr', 'QB'],
   {'display': '48.3', 'hundredths': 4825}),
  ('normal control 1',
   [{'first_downs': 0,
     'fum': 2,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 0,
     'pass_yds': -9,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 3,
     'two_pt': 0},
    'ppr', 'QB'],
   {'display': '-4.0', 'hundredths': -400}),
  ('normal control 2',
   [{'first_downs': 3,
     'fum': 2,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 0,
     'pass_yds': 25,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': -5,
     'two_pt': 0},
    'ppr', 'TE'],
   {'display': '-0.3', 'hundredths': -25}),
  ('normal control 3',
   [{'first_downs': 1,
     'fum': 2,
     'fum_lost': 2,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 31,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': -4,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '-6.8', 'hundredths': -675}),
  ('normal control 4',
   [{'first_downs': 5,
     'fum': 2,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 415,
     'rec': 1,
     'rec_td': 0,
     'rec_yds': -4,
     'rush_td': 0,
     'rush_yds': -11,
     'two_pt': 1},
    'half', 'RB'],
   {'display': '17.8', 'hundredths': 1775})],
 [('regression: yards from scrimmage merged',
   [{'first_downs': 1,
     'fum': 3,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 1,
     'pass_yds': 308,
     'rec': 6,
     'rec_td': 2,
     'rec_yds': 150,
     'rush_td': 0,
     'rush_yds': -8,
     'two_pt': 0},
    'ppr', 'QB'],
   {'display': '53.3', 'hundredths': 5325}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 300,
     'rec': 7,
     'rec_td': 2,
     'rec_yds': 48,
     'rush_td': 0,
     'rush_yds': 3,
     'two_pt': 0},
    'ppr', 'WR'],
   {'display': '44.3', 'hundredths': 4425}),
  ('second regression',
   [{'first_downs': 2,
     'fum': 3,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 4,
     'pass_yds': 107,
     'rec': 11,
     'rec_td': 2,
     'rec_yds': 148,
     'rush_td': 1,
     'rush_yds': -7,
     'two_pt': 1},
    'std', 'WR'],
   {'display': '51.5', 'hundredths': 5150}),
  ('normal control 1',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 2,
     'pass_yds': 299,
     'rec': 2,
     'rec_td': 2,
     'rec_yds': 20,
     'rush_td': 0,
     'rush_yds': 112,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '47.3', 'hundredths': 4725}),
  ('normal control 2',
   [{'first_downs': 3,
     'fum': 3,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 72,
     'rush_td': 0,
     'rush_yds': 134,
     'two_pt': 0},
    'half', 'TE'],
   {'display': '43.8', 'hundredths': 4375}),
  ('normal control 3',
   [{'first_downs': 2,
     'fum': 3,
     'fum_lost': 2,
     'int': 1,
     'pass_td': 4,
     'pass_yds': 325,
     'rec': 7,
     'rec_td': 1,
     'rec_yds': 144,
     'rush_td': 1,
     'rush_yds': 142,
     'two_pt': 1},
    'ppr', 'WR'],
   {'display': '81.5', 'hundredths': 8150}),
  ('normal control 4',
   [{'first_downs': 8,
     'fum': 1,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 4,
     'pass_yds': 24,
     'rec': 7,
     'rec_td': 1,
     'rec_yds': -2,
     'rush_td': 0,
     'rush_yds': 99,
     'two_pt': 0},
    'ppr', 'QB'],
   {'display': '36.0', 'hundredths': 3600})],
 [('regression: yards from scrimmage merged',
   [{'first_downs': 2,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 1,
     'pass_yds': -3,
     'rec': 7,
     'rec_td': 2,
     'rec_yds': 99,
     'rush_td': 0,
     'rush_yds': 113,
     'two_pt': 1},
    'std', 'TE'],
   {'display': '43.0', 'hundredths': 4300}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 0,
     'fum': 0,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 0,
     'pass_yds': 350,
     'rec': 0,
     'rec_td': 1,
     'rec_yds': 55,
     'rush_td': 0,
     'rush_yds': 82,
     'two_pt': 0},
    'std', 'WR'],
   {'display': '36.0', 'hundredths': 3600}),
  ('second regression',
   [{'first_downs': 0,
     'fum': 1,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 0,
     'pass_yds': 24,
     'rec': 9,
     'rec_td': 0,
     'rec_yds': 35,
     'rush_td': 1,
     'rush_yds': 100,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '22.0', 'hundredths': 2200}),
  ('normal control 1',
   [{'first_downs': 5,
     'fum': 2,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 104,
     'rec': 10,
     'rec_td': 0,
     'rec_yds': 100,
     'rush_td': 1,
     'rush_yds': 99,
     'two_pt': 0},
    'std', 'TE'],
   {'display': '30.3', 'hundredths': 3025}),
  ('normal control 2',
   [{'first_downs': 3,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 300,
     'rec': 2,
     'rec_td': 2,
     'rec_yds': 41,
     'rush_td': 0,
     'rush_yds': 34,
     'two_pt': 0},
    'ppr', 'TE'],
   {'display': '35.8', 'hundredths': 3575}),
  ('normal control 3',
   [{'first_downs': 0,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 3,
     'pass_yds': 299,
     'rec': 7,
     'rec_td': 0,
     'rec_yds': 21,
     'rush_td': 1,
     'rush_yds': -10,
     'two_pt': 0},
    'half', 'QB'],
   {'display': '29.5', 'hundredths': 2950}),
  ('normal control 4',
   [{'first_downs': 1,
     'fum': 3,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 4,
     'pass_yds': 161,
     'rec': 0,
     'rec_td': 1,
     'rec_yds': -5,
     'rush_td': 2,
     'rush_yds': -2,
     'two_pt': 1},
    'std', 'QB'],
   {'display': '38.3', 'hundredths': 3825})]]
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(stats, fmt, pos):
    def unit(y, per):
        q = abs(y) // per
        return q if y >= 0 else -q
    rec_val = {'std': 0, 'half': 50, 'ppr': 100}[fmt]
    if pos == 'TE':
        rec_val += 50
    pts = 0
    pts += unit(stats['pass_yds'], 25) * 100
    pts += stats['pass_td'] * 400
    pts -= stats['int'] * 200
    pts += unit(stats['rush_yds'], 10) * 100
    pts += stats['rush_td'] * 600
    pts += stats['rec'] * rec_val
    pts += round(stats['rec_yds'] / 10) * 100
    pts += stats['rec_td'] * 600
    pts -= stats['fum_lost'] * 200
    pts += stats['two_pt'] * 200
    pts += stats['first_downs'] * 25
    if stats['pass_yds'] >= 300:
        pts += 300
    if stats['rush_yds'] >= 100:
        pts += 300
    if stats['rec_yds'] >= 100:
        pts += 300
    t = (abs(pts) + 5) // 10
    sign = '-' if pts < 0 and t else ''
    return {'hundredths': pts, 'display': '%s%d.%d' % (sign, t // 10, t % 10)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: yards from scrimmage merged',
   [{'first_downs': 3,
     'fum': 2,
     'fum_lost': 2,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 7,
     'rec_td': 0,
     'rec_yds': -4,
     'rush_td': 0,
     'rush_yds': 93,
     'two_pt': 1},
    'half', 'WR'],
   {'display': '33.3', 'hundredths': 3325}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 7,
     'fum': 3,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 0,
     'rec_td': 1,
     'rec_yds': 27,
     'rush_td': 0,
     'rush_yds': 2,
     'two_pt': 0},
    'std', 'TE'],
   {'display': '20.8', 'hundredths': 2075}),
  ('second regression',
   [{'first_downs': 8,
     'fum': 2,
     'fum_lost': 2,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 158,
     'rec': 8,
     'rec_td': 2,
     'rec_yds': 99,
     'rush_td': 1,
     'rush_yds': 122,
     'two_pt': 0},
    'half', 'TE'],
   {'display': '52.0', 'hundredths': 5200}),
  ('normal control 1',
   [{'first_downs': 1,
     'fum': 2,
     'fum_lost': 2,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 39,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 8,
     'two_pt': 0},
    'half', 'TE'],
   {'display': '-8.8', 'hundredths': -875}),
  ('normal control 2',
   [{'first_downs': 8,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 2,
     'pass_yds': -3,
     'rec': 1,
     'rec_td': 1,
     'rec_yds': 100,
     'rush_td': 2,
     'rush_yds': 52,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '44.0', 'hundredths': 4400}),
  ('normal control 3',
   [{'first_downs': 3,
     'fum': 2,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 417,
     'rec': 10,
     'rec_td': 0,
     'rec_yds': 44,
     'rush_td': 1,
     'rush_yds': 91,
     'two_pt': 0},
    'ppr', 'RB'],
   {'display': '40.8', 'hundredths': 4075}),
  ('normal control 4',
   [{'first_downs': 3,
     'fum': 1,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 1,
     'pass_yds': 6,
     'rec': 2,
     'rec_td': 1,
     'rec_yds': -4,
     'rush_td': 0,
     'rush_yds': 1,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '4.8', 'hundredths': 475})],
 [('regression: yards from scrimmage merged',
   [{'first_downs': 9,
     'fum': 1,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 3,
     'pass_yds': 412,
     'rec': 1,
     'rec_td': 1,
     'rec_yds': 19,
     'rush_td': 1,
     'rush_yds': 9,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '42.8', 'hundredths': 4275}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 0,
     'fum': 2,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 6,
     'rec_td': 1,
     'rec_yds': 66,
     'rush_td': 2,
     'rush_yds': 143,
     'two_pt': 1},
    'std', 'TE'],
   {'display': '66.0', 'hundredths': 6600}),
  ('second regression',
   [{'first_downs': 0,
     'fum': 3,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 4,
     'pass_yds': 24,
     'rec': 5,
     'rec_td': 1,
     'rec_yds': 107,
     'rush_td': 1,
     'rush_yds': 10,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '40.0', 'hundredths': 4000}),
  ('normal control 1',
   [{'first_downs': 1,
     'fum': 2,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 2,
     'pass_yds': 24,
     'rec': 5,
     'rec_td': 0,
     'rec_yds': 20,
     'rush_td': 1,
     'rush_yds': 95,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '30.8', 'hundredths': 3075}),
  ('normal control 2',
   [{'first_downs': 9,
     'fum': 2,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 17,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': -1,
     'two_pt': 0},
    'half', 'WR'],
   {'display': '-3.8', 'hundredths': -375}),
  ('normal control 3',
   [{'first_downs': 6,
     'fum': 1,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 3,
     'pass_yds': 187,
     'rec': 8,
     'rec_td': 2,
     'rec_yds': 54,
     'rush_td': 2,
     'rush_yds': 10,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '62.5', 'hundredths': 6250}),
  ('normal control 4',
   [{'first_downs': 9,
     'fum': 3,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 3,
     'pass_yds': 103,
     'rec': 6,
     'rec_td': 1,
     'rec_yds': 20,
     'rush_td': 0,
     'rush_yds': 100,
     'two_pt': 1},
    'half', 'TE'],
   {'display': '45.3', 'hundredths': 4525})],
 [('regression: yards from scrimmage merged',
   [{'first_downs': 4,
     'fum': 3,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 156,
     'rec': 2,
     'rec_td': 1,
     'rec_yds': 141,
     'rush_td': 2,
     'rush_yds': -15,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '35.0', 'hundredths': 3500}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 2,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 2,
     'pass_yds': 274,
     'rec': 3,
     'rec_td': 1,
     'rec_yds': 106,
     'rush_td': 1,
     'rush_yds': -13,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '40.0', 'hundredths': 4000}),
  ('second regression',
   [{'first_downs': 9,
     'fum': 2,
     'fum_lost': 2,
     'int': 0,
     'pass_td': 3,
     'pass_yds': -3,
     'rec': 9,
     'rec_td': 1,
     'rec_yds': 99,
     'rush_td': 2,
     'rush_yds': 9,
     'two_pt': 1},
    'ppr', 'QB'],
   {'display': '48.3', 'hundredths': 4825}),
  ('normal control 1',
   [{'first_downs': 0,
     'fum': 2,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 0,
     'pass_yds': -9,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 3,
     'two_pt': 0},
    'ppr', 'QB'],
   {'display': '-4.0', 'hundredths': -400}),
  ('normal control 2',
   [{'first_downs': 3,
     'fum': 2,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 0,
     'pass_yds': 25,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': -5,
     'two_pt': 0},
    'ppr', 'TE'],
   {'display': '-0.3', 'hundredths': -25}),
  ('normal control 3',
   [{'first_downs': 1,
     'fum': 2,
     'fum_lost': 2,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 31,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': -4,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '-6.8', 'hundredths': -675}),
  ('normal control 4',
   [{'first_downs': 5,
     'fum': 2,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 415,
     'rec': 1,
     'rec_td': 0,
     'rec_yds': -4,
     'rush_td': 0,
     'rush_yds': -11,
     'two_pt': 1},
    'half', 'RB'],
   {'display': '17.8', 'hundredths': 1775})],
 [('regression: yards from scrimmage merged',
   [{'first_downs': 1,
     'fum': 3,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 1,
     'pass_yds': 308,
     'rec': 6,
     'rec_td': 2,
     'rec_yds': 150,
     'rush_td': 0,
     'rush_yds': -8,
     'two_pt': 0},
    'ppr', 'QB'],
   {'display': '53.3', 'hundredths': 5325}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 300,
     'rec': 7,
     'rec_td': 2,
     'rec_yds': 48,
     'rush_td': 0,
     'rush_yds': 3,
     'two_pt': 0},
    'ppr', 'WR'],
   {'display': '44.3', 'hundredths': 4425}),
  ('second regression',
   [{'first_downs': 2,
     'fum': 3,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 4,
     'pass_yds': 107,
     'rec': 11,
     'rec_td': 2,
     'rec_yds': 148,
     'rush_td': 1,
     'rush_yds': -7,
     'two_pt': 1},
    'std', 'WR'],
   {'display': '51.5', 'hundredths': 5150}),
  ('normal control 1',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 2,
     'pass_yds': 299,
     'rec': 2,
     'rec_td': 2,
     'rec_yds': 20,
     'rush_td': 0,
     'rush_yds': 112,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '47.3', 'hundredths': 4725}),
  ('normal control 2',
   [{'first_downs': 3,
     'fum': 3,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 72,
     'rush_td': 0,
     'rush_yds': 134,
     'two_pt': 0},
    'half', 'TE'],
   {'display': '43.8', 'hundredths': 4375}),
  ('normal control 3',
   [{'first_downs': 2,
     'fum': 3,
     'fum_lost': 2,
     'int': 1,
     'pass_td': 4,
     'pass_yds': 325,
     'rec': 7,
     'rec_td': 1,
     'rec_yds': 144,
     'rush_td': 1,
     'rush_yds': 142,
     'two_pt': 1},
    'ppr', 'WR'],
   {'display': '81.5', 'hundredths': 8150}),
  ('normal control 4',
   [{'first_downs': 8,
     'fum': 1,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 4,
     'pass_yds': 24,
     'rec': 7,
     'rec_td': 1,
     'rec_yds': -2,
     'rush_td': 0,
     'rush_yds': 99,
     'two_pt': 0},
    'ppr', 'QB'],
   {'display': '36.0', 'hundredths': 3600})],
 [('regression: yards from scrimmage merged',
   [{'first_downs': 2,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 1,
     'pass_yds': -3,
     'rec': 7,
     'rec_td': 2,
     'rec_yds': 99,
     'rush_td': 0,
     'rush_yds': 113,
     'two_pt': 1},
    'std', 'TE'],
   {'display': '43.0', 'hundredths': 4300}),
  ('partial repair probe: yards from scrimmage merged',
   [{'first_downs': 0,
     'fum': 0,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 0,
     'pass_yds': 350,
     'rec': 0,
     'rec_td': 1,
     'rec_yds': 55,
     'rush_td': 0,
     'rush_yds': 82,
     'two_pt': 0},
    'std', 'WR'],
   {'display': '36.0', 'hundredths': 3600}),
  ('second regression',
   [{'first_downs': 0,
     'fum': 1,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 0,
     'pass_yds': 24,
     'rec': 9,
     'rec_td': 0,
     'rec_yds': 35,
     'rush_td': 1,
     'rush_yds': 100,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '22.0', 'hundredths': 2200}),
  ('normal control 1',
   [{'first_downs': 5,
     'fum': 2,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 104,
     'rec': 10,
     'rec_td': 0,
     'rec_yds': 100,
     'rush_td': 1,
     'rush_yds': 99,
     'two_pt': 0},
    'std', 'TE'],
   {'display': '30.3', 'hundredths': 3025}),
  ('normal control 2',
   [{'first_downs': 3,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 300,
     'rec': 2,
     'rec_td': 2,
     'rec_yds': 41,
     'rush_td': 0,
     'rush_yds': 34,
     'two_pt': 0},
    'ppr', 'TE'],
   {'display': '35.8', 'hundredths': 3575}),
  ('normal control 3',
   [{'first_downs': 0,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 3,
     'pass_yds': 299,
     'rec': 7,
     'rec_td': 0,
     'rec_yds': 21,
     'rush_td': 1,
     'rush_yds': -10,
     'two_pt': 0},
    'half', 'QB'],
   {'display': '29.5', 'hundredths': 2950}),
  ('normal control 4',
   [{'first_downs': 1,
     'fum': 3,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 4,
     'pass_yds': 161,
     'rec': 0,
     'rec_td': 1,
     'rec_yds': -5,
     'rush_td': 2,
     'rush_yds': -2,
     'two_pt': 1},
    'std', 'QB'],
   {'display': '38.3', 'hundredths': 3825})]]
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 player with 9 rushing and 9 receiving yards scores 1 point instead of 0.

Score a skill-player stat line in integer hundredths. Passing yards earn 1 point per full 25 yards, rushing and receiving yards 1 point per full 10 yards, each category truncated toward zero separately. Pass TD 4, interception -2, rush/receiving TD 6, fumble lost -2 (fumbles recovered by the own team are free), two-point conversion 2, each first down 0.25. Receptions are worth 0/0.5/1 for std/half/ppr, and a TE earns an extra 0.5 per reception on top. 300+ passing, 100+ rushing and 100+ receiving yards each add a 3 point bonus. The display string rounds to tenths half away from zero and never shows -0.0.

split: open-access


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

N = 1
observations = []
def solve(stats, fmt, pos):
    def unit(y, per):
        q = abs(y) // per
        return q if y >= 0 else -q
    rec_val = {'std': 0, 'half': 50, 'ppr': 100}[fmt]
    if pos == 'TE':
        rec_val += 50
    pts = 0
    pts += stats['pass_yds'] * 4
    pts += stats['pass_td'] * 400
    pts -= stats['int'] * 200
    pts += unit(stats['rush_yds'], 10) * 100
    pts += stats['rush_td'] * 600
    pts += stats['rec'] * rec_val
    pts += unit(stats['rec_yds'], 10) * 100
    pts += stats['rec_td'] * 600
    pts -= stats['fum_lost'] * 200
    pts += stats['two_pt'] * 200
    pts += stats['first_downs'] * 25
    if stats['pass_yds'] >= 300:
        pts += 300
    if stats['rush_yds'] >= 100:
        pts += 300
    if stats['rec_yds'] >= 100:
        pts += 300
    t = (abs(pts) + 5) // 10
    sign = '-' if pts < 0 and t else ''
    return {'hundredths': pts, 'display': '%s%d.%d' % (sign, t // 10, t % 10)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: passing yard granularity',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 193,
     'rec': 1,
     'rec_td': 1,
     'rec_yds': 42,
     'rush_td': 0,
     'rush_yds': -3,
     'two_pt': 1},
    'ppr', 'RB'],
   {'display': '16.3', 'hundredths': 1625}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 3,
     'pass_yds': -12,
     'rec': 6,
     'rec_td': 1,
     'rec_yds': 100,
     'rush_td': 2,
     'rush_yds': 9,
     'two_pt': 1},
    'std', 'WR'],
   {'display': '43.3', 'hundredths': 4325}),
  ('second regression',
   [{'first_downs': 7,
     'fum': 0,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 2,
     'pass_yds': 278,
     'rec': 10,
     'rec_td': 0,
     'rec_yds': 20,
     'rush_td': 2,
     'rush_yds': 46,
     'two_pt': 1},
    'std', 'QB'],
   {'display': '34.8', 'hundredths': 3475}),
  ('normal control 1',
   [{'first_downs': 4,
     'fum': 2,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 11,
     'rec_td': 0,
     'rec_yds': -2,
     'rush_td': 2,
     'rush_yds': -7,
     'two_pt': 1},
    'half', 'TE'],
   {'display': '39.0', 'hundredths': 3900}),
  ('normal control 2',
   [{'first_downs': 0,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 91,
     'rush_td': 2,
     'rush_yds': 99,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '52.0', 'hundredths': 5200}),
  ('normal control 3',
   [{'first_downs': 4,
     'fum': 3,
     'fum_lost': 2,
     'int': 0,
     'pass_td': 2,
     'pass_yds': 300,
     'rec': 11,
     'rec_td': 0,
     'rec_yds': 19,
     'rush_td': 0,
     'rush_yds': -14,
     'two_pt': 1},
    'std', 'TE'],
   {'display': '27.5', 'hundredths': 2750}),
  ('normal control 4',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 300,
     'rec': 2,
     'rec_td': 1,
     'rec_yds': 147,
     'rush_td': 1,
     'rush_yds': 100,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '55.3', 'hundredths': 5525})],
 [('regression: passing yard granularity',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 3,
     'pass_yds': 173,
     'rec': 1,
     'rec_td': 0,
     'rec_yds': 20,
     'rush_td': 0,
     'rush_yds': 147,
     'two_pt': 1},
    'ppr', 'WR'],
   {'display': '34.3', 'hundredths': 3425}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 5,
     'fum': 2,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 0,
     'pass_yds': -11,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 10,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '-1.8', 'hundredths': -175}),
  ('second regression',
   [{'first_downs': 8,
     'fum': 3,
     'fum_lost': 3,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 247,
     'rec': 5,
     'rec_td': 1,
     'rec_yds': 108,
     'rush_td': 0,
     'rush_yds': 105,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '33.0', 'hundredths': 3300}),
  ('normal control 1',
   [{'first_downs': 1,
     'fum': 1,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 4,
     'pass_yds': 300,
     'rec': 9,
     'rec_td': 1,
     'rec_yds': 20,
     'rush_td': 2,
     'rush_yds': -1,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '49.3', 'hundredths': 4925}),
  ('normal control 2',
   [{'first_downs': 3,
     'fum': 1,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 4,
     'pass_yds': 25,
     'rec': 9,
     'rec_td': 2,
     'rec_yds': -4,
     'rush_td': 0,
     'rush_yds': 82,
     'two_pt': 0},
    'half', 'WR'],
   {'display': '40.3', 'hundredths': 4025}),
  ('normal control 3',
   [{'first_downs': 3,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 4,
     'pass_yds': 25,
     'rec': 6,
     'rec_td': 1,
     'rec_yds': 63,
     'rush_td': 2,
     'rush_yds': 4,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '50.8', 'hundredths': 5075}),
  ('normal control 4',
   [{'first_downs': 9,
     'fum': 0,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 0,
     'pass_yds': 325,
     'rec': 2,
     'rec_td': 0,
     'rec_yds': 19,
     'rush_td': 0,
     'rush_yds': -7,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '24.3', 'hundredths': 2425})],
 [('regression: passing yard granularity',
   [{'first_downs': 2,
     'fum': 2,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 16,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 11,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '-4.5', 'hundredths': -450}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 0,
     'fum': 2,
     'fum_lost': 2,
     'int': 0,
     'pass_td': 0,
     'pass_yds': -12,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 10,
     'two_pt': 0},
    'ppr', 'RB'],
   {'display': '-3.0', 'hundredths': -300}),
  ('second regression',
   [{'first_downs': 3,
     'fum': 1,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 376,
     'rec': 6,
     'rec_td': 2,
     'rec_yds': 69,
     'rush_td': 1,
     'rush_yds': -7,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '41.8', 'hundredths': 4175}),
  ('normal control 1',
   [{'first_downs': 3,
     'fum': 3,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 7,
     'rec_td': 1,
     'rec_yds': 5,
     'rush_td': 2,
     'rush_yds': 118,
     'two_pt': 1},
    'std', 'WR'],
   {'display': '41.8', 'hundredths': 4175}),
  ('normal control 2',
   [{'first_downs': 7,
     'fum': 1,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 1,
     'pass_yds': 300,
     'rec': 11,
     'rec_td': 0,
     'rec_yds': 95,
     'rush_td': 0,
     'rush_yds': -7,
     'two_pt': 0},
    'ppr', 'RB'],
   {'display': '40.8', 'hundredths': 4075}),
  ('normal control 3',
   [{'first_downs': 1,
     'fum': 1,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 5,
     'rec_td': 0,
     'rec_yds': 124,
     'rush_td': 2,
     'rush_yds': 152,
     'two_pt': 1},
    'ppr', 'RB'],
   {'display': '57.3', 'hundredths': 5725}),
  ('normal control 4',
   [{'first_downs': 9,
     'fum': 2,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 0,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 5,
     'two_pt': 0},
    'ppr', 'QB'],
   {'display': '-5.8', 'hundredths': -575})],
 [('regression: passing yard granularity',
   [{'first_downs': 9,
     'fum': 1,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 1,
     'pass_yds': 305,
     'rec': 2,
     'rec_td': 2,
     'rec_yds': 20,
     'rush_td': 2,
     'rush_yds': 155,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '58.3', 'hundredths': 5825}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 9,
     'fum': 2,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 2,
     'pass_yds': -3,
     'rec': 4,
     'rec_td': 1,
     'rec_yds': 75,
     'rush_td': 0,
     'rush_yds': 100,
     'two_pt': 0},
    'half', 'WR'],
   {'display': '32.3', 'hundredths': 3225}),
  ('second regression',
   [{'first_downs': 0,
     'fum': 3,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 1,
     'rec': 6,
     'rec_td': 2,
     'rec_yds': 99,
     'rush_td': 1,
     'rush_yds': 90,
     'two_pt': 0},
    'ppr', 'TE'],
   {'display': '49.0', 'hundredths': 4900}),
  ('normal control 1',
   [{'first_downs': 9,
     'fum': 1,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 8,
     'rec_td': 2,
     'rec_yds': 20,
     'rush_td': 2,
     'rush_yds': 124,
     'two_pt': 1},
    'std', 'WR'],
   {'display': '67.3', 'hundredths': 6725}),
  ('normal control 2',
   [{'first_downs': 4,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 1,
     'pass_yds': 25,
     'rec': 10,
     'rec_td': 1,
     'rec_yds': 43,
     'rush_td': 0,
     'rush_yds': 9,
     'two_pt': 0},
    'std', 'TE'],
   {'display': '17.0', 'hundredths': 1700}),
  ('normal control 3',
   [{'first_downs': 5,
     'fum': 1,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 3,
     'pass_yds': 325,
     'rec': 4,
     'rec_td': 1,
     'rec_yds': 141,
     'rush_td': 0,
     'rush_yds': 88,
     'two_pt': 1},
    'ppr', 'RB'],
   {'display': '64.3', 'hundredths': 6425}),
  ('normal control 4',
   [{'first_downs': 8,
     'fum': 2,
     'fum_lost': 2,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 300,
     'rec': 5,
     'rec_td': 1,
     'rec_yds': 99,
     'rush_td': 0,
     'rush_yds': -3,
     'two_pt': 1},
    'half', 'TE'],
   {'display': '31.0', 'hundredths': 3100})],
 [('regression: passing yard granularity',
   [{'first_downs': 1,
     'fum': 3,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 3,
     'pass_yds': -3,
     'rec': 1,
     'rec_td': 1,
     'rec_yds': 115,
     'rush_td': 0,
     'rush_yds': 85,
     'two_pt': 1},
    'half', 'TE'],
   {'display': '43.3', 'hundredths': 4325}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 5,
     'fum': 2,
     'fum_lost': 2,
     'int': 0,
     'pass_td': 0,
     'pass_yds': -6,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 7,
     'two_pt': 0},
    'std', 'WR'],
   {'display': '-2.8', 'hundredths': -275}),
  ('second regression',
   [{'first_downs': 1,
     'fum': 3,
     'fum_lost': 2,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 190,
     'rec': 6,
     'rec_td': 0,
     'rec_yds': 149,
     'rush_td': 1,
     'rush_yds': 100,
     'two_pt': 1},
    'ppr', 'RB'],
   {'display': '53.3', 'hundredths': 5325}),
  ('normal control 1',
   [{'first_downs': 2,
     'fum': 0,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 5,
     'rec_td': 2,
     'rec_yds': 20,
     'rush_td': 0,
     'rush_yds': 70,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '38.0', 'hundredths': 3800}),
  ('normal control 2',
   [{'first_downs': 0,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 1,
     'pass_yds': 300,
     'rec': 4,
     'rec_td': 1,
     'rec_yds': 63,
     'rush_td': 2,
     'rush_yds': 32,
     'two_pt': 1},
    'std', 'TE'],
   {'display': '46.0', 'hundredths': 4600}),
  ('normal control 3',
   [{'first_downs': 4,
     'fum': 0,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 300,
     'rec': 7,
     'rec_td': 0,
     'rec_yds': 94,
     'rush_td': 2,
     'rush_yds': 55,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '48.5', 'hundredths': 4850}),
  ('normal control 4',
   [{'first_downs': 3,
     'fum': 0,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 2,
     'pass_yds': 25,
     'rec': 1,
     'rec_td': 2,
     'rec_yds': -3,
     'rush_td': 1,
     'rush_yds': 57,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '33.3', 'hundredths': 3325})]]
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(stats, fmt, pos):
    def unit(y, per):
        q = abs(y) // per
        return q if y >= 0 else -q
    rec_val = {'std': 0, 'half': 50, 'ppr': 100}[fmt]
    if pos == 'TE':
        rec_val += 50
    pts = 0
    pts += stats['pass_yds'] * 4 // 100 * 100
    pts += stats['pass_td'] * 400
    pts -= stats['int'] * 200
    pts += unit(stats['rush_yds'], 10) * 100
    pts += stats['rush_td'] * 600
    pts += stats['rec'] * rec_val
    pts += unit(stats['rec_yds'], 10) * 100
    pts += stats['rec_td'] * 600
    pts -= stats['fum_lost'] * 200
    pts += stats['two_pt'] * 200
    pts += stats['first_downs'] * 25
    if stats['pass_yds'] >= 300:
        pts += 300
    if stats['rush_yds'] >= 100:
        pts += 300
    if stats['rec_yds'] >= 100:
        pts += 300
    t = (abs(pts) + 5) // 10
    sign = '-' if pts < 0 and t else ''
    return {'hundredths': pts, 'display': '%s%d.%d' % (sign, t // 10, t % 10)}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: passing yard granularity',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 193,
     'rec': 1,
     'rec_td': 1,
     'rec_yds': 42,
     'rush_td': 0,
     'rush_yds': -3,
     'two_pt': 1},
    'ppr', 'RB'],
   {'display': '16.3', 'hundredths': 1625}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 3,
     'pass_yds': -12,
     'rec': 6,
     'rec_td': 1,
     'rec_yds': 100,
     'rush_td': 2,
     'rush_yds': 9,
     'two_pt': 1},
    'std', 'WR'],
   {'display': '43.3', 'hundredths': 4325}),
  ('second regression',
   [{'first_downs': 7,
     'fum': 0,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 2,
     'pass_yds': 278,
     'rec': 10,
     'rec_td': 0,
     'rec_yds': 20,
     'rush_td': 2,
     'rush_yds': 46,
     'two_pt': 1},
    'std', 'QB'],
   {'display': '34.8', 'hundredths': 3475}),
  ('normal control 1',
   [{'first_downs': 4,
     'fum': 2,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 11,
     'rec_td': 0,
     'rec_yds': -2,
     'rush_td': 2,
     'rush_yds': -7,
     'two_pt': 1},
    'half', 'TE'],
   {'display': '39.0', 'hundredths': 3900}),
  ('normal control 2',
   [{'first_downs': 0,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 91,
     'rush_td': 2,
     'rush_yds': 99,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '52.0', 'hundredths': 5200}),
  ('normal control 3',
   [{'first_downs': 4,
     'fum': 3,
     'fum_lost': 2,
     'int': 0,
     'pass_td': 2,
     'pass_yds': 300,
     'rec': 11,
     'rec_td': 0,
     'rec_yds': 19,
     'rush_td': 0,
     'rush_yds': -14,
     'two_pt': 1},
    'std', 'TE'],
   {'display': '27.5', 'hundredths': 2750}),
  ('normal control 4',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 300,
     'rec': 2,
     'rec_td': 1,
     'rec_yds': 147,
     'rush_td': 1,
     'rush_yds': 100,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '55.3', 'hundredths': 5525})],
 [('regression: passing yard granularity',
   [{'first_downs': 1,
     'fum': 0,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 3,
     'pass_yds': 173,
     'rec': 1,
     'rec_td': 0,
     'rec_yds': 20,
     'rush_td': 0,
     'rush_yds': 147,
     'two_pt': 1},
    'ppr', 'WR'],
   {'display': '34.3', 'hundredths': 3425}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 5,
     'fum': 2,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 0,
     'pass_yds': -11,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 10,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '-1.8', 'hundredths': -175}),
  ('second regression',
   [{'first_downs': 8,
     'fum': 3,
     'fum_lost': 3,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 247,
     'rec': 5,
     'rec_td': 1,
     'rec_yds': 108,
     'rush_td': 0,
     'rush_yds': 105,
     'two_pt': 0},
    'std', 'QB'],
   {'display': '33.0', 'hundredths': 3300}),
  ('normal control 1',
   [{'first_downs': 1,
     'fum': 1,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 4,
     'pass_yds': 300,
     'rec': 9,
     'rec_td': 1,
     'rec_yds': 20,
     'rush_td': 2,
     'rush_yds': -1,
     'two_pt': 0},
    'std', 'RB'],
   {'display': '49.3', 'hundredths': 4925}),
  ('normal control 2',
   [{'first_downs': 3,
     'fum': 1,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 4,
     'pass_yds': 25,
     'rec': 9,
     'rec_td': 2,
     'rec_yds': -4,
     'rush_td': 0,
     'rush_yds': 82,
     'two_pt': 0},
    'half', 'WR'],
   {'display': '40.3', 'hundredths': 4025}),
  ('normal control 3',
   [{'first_downs': 3,
     'fum': 0,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 4,
     'pass_yds': 25,
     'rec': 6,
     'rec_td': 1,
     'rec_yds': 63,
     'rush_td': 2,
     'rush_yds': 4,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '50.8', 'hundredths': 5075}),
  ('normal control 4',
   [{'first_downs': 9,
     'fum': 0,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 0,
     'pass_yds': 325,
     'rec': 2,
     'rec_td': 0,
     'rec_yds': 19,
     'rush_td': 0,
     'rush_yds': -7,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '24.3', 'hundredths': 2425})],
 [('regression: passing yard granularity',
   [{'first_downs': 2,
     'fum': 2,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 16,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 11,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '-4.5', 'hundredths': -450}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 0,
     'fum': 2,
     'fum_lost': 2,
     'int': 0,
     'pass_td': 0,
     'pass_yds': -12,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 10,
     'two_pt': 0},
    'ppr', 'RB'],
   {'display': '-3.0', 'hundredths': -300}),
  ('second regression',
   [{'first_downs': 3,
     'fum': 1,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 0,
     'pass_yds': 376,
     'rec': 6,
     'rec_td': 2,
     'rec_yds': 69,
     'rush_td': 1,
     'rush_yds': -7,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '41.8', 'hundredths': 4175}),
  ('normal control 1',
   [{'first_downs': 3,
     'fum': 3,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 7,
     'rec_td': 1,
     'rec_yds': 5,
     'rush_td': 2,
     'rush_yds': 118,
     'two_pt': 1},
    'std', 'WR'],
   {'display': '41.8', 'hundredths': 4175}),
  ('normal control 2',
   [{'first_downs': 7,
     'fum': 1,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 1,
     'pass_yds': 300,
     'rec': 11,
     'rec_td': 0,
     'rec_yds': 95,
     'rush_td': 0,
     'rush_yds': -7,
     'two_pt': 0},
    'ppr', 'RB'],
   {'display': '40.8', 'hundredths': 4075}),
  ('normal control 3',
   [{'first_downs': 1,
     'fum': 1,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 5,
     'rec_td': 0,
     'rec_yds': 124,
     'rush_td': 2,
     'rush_yds': 152,
     'two_pt': 1},
    'ppr', 'RB'],
   {'display': '57.3', 'hundredths': 5725}),
  ('normal control 4',
   [{'first_downs': 9,
     'fum': 2,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 0,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 5,
     'two_pt': 0},
    'ppr', 'QB'],
   {'display': '-5.8', 'hundredths': -575})],
 [('regression: passing yard granularity',
   [{'first_downs': 9,
     'fum': 1,
     'fum_lost': 1,
     'int': 3,
     'pass_td': 1,
     'pass_yds': 305,
     'rec': 2,
     'rec_td': 2,
     'rec_yds': 20,
     'rush_td': 2,
     'rush_yds': 155,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '58.3', 'hundredths': 5825}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 9,
     'fum': 2,
     'fum_lost': 1,
     'int': 2,
     'pass_td': 2,
     'pass_yds': -3,
     'rec': 4,
     'rec_td': 1,
     'rec_yds': 75,
     'rush_td': 0,
     'rush_yds': 100,
     'two_pt': 0},
    'half', 'WR'],
   {'display': '32.3', 'hundredths': 3225}),
  ('second regression',
   [{'first_downs': 0,
     'fum': 3,
     'fum_lost': 1,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 1,
     'rec': 6,
     'rec_td': 2,
     'rec_yds': 99,
     'rush_td': 1,
     'rush_yds': 90,
     'two_pt': 0},
    'ppr', 'TE'],
   {'display': '49.0', 'hundredths': 4900}),
  ('normal control 1',
   [{'first_downs': 9,
     'fum': 1,
     'fum_lost': 1,
     'int': 0,
     'pass_td': 2,
     'pass_yds': 325,
     'rec': 8,
     'rec_td': 2,
     'rec_yds': 20,
     'rush_td': 2,
     'rush_yds': 124,
     'two_pt': 1},
    'std', 'WR'],
   {'display': '67.3', 'hundredths': 6725}),
  ('normal control 2',
   [{'first_downs': 4,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 1,
     'pass_yds': 25,
     'rec': 10,
     'rec_td': 1,
     'rec_yds': 43,
     'rush_td': 0,
     'rush_yds': 9,
     'two_pt': 0},
    'std', 'TE'],
   {'display': '17.0', 'hundredths': 1700}),
  ('normal control 3',
   [{'first_downs': 5,
     'fum': 1,
     'fum_lost': 0,
     'int': 1,
     'pass_td': 3,
     'pass_yds': 325,
     'rec': 4,
     'rec_td': 1,
     'rec_yds': 141,
     'rush_td': 0,
     'rush_yds': 88,
     'two_pt': 1},
    'ppr', 'RB'],
   {'display': '64.3', 'hundredths': 6425}),
  ('normal control 4',
   [{'first_downs': 8,
     'fum': 2,
     'fum_lost': 2,
     'int': 2,
     'pass_td': 0,
     'pass_yds': 300,
     'rec': 5,
     'rec_td': 1,
     'rec_yds': 99,
     'rush_td': 0,
     'rush_yds': -3,
     'two_pt': 1},
    'half', 'TE'],
   {'display': '31.0', 'hundredths': 3100})],
 [('regression: passing yard granularity',
   [{'first_downs': 1,
     'fum': 3,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 3,
     'pass_yds': -3,
     'rec': 1,
     'rec_td': 1,
     'rec_yds': 115,
     'rush_td': 0,
     'rush_yds': 85,
     'two_pt': 1},
    'half', 'TE'],
   {'display': '43.3', 'hundredths': 4325}),
  ('partial repair probe: passing yard granularity',
   [{'first_downs': 5,
     'fum': 2,
     'fum_lost': 2,
     'int': 0,
     'pass_td': 0,
     'pass_yds': -6,
     'rec': 0,
     'rec_td': 0,
     'rec_yds': 0,
     'rush_td': 0,
     'rush_yds': 7,
     'two_pt': 0},
    'std', 'WR'],
   {'display': '-2.8', 'hundredths': -275}),
  ('second regression',
   [{'first_downs': 1,
     'fum': 3,
     'fum_lost': 2,
     'int': 1,
     'pass_td': 2,
     'pass_yds': 190,
     'rec': 6,
     'rec_td': 0,
     'rec_yds': 149,
     'rush_td': 1,
     'rush_yds': 100,
     'two_pt': 1},
    'ppr', 'RB'],
   {'display': '53.3', 'hundredths': 5325}),
  ('normal control 1',
   [{'first_downs': 2,
     'fum': 0,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 3,
     'pass_yds': 25,
     'rec': 5,
     'rec_td': 2,
     'rec_yds': 20,
     'rush_td': 0,
     'rush_yds': 70,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '38.0', 'hundredths': 3800}),
  ('normal control 2',
   [{'first_downs': 0,
     'fum': 0,
     'fum_lost': 0,
     'int': 2,
     'pass_td': 1,
     'pass_yds': 300,
     'rec': 4,
     'rec_td': 1,
     'rec_yds': 63,
     'rush_td': 2,
     'rush_yds': 32,
     'two_pt': 1},
    'std', 'TE'],
   {'display': '46.0', 'hundredths': 4600}),
  ('normal control 3',
   [{'first_downs': 4,
     'fum': 0,
     'fum_lost': 0,
     'int': 3,
     'pass_td': 0,
     'pass_yds': 300,
     'rec': 7,
     'rec_td': 0,
     'rec_yds': 94,
     'rush_td': 2,
     'rush_yds': 55,
     'two_pt': 1},
    'ppr', 'TE'],
   {'display': '48.5', 'hundredths': 4850}),
  ('normal control 4',
   [{'first_downs': 3,
     'fum': 0,
     'fum_lost': 0,
     'int': 0,
     'pass_td': 2,
     'pass_yds': 25,
     'rec': 1,
     'rec_td': 2,
     'rec_yds': -3,
     'rush_td': 1,
     'rush_yds': 57,
     'two_pt': 0},
    'half', 'RB'],
   {'display': '33.3', 'hundredths': 3325})]]
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 310-yard passer earns 12.4 passing points where the league awards 12.

Score a skill-player stat line in integer hundredths. Passing yards earn 1 point per full 25 yards, rushing and receiving yards 1 point per full 10 yards, each category truncated toward zero separately. Pass TD 4, interception -2, rush/receiving TD 6, fumble lost -2 (fumbles recovered by the own team are free), two-point conversion 2, each first down 0.25. Receptions are worth 0/0.5/1 for std/half/ppr, and a TE earns an extra 0.5 per reception on top. 300+ passing, 100+ rushing and 100+ receiving yards each add a 3 point bonus. The display string rounds to tenths half away from zero and never shows -0.0.

split: open-access


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

N = 1
observations = []
def solve(game):
    pa = game['pa_total']
    tiers = [(0, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa <= limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in ytiers:
        if ya <= limit:
            ypts = value
            break
    pts += ypts
    pts += game['sack_halves'] * 50
    pts += game['ints'] * 200 + game['fum_rec'] * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: offense return points excluded',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 14,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 127}],
   2250),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 13,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   1550),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 36,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   1050),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   1350),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 37,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 197}],
   1700),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 399}],
   2200),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 99}],
   3000)],
 [('regression: offense return points excluded',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 199}],
   2450),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 41,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   1350),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 27,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 299}],
   2400),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 99}],
   900),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 199}],
   1800),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 350}],
   1150),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 515}],
   1250)],
 [('regression: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 349}],
   950),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 400}],
   2100),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 99}],
   2600),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   550),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 100}],
   1250),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 100}],
   1450),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   900)],
 [('regression: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 20,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   1750),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2250),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 150}],
   3250),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   -150),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 300}],
   1900),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 199}],
   750),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 9,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   1950)],
 [('regression: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 8,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   2600),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 299}],
   1250),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   1850),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2400),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 27,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   1150),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 349}],
   1750),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 99}],
   2600)]]
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(game):
    pa = game['pa_total'] - game['def_td'] * 7
    tiers = [(0, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa <= limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in ytiers:
        if ya <= limit:
            ypts = value
            break
    pts += ypts
    pts += game['sack_halves'] * 50
    pts += game['ints'] * 200 + game['fum_rec'] * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: offense return points excluded',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 14,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 127}],
   2250),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 13,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   1550),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 36,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   1050),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   1350),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 37,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 197}],
   1700),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 399}],
   2200),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 99}],
   3000)],
 [('regression: offense return points excluded',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 199}],
   2450),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 41,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   1350),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 27,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 299}],
   2400),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 99}],
   900),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 199}],
   1800),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 350}],
   1150),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 515}],
   1250)],
 [('regression: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 349}],
   950),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 400}],
   2100),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 99}],
   2600),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   550),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 100}],
   1250),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 100}],
   1450),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   900)],
 [('regression: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 20,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   1750),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2250),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 150}],
   3250),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   -150),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 300}],
   1900),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 199}],
   750),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 9,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   1950)],
 [('regression: offense return points excluded',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 8,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   2600),
  ('partial repair probe: offense return points excluded',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 299}],
   1250),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   1850),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2400),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 27,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   1150),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 349}],
   1750),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 99}],
   2600)]]
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 defense that allowed 0 points loses its shutout because its own quarterback threw a pick-six.

Score a team defense/special teams unit in hundredths. Points allowed exclude points the opponent scored on returns against our offense. Tiers: 0 -> 10, 1-6 -> 7, 7-13 -> 4, 14-20 -> 1, 21-27 -> 0, 28-34 -> -1, 35+ -> -4. Yards allowed: <=99 -> 5, 100-199 -> 3, 200-299 -> 2, 300-349 -> 0, 350-399 -> -1, 400-449 -> -3, 450+ -> -5. Sacks are recorded in half-sack units and score 1 per full sack (0.5 per half). Interceptions and opponent fumbles recovered 2 each (own fumble recoveries score nothing), safety 2, defensive or special-teams TD 6, blocked kick 2.

split: open-access


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

N = 1
observations = []
def solve(game):
    pa = game['pa_total'] - game['pa_offense_returns']
    tiers = [(0, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa < limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in ytiers:
        if ya <= limit:
            ypts = value
            break
    pts += ypts
    pts += game['sack_halves'] * 50
    pts += game['ints'] * 200 + game['fum_rec'] * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: points allowed tier comparator',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 15,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   2500),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 100}],
   2800),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 6,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   2650),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 9,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 272}],
   2250),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 43,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 299}],
   2100),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 21,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 99}],
   2750),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 42,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 99}],
   1150)],
 [('regression: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 200}],
   1200),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 449}],
   2550),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   3000),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 449}],
   750),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 20,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   850),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 9,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 100}],
   2400),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 30,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 99}],
   2250)],
 [('regression: points allowed tier comparator',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   3050),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 12,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 400}],
   1750),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 34,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   950),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 41,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 300}],
   1200),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 200}],
   2250),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 4,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   1250),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 183}],
   1350)],
 [('regression: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 495}],
   1300),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 33,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 199}],
   2750),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   1850),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 14,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   1750),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 40,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   850),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 42,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 400}],
   -50),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 299}],
   1550)],
 [('regression: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 349}],
   3600),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 200}],
   1100),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 6,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   2150),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 170}],
   1400),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 20,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 349}],
   1900),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 30,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 449}],
   1450),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 21,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2200)]]
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(game):
    pa = game['pa_total'] - game['pa_offense_returns']
    tiers = [(1, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa < limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in ytiers:
        if ya <= limit:
            ypts = value
            break
    pts += ypts
    pts += game['sack_halves'] * 50
    pts += game['ints'] * 200 + game['fum_rec'] * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: points allowed tier comparator',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 15,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   2500),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 100}],
   2800),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 6,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   2650),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 9,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 272}],
   2250),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 43,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 299}],
   2100),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 21,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 99}],
   2750),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 42,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 99}],
   1150)],
 [('regression: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 200}],
   1200),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 449}],
   2550),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   3000),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 449}],
   750),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 20,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   850),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 9,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 100}],
   2400),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 30,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 99}],
   2250)],
 [('regression: points allowed tier comparator',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   3050),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 12,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 400}],
   1750),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 34,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   950),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 41,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 300}],
   1200),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 200}],
   2250),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 4,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   1250),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 183}],
   1350)],
 [('regression: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 495}],
   1300),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 33,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 199}],
   2750),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   1850),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 14,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   1750),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 40,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   850),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 42,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 400}],
   -50),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 299}],
   1550)],
 [('regression: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 349}],
   3600),
  ('partial repair probe: points allowed tier comparator',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 200}],
   1100),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 6,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   2150),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 170}],
   1400),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 20,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 349}],
   1900),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 30,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 449}],
   1450),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 21,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2200)]]
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 defense allowing exactly 6 points lands in the 7-13 tier.

Score a team defense/special teams unit in hundredths. Points allowed exclude points the opponent scored on returns against our offense. Tiers: 0 -> 10, 1-6 -> 7, 7-13 -> 4, 14-20 -> 1, 21-27 -> 0, 28-34 -> -1, 35+ -> -4. Yards allowed: <=99 -> 5, 100-199 -> 3, 200-299 -> 2, 300-349 -> 0, 350-399 -> -1, 400-449 -> -3, 450+ -> -5. Sacks are recorded in half-sack units and score 1 per full sack (0.5 per half). Interceptions and opponent fumbles recovered 2 each (own fumble recoveries score nothing), safety 2, defensive or special-teams TD 6, blocked kick 2.

split: open-access