day20a.c gets the numerical result required by the puzzle, but doesn't actually solve what the puzzle asked for: the entire grid of tiles. Both day20a.c and day20b.c contain a lot of duplicated code and poor code quality in general.