A solution in C++ to the BIO 2008 problem "Shirts" using a breadth-first search algorithm.
Please note:
- The output format I have used here is not the same as specified in the question. Although this would likely lose marks, I feel it is clearer and nicer for non-competition use.
- This is one of the first C++ programs I have written (I often use C#) and so I would like to apologise to purists of the form for any unpleasant syntax; please open an issue, as I am sure it would be useful for me to learn the correct way to do it.
- The program is relatively well optimised, and all of the solutions specified in the mark scheme run in under 0.1s as timed by the code in the program.
(c) 2014 William Eustace. MIT licensed.