Initial commit for day9

This commit is contained in:
Martin Potier 2020-12-10 13:30:34 +02:00
parent 09ca90be06
commit fa87faaa02
No known key found for this signature in database
GPG key ID: D4DD957DBA4AD89E
3 changed files with 1026 additions and 3 deletions

1000
day9/input Normal file

File diff suppressed because it is too large Load diff

20
day9/main.hs Executable file
View file

@ -0,0 +1,20 @@
#! /usr/bin/env -S"ANSWER=42" nix-shell
#! nix-shell -p ghcid
#! nix-shell -p "haskellPackages.ghcWithPackages (p: with p; [pretty-simple])"
#! nix-shell -i "ghcid -c 'ghci' -T main"
{-# OPTIONS_GHC -Wall -Wincomplete-uni-patterns #-}
{-# OPTIONS_GHC -Wno-unused-top-binds -Wno-unused-imports #-}
{-# LANGUAGE OverloadedStrings #-}
import Debug.Trace (trace)
import Text.Pretty.Simple
exampleData :: [Int]
exampleData = [ 35,20,15,25,47,40,62,55,65,95,102,117,150
, 182,127,219,299,277,309,576 ];
main :: IO ()
main = do
putStrLn "Test"
putStrLn "Day 9 - Part 1"

View file

@ -1,12 +1,15 @@
#! /usr/bin/env -S"ANSWER=42" nix-shell #! /usr/bin/env -S"ANSWER=42" nix-shell
#! nix-shell -p ghcid #! nix-shell -p ghcid
#! nix-shell -p "haskellPackages.ghcWithPackages (p: with p; [])" #! nix-shell -p "haskellPackages.ghcWithPackages (p: with p; [pretty-simple])"
#! nix-shell -i "ghcid -c 'ghci' -T main" #! nix-shell -i "ghcid -c 'ghci' -T main"
{-# OPTIONS_GHC -Wall -Wincomplete-uni-patterns #-} {-# OPTIONS_GHC -Wall -Wincomplete-uni-patterns #-}
{-# OPTIONS_GHC -Wno-unused-top-binds #-} {-# OPTIONS_GHC -Wno-unused-top-binds -Wno-unused-imports #-}
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
import Debug.Trace (trace)
import Text.Pretty.Simple
main :: IO () main :: IO ()
main = do main = do
putStrLn "Day 1 - Part 1" putStrLn "Day x - Part 1"