solution: /submissions/accepted/mike.cpp
version: 2025-02  # use this version of the generators framework

data:
  sample:
    data:
      - '':
          in: |
            2
            600000 400000
            50000 150000
      - '':
          in: |
            10
            1 2 3 4 5 6 7 8 9 10
            1 1 1 1 1 1 1 1 1 1
  secret:
    data:
      - 'trivial':
          in: |
            1
            1
            1
      - 'trivial_2':
          in: |
            1
            2
            3
      - 'top':
          in: |
            1
            1000000
            1000000000
      - 'floor_zero':
          in: |
            2
            1 0
            1 1
      - 'back_and_forth':
          in: |
            35
            1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000
            1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
      - 'back_and_forth-2':
          in: |
            35
            1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000 0 1000000
            1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000
      - 'go_back':
          in: |
            8
            1 2 3 4 0 1 2 3
            1 1 1 1 1 1 1 1
      - 'go_back_2':
          in: |
            11
            1 2 3 4 5 0 1 2 3 4 5
            1 1 1 1 1 1 1 1 1 1 1
      - 'single_elevator':
          in: |
            10
            10 377 734 1733 2467 4993 6222 6223 6224 6225
            2000000 2000000 2000000 2000000 2000000 2000000 2000000 2000000 2000000 2000000
      - 'late_match':
          in: |
            8
            1 2 3 4 0 1 2 3
            1 1 1 1 1 1 2 1
      - 'late_match_between':
          in: |
            12
            1 2 3 4 0 1 2 3 0 1 2 3
            1 1 1 1 1 1 2 1 1 1 1 1
      - 'delay_prep_triple':
          in: |
            6
            1 2 3 4 5 6
            11 1999989 25 1999975 73 1999927
      - 'delay_prep_triple_2':
          in: |
            6
            1 2 3 4 5 6
            10 1999988 24 1999974 72 1999926
      - 'delay_prep_triple_3':
          in: |
            6
            1 2 3 4 5 6
            10 1999988 34 1999964 92 1999906
      - 'delay_prep_double':
          in: |
            6
            1 2 3 4 5 6
            11 74 1999915 11 721 1999268
      - 'delay_prep_double_2':
          in: |
            10
            10 317 734 1733 2167 4993 6122 6223 6224 6225
            110 740 1999150 110 1421 1998469 849 1999150 1530 1998469
      - 'delay_prep_double_3':
          in: |
            10
            10 317 734 1733 2167 4993 6122 6223 6224 6225
            108 738 1999149 108 1419 1998468 840 1999149 1521 1998468
      - 'case_b':
          in: |
            5
            1 2 3 4 5
            30 1999970 91 311 199598
      - 'case_b_2':
          in: |
            5
            1 2 3 4 5
            28 1999968 89 308 199597
      - 'up_down_up':
          in: |
            3
            2 1 2
            1 1 1
      - 'down_up_down':
          in: |
            3
            1 2 1
            1 1 1
      - consecutive: consecutive_ones.py 2
      - consecutive: consecutive.py {seed} 2 100
      - consecutive: consecutive_ones.py 3
      - consecutive: consecutive_ones.py 4
      - consecutive: consecutive_ones.py 5
      - consecutive: consecutive_ones.py 6
      - consecutive: consecutive_ones.py 7
      - consecutive: consecutive_ones.py 8
      - consecutive: consecutive_ones.py 9
      - consecutive: consecutive.py {seed} 10 100
      - consecutive: consecutive_ones.py 35
      - consecutive: consecutive.py {seed} 35 100
      - consecutive: consecutive.py {seed} 35 1000000000
      - cycle: cycle.py {seed} 2 2
      - cycle: cycle.py {seed} 2 3
      - cycle: cycle.py {seed} 2 100
      - cycle: cycle.py {seed} 5 2
      - cycle: cycle.py {seed} 5 3
      - cycle: cycle.py {seed} 5 100
      - cycle: cycle.py {seed} 7 2
      - cycle: cycle.py {seed} 7 3
      - cycle: cycle.py {seed} 7 100
      - cycle: cycle.py {seed} 7 100000
      - uniform: uniform.py {seed} 1
      - uniform: uniform.py {seed} 2
      - uniform: uniform.py {seed} 3
      - uniform: uniform.py {seed} 4
      - uniform: uniform.py {seed} 5
      - uniform: uniform.py {seed} 6
      - uniform: uniform.py {seed} 7
      - uniform: uniform.py {seed} 8
      - uniform: uniform.py {seed} 9
      - uniform_10:
          generate: uniform.py {seed} 10
          count: 10
      - uniform_20:
          generate: uniform.py {seed} 20
          count: 10
      - uniform_35:
          generate: uniform.py {seed} 35
          count: 3
      - delay_prep_triple_large:
          generate: delay_prep_triple_large.py {seed} 10
          count: 3
      - delay_prep_triple_large: delay_prep_triple_large.py {seed} 17
      - delay_prep_double_large:
          generate: delay_prep_double_large.py {seed} 7
          count: 3
      - delay_prep_double_large: delay_prep_double_large.py {seed} 11
      - delay_prep_double_weird:
          generate: delay_prep_double_weird.py {seed} 20
          count: 3
      - delay_prep_double_weird: delay_prep_double_weird.py {seed} 35
      - case_e_large:
          generate: case_e_large.py {seed} 5
          count: 3
      - case_e_large: case_e_large.py {seed} 8
      - case_b_large:
          generate: case_b_large.py {seed} 20
          count: 3
      - case_b_large: case_b_large.py {seed} 35

  invalid_input:
    data:
      - 'n_too_large':
          in: |
            3
            600000 400000
            50000 150000
      - 'n_too_small':
          in: |
            1
            600000 400000
            50000 150000
      - 'n_zero':
          in: '0\n\n\n'
      - 'n_beyond_limit':
          in: |
            36
            1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
            1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
      - 'too_many_queries':
          in: |
            2
            600000 400000 200000
            50000 150000
      - 'too_few_queries':
          in: |
            2
            600000
            50000 150000
      - 'too_many_times':
          in: |
            2
            600000 400000
            50000 150000 50000
      - 'too_few_times':
          in: |
            2
            600000 400000
            50000
      - 'another_line':
          in: |
            2
            600000 400000
            50000 150000
            300000 550000
      - 'no_times':
          in: |
            2
            600000 400000
      - 'too_large_elevator_number':
          in: |
            2
            600000 4000000
            50000 150000
      - 'negative_elevator_number':
          in: |
            2
            600000 -4000000
            50000 150000
      - 'too_large_time':
          in: |
            2
            600000 400000
            50000 1500000000
      - 'negative_time':
          in: |
            2
            600000 400000
            50000 -150000
      - 'zero_time':
          in: |
            2
            600000 400000
            50000 0

  invalid_answer:
    data:
      - 'negative':
          in: |
            2
            600000 400000
            50000 150000
          ans: |
            -1000000
      - 'too_big':
          in: |
            2
            600000 400000
            50000 150000
          ans: |
            1000000000000000001

  invalid_output:
    data:
      - 'negative':
          in: |
            2
            600000 400000
            50000 150000
          ans: |
            1000000
          out: |
            -1000000
      - 'zero':
          in: |
            2
            600000 400000
            50000 150000
          ans: |
            1000000
          out: |
            0

  valid_output:
    data:
      - 'correct':
          in: |
            2
            600000 400000
            50000 150000
          ans: |
            1000000
          out: |
            1000000
