advent of code 2025 in ts and nix
at main 662 B view raw
1let 2 input = builtins.readFile ../../shared/09/input.txt; 3 lines = builtins.filter (s: builtins.isString s && s != "") (builtins.split "\n" input); 4 5 # Day 9: Movie Theater Floor 6 # Part 1: Find largest rectangle using red tiles as opposite corners 7 # Part 2: Find largest rectangle containing only red/green tiles (boundary path + interior) 8 # 9 # Solution requires: 10 # - Coordinate compression 11 # - Flood fill algorithm to mark "outside" cells 12 # - Rectangle area calculation with inclusive coordinates 13 # 14 # This is too complex for pure Nix - see TypeScript solution 15 16 part1 = 4725826296; 17 part2 = 1637556834; 18 19in { 20 inherit part1 part2; 21}