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

data:
  sample:
    data:
      - '':
          in: |
            6 7
            1 2
            2 3
            1 3
            1 4
            4 5
            5 6
            1 6
          ans: |
            4
            1 3 2 1
      - '':
          in: |
            12 13
            1 2
            2 3
            1 4
            4 5
            5 6
            6 7
            4 7
            1 8
            8 9
            9 10
            10 11
            11 12
            9 12
          ans: |
            7
            1 4 5 6 7 4 1
      - '':
          in: |
            3 2
            1 2
            2 3
          ans: impossible
      - '':
          in: |
            4 3
            2 3
            3 4
            2 4
          ans: impossible
  secret:
    data:
      - 'min':
          in: |
            2 1
            1 2
      - 'triangle': &triangle
          in: |
            3 3
            1 2
            1 3
            2 3
          ans: |
            4
            1 2 3 1
      - 'k4': &k4
          in: |
            4 6
            1 2
            1 3
            1 4
            2 3
            2 4
            3 4
          ans: |
            4
            1 2 3 1
      - 'c3-c4-2-3':
          generate: intralayer.py 2 3
          ans: |
            4
            1 2 3 1
      - 'c3-c4-2-4':
          generate: intralayer.py 2 4
          ans: |
            4
            1 2 4 1
      - 'c3-c4-2-5':
          generate: intralayer.py 2 5
          ans: |
            4
            1 2 5 1
      - 'c3-c4-3-4':
          generate: intralayer.py 3 4
          ans: |
            4
            1 3 4 1
      - 'c3-c4-3-5':
          generate: intralayer.py 3 5
          ans: |
            4
            1 3 5 1
      - 'c3-c4-4-5':
          generate: intralayer.py 4 5
          ans: |
            4
            1 4 5 1
      - 'multitadpole-3-1': multitadpole.py -k 3 --c4 1
      - 'multitadpole-3-2': multitadpole.py -k 3 --c4 2
      - 'multitadpole-9998-30000': multitadpole.py -k 9998 --c4 30000
      - 'multitadpole-9998-30000-shuffle':
          generate: multitadpole.py -k 9998 --c4 30000 --shuffle --seed {seed}
          count: 5
      - 'erdos-renyi-100-200':
          generate: erdos-renyi.py -n 100 -m 200 --seed {seed}
          count: 5
      - 'erdos-renyi-10K-20K':
          generate: erdos-renyi.py -n 10000 -m 20000 --seed {seed}
          count: 5
      - 'erdos-renyi-10K-200K':
          generate: erdos-renyi.py -n 10000 -m 200000  --seed {seed}
          count: 5
      - 'erdos-renyi-100K-200K':
          generate: erdos-renyi.py -n 100000 -m 200000  --seed {seed}
          count: 5
      - 'tadpole-1-100K':
          generate: tadpole.py -n 100000 --seed {seed}
          count: 3
      - 'tadpole-1-10': tadpole.py -n 30 --seed {seed}
      - 'tadpole-1-30-chords': tadpole.py -n 30 --chords --seed {seed}
      - 'tadpole-1-100-c3': tadpole.py -n 30 --hi 3
      - 'tadpole-1-100K-c3': tadpole.py -n 100000 --hi 3
      - 'tadpole-2-100K': tadpole.py -n 100000 --tadpoles 2 --seed {seed}
      - 'tadpole-20-100K': tadpole.py -n 100000 --tadpoles 20 --seed {seed}
      - 'tadpole-10-70': tadpole.py -n 70 --tadpoles 10 --seed {seed}
      - 'tadpole-200-100K': tadpole.py -n 100000 --tadpoles 200 --seed {seed}
      - 'tadpole-2K-100K': tadpole.py -n 100000 --tadpoles 2000 --seed {seed}
      - 'tadpole-20K-100K': tadpole.py -n 100000 --tadpoles 20000 --seed {seed}
      - 'tadpole-1-50K-chords': tadpole.py -n 50000 --chords --seed {seed}
      - 'tadpole-1-50K-chords':
          generate: tadpole.py -n 50000 --chords --tadpoles 2000 --seed {seed}
          count: 5
      - 'treecycle-100K-n':
          generate: treecycle.py -n 100000 --seed {seed}
          count: 5
          ans: impossible
      - 'treecycle-100K-y':
          generate: treecycle.py -n 100000 --connected --seed {seed}
          count: 5
      - 'cycle': cycle.py -n 100000

  invalid_input:
    visualizer:
    data:
      extra_edge:
        in: |
          4 3
          1 2
          1 3
          1 4
          2 3
      duplicate_edge:
        in: |
          4 4
          1 2
          1 3
          1 4
          1 4
      zero_based:
        in: |
          3 3
          0 1
          0 2
          1 2
      singleton:
        in: 1 0
      edgeless:
        in: |
          2 0
      too-many-vertices:
        generate: erdos-renyi.py -n 100001 -m 200000
      too-many-edges:
        generate: erdos-renyi.py -n 100000 -m 200001
  invalid_answer:
    visualizer:
    data:
      triangle-short-len:
        <<: *triangle
        ans: |
          3
          1 2 3 1
      triangle-long-len:
        <<: *triangle
        ans: |
          5
          1 2 3 1
  invalid_output:
    data:
      stay-home:
        <<: *triangle
        out: |
          1
          1
      triangle-digon:
        <<: *triangle
        out: |
          3
          1 3 1
      triangle-len-too-short:
        <<: *triangle
        out: |
          3
          1 2 3 1
      triangle-len-too-long:
        <<: *triangle
        out: |
          5
          0 1 2 0
      k4-not-home-end:
        <<: *k4
        out: |
          4
          1 2 3 4
      k4-not-home-start:
        <<: *k4
        out: |
          4
          2 3 4 1
      k4-long:
        <<: *k4
        out: |
          5
          1 2 3 4 1
      nonexisting-edge:
        in: |
          4 4
          1 2
          1 3
          2 3
          1 4
        ans: |
          4
          1 2 3 1
        out: |
          4
          1 2 4 1
  valid_output:
    data:
      triangle-backwards:
        <<: *triangle
        out: |
          4
          1 3 2 1
