Notes de Jérôme Prudent
Notes publiques ...

« Notes

Advent of code 2022 day4

Créée le 11 Sep 2023

  • I always try to solve the sample before the real input
  • image.png
  • The splitting part of the input was easy.
  • I tried to use a sophisticated QUERY (a SQL DSL over spreadsheet, quite powerful!) but couldn’t crack it without subqueries that aren’t supported.
  • So I fired my ultimate weapon IFS : =IFS(B2="",0,and(B2>=B3,C2<=C3),1,and(B3>=B2,C3<=C2),1,true,0) and copied it on each row (row reference are adapted automatically!!). Just
  • Then I downloaded my input, but, oh NO, 😑 the sample is not like the input. I must have misread something 🤷‍♂️. Next time I should compare the input with the sample!
  • So do it again !
  • I applied same technique, and with all data presented in column instead of group of rows, it was even easier … ⭐️
  • The second part was just an adaptation of the IFS ⭐️
  • Find the spreadsheet here