Single repo for all days of 2021.
Dirs like dayN
contains related day solution.
Dir input
contains sample data and my input data for puzzles (yes, it is
differs by account).
Dir puzzles
contains descriptions of puzzles for those who have not registered
on AoC site.
Single ./cmd/main.go
file for any day or part solution.
All solutions can be tested via:
$ make test
If you want to get answer for your input data use:
$ go run ./cmd/... -day X -part Y ${your.file}
It was slow because I don't know the rules of bingo.
Find a simpler algorithm. Come on!
Fun! Digits, digits are everywhere!
Oh, my memory!
What's the trick? Oh, I see!
The first attempt was to use a graph. But it gets too difficult.
Hit me too hard in the head.
Yes, I know about 3D. But the coordinate axes are undefined...
I looked a little for tips, but implemented it in my own way.
Very interesting. Infinite image, huh?
What? Why so easy... wait, whaaat?
Was an ice memory eater :)
Remember a puzzle with 2 water cans in "Die hard" movie?
Damn. It is like puzzle 15, but how you gonna prefill graph?
I am lost 1 day due to wrong path calculation (hallway you know)...
Fnx to community for tips (pod only moves twice) and for cool ascii visualisation style:
0 ........... DABC BADC
5 A.......... D.BC BADC
10 AA......... D.BC B.DC
60 AA......... D..C BBDC
460 AA...C..... D... BBDC
3460 AA...C.D... D... BB.C
3760 AA.....D... D... BBCC
4060 AA.....D.C. D... BBC.
8060 AA...D.D.C. .... BBC.
8110 AA...D.D.C. .B.. .BC.
8113 A....D.D.C. .B.. ABC.
11113 A....D...C. .B.. ABCD
11513 A....D..... .BC. ABCD
15513 A.......... .BCD ABCD
15516 ........... ABCD ABCD
First I implemented ALU ... But this is too slow.
Then I spied a solution from the community.
Part One was too easy.
Part Two... Whell... Fun! ;)