feat(sterni/aoc/2021): day 4 solution

Change-Id: Ib8b4206b40acad32e10ebd9103e54074ba3452fc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4681
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
sterni 2021-12-26 20:47:01 +01:00 committed by clbot
parent 675f97e535
commit d052bc5953

View file

@ -124,6 +124,26 @@ CO2ScrubberRating ← DebinList 0 >_lifeSupportRating ⊢
•Out "Day 3.2: "•Fmt (OxygenGeneratorRating×CO2ScrubberRating) day3Input
#
# 2021-12-04
#
day4Numbers ReadDec¨ ',' SplitOn ReadInput 4
day4Boards ReadDec¨>˘(' 'SplitOn¨)> (<) SplitOn 2ReadInput 4
BoardWins {C ´(´˘) (CC)𝕩}
_CallNumber {(𝕗𝕩) ((¬BoardWins))˘ 𝕨}
BoardWinScores {
𝕩 (0</×) (-») (+´)(BoardWins˘/(+´)˘(𝕨׬))¨ (<0˜𝕨) (𝕨 _CallNumber)`𝕩
}
day4WinScores day4Boards BoardWinScores day4Numbers
•Out "Day 4.1: "•Fmt day4WinScores
•Out "Day 4.2: "•Fmt day4WinScores
#
# 2021-12-06
#