2023 theend
This commit is contained in:
parent
a811664a99
commit
08a8e2ccd6
5 changed files with 1041 additions and 0 deletions
3
Main.hs
3
Main.hs
|
@ -8,6 +8,7 @@ import Day3
|
|||
import Day4
|
||||
import Day5
|
||||
import Day6
|
||||
import Day7
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
|
@ -24,4 +25,6 @@ main = do
|
|||
Day5.main
|
||||
putStrLn "Day 6"
|
||||
Day6.main
|
||||
putStrLn "Day 7"
|
||||
Day7.main
|
||||
|
||||
|
|
5
inputs/day7-test.input
Normal file
5
inputs/day7-test.input
Normal file
|
@ -0,0 +1,5 @@
|
|||
32T3K 765
|
||||
T55J5 684
|
||||
KK677 28
|
||||
KTJJT 220
|
||||
QQQJA 483
|
1000
inputs/day7.input
Normal file
1000
inputs/day7.input
Normal file
File diff suppressed because it is too large
Load diff
|
@ -28,3 +28,4 @@ library:
|
|||
- Day4
|
||||
- Day5
|
||||
- Day6
|
||||
- Day7
|
||||
|
|
32
src/Day7.hs
Normal file
32
src/Day7.hs
Normal file
|
@ -0,0 +1,32 @@
|
|||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
{-# OPTIONS_GHC -Wno-unused-do-bind #-}
|
||||
|
||||
module Day7 where
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
putStrLn "Part 1"
|
||||
putStrLn "Part 2"
|
||||
|
||||
data Card
|
||||
= Card2
|
||||
| Card3
|
||||
| Card4
|
||||
| Card5
|
||||
| Card6
|
||||
| Card7
|
||||
| Card8
|
||||
| Card9
|
||||
| CardT
|
||||
| CardJ
|
||||
| CardQ
|
||||
| CardK
|
||||
| CardA
|
||||
deriving (Show,Eq,Ord,Enum)
|
||||
|
||||
data CamelCardsHand = CCHand Card Card Card Card Card
|
||||
deriving (Show,Eq)
|
||||
|
||||
instance Ord CamelCardsHand where
|
||||
compare (CCHand a1 b1 c1 d1 e1) (CCHand a2 b2 c2 d2 e2) = undefined
|
Loading…
Add table
Reference in a new issue