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

N = 1
observations = []
def solve(cph, band, setpoint, temps):
    period = 60 // cph
    out = []
    on_left = 0
    for minute, temp in enumerate(temps):
        if minute % period == 0:
            err = setpoint - temp
            num = max(0, min(err, band)) * period
            on = (2 * num + band) // (2 * band)
            if 0 < period - on < 2:
                on = period
            on_left = on
        out.append(on_left > 0)
        if on_left > 0:
            on_left -= 1
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['regression: scenario 2',
   [6,
    30,
    700,
    [697,
     695,
     691,
     695,
     691,
     692,
     693,
     692,
     690,
     690,
     690,
     687,
     684,
     683,
     687,
     688,
     688,
     691,
     690,
     692,
     693,
     689,
     692]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [4,
    10,
    700,
    [673,
     669,
     665,
     669,
     667,
     665,
     664,
     662,
     659,
     662,
     661,
     659,
     660,
     656,
     659,
     660,
     656,
     652,
     654,
     652,
     656,
     657,
     653,
     653,
     653,
     653,
     654,
     653,
     650,
     650,
     650,
     650,
     651,
     654,
     651,
     650,
     650,
     650,
     650]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: scenario 3',
   [7,
    30,
    700,
    [693,
     691,
     695,
     691,
     695,
     698,
     697,
     700,
     702,
     704,
     706,
     708,
     709,
     707,
     706,
     702,
     702,
     701,
     698,
     701,
     700,
     704,
     703,
     702,
     702,
     699,
     695,
     694,
     696,
     699,
     696,
     692,
     694,
     693,
     694,
     697,
     700]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False]],
  ['control: scenario 4',
   [4,
    10,
    700,
    [680,
     684,
     685,
     683,
     684,
     685,
     686,
     682,
     681,
     679,
     677,
     681,
     680,
     681,
     677,
     681,
     680,
     682,
     682,
     678,
     677,
     673,
     672,
     676,
     673,
     670,
     669,
     665,
     662]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]]],
 [['regression: scenario 8',
   [9,
    30,
    700,
    [687,
     691,
     690,
     688,
     689,
     690,
     693,
     696,
     700,
     697,
     701,
     705,
     704,
     703,
     702,
     698,
     702,
     699,
     703,
     700,
     697,
     694,
     698,
     695,
     698,
     701,
     698,
     696]],
   [True,
    True,
    True,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['regression: scenario 14',
   [9,
    10,
    700,
    [699,
     703,
     700,
     700,
     703,
     707,
     706,
     710,
     714,
     715,
     715,
     715,
     715,
     712,
     713,
     712,
     715,
     715,
     715,
     712,
     710,
     706,
     706,
     706,
     703,
     705,
     703,
     706,
     709,
     705,
     707,
     705]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [6,
    30,
    700,
    [690,
     689,
     690,
     691,
     689,
     685,
     682,
     686,
     682,
     680,
     684,
     687,
     690,
     693,
     692,
     689,
     688,
     685,
     683,
     685,
     687,
     683,
     684,
     688,
     691,
     689,
     686,
     683,
     679,
     679,
     682,
     680,
     680,
     684]],
   [True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True]],
  ['control: scenario 2',
   [6,
    10,
    700,
    [686,
     687,
     685,
     682,
     682,
     678,
     681,
     677,
     676,
     673,
     674,
     676,
     672,
     670,
     669,
     673,
     674,
     676,
     675,
     673,
     675,
     672,
     673,
     674,
     670,
     672]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]]],
 [['regression: scenario 3',
   [7,
    30,
    700,
    [701,
     704,
     708,
     708,
     709,
     711,
     707,
     709,
     710,
     706,
     707,
     703,
     701,
     697,
     697,
     698,
     698,
     701,
     700,
     699,
     699,
     695,
     696,
     700,
     698,
     701,
     700]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False]],
  ['regression: scenario 17',
   [9,
    10,
    700,
    [699,
     695,
     691,
     688,
     691,
     690,
     694,
     696,
     693,
     691,
     688,
     686,
     687,
     691,
     687,
     686,
     683,
     680,
     679,
     681,
     678,
     678,
     679,
     680,
     681,
     683,
     681,
     683,
     683,
     687]],
   [True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [7,
    20,
    700,
    [688,
     691,
     689,
     691,
     692,
     691,
     687,
     691,
     692,
     691,
     695,
     695,
     692,
     689,
     688,
     684,
     682,
     681,
     679,
     678,
     682,
     682,
     680,
     682,
     686,
     689,
     687,
     687,
     690,
     686,
     687,
     691]],
   [True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False]],
  ['regression: scenario 2',
   [9,
    20,
    700,
    [702,
     703,
     707,
     703,
     700,
     697,
     699,
     698,
     696,
     693,
     696,
     695,
     694,
     690,
     692,
     695,
     697,
     700,
     698,
     699,
     701,
     704,
     708,
     712,
     710,
     709,
     713,
     709,
     710,
     714,
     711,
     711,
     707,
     706,
     706]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]]],
 [['regression: scenario 12',
   [5,
    30,
    700,
    [698,
     698,
     701,
     703,
     706,
     703,
     704,
     701,
     702,
     698,
     698,
     694,
     698,
     699,
     701,
     701,
     700,
     697,
     693,
     692,
     692,
     690,
     688,
     690,
     691,
     691,
     693]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True]],
  ['regression: scenario 14',
   [5,
    20,
    700,
    [696,
     695,
     692,
     694,
     695,
     696,
     694,
     693,
     690,
     692,
     693,
     693,
     697,
     697,
     701,
     704,
     705,
     704,
     708,
     712,
     713,
     713,
     715,
     712,
     712,
     710,
     707,
     709,
     705,
     701,
     698,
     695,
     697,
     701,
     699,
     700,
     699]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [6,
    10,
    700,
    [702,
     699,
     703,
     707,
     704,
     708,
     705,
     701,
     698,
     700,
     703,
     703,
     700,
     697,
     696,
     697,
     697,
     701,
     703,
     703,
     704,
     705,
     708,
     704,
     706,
     705,
     702,
     706,
     707,
     704,
     708,
     707,
     703,
     706,
     707,
     703,
     703,
     706,
     707,
     706]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 2',
   [3,
    20,
    700,
    [682, 683, 684, 687, 687, 686, 682, 683, 680, 676, 680, 683, 679, 675, 674, 671, 671, 672, 670, 672]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False]]],
 [['regression: scenario 31',
   [8,
    10,
    700,
    [699,
     697,
     700,
     696,
     699,
     695,
     692,
     694,
     698,
     699,
     696,
     700,
     701,
     701,
     698,
     698,
     700,
     704,
     702,
     698,
     695,
     697,
     701,
     697,
     696,
     698,
     696,
     696,
     696,
     693,
     695,
     693,
     695,
     691,
     689,
     688,
     690,
     692,
     691,
     688]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True]],
  ['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [5,
    10,
    700,
    [698,
     700,
     702,
     701,
     700,
     700,
     699,
     697,
     694,
     696,
     698,
     694,
     697,
     697,
     694,
     698,
     700,
     698,
     699,
     700,
     703,
     707,
     708,
     706,
     708,
     712,
     710,
     706,
     702,
     700,
     696,
     696,
     692]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 2',
   [3,
    10,
    700,
    [669,
     665,
     665,
     665,
     666,
     665,
     663,
     665,
     667,
     665,
     667,
     663,
     663,
     667,
     667,
     668,
     664,
     664,
     664,
     663,
     661,
     661,
     661,
     664,
     666,
     664,
     668]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: scenario 3',
   [4,
    30,
    700,
    [693,
     696,
     695,
     696,
     695,
     694,
     690,
     686,
     682,
     681,
     683,
     685,
     681,
     677,
     673,
     671,
     674,
     672,
     668,
     671,
     668,
     668,
     672,
     672,
     674,
     677,
     680,
     676,
     673,
     675,
     677,
     673,
     671,
     670,
     672,
     668,
     666]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]]]]
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(cph, band, setpoint, temps):
    period = 60 // cph
    out = []
    on_left = 0
    for minute, temp in enumerate(temps):
        if minute % period == 0:
            err = setpoint - temp
            num = max(0, min(err, band)) * period
            on = (2 * num + band) // (2 * band)
            if 0 < on < 2:
                on = 0
            if 0 < period - on < 2:
                on = period
            on_left = on
        out.append(on_left > 0)
        if on_left > 0:
            on_left -= 1
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['regression: scenario 2',
   [6,
    30,
    700,
    [697,
     695,
     691,
     695,
     691,
     692,
     693,
     692,
     690,
     690,
     690,
     687,
     684,
     683,
     687,
     688,
     688,
     691,
     690,
     692,
     693,
     689,
     692]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [4,
    10,
    700,
    [673,
     669,
     665,
     669,
     667,
     665,
     664,
     662,
     659,
     662,
     661,
     659,
     660,
     656,
     659,
     660,
     656,
     652,
     654,
     652,
     656,
     657,
     653,
     653,
     653,
     653,
     654,
     653,
     650,
     650,
     650,
     650,
     651,
     654,
     651,
     650,
     650,
     650,
     650]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: scenario 3',
   [7,
    30,
    700,
    [693,
     691,
     695,
     691,
     695,
     698,
     697,
     700,
     702,
     704,
     706,
     708,
     709,
     707,
     706,
     702,
     702,
     701,
     698,
     701,
     700,
     704,
     703,
     702,
     702,
     699,
     695,
     694,
     696,
     699,
     696,
     692,
     694,
     693,
     694,
     697,
     700]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False]],
  ['control: scenario 4',
   [4,
    10,
    700,
    [680,
     684,
     685,
     683,
     684,
     685,
     686,
     682,
     681,
     679,
     677,
     681,
     680,
     681,
     677,
     681,
     680,
     682,
     682,
     678,
     677,
     673,
     672,
     676,
     673,
     670,
     669,
     665,
     662]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]]],
 [['regression: scenario 8',
   [9,
    30,
    700,
    [687,
     691,
     690,
     688,
     689,
     690,
     693,
     696,
     700,
     697,
     701,
     705,
     704,
     703,
     702,
     698,
     702,
     699,
     703,
     700,
     697,
     694,
     698,
     695,
     698,
     701,
     698,
     696]],
   [True,
    True,
    True,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['regression: scenario 14',
   [9,
    10,
    700,
    [699,
     703,
     700,
     700,
     703,
     707,
     706,
     710,
     714,
     715,
     715,
     715,
     715,
     712,
     713,
     712,
     715,
     715,
     715,
     712,
     710,
     706,
     706,
     706,
     703,
     705,
     703,
     706,
     709,
     705,
     707,
     705]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [6,
    30,
    700,
    [690,
     689,
     690,
     691,
     689,
     685,
     682,
     686,
     682,
     680,
     684,
     687,
     690,
     693,
     692,
     689,
     688,
     685,
     683,
     685,
     687,
     683,
     684,
     688,
     691,
     689,
     686,
     683,
     679,
     679,
     682,
     680,
     680,
     684]],
   [True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True]],
  ['control: scenario 2',
   [6,
    10,
    700,
    [686,
     687,
     685,
     682,
     682,
     678,
     681,
     677,
     676,
     673,
     674,
     676,
     672,
     670,
     669,
     673,
     674,
     676,
     675,
     673,
     675,
     672,
     673,
     674,
     670,
     672]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]]],
 [['regression: scenario 3',
   [7,
    30,
    700,
    [701,
     704,
     708,
     708,
     709,
     711,
     707,
     709,
     710,
     706,
     707,
     703,
     701,
     697,
     697,
     698,
     698,
     701,
     700,
     699,
     699,
     695,
     696,
     700,
     698,
     701,
     700]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False]],
  ['regression: scenario 17',
   [9,
    10,
    700,
    [699,
     695,
     691,
     688,
     691,
     690,
     694,
     696,
     693,
     691,
     688,
     686,
     687,
     691,
     687,
     686,
     683,
     680,
     679,
     681,
     678,
     678,
     679,
     680,
     681,
     683,
     681,
     683,
     683,
     687]],
   [True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [7,
    20,
    700,
    [688,
     691,
     689,
     691,
     692,
     691,
     687,
     691,
     692,
     691,
     695,
     695,
     692,
     689,
     688,
     684,
     682,
     681,
     679,
     678,
     682,
     682,
     680,
     682,
     686,
     689,
     687,
     687,
     690,
     686,
     687,
     691]],
   [True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False]],
  ['regression: scenario 2',
   [9,
    20,
    700,
    [702,
     703,
     707,
     703,
     700,
     697,
     699,
     698,
     696,
     693,
     696,
     695,
     694,
     690,
     692,
     695,
     697,
     700,
     698,
     699,
     701,
     704,
     708,
     712,
     710,
     709,
     713,
     709,
     710,
     714,
     711,
     711,
     707,
     706,
     706]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]]],
 [['regression: scenario 12',
   [5,
    30,
    700,
    [698,
     698,
     701,
     703,
     706,
     703,
     704,
     701,
     702,
     698,
     698,
     694,
     698,
     699,
     701,
     701,
     700,
     697,
     693,
     692,
     692,
     690,
     688,
     690,
     691,
     691,
     693]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True]],
  ['regression: scenario 14',
   [5,
    20,
    700,
    [696,
     695,
     692,
     694,
     695,
     696,
     694,
     693,
     690,
     692,
     693,
     693,
     697,
     697,
     701,
     704,
     705,
     704,
     708,
     712,
     713,
     713,
     715,
     712,
     712,
     710,
     707,
     709,
     705,
     701,
     698,
     695,
     697,
     701,
     699,
     700,
     699]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [6,
    10,
    700,
    [702,
     699,
     703,
     707,
     704,
     708,
     705,
     701,
     698,
     700,
     703,
     703,
     700,
     697,
     696,
     697,
     697,
     701,
     703,
     703,
     704,
     705,
     708,
     704,
     706,
     705,
     702,
     706,
     707,
     704,
     708,
     707,
     703,
     706,
     707,
     703,
     703,
     706,
     707,
     706]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 2',
   [3,
    20,
    700,
    [682, 683, 684, 687, 687, 686, 682, 683, 680, 676, 680, 683, 679, 675, 674, 671, 671, 672, 670, 672]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False]]],
 [['regression: scenario 31',
   [8,
    10,
    700,
    [699,
     697,
     700,
     696,
     699,
     695,
     692,
     694,
     698,
     699,
     696,
     700,
     701,
     701,
     698,
     698,
     700,
     704,
     702,
     698,
     695,
     697,
     701,
     697,
     696,
     698,
     696,
     696,
     696,
     693,
     695,
     693,
     695,
     691,
     689,
     688,
     690,
     692,
     691,
     688]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True]],
  ['regression: tiny error',
   [6,
    30,
    700,
    [696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: three cycles',
   [5,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     700,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681,
     681]],
   [True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: seven cycles per hour',
   [7,
    20,
    700,
    [690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     690,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     685,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    True,
    True,
    False]],
  ['control: above setpoint',
   [4,
    10,
    700,
    [705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     705,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695,
     695]],
   [False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 1',
   [5,
    10,
    700,
    [698,
     700,
     702,
     701,
     700,
     700,
     699,
     697,
     694,
     696,
     698,
     694,
     697,
     697,
     694,
     698,
     700,
     698,
     699,
     700,
     703,
     707,
     708,
     706,
     708,
     712,
     710,
     706,
     702,
     700,
     696,
     696,
     692]],
   [True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False]],
  ['control: scenario 2',
   [3,
    10,
    700,
    [669,
     665,
     665,
     665,
     666,
     665,
     663,
     665,
     667,
     665,
     667,
     663,
     663,
     667,
     667,
     668,
     664,
     664,
     664,
     663,
     661,
     661,
     661,
     664,
     666,
     664,
     668]],
   [True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]],
  ['control: scenario 3',
   [4,
    30,
    700,
    [693,
     696,
     695,
     696,
     695,
     694,
     690,
     686,
     682,
     681,
     683,
     685,
     681,
     677,
     673,
     671,
     674,
     672,
     668,
     671,
     668,
     668,
     672,
     672,
     674,
     677,
     680,
     676,
     673,
     675,
     677,
     673,
     671,
     670,
     672,
     668,
     666]],
   [True,
    True,
    True,
    True,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    False,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True,
    True]]]]
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:
Small errors produce one-minute burns that never let the heat exchanger reach temperature.

Time-proportioning heating thermostat with a cycles-per-hour setting, sampled per minute. The cycle length is 60 // cph minutes. At each cycle start the error (setpoint - temp) is clamped to 0..band and the on time is error/band of the cycle rounded half up; an on time of 1 minute is extended to the 2-minute minimum, and an off time of 1 minute is eliminated (full on). The output is on for the first on-time minutes of the cycle. Return the heat output per minute.

split: open-access