Implement day 19 part 1

By brute force and lots of it
This commit is contained in:
2021-12-19 18:16:56 +01:00
parent 6506af879a
commit 53ca8d0043
2 changed files with 256 additions and 3 deletions

View File

@@ -82,8 +82,9 @@ pub fn ordered<O: PartialOrd>(a: O, b: O) -> (O, O) {
}
}
pub fn read_input<P, O>(input: &mut dyn Read, parser: P) -> O
pub fn read_input<I, P, O>(mut input: I, parser: P) -> O
where
I: Read,
P: for<'a> FnOnce(&'a [u8]) -> IResult<&'a [u8], O>,
{
let mut buffer = Vec::new();