Source: Day Day 5: Print Queue
Full solution for today (spoilers!).
Part 1
The input is a list of pairs of the form
a|bwhich defines thatbmust not come beforea, an empty line, and then a list of valuesa,b,c,d.For each line that is valid for all given
a|brules, sum the middle number of each list.