From b6068265618f4369eb2c5b56111c91818cad529a Mon Sep 17 00:00:00 2001 From: Joey Eamigh <55670930+JoeyEamigh@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:09:32 -0500 Subject: [PATCH] day3 --- .gitignore | 5 + .vscode/launch.json | 27 ++ .vscode/tasks.json | 50 +++ Justfile | 16 +- bun.lockb | Bin 0 -> 3141 bytes day2/app/Pt1.hs | 33 ++ day2/app/Pt2.hs | 45 ++ day2/day2.cabal | 46 ++ day3/pt1.ts | 9 + day3/pt2.ts | 12 + inputs/day2 | 1000 +++++++++++++++++++++++++++++++++++++++++++ inputs/day3 | 6 + package.json | 11 + stack.yaml | 1 + tsconfig.json | 27 ++ 15 files changed, 1285 insertions(+), 3 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json create mode 100755 bun.lockb create mode 100644 day2/app/Pt1.hs create mode 100644 day2/app/Pt2.hs create mode 100644 day2/day2.cabal create mode 100644 day3/pt1.ts create mode 100644 day3/pt2.ts create mode 100644 inputs/day2 create mode 100644 inputs/day3 create mode 100644 package.json create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index a910a62..53db15b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,14 @@ dist-newstyle .stack-work/ *~ +.vscode/dist-cabal-repl +.vscode/phoityne.log # rust build +# js +node_modules + # misc .DS_Store diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..f6a8e8c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "ghc", + "request": "launch", + "name": "day2pt2", + "internalConsoleOptions": "openOnSessionStart", + "workspace": "${workspaceFolder}", + "startup": "${workspaceFolder}/day2/app/Pt2.hs", + "startupFunc": "", + "startupArgs": "", + "stopOnEntry": false, + "mainArgs": "", + "ghciPrompt": "H>>= ", + "ghciInitialPrompt": "> ", + "ghciCmd": "stack ghci --with-ghc=ghci-dap --test --no-load --no-build --main-is main", + "ghciEnv": {}, + "logFile": "${workspaceFolder}/.vscode/phoityne.log", + "logLevel": "WARNING", + "forceInspect": false + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..c7efda6 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,50 @@ + +{ + // Automatically created by phoityne-vscode extension. + + "version": "2.0.0", + "presentation": { + "reveal": "always", + "panel": "new" + }, + "tasks": [ + { + // F7 + "group": { + "kind": "build", + "isDefault": true + }, + "label": "haskell build", + "type": "shell", + //"command": "cabal configure && cabal build" + "command": "stack build" + }, + { + // F6 + "group": "build", + "type": "shell", + "label": "haskell clean & build", + //"command": "cabal clean && cabal configure && cabal build" + "command": "stack clean && stack build" + //"command": "stack clean ; stack build" // for powershell + }, + { + // F8 + "group": { + "kind": "test", + "isDefault": true + }, + "type": "shell", + "label": "haskell test", + //"command": "cabal test" + "command": "stack test" + }, + { + // F6 + "isBackground": true, + "type": "shell", + "label": "haskell watch", + "command": "stack build --test --no-run-tests --file-watch" + } + ] +} diff --git a/Justfile b/Justfile index 3e21700..528c55f 100644 --- a/Justfile +++ b/Justfile @@ -1,5 +1,15 @@ -all: - just day1 +day3: + bun run day3/pt1.ts + bun run day3/pt2.ts + +day2: + stack run day2pt1 + stack run day2pt2 day1: - stack run --package day1 + stack run day1 + +all: + just day1 + just day2 + just day3 diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..3a1fdddbc7e271c02946c00ad9345151edd67966 GIT binary patch literal 3141 zcmd5;3s6*L6uyg#=#mJwJ;ukdh*F7r_x;damo%CtF%e}*QOjk$yIk29_ugIDtz>t` z8dRFVL`@CGN1_r6j!b6bXbDXDC^W|jD~w*`E7NphYQWBa_g=U)shc@NXXc;t|98*# z-SeMw_MVfPqVUm_qJVTO2)AEW;B!l0$(N_L^pXbE;GR?AUqU{L{_xU<48uQP{A*=@54=;tkkyB8G)V!%hM^ zAM|k0b)bPPbQ$ympli72V9VNF`#oIqspfJ2v7t{K%2I}JymZ-dvV7E~@l}fa*VCG( zO&RVnw_VKH_`$a08v?b^e zJ=JkG_H5p|N%2D~<}#Z1cdr~>r0%M3ZQpNSXj?V^{Pkj6+v2jG%p*mc+%+u?)jt_t z-16mP@3shdh4B=}?;#G?h4)gQO|&jJ7q2|l^wzJWZF5<2b&mG@BkNms7IaiKJe+!9 zRm;p-yS{DSzq>hc?6MuBo~g6Fw2vk)r(N zeQQ#F>pGnEko{tCyMR|%*W#^5Gr~*enRmuL-}?RR3*ABSsqx2KFIJ?LZMLMfCz}#X z9p_wr*SNJsJuT_MG2$eze0}bvtC`t1oRUQEp~^}DFJEWKZSm?&!3#;(5^g^C-SqP# zzRqsU?0U502W9Gmof_%E@>gzUp4;Wvt6zDAJYKgjmHDD^TJQBSN#vq&>t(Zc^v-x~ z^>W}HEaBtM>wEEI5Z%8QcLxj8$bE}iI4v>Llnp1{G-Gu-alYf?xfDTIWNM|1CWC~> zK3S%fS)HWA?Xg3DWTo#`M9=}%;V&HFFs|K7%s!3U0=U~SpnRe41Ntwcyrch!k;CRj z$-#eL5f8%iTu7I592RKgNF?TkYW-rL5pJdL_eu5FTk(CJ@6(B*7j(E1S4O%Mnhf|( zKP<*+WeA$VFn(6xdw+~bg{yFl0mJxdf$#n?qUAv8QrU?#Emf}3(T{J8(7!j#g4%TG}F)1?eSxvkE53`M#f7MW@w2*&;( zFtm;3Jo1P19cpc*6b)qP*~rdq=AXwEA7p5npnz@h=d$ozdsdGNl8EM_6-M0&QE5V7 z59dJxH-SM7K)hAA3pZw6>L=Wc$8Pg1CDcl_mI-(X+D4IH=1F#|fGMz$VZ8KIg@Pg+ zB+XC(-0gKOqj3-APz)F;)j Int) . words) (lines inputs) + + printf "safe: %d\n" $ length $ filter safe columns + +safe :: (Ord a, Num a) => [a] -> Bool +safe x = distance x && ascOrDesc x + +distance :: (Ord a, Num a) => [a] -> Bool +distance [] = True +distance [_] = True +distance (x : y : xs) = abs (x - y) <= 3 && abs (x - y) >= 1 && distance (y : xs) + +ascOrDesc :: (Ord a, Num a) => [a] -> Bool +ascOrDesc [] = False +ascOrDesc [_] = False +ascOrDesc (x : y : xs) = (x < y && asc (x : y : xs)) || (x > y && desc (x : y : xs)) + +asc :: (Ord a, Num a) => [a] -> Bool +asc [] = True +asc [_] = True +asc (x : y : xs) = x < y && asc (y : xs) + +desc :: (Ord a, Num a) => [a] -> Bool +desc [] = True +desc [_] = True +desc (x : y : xs) = x > y && desc (y : xs) diff --git a/day2/app/Pt2.hs b/day2/app/Pt2.hs new file mode 100644 index 0000000..e89e832 --- /dev/null +++ b/day2/app/Pt2.hs @@ -0,0 +1,45 @@ +module Main (main) where + +import Data.List (delete) +import Text.Printf (printf) + +main :: IO () +main = do + inputs <- readFile "./inputs/day2" + let columns = map (map (read :: String -> Int) . words) (lines inputs) + + -- print $ filter safe columns + printf "safe w damper: %d\n" $ length $ filter safe columns + +safe :: (Ord a, Num a) => [a] -> Bool +safe x = distance x x x && ascOrDesc x + +distance :: (Ord a, Num a) => [a] -> [a] -> [a] -> Bool +distance full arr (x : y : xs) + | length arr < length full - 1 = False + | abs (x - y) <= 3 && abs (x - y) >= 1 = distance full arr (y : xs) + | otherwise = distance full (delete y arr) (x : xs) +distance full arr [_] = length arr >= length full - 1 +distance _ _ _ = False + +ascOrDesc :: (Ord a, Num a) => [a] -> Bool +ascOrDesc (x : y : xs) + | x < y = asc (x : y : xs) (x : y : xs) (x : y : xs) + | x > y = desc (x : y : xs) (x : y : xs) (x : y : xs) +ascOrDesc _ = False + +asc :: (Ord a, Num a) => [a] -> [a] -> [a] -> Bool +asc full arr (x : y : xs) + | length arr < length full - 1 = False + | x < y = asc full arr (y : xs) + | x >= y = asc full (delete y arr) (x : xs) +asc full arr [_] = length arr >= length full - 1 +asc _ _ _ = False + +desc :: (Ord a, Num a) => [a] -> [a] -> [a] -> Bool +desc full arr (x : y : xs) + | length arr < length full - 1 = False + | x > y = desc full arr (y : xs) + | x <= y = desc full (delete y arr) (x : xs) +desc full arr [_] = length arr >= length full - 1 +desc _ _ _ = False diff --git a/day2/day2.cabal b/day2/day2.cabal new file mode 100644 index 0000000..b1fc396 --- /dev/null +++ b/day2/day2.cabal @@ -0,0 +1,46 @@ +cabal-version: 2.2 + +-- This file has been generated from package.yaml by hpack version 0.37.0. +-- +-- see: https://github.com/sol/hpack + +name: day2 +version: 0.1.0.0 +description: Please see the README on GitHub at +homepage: https://github.com/githubuser/day2#readme +bug-reports: https://github.com/githubuser/day2/issues +author: Author name here +maintainer: example@example.com +copyright: 2024 Author name here +license: MIT +build-type: Simple + +source-repository head + type: git + location: https://github.com/githubuser/day2 + +executable day2pt1 + main-is: Pt1.hs + other-modules: + Paths_day2 + autogen-modules: + Paths_day2 + hs-source-dirs: + app + ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N + build-depends: + base >=4.7 && <5 + default-language: Haskell2010 + +executable day2pt2 + main-is: Pt2.hs + other-modules: + Paths_day2 + autogen-modules: + Paths_day2 + hs-source-dirs: + app + ghc-options: -Wall -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N + build-depends: + base >=4.7 && <5 + default-language: Haskell2010 diff --git a/day3/pt1.ts b/day3/pt1.ts new file mode 100644 index 0000000..8bd0bac --- /dev/null +++ b/day3/pt1.ts @@ -0,0 +1,9 @@ +const input = await Bun.file('./inputs/day3').text(); +const regex = /mul\((?\d+)\,(?\d+)\)/g; + +const total = input + .matchAll(regex) + .map(({ groups }) => Number(groups!.first) * Number(groups!.second)) + .reduce((curr, acc) => curr + acc); + +console.log(`sum of mult: ${total}`); diff --git a/day3/pt2.ts b/day3/pt2.ts new file mode 100644 index 0000000..11cd12f --- /dev/null +++ b/day3/pt2.ts @@ -0,0 +1,12 @@ +const input = await Bun.file('./inputs/day3').text(); +const regex = /(?do|don't)\(\)|mul\((?\d+)\,(?\d+)\)/g; + +let enabled = true; +let total = 0; +input.matchAll(regex).forEach(({ groups }) => { + if (groups!.instruction === 'do') enabled = true; + else if (groups!.instruction === "don't") enabled = false; + else if (enabled) total += Number(groups!.first) * Number(groups!.second); +}); + +console.log(`sum of mult with do/don't: ${total}`); diff --git a/inputs/day2 b/inputs/day2 new file mode 100644 index 0000000..f70253f --- /dev/null +++ b/inputs/day2 @@ -0,0 +1,1000 @@ +44 47 50 51 53 54 53 +70 73 75 77 80 81 84 84 +1 3 4 7 10 13 16 20 +47 49 52 53 55 57 60 65 +69 70 71 70 71 +22 23 20 21 24 27 24 +90 92 93 94 95 93 94 94 +16 18 15 16 20 +47 48 51 50 55 +27 28 31 31 32 34 +35 36 36 38 39 41 38 +32 33 33 36 38 39 39 +11 14 14 17 20 22 23 27 +65 68 71 71 72 79 +68 69 71 74 76 79 83 84 +51 52 56 58 59 61 64 61 +89 91 94 98 98 +45 48 51 55 59 +82 85 89 90 91 93 99 +41 42 44 49 51 +74 76 77 82 81 +33 36 37 43 45 48 48 +10 12 15 18 23 27 +63 66 72 75 76 81 +71 68 71 73 74 75 +78 75 76 77 76 +8 6 9 11 11 +39 37 38 41 43 47 +87 86 87 90 96 +32 31 32 30 33 35 +17 16 17 18 16 17 14 +63 60 62 61 62 65 65 +77 76 77 78 75 78 80 84 +9 7 10 11 8 15 +48 46 47 49 52 52 54 +17 16 17 19 20 23 23 22 +12 9 10 12 12 13 13 +20 18 20 20 24 +69 66 66 67 72 +9 7 10 12 16 17 18 +19 17 18 19 21 25 28 27 +55 54 57 58 62 62 +55 54 58 61 65 +51 49 53 55 58 60 65 +59 58 60 65 68 +82 81 88 90 93 96 93 +17 14 17 18 23 23 +53 50 52 54 61 65 +26 24 27 28 33 34 36 43 +18 18 19 20 21 22 +63 63 65 67 68 71 70 +3 3 6 7 10 10 +82 82 83 86 89 93 +37 37 40 43 50 +53 53 54 51 52 54 56 +86 86 83 84 83 +37 37 40 42 41 41 +9 9 12 13 10 12 13 17 +57 57 59 61 60 63 65 71 +65 65 67 67 70 72 +23 23 24 24 23 +94 94 96 98 98 99 99 +49 49 50 53 53 55 57 61 +54 54 54 57 64 +70 70 74 77 78 +46 46 47 51 48 +9 9 10 14 14 +78 78 80 81 84 88 92 +49 49 50 53 55 56 60 67 +70 70 77 79 82 85 88 +7 7 14 15 13 +46 46 52 55 58 59 62 62 +16 16 21 22 26 +28 28 29 31 36 43 +2 6 9 10 11 12 +56 60 62 64 63 +60 64 65 68 71 73 74 74 +27 31 33 34 37 38 41 45 +6 10 11 14 15 18 21 26 +14 18 19 22 19 22 24 +17 21 23 26 27 26 28 27 +85 89 92 93 91 94 94 +20 24 27 24 28 +47 51 52 51 52 53 56 62 +18 22 24 24 25 28 +28 32 35 38 38 40 39 +43 47 47 49 50 52 52 +45 49 52 52 56 +33 37 38 38 45 +66 70 73 75 79 81 82 83 +12 16 20 22 24 25 26 25 +54 58 59 61 65 68 71 71 +14 18 20 24 28 +30 34 36 40 43 45 50 +22 26 27 29 31 32 38 40 +59 63 66 67 70 73 79 76 +40 44 47 49 50 55 58 58 +46 50 51 53 58 62 +34 38 40 43 48 55 +53 59 61 64 67 70 +47 52 53 55 56 54 +31 37 39 41 43 45 45 +21 27 29 31 33 37 +18 24 26 28 30 33 36 41 +29 36 37 38 36 38 +2 9 7 9 12 14 15 12 +72 77 76 77 80 82 85 85 +42 48 50 48 50 53 57 +75 81 83 81 84 87 90 97 +17 22 24 27 27 30 33 34 +42 48 48 51 54 52 +82 87 89 89 91 92 93 93 +36 42 44 45 48 50 50 54 +51 58 60 62 62 63 68 +15 20 23 24 26 30 33 +18 25 27 31 30 +68 73 77 78 81 81 +6 12 13 17 21 +8 15 19 21 23 26 31 +8 15 17 22 24 27 +19 25 32 35 37 38 40 39 +55 60 61 63 70 71 71 +43 50 57 60 61 63 67 +12 17 19 25 26 28 34 +96 94 93 92 91 90 87 90 +75 74 71 70 69 66 63 63 +72 69 68 67 66 62 +77 74 72 69 67 66 65 58 +43 42 40 37 40 38 37 36 +99 96 97 96 95 93 92 93 +89 86 85 86 83 81 81 +48 46 43 42 41 42 40 36 +69 66 64 61 64 62 61 55 +98 95 93 90 90 87 84 81 +30 27 24 24 23 25 +33 30 28 28 28 +58 57 54 54 52 48 +71 69 68 68 65 62 57 +36 33 32 31 27 24 +94 91 87 86 84 81 78 79 +35 34 31 28 27 24 20 20 +77 76 75 71 69 65 +53 52 48 45 44 41 39 33 +99 98 96 95 88 85 83 80 +79 76 69 66 64 61 62 +58 57 55 49 48 48 +40 39 33 32 30 27 23 +93 90 89 88 87 81 74 +37 39 36 35 32 29 28 +96 99 96 94 96 +47 48 47 45 42 39 39 +33 35 34 32 28 +17 19 16 14 7 +82 83 81 78 79 78 75 72 +25 27 26 25 28 26 29 +23 26 29 28 25 25 +85 88 91 89 88 86 85 81 +81 83 82 79 82 79 77 72 +44 47 47 45 43 +80 83 82 82 85 +38 40 39 38 37 37 35 35 +86 88 85 83 83 82 78 +27 29 28 28 22 +49 51 49 45 42 +37 39 37 33 30 27 30 +63 65 62 58 58 +43 45 42 40 39 36 32 28 +33 34 32 29 25 23 17 +33 35 33 31 28 22 19 +39 41 38 31 30 28 29 +15 16 15 8 7 6 6 +24 26 25 20 16 +92 93 90 88 82 76 +54 54 51 49 46 44 42 40 +37 37 36 35 37 +44 44 43 42 41 41 +32 32 31 30 27 24 20 +34 34 32 29 23 +94 94 97 94 92 90 +43 43 40 42 40 37 40 +36 36 38 36 35 32 32 +66 66 63 66 65 63 59 +6 6 3 6 1 +48 48 45 44 44 42 41 40 +43 43 42 42 39 42 +52 52 49 47 44 44 44 +31 31 28 28 26 22 +47 47 45 45 38 +79 79 75 72 71 69 +43 43 42 39 37 34 30 33 +21 21 17 14 14 +69 69 66 62 60 57 56 52 +42 42 38 35 32 25 +94 94 91 86 84 +25 25 23 20 14 11 8 11 +27 27 21 20 18 16 16 +80 80 79 73 72 71 67 +38 38 35 32 25 19 +48 44 43 40 38 37 36 34 +17 13 11 9 6 5 8 +59 55 52 49 47 46 46 +92 88 87 84 82 79 76 72 +74 70 69 66 63 60 57 51 +90 86 85 88 87 +82 78 75 76 75 76 +72 68 71 69 66 65 65 +79 75 74 72 70 68 70 66 +55 51 52 49 42 +34 30 30 29 28 25 24 +72 68 67 64 64 67 +77 73 72 72 70 70 +85 81 80 77 77 76 72 +45 41 39 38 35 35 33 27 +31 27 25 23 20 16 15 +69 65 61 59 58 60 +54 50 49 45 43 43 +64 60 59 57 53 51 49 45 +31 27 26 22 17 +78 74 67 64 62 61 60 +43 39 37 32 35 +81 77 71 70 67 64 62 62 +71 67 65 64 63 58 56 52 +52 48 47 45 42 39 32 27 +97 90 88 86 84 81 78 77 +15 10 9 7 6 9 +43 37 35 33 32 32 +89 84 81 78 76 75 71 +35 28 25 22 19 16 14 7 +66 59 56 57 55 52 51 49 +79 74 72 73 76 +83 78 80 77 74 72 72 +62 55 53 55 51 +95 89 87 89 86 79 +31 24 23 22 20 18 18 16 +94 89 87 87 85 82 79 80 +35 29 29 28 28 +45 39 39 36 35 31 +30 23 23 21 19 16 11 +73 68 64 63 62 59 58 55 +57 50 46 45 42 45 +28 22 21 19 15 12 10 10 +61 56 53 49 45 +57 52 50 47 46 44 40 35 +64 57 54 48 47 44 43 +27 21 18 11 10 9 10 +51 45 42 39 36 29 26 26 +95 88 85 79 75 +41 34 33 27 22 +79 80 83 84 86 92 90 +46 39 36 33 29 25 +54 50 49 46 45 44 47 +94 89 88 82 82 +16 19 22 25 27 31 32 34 +92 89 90 96 96 +83 83 82 79 76 69 68 +80 77 79 80 80 87 +41 44 45 48 49 56 60 +28 28 27 23 19 +87 88 90 93 94 98 99 97 +6 10 7 10 8 +13 13 18 20 24 +57 57 57 58 62 +75 77 79 82 79 80 83 +62 59 63 65 68 69 72 +89 85 84 81 79 77 74 72 +49 50 49 46 42 40 38 34 +31 28 30 36 38 +38 34 34 31 29 23 +95 96 99 97 96 95 94 96 +98 94 91 88 87 86 85 85 +69 69 66 64 62 61 54 +47 47 49 50 51 51 51 +31 27 25 28 27 26 22 +73 76 79 81 85 +12 15 15 13 11 4 +57 64 65 67 72 75 77 +31 29 26 25 26 +66 73 79 81 79 +59 62 62 59 56 56 +78 74 73 73 70 67 64 +23 23 23 20 19 17 11 +68 68 66 64 62 65 63 64 +63 59 62 60 57 54 54 +31 37 35 37 38 38 +44 45 42 41 39 41 +22 22 25 26 28 +49 51 44 43 41 38 37 40 +19 18 21 21 25 +89 83 79 77 74 76 +98 97 96 94 91 88 83 +89 88 85 82 79 76 76 71 +71 68 67 65 61 60 58 +32 36 37 44 45 47 49 55 +14 12 10 12 12 +19 17 18 20 21 21 19 +15 12 17 18 21 23 30 +86 87 86 81 80 +65 65 64 62 64 62 60 56 +4 6 5 8 8 +70 67 63 60 60 +41 42 42 45 49 +45 47 54 55 58 58 +81 85 87 88 89 93 +83 84 83 80 79 78 71 65 +63 60 59 61 57 +57 57 54 53 51 51 48 +4 3 5 6 7 7 +70 70 68 69 68 +57 51 48 43 41 +74 78 81 83 86 85 +56 60 61 62 65 68 +10 11 11 14 15 15 +86 90 91 92 93 94 99 98 +43 47 50 51 54 61 +36 29 27 26 23 22 19 13 +56 57 54 51 51 49 46 44 +46 40 37 34 34 28 +56 61 64 65 64 65 66 68 +13 11 8 5 1 +79 79 77 77 76 73 72 72 +37 35 34 31 31 31 +61 57 53 51 48 47 +26 22 21 19 17 12 +37 33 31 28 25 23 19 +25 31 34 37 38 37 38 42 +16 23 26 27 30 33 37 37 +65 60 57 51 48 46 42 +3 2 5 2 6 +56 56 57 59 61 64 70 +78 78 76 73 70 69 63 63 +88 89 86 82 82 +29 31 29 29 25 +70 66 64 62 56 55 53 +35 34 35 36 38 36 +2 6 7 8 11 14 16 16 +50 48 49 51 52 57 58 62 +49 49 52 56 58 62 +71 66 63 61 57 +89 91 92 95 95 94 +25 30 33 36 43 +82 84 85 86 87 89 91 97 +42 42 40 39 32 28 +63 67 70 72 76 78 79 81 +66 66 67 69 70 74 +47 40 38 38 37 36 34 34 +14 14 13 14 16 17 17 +68 68 66 63 61 60 57 57 +51 52 56 59 61 68 +40 42 40 39 36 35 34 30 +28 25 18 15 13 9 +81 85 83 84 88 +27 23 19 18 17 15 11 +40 41 42 48 49 +61 61 62 61 58 55 55 +33 34 33 36 29 +29 27 26 20 18 16 +28 23 20 18 15 12 10 8 +5 5 8 9 10 10 12 17 +51 56 56 58 61 67 +17 21 23 24 24 26 29 26 +12 18 20 21 23 25 25 +16 16 17 20 22 23 27 28 +20 18 15 14 14 10 +40 34 33 31 30 33 31 29 +39 38 41 44 46 44 50 +15 15 19 22 23 30 +57 61 58 60 62 69 +72 79 82 85 82 +58 56 54 52 49 47 49 47 +8 10 15 16 21 +76 75 78 82 83 80 +93 95 94 91 84 80 +87 85 86 88 91 94 95 99 +88 88 86 84 83 79 +74 75 78 79 82 82 +58 59 61 65 67 69 69 +57 64 66 69 73 +81 77 72 71 68 62 +73 73 68 67 66 65 63 58 +56 56 53 52 48 50 +56 55 53 50 45 43 42 42 +26 24 20 19 17 12 +62 62 63 64 62 64 62 +47 42 38 37 34 32 26 +55 59 62 63 61 63 64 +81 78 77 73 70 71 +46 46 48 49 46 49 55 +73 70 70 69 72 +62 62 63 62 61 56 +74 78 81 78 81 81 +90 86 84 83 82 78 78 +2 9 12 14 14 15 13 +95 91 88 88 89 +45 45 43 41 39 33 31 33 +43 42 43 45 42 44 45 45 +20 24 27 33 37 +85 81 80 78 78 74 +7 10 8 10 9 +39 41 42 40 37 37 +76 73 72 66 68 +34 40 41 44 49 53 +92 90 93 97 97 +61 68 70 72 69 72 74 72 +37 33 31 30 29 24 20 +24 20 16 14 11 10 9 4 +72 76 78 84 85 86 86 +21 24 23 20 17 16 18 14 +26 28 25 23 20 20 +4 4 7 8 12 14 12 +92 91 88 86 85 83 80 +95 93 91 90 89 +83 84 86 89 92 95 +61 62 65 67 70 +91 88 85 84 81 +6 7 9 10 13 +81 82 85 88 91 93 95 +74 73 70 67 66 64 +55 57 59 62 65 +12 10 9 6 4 2 +48 46 44 41 40 39 +98 95 94 92 89 +38 39 40 41 42 44 45 +19 22 23 25 28 30 32 34 +56 59 61 63 65 66 67 +21 23 24 26 27 30 +9 11 14 15 18 +3 6 8 10 11 +24 23 20 18 17 15 13 +17 15 14 11 10 7 4 2 +49 48 45 42 40 37 34 33 +49 50 51 53 55 +18 16 13 11 8 7 4 +75 73 70 68 67 64 61 58 +17 14 12 10 9 7 +8 10 12 13 15 18 20 21 +77 76 75 73 71 70 69 +67 66 63 62 59 58 +17 18 20 22 24 +67 65 63 60 59 +2 4 7 9 10 11 14 +39 37 35 32 30 +31 33 35 36 37 39 +83 82 79 78 75 72 71 69 +46 45 42 40 39 38 36 33 +36 38 39 40 41 +40 42 45 47 49 +46 45 43 42 40 38 36 34 +37 35 32 31 30 28 +34 33 32 30 28 26 23 +66 69 71 72 73 75 78 +63 60 57 55 54 52 51 +59 61 63 64 66 +20 17 16 14 11 8 +99 97 94 91 89 87 84 82 +92 90 87 86 84 81 79 76 +53 51 48 47 44 41 39 36 +88 90 91 94 96 97 +14 11 9 8 5 +4 5 6 7 9 12 15 +89 87 85 83 82 79 77 76 +2 5 8 9 10 11 14 17 +10 12 14 16 18 21 +51 54 57 60 62 64 66 68 +46 48 49 50 53 +5 7 8 11 14 16 17 20 +73 71 70 69 67 64 61 58 +94 91 89 86 84 83 80 +87 90 91 92 95 96 97 +25 23 20 17 15 13 +70 71 73 76 79 81 83 +72 70 69 66 65 62 60 +97 95 92 91 89 87 +59 58 57 56 54 +61 60 57 55 52 51 +93 90 87 84 83 +8 11 14 15 18 20 +25 26 29 32 35 +14 15 16 19 20 22 23 24 +77 75 73 72 71 +79 82 83 86 87 89 91 94 +40 39 36 34 31 28 26 +85 87 90 91 94 95 +53 50 49 46 45 43 40 37 +72 74 77 80 81 84 86 +68 65 63 61 58 56 54 +17 16 14 13 10 +82 81 79 76 75 72 71 68 +2 3 6 8 11 12 13 +56 53 50 48 47 +63 65 67 69 71 74 77 +38 40 41 44 47 +89 86 84 81 80 77 76 +65 62 61 59 58 +53 55 56 58 61 63 65 +69 71 74 75 77 79 82 +78 76 73 72 71 69 68 67 +71 74 77 78 81 82 84 87 +14 12 9 8 5 3 +84 81 79 76 74 73 71 70 +58 57 55 53 51 49 47 +59 62 64 65 67 69 +17 14 12 10 8 5 4 +46 43 41 39 36 33 32 +66 65 62 60 57 +14 13 11 10 9 7 +3 5 6 9 12 13 16 +38 39 41 42 43 45 47 48 +19 22 23 25 27 30 +41 38 36 35 33 32 29 26 +34 36 37 39 42 +40 37 34 33 32 +26 23 21 20 18 16 +75 76 77 79 82 +75 77 78 79 80 83 +67 70 72 73 74 77 80 82 +50 48 45 42 39 +69 68 67 65 64 63 61 +15 14 12 10 7 +42 40 37 36 33 +27 24 22 21 19 17 14 +57 59 62 64 67 70 +14 17 20 22 24 25 26 +32 29 27 24 23 21 18 15 +65 67 70 71 74 +1 4 5 8 11 +79 80 81 84 87 90 92 94 +11 10 9 7 5 3 2 +41 40 37 36 35 32 29 28 +61 63 66 68 69 72 74 +42 41 40 39 38 36 33 30 +36 35 33 32 31 30 28 +12 13 15 18 21 23 +62 61 58 55 53 52 +78 76 73 71 68 66 +22 24 26 28 31 33 +31 29 26 24 21 19 +7 10 12 13 15 17 +8 9 11 13 15 16 +62 61 60 58 56 +11 9 6 4 1 +72 74 76 77 78 81 83 +53 55 56 58 60 63 65 67 +42 44 46 48 49 52 +22 21 19 18 15 13 11 9 +42 45 46 48 51 52 +49 48 47 46 45 43 +11 9 7 4 3 +86 85 84 81 79 77 74 +22 24 25 28 29 32 35 36 +46 47 49 51 52 53 +20 21 24 25 26 28 +48 50 51 54 55 58 +42 41 39 38 37 +60 59 56 53 50 47 46 44 +25 22 20 19 17 16 13 +14 13 11 10 9 7 5 4 +79 76 75 72 71 70 68 +67 64 62 59 57 55 53 50 +28 25 24 23 21 19 +4 7 10 11 12 13 16 +27 24 22 20 19 +37 36 33 32 30 27 +3 5 8 11 14 15 +22 23 25 26 29 32 35 38 +63 65 66 68 69 71 +86 87 88 89 90 93 94 97 +65 63 60 57 56 +48 46 44 42 39 +98 96 94 91 90 87 86 85 +6 9 10 11 13 +88 91 92 94 96 98 +74 77 78 79 81 84 +96 95 93 91 90 87 +33 34 35 37 39 +12 9 7 6 4 +19 21 22 23 26 28 +13 16 17 19 20 21 23 +56 58 59 61 63 66 68 69 +72 70 69 67 64 63 62 59 +63 66 69 71 72 +41 38 37 36 34 31 +76 79 82 83 84 87 89 91 +5 6 8 10 12 15 16 +72 74 77 80 83 84 87 90 +88 85 83 80 78 75 74 73 +46 44 41 39 37 36 33 30 +69 71 74 76 79 82 +89 90 93 95 98 +58 55 54 51 49 48 45 +44 41 38 37 36 35 34 +34 36 37 40 42 +66 68 70 73 75 78 +59 61 62 63 66 67 69 72 +22 21 18 16 14 13 11 9 +15 14 13 12 9 +41 39 38 36 33 30 29 26 +14 15 18 20 22 +32 31 28 26 23 21 +22 24 25 26 28 29 32 +73 76 79 81 84 86 89 90 +13 15 18 20 23 25 27 28 +5 6 8 10 12 13 +17 18 21 24 27 +91 89 87 85 83 81 80 +30 29 26 23 21 19 +34 37 40 43 44 45 48 +38 39 41 42 44 46 49 50 +29 32 33 34 37 39 41 +75 77 80 81 84 87 90 93 +74 73 70 67 66 +10 11 14 16 18 19 21 +30 29 27 25 24 21 +65 68 71 72 73 76 79 +78 75 73 72 70 67 64 +99 98 96 93 91 +71 69 68 67 66 64 62 61 +18 20 22 25 26 27 29 +64 67 69 71 72 75 78 +88 87 84 81 78 76 73 +25 23 22 21 18 +89 86 84 83 82 80 78 +79 76 75 72 70 67 66 63 +67 69 71 74 76 77 +66 63 60 59 56 55 +73 72 69 66 63 61 60 +20 23 24 27 29 30 +96 95 93 92 91 +65 63 62 61 58 +75 76 77 80 83 +31 28 25 22 20 18 15 14 +20 23 26 29 31 34 36 +89 90 91 92 95 96 97 +74 72 69 66 64 63 61 +39 41 44 46 49 +38 36 33 30 27 24 23 20 +78 79 81 82 84 87 +3 4 7 10 12 14 +12 9 8 6 4 3 +95 93 92 91 90 88 87 +44 45 46 47 48 +80 81 82 85 88 +47 44 41 38 37 +55 57 59 61 62 65 66 +52 54 56 57 60 +83 82 80 78 75 +72 70 67 66 63 61 60 58 +43 44 46 47 50 53 54 +15 14 11 9 8 7 +85 83 81 80 78 +19 17 14 12 10 8 5 4 +22 23 25 27 29 31 33 +43 45 47 49 52 54 57 58 +57 56 54 51 50 47 +89 88 86 84 81 80 77 +54 55 57 58 59 61 64 +32 29 28 26 23 21 18 +38 36 35 34 33 +36 38 40 42 44 47 +22 21 20 19 17 16 14 11 +52 54 55 57 60 63 64 +13 15 18 19 21 23 25 +19 21 24 27 28 31 +14 17 20 22 25 +63 61 58 57 54 52 +22 20 18 15 14 13 10 7 +34 36 37 40 41 +15 14 13 11 8 6 5 2 +36 39 40 42 44 45 47 +35 37 40 42 43 44 45 +19 18 16 14 11 9 +38 41 42 44 45 46 +84 85 88 90 93 95 97 +53 52 51 48 45 +37 35 33 32 31 30 27 25 +17 19 20 22 25 28 +9 10 12 14 15 +25 26 29 31 34 36 37 40 +19 20 23 24 26 +48 51 53 56 57 59 60 +74 71 68 66 63 62 59 57 +17 15 12 10 8 6 4 +36 33 30 27 25 22 21 20 +71 72 75 78 80 +67 69 72 73 74 75 77 +67 70 71 74 76 +89 92 94 95 97 +61 59 56 54 52 51 48 +15 17 20 22 25 +26 29 32 34 35 37 40 +22 24 25 28 29 32 +26 25 22 19 16 15 12 +13 16 17 20 22 23 +85 82 79 77 76 75 72 +9 11 13 16 18 20 23 +56 55 54 51 48 +5 8 11 14 15 16 +54 51 48 47 46 45 +60 62 65 68 69 70 73 +22 19 17 15 13 +97 95 94 92 90 87 85 83 +22 19 16 13 12 9 +63 66 67 70 73 75 +94 92 91 88 86 84 83 81 +42 43 45 48 50 53 56 58 +42 44 47 50 53 +15 14 13 12 10 +63 60 58 56 54 51 49 48 +54 52 50 47 44 41 +18 21 23 26 28 30 32 +38 37 35 34 31 28 26 23 +81 79 76 75 73 72 71 68 +46 44 41 38 37 +91 90 87 85 83 +12 14 15 18 20 +54 56 57 60 63 65 +57 56 55 52 51 50 +40 37 35 32 30 28 +61 63 64 65 68 +2 3 4 5 6 9 12 +49 50 51 52 54 +69 71 74 75 76 77 +74 75 77 79 82 85 +17 15 12 11 9 +32 31 28 25 22 21 +27 28 31 34 37 +11 13 16 17 20 22 23 26 +80 79 77 75 74 71 +15 12 11 10 7 6 +87 84 83 81 79 +34 37 38 40 43 45 47 +45 48 49 52 55 57 +54 51 50 49 46 44 43 +37 40 41 44 47 49 50 +16 13 12 10 8 6 3 +84 86 87 90 93 96 99 +59 57 54 53 52 49 48 +60 57 55 54 51 50 48 +29 30 31 33 34 36 +66 67 70 71 74 76 79 81 +84 86 88 91 94 96 +47 44 43 40 39 +80 79 77 75 73 72 71 68 +17 15 13 12 9 +81 79 76 74 71 70 67 +22 20 19 17 15 +56 58 60 62 63 66 67 +26 28 29 31 32 33 34 +48 45 43 42 41 38 37 +41 44 47 50 53 56 +71 70 68 66 63 +50 49 47 44 43 41 39 +16 13 10 8 7 6 5 3 +40 37 34 31 28 26 25 22 +79 82 84 86 87 90 92 95 +90 87 86 85 82 79 78 75 +48 50 51 54 56 +62 59 56 53 52 +52 55 57 60 61 +39 42 45 48 50 52 +68 67 65 64 63 60 +8 10 13 14 17 20 21 23 +23 24 25 27 28 30 33 34 +80 79 77 74 72 70 67 65 +3 4 7 9 12 13 15 16 +65 67 70 72 75 +64 63 60 57 55 52 +82 79 78 76 73 70 67 64 +91 89 86 83 80 79 78 76 +18 15 13 11 8 6 5 3 +71 69 68 67 65 62 59 +58 60 62 64 66 69 +53 52 49 46 44 41 40 37 +52 53 54 57 58 61 64 67 +5 7 9 12 14 16 19 +62 64 65 68 71 73 74 75 +32 34 36 38 40 +39 40 42 45 48 49 52 55 +10 12 15 18 20 21 22 +44 41 40 38 35 32 29 +74 75 76 77 79 +14 13 11 9 8 7 +16 18 19 20 21 24 +19 16 13 10 7 6 +54 57 58 59 62 63 64 +12 15 16 19 21 23 26 28 +61 58 57 55 54 +24 21 19 18 16 +54 51 50 49 46 +33 36 39 41 44 +32 33 36 38 41 44 47 +44 47 49 51 52 +20 22 25 28 29 31 34 +46 43 40 39 36 34 33 32 +4 7 9 12 15 +18 16 14 12 9 8 6 +17 14 11 8 5 +51 50 49 48 45 +51 50 48 47 45 44 43 +48 46 43 42 41 +70 71 74 76 77 78 +42 41 38 37 36 34 +43 42 39 37 35 32 30 27 +73 70 68 67 65 64 61 60 +85 86 89 91 92 94 +53 56 58 59 60 61 63 66 +83 84 86 88 91 92 +91 90 89 86 85 84 83 +4 6 9 12 14 15 18 +89 88 85 82 79 77 +31 29 26 25 24 +28 30 33 35 36 37 39 40 +66 65 64 62 59 +25 23 21 19 18 17 +93 92 91 89 88 86 84 81 +19 20 22 24 27 28 31 34 +24 25 27 28 30 +7 10 11 14 17 18 20 +26 27 30 32 35 +72 69 66 65 62 59 57 +96 94 93 92 90 +11 13 16 19 20 23 24 26 +50 49 47 44 43 42 40 39 +31 29 27 24 21 20 19 18 +53 55 58 61 63 66 68 +57 60 63 65 67 +73 74 75 77 78 80 +21 20 17 14 11 9 7 +56 58 61 64 65 66 67 +77 75 72 69 67 65 64 +53 55 57 58 61 +30 27 25 23 20 17 +45 44 42 40 37 36 33 +34 31 28 26 23 21 20 17 +45 46 48 50 52 +51 52 53 54 55 58 +39 36 35 33 31 +56 59 61 64 66 69 71 72 +94 92 89 88 85 83 +4 7 10 12 15 17 18 21 +74 76 79 82 83 84 +71 69 66 63 61 60 57 +82 85 86 88 90 92 94 96 +69 71 73 74 75 +35 38 40 41 44 46 49 +78 80 81 82 84 85 87 88 +29 32 34 35 38 +26 24 21 19 17 16 13 11 +39 41 43 45 48 +58 60 61 62 63 64 67 68 +61 64 66 67 70 73 +85 84 83 81 80 +66 63 62 61 59 57 55 +38 41 42 43 46 49 +47 44 41 40 38 35 32 30 +41 39 38 37 36 +85 88 91 93 95 +7 10 11 13 16 19 22 +51 50 48 47 44 43 40 +47 46 43 41 39 38 36 +93 92 91 89 87 85 83 82 +83 80 79 77 74 73 70 +46 44 41 39 37 36 33 32 +29 32 33 35 38 +21 18 16 15 12 9 8 +25 27 29 31 33 +51 53 56 58 59 62 64 +57 58 61 63 65 67 +49 48 47 45 44 41 +42 44 47 48 49 +69 68 66 63 61 60 +27 24 22 21 20 +81 78 77 74 71 70 67 64 +41 44 46 49 50 +13 11 9 6 5 3 +53 52 50 48 47 44 43 42 +48 45 42 41 38 36 34 +62 59 58 57 56 55 +51 50 47 44 42 39 36 +3 4 7 10 13 16 +16 19 20 22 25 +93 91 90 87 85 +87 86 83 80 77 +84 82 80 79 78 76 75 73 +25 27 28 29 31 32 35 38 +82 81 78 75 74 72 70 +84 85 86 89 90 +80 81 82 85 87 89 +1 2 5 8 10 +74 76 78 81 82 83 84 86 +52 54 55 56 57 58 +17 20 22 24 26 28 30 31 +73 72 69 68 65 62 +65 62 60 59 56 55 +54 52 50 48 46 +44 43 42 40 39 +67 68 70 73 74 77 79 81 +91 90 88 86 83 82 81 80 +36 38 39 40 43 45 47 49 +29 28 25 24 23 20 +39 40 43 46 47 49 +83 81 79 76 74 73 +45 43 42 41 40 37 +38 41 42 44 45 47 48 +34 35 38 41 42 43 44 45 +62 59 56 55 52 49 48 +11 13 16 17 20 21 +49 46 45 43 41 40 38 +54 52 51 49 46 44 +96 94 92 89 88 86 84 +41 38 36 33 31 28 25 +21 22 25 26 29 30 31 +27 28 29 32 35 37 39 41 +55 58 60 63 66 68 69 71 +18 15 14 12 11 10 +77 75 74 71 70 +23 25 28 30 31 32 +14 15 17 20 23 25 28 +46 48 50 51 53 55 +72 71 70 69 68 +60 57 56 54 53 51 +93 92 89 86 83 +66 63 62 61 60 59 58 +28 31 34 37 38 +78 79 82 84 85 88 90 92 +60 62 65 67 70 71 +57 60 62 65 67 70 72 +5 8 11 14 15 +63 65 67 69 71 74 75 77 +79 77 74 72 70 +55 58 60 62 65 +28 30 32 34 37 +19 21 24 25 27 +67 65 62 59 58 56 +94 93 91 89 86 83 81 79 +42 41 40 39 37 +16 19 21 23 26 +67 64 62 59 56 +66 64 61 59 56 54 53 51 +62 63 64 67 68 +87 84 81 79 76 74 71 68 +7 8 11 14 15 +37 39 42 43 45 +21 24 26 28 31 33 36 39 +48 50 53 56 59 61 64 65 +63 64 65 66 69 70 +58 60 63 64 65 +5 6 7 10 11 14 17 19 +51 48 47 46 44 +25 28 30 32 35 37 39 +32 31 28 26 25 +91 89 88 85 83 +91 90 87 85 84 83 +39 38 35 34 31 29 +50 51 53 54 56 +59 60 63 65 66 +25 27 28 30 31 +57 54 53 51 50 +50 53 56 57 60 62 65 68 +63 61 60 58 55 52 50 +60 62 64 65 66 68 69 +43 45 48 49 51 52 55 +65 66 68 71 74 77 +24 25 26 28 29 30 32 35 +89 90 92 95 97 +83 84 86 88 89 92 94 +31 32 34 35 37 40 42 43 +73 76 78 79 81 +63 64 67 68 70 73 75 78 +86 84 81 78 77 75 +43 42 40 38 35 +62 64 65 68 71 +68 70 72 75 78 80 83 +77 80 82 85 88 90 91 94 +11 9 8 7 6 +79 80 83 84 87 +44 45 46 47 50 52 55 56 +32 34 35 37 38 40 43 +57 54 51 49 46 45 44 42 +41 39 38 37 34 31 29 26 +81 82 83 85 88 90 91 93 +62 64 66 69 72 73 76 +27 28 30 31 32 33 34 36 +25 27 30 31 33 36 +99 96 93 92 90 +34 33 30 27 25 23 22 21 +27 24 23 20 18 15 13 +91 90 88 87 84 +62 59 56 55 52 49 47 +19 17 16 15 14 13 +95 92 90 87 84 82 79 76 +12 11 9 8 6 3 +15 18 20 22 25 26 27 29 +51 49 47 46 43 40 +62 65 67 68 71 +67 68 71 74 77 79 82 84 +47 45 42 39 37 35 32 31 +51 48 47 46 44 42 41 39 +45 46 49 50 51 52 +86 89 90 92 93 +66 67 68 71 72 75 \ No newline at end of file diff --git a/inputs/day3 b/inputs/day3 new file mode 100644 index 0000000..5435b39 --- /dev/null +++ b/inputs/day3 @@ -0,0 +1,6 @@ +-select()&how()''from()}what()mul(667,142);*when()*/%%+ &mul(139,116),,)mul(665,813)$>-+from()where(),from()mul(589,293))mul(832,177)mul(701,929)~([mul(300,986)from()mul(238,716)/~*~'what()when():}mul(437,789)mul(662,564)*)^,;%<}#'mul(567,346)don't()from()-who(),^/mul(939,542)mul(944,786)^}select()(mul(508,210)}mul(873,534)}select()where()-,*+)#@mul(925,280)where()*who()why()who()?%:mul(858,972)+mul(113,350)' *who()+from(641,444))&]*don't();from()+,@[mul(522,403)mul(627,14)why()where()+/#^!what()^mul(678,234) mul(79,303)from()from()^'who()@;/~[mul(752,220);-don't()((select()select(){mul(454,158) *]#mul(387,262)how()where()when()[from(118,182)mul(662,176)%]')from()where()mul(259,178)--)~>$who()do()where()&&]~@{)%]mul(566,269);select()%}%+ mul(21,147),#&)*'why()#+don't()-,:{/%what()$*mul(883,511)select(264,142)select()how()]/?&&mul(205,770)select()%from()what()&$select()who())mul(538,114)/mul(9,272)from()?(why(727,269)when()don't()>+/ when(),)mul(750,773)*['do()]mul(316,235)+{{mul(744,197)*#who()*}how()how()why())mul(932,794)*where())+<-/ mul(371,760)why() who()(select()@mul(595,45)who()%how()'when()>how(){why()[mul(123,779)!@where()(mul(988,620)~'*,?/#when()mul(612,810)mul(720,939)]/(,^&how()%^]mul(391,308);&@-mul(525,708)+what(352,33)when()from()why()} ~mul(79,405)@*where()! mul(865,388) ?[$what()mul(747,941)#[}from() ((mul(418,822)mul(90,638)select()(#;;<[+@mul(657,611)]}@)mul(30,874)@mul(525,145))who() where()+:~+]mul(176,137)what()] mul(381,84)):how()mul(315,467)%($'(*]:%mul(792,258)]>'mul(534+[#>&)+why()mul(881,357):^*?what()who(514,882)where())}-mul(88,883[;^-#mul(208,713)}?;]!%mul(651,918);{),:what()*mul(528,154)):@*]; &%[mul(542,543)mul(480,848)why()mul(843,903)[select())-*@ ;who()mul(77,706)<[;}mul(303,968));why()mul(916,126)&&%/&mul(462,652)[!~()what()from()from()select()how()mul(730,810/,when(286,584)don't()^select()mul(609,219)(-~&who():mul(135,454)from()-%~]#mul(909,564)when()&why(){/~+?who()[do()mul(852,307)-[?;)how()do()[[*->{!#^mul(678,864)>when()%>!']$mul(16,905),!mul(111,596)why()$mul(2,397)/-@}~;where(942,895)do()who()where()<}when()?mul(846,421),?(where()why(),how()(&mul(643,890)%~*[;% $what()don't()^$&(##mul(112,802)where()^ &(&&{&do()+(!(mul(732,198)[}!'>^%mul(919,810)mul(342,316))}what()&~:~$mul(822,157)-,{select()who()mul(907,36>where()/$!^<&$where()mul(10,661)-who()mul(496,782)@%%?'{[;(mul(110,115)~mul(447,69)*[what()[{]>-'@mul(197,810)select()what()who()mul(492,647)where()*[{ [~&what()$mul(24%<>mul(234,703) +)$~where()when()@when(),mul(939,238){from()(#!>-mul(44,294)what()where(244,294)*when()&&what()who()what()mul(173,998)+mul(915,924)mul(126{'*mul(849,404)#select()mul(480,290)('%what()}),%'mul(525,37) /;mul(371,488{<$,what()mul(652,384)+/+']:^;;what()mul(463,163)[$mul(692,303)@(&'+'how()mul(574,785)select()?why():>when(579,794)>mul(385,563)>-%where():(^)mul(349,597)select()- '(why())mul(325,80)mul(83]}[[^*how() why() don't()mul(807,644)-who()$mul(716,166);select()mul(626,79)/don't()!( why()mul(496,577)~how()':!what()'@,mul(44what()where()how()?who()mul(115,627)^&'from()% mul(28,698)+why()mul(7,895)'mul(150#$[{]:mul(370,234)}why()# &{)mul(902,182))}*+^where():why()mul(263,783)who()]#;(-!why()$mul(635,217from()from();%+:$;^)mul(505,91)}''%${mul(467,336)}]]mul(323,115)^^why()why()%?>$>!mul(314,474)when()!'},%*select(),when()do()]':mul(748,29)why()select()'&^}~&from(),mul(55,11)[*/&who()&&mul(478,127)]-when()mul(64,831)what()/;[[mul(822,263)mul(833,138)>,$;how(843,918)>#mul(180,9)&what(136,915):;mul(883,785)mul(544,853)%mul(547,842)?select()^~:((mul(475,655)'^+[mul(70,929)when()from()+from()}[why()?'why()mul(88,259)from()[:who()<mul(140,477)>&$where(602,252)-;;% {mul/@ ${select() !mul(167,943)what()[)mul(753,926)}$+#$mul(167,13)mul(456,116)mul(109,352)>]select()/' when()!mul(820,444),, (*mul(227,538)@:%{mul(168,817)from()/where():$ />who(795,19)-mul(799,466)~;(;from()-$)){mul(356,431)!from()*$what()mul(175,543)*mul(340,188)when():where()mul(613,955)from()~do()where(){mul(733,695) @mul(96,566)how()^what()how()'$what()]mul(303,135)]//who()(who()+mul){;^,mul(515,424) ]/%select()]mul(283,274)'>;*~from(){{from()?mul(869,316) +';[why()mul(719,314)-mul(38,357):]how()*/how()select()mul(78,942);$+#from()mul(265,330)from()from()& +-@-,mul(148,251)where()})why()/mul(159,418)%<},-?!^!~mul(632,32),don't()what()what()]>when()-#when()]mul(518,898)mul(64,74)mul(624,359){-*}mul(435,903)how()select()%where(36,5)(mul(750,885)*where()mul(15,112)?:%select()@<[mul(913,903));[from()#&*mul(511,123)+%when()&^'#mul(495,296,;what()mul(56,831) #[>/*(>+^mul(806,137)))/@*@}mul(395,547)'select(){what()why()*where():!don't()~!mul(112,799)(%from()*who(172,318)mul,)!&mul(590,625)$mul(516,115)how()[*!>mul(914,404)~when()](what()*mul(400,936)how()*^^{<{%?mul(999,987)!})#]mul(959,690)@{'}:{when()when()mul(570,284);~mul(97,397)@;#mul(132,335)?~#mul(42,819))mul(655,746){#^%who(101,15)&#!mul(291,803),#+?&mul(816,961);}mul(122,643)?~*#what()@;what()mul(711,201)why()(~]?&mul(529,206)from()where()%@from() /]mul(444,963)@who()from()/:[(-mul(346,877))/when()&mul(177,443)$![%;@don't()][mul(677,276)*mul(353,913)select()from()*mul(695,847)/mul(20,815()who())})mul(438,161)select():why()who()*]^]mul(321,822)*^from()/where()-?{mul(718,349)mul(355,582)<;mul(830,962)mul(312,508))from()where()who())&why()>]do()mul(224,71)@(how()why()select(688,447)mul(89,792)#mul(154,938)select()do() who()}$!!&mul(172,622))$what(){>mul(623,570)&%-where():&*}mul(31,554)<(#where()*from():{@!mul(987,776))*'/mul+?(mul(701,61)~];}><{&mul(563,85):^^how()(mul(868,860)~,what()@{do()'why()mul(819,142)<$how()&mul(299,411)?mul(954,291){'-where()>mul(985 ~^why()?mul(131,20)*/ >from()',++>mul(415,335)?[-mul(798,190)^who()>;[mul(611,479)mul(658,622~,who()/&#:{who()}?mul(291,148)+where()}@who(51,417)what()why())why()?:{*[!;mul(627,512):[;<':*mulwhy()((@)$$ ':don't()what(511,960)mul(159,248); mul(588,419)-#%(mul(331,93}from()>mul(560,438)}from()mul(729,489)}*<@what()mul(456,993)]+-('@mul(164,410)@%+mul(283,493)<*;/ :when()((mul(266,486)[when(),?+mul(249,165)}don't()+why()where()'~mul(472,202),select(554,790)mul(387,509)~&!mul(514,914)who()from()when()mul(673,224)@where()/++)+{ +mul(480,948)$/when()don't()&,mul(584,391) @+mul(180,685)who()select()'-!!$~mul+?mul(249,664)why()select() mul(627,626)'$who()how()~mul%)@+;[{mul(237,229)who()%<{-{*]+;mul(809,56)#~}'mul(691,801)(:}['{<-/mul(990,19)select()where()what()':who(194,310)!^{mul(972,914)];&>mul(823,879)mul(531,912)how(640,856)^who()%!@mul(988,624)why() ^~[mul(593,75)what()*}]#-mul(238,652)$why(){#:$,)mul(351,278)@select() @[*/'mul(41,175)mul(723,126)&+how()/when()%mul(495,494what(25,590)why():]*$(mul(760,407) mul(208,295)*when()&'}do()@ }&when()/~who()what()^mul(613,494) why()%~@who()mul(159,575)why()where(390,372)%% ~from()-mul(570,730))mul(634,554)who()&how()mul(909,159)[[)+mul(481,13) mul(310,211)what()}why()from()how()< $why()mul(235,144):${how()^?;!]mul(601,971)mul(3,148)>))mul(351,281)from()&why(){!from()mul(398,4)why()when()#>mul(779,170)+)when()@>]/]mul(374,400)mul(725,109)from() *-<[+'mul(771,683)where()how()%+(,(mul(968,53)['who()@>[@(select():mul(650,309)#*,mul(676/#how()@select()^}%>from())mul(428,451)%}where()({%{>what()how()mul(840,189)how()mul(734,158)[:#what()&&(when() -mul(302,951){-what()>%[+mul(86,676)!mul(574,410)/*who()mul(709,782)mul:how()[)%-&from()mul(903,410)&~^!why()select()>when()how()mul(501,677)&,where()$)>'mul(572,739){mul(26,438)(*where()^'&mul(437,403)where()what()mul@&[<*)[:#%%mul(523,163)mul(401,39%&/]>mul(712,673)mul(593,248) mul(910,410)+?mul(60,141)-who()?~'mul(798,372)mul(469,939)(select()^[!-'mul(243,488)&/+-/^what()>^>mul(618,943 ('mul(252,224)*!$mul(619,792)from()&^mul(218,278){,mul(416,669)+*$]#mul(800,119)%]%^#$;*>{mul(482,893)'&&?how()mul(89,677)&)#mul(483,457)why()[select()(!+;[mul(134,789)]~how() #%mul(837,402)~,?>*mul(128,824)[/#@don't()what()$[&mul(181,943)[mul(678,31)~$:who()when()@ *what()mul(141,981)>!!~,/mul(169,72)where()why(),+*mul(347,11)~what(),when(): when()]mul(283,646)?'mul(834,247)[mul(744,766)()*mul(979,782)$;mul(864,806)?from()mul(836,818){%mul(662,438)mul(174,824)'who()+select()mul(614,265)^select()mul(141,687)+**)[~$[/-mul(61,197)from() when()mul(498,859)who()@>why()how()how()mul(494when()!^^don't()when()mul(29,653){why()mul(41,526)#select()from()mul(715,903) +@where(957,13)how(451,967):?(/mul(884,339)&: -mul(895,988)%:from()mul(267,780)do()+!mul(747,812)[*;:&-##[,mul(877,201)@[from()(<{)<$mul(696,261)where()/??&-$:where()mul(451,383)#how()}$>,mul(966,386)~-#from()!when()/what()select()mul(893,103)/ ; /;-select(467,60)why(139,346)?mul(650,959)why(884,941)+why()mul(353,814)from()who(){-*#who()mul(400,173)mul(661^$[[:*?mul(731,905)&(mul(317,300)!^< [/-how(){when()mul(476,578)who()from()&}-)mul(628,306)who():~',+@mul(633,755)$?^&mul(45,740)mul(495,369)how()when()!select()mul(809,627){when() what()mul(625,205)%/select()$(where():why()^when()don't()>/:?mul(825,853):when()&~,(~select()]~mul(660,614)]+mul(968,860)-do()%select()~ mul(843,731!$}how()mul(354,619)@select()mul(354,560)when()}*mul(994,176)~]#how(549,822)[mul(887,251)[select()&*%who(17,670)who()%)&mul(360,653)-/''>from(803,726)mulwhere()?what()&mul(446,573):select()?how():&mul(660,62);[;)/?!@ when()mul(131,738)~;)mul(222,467)how()@},who()>why()mul(907,236)-$]^mul(389,882){mul(481,917)how()--!{when()mul(826,862)!what(776,585)%*from()/^mul(258,741)&+@[,&from()^?>mul(615,874))#where()who()^from()'(what()mul]#mul(239,843)where()where()!&mul(35,752)#}}how()))mul(103,32)'>]mul(491,16)%$'mul(914,334)~select()/'!@mul(256,451) ~%[$why()?mul(330,802)where(){(?mul(373,28[#:&/&'%%mul(227,364))mul]:mul(650,371)@@?[$from()mul(358,277)mul(102,94)%)';mul(431,297)>!when()*mul(83,650)#;/'@<)!/mul(444,600)+(*mul(342,980)$;mul(887,991)@mul(942,266)mul(554,806)[{why()who(), )select(){mul(560,307)^)mul(90,988)*:[mul(362}&don't()]where()what()!?!$mul(646,5)[+&(;;/^mul(70?'mul(768,397)]where()#(%don't()-how()~select()^how()@mul(969,59)<[how(288,620)who()>what()?from(925,90)mul(644,250)@+)@how()from()?from()mul(370,958)}mul(856,740)don't()](<#->!who()*mul(127,512)where(155,111)&$**>?mul(568,551)(when();$} (why()#mul(696,66)]~{/]mul(54,72)}mul(723,615)#mul(746,486)['*mul(890,144)!mul(139,363)mul(203,759),<;mul(954,65)when()*mul(122,219)^what()who(31,222)how()when()how()mul(235,569)what(934,341)from(545,730)/who()*^mul(344,502)where()~-] $>$mul(473,194)mul(514,408)do()when()['mul(592,732)mul(668,655){what()]>+?mul(897,859)~$select()]mulwhere()mul(116,140)@+what()&#mul(843,710)/$%~; @mul(329,45)~??@mul(751,862)?>mul(465,182)mul(879,670)select()}<)how()select(342,147)^why()-why(77,328)mul(839,63){from()mul(609,495)who())??#@%&}mul(791,585)mul(89,505)who() ~who() $do()$;][mul(208,816)$;mul(162,345)?)what()*#^$]what()mul(239,645)from(),{@mul(225,844)select()'why(609,236)}?[mul(364,169)(select()!mul(273,586) +from()where()'%'where()<{?}mul(758,234)from(443,726)select()when()}'mul(884,68)**/[&{;~mul(818,66)why()where()>,from()-?;{mul(282,741)?['>mul(560,385)why()]@&$]<>]from()do()}/*^!}{mul(142,84)$from()who()how()mul:mul(225,76),how() (#how()mul(685,905)when()!!^['(^mul(744,487)-mul(837,928)from()<$((mul(776,854)mul(668,869)!who()mul(123,137)%-mul(76,346)-where()select()^}mul(912,946)'$#!mul(930,449)(,where(),$-how(){do()&what(),]when(){mul(665,336)$don't()<%why()]-}why()how()mul(705,882)select()+%-&#mul(162,959)select(),/*^^why()-+?mul(665,535)~?what()(select()how()from()how()^what()mul(968,599){,~##how()#-,(mul(620,224)^{+ mul(864,140)where()mul(169,847):why()?what()+don't()mul(251,569)/#%>mul(956,70);:mul(200,261)>!@when()):<^+:mul(899,267)who()#,&from()what()when(473,423)'from()mul(521,38)(why()/why()>^/]?mul(881,241)#'*(/mul(991,447)*mul(481,364)!what()$+^%mul{-what()}:+;mul(260,175),}$+what()mul(476,265)who()how();%#mul(444,418)>)select()from()why()'mul(189,265)@[({}mul(736,742)when()],mul(689,493)+ ^#[:don't()where()select()#mul(524,647)where()'%#!}(mul(466,834)))%where()~>!]mul(841,130)%select()>how()why();mul(511,221)when()-mul(295,571)<*};why()?[~mul(749,813) ~*(why()^why() mul(74,836)%:%(/>/%)mul(148,705)&mul(973,710)]!}:]from()!who()-mul(751,18)/#[from()>/'what()/mul(451,419)how()^where(),&>'mul(21,960){+-{'mul(305,674)%]&*- {-],mul(241,623)!]who()how();%don't()mul(987,838)+mul(495,346)>#*[what()@[select()don't()??:^select(),)mul(83,151);;]:-'#from()when()who()mul(641,58)<$,where()!why()+mul(698,90)from()mul(289,417)^from()who()<+>mul(280,434)!mul(510,875)select()from()]mul(63,720)from()*{who(140,649)- how() -]mul(310,719)[;why()mul(199,500)>who()mul(150,452)why()^mul(573,483)mul(194,434)select()$]$++mul(793,362)}where():*when()&:who())mul(448,657)who()don't()?-:-[!'mul(557,248)! @/why()[<)when(245,258)%mul(874,939)what()^from())mul(55,802)^%,&?select(431,807)}from(331,380)~where()mul(714,95)$?,mul(574,272)mul(895,71)){how(),/]mul(600,135)mul(875,178)]}$^ ?what()?{]mul(55,317)(^)(mul(474,170)when())]!what()mul(872,189)'from()where()( [$<)mul(948,648)-^[&#mul(308,675)[what()]from():(mul(547,600)how()who()~[what()~+who()mul(107,328)~([:+mul(982,96)>:mul(100,141)*'&(~where()[mul(528,201)>what())/~^:;mul(10,602) \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..110b296 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "adventofcode2024", + "module": "index.ts", + "type": "module", + "devDependencies": { + "@types/bun": "latest" + }, + "peerDependencies": { + "typescript": "^5.0.0" + } +} diff --git a/stack.yaml b/stack.yaml index 514932f..1a9ad8d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -31,6 +31,7 @@ snapshot: # - wai packages: - day1 +- day2 # Dependency packages to be pulled from upstream that are not in the snapshot. # These entries can reference officially published versions as well as # forks / in-progress versions pinned to a git hash. For example: diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..238655f --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // Enable latest features + "lib": ["ESNext", "DOM"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + } +}