Part 1 done, 2 in process
This commit is contained in:
parent
bfcbd531be
commit
5cf0989ff0
@ -1,5 +1,36 @@
|
|||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
|
import Data.HashSet (HashSet)
|
||||||
|
import qualified Data.HashSet as HS
|
||||||
|
import Data.List.Split (splitOn)
|
||||||
|
|
||||||
|
partOne :: String -> Int
|
||||||
|
partOne = sum . map computePoints . filter (not . null) . map partOnePerLine . lines
|
||||||
|
|
||||||
|
partOnePerLine :: String -> [Int]
|
||||||
|
partOnePerLine = hashIntersect . strToInt . beforeHashSet
|
||||||
|
|
||||||
|
computePoints :: [Int] -> Int
|
||||||
|
computePoints n = 2 ^ (length n - 1)
|
||||||
|
|
||||||
|
hashIntersect :: (HashSet Int, HashSet Int) -> [Int]
|
||||||
|
hashIntersect (x, y) = HS.toList (HS.intersection x y)
|
||||||
|
|
||||||
|
strToInt :: (String, String) -> (HashSet Int, HashSet Int)
|
||||||
|
strToInt (win, cards) = ((HS.fromList . map getInt . words) win, (HS.fromList . map getInt . words) cards)
|
||||||
|
|
||||||
|
getInt :: String -> Int
|
||||||
|
getInt n = read n :: Int
|
||||||
|
|
||||||
|
beforeHashSet :: String -> (String, String)
|
||||||
|
beforeHashSet = (\v -> (head v, last v)) . splitOn "|" . last . splitOn ":"
|
||||||
|
|
||||||
|
partTwoPerLine :: String -> Int
|
||||||
|
partTwoPerLine = length . partOnePerLine
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
putStrLn "Hello, Haskell!"
|
content <- readFile "sample.txt"
|
||||||
|
(print . partOne) content
|
||||||
|
let tmp = (zip [1 ..] . map partTwoPerLine . lines) content
|
||||||
|
mapM_ print tmp
|
||||||
|
@ -68,7 +68,7 @@ executable day4
|
|||||||
-- other-extensions:
|
-- other-extensions:
|
||||||
|
|
||||||
-- Other library packages from which modules are imported.
|
-- Other library packages from which modules are imported.
|
||||||
build-depends: base ^>=4.17.2.1
|
build-depends: base ^>=4.18.2.0, split, unordered-containers
|
||||||
|
|
||||||
-- Directories containing source files.
|
-- Directories containing source files.
|
||||||
hs-source-dirs: app
|
hs-source-dirs: app
|
||||||
|
204
day4/input.txt
Normal file
204
day4/input.txt
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
Card 1: 9 39 27 89 87 29 54 19 43 45 | 9 80 29 20 54 58 78 77 39 35 76 79 19 87 45 89 23 31 94 34 67 43 56 50 27
|
||||||
|
Card 2: 89 59 76 2 60 83 21 37 92 45 | 79 5 41 92 45 59 72 50 89 37 64 65 60 54 57 22 66 21 25 76 1 39 83 2 33
|
||||||
|
Card 3: 40 25 13 65 86 5 35 87 9 30 | 87 76 30 93 5 45 16 40 48 89 78 59 18 12 71 85 66 21 80 28 50 60 49 72 27
|
||||||
|
Card 4: 21 34 70 83 66 44 90 68 76 12 | 46 80 70 73 44 99 32 98 66 68 76 28 85 74 17 38 27 22 83 16 12 90 33 34 21
|
||||||
|
Card 5: 5 67 90 43 26 31 17 47 14 1 | 83 64 47 24 33 5 90 20 19 61 14 56 67 26 1 70 31 9 17 57 43 95 82 91 49
|
||||||
|
Card 6: 8 1 42 80 94 21 15 89 60 73 | 53 23 64 63 15 89 29 93 78 80 62 52 21 40 94 4 42 61 22 1 73 97 28 60 8
|
||||||
|
Card 7: 67 32 20 69 40 22 35 44 86 72 | 84 53 39 52 43 46 41 16 25 77 32 5 7 29 13 31 22 98 58 82 2 85 34 89 79
|
||||||
|
Card 8: 94 12 71 3 2 93 87 18 83 67 | 89 80 82 62 88 64 24 45 54 84 2 7 43 37 16 49 67 13 95 53 50 42 6 83 68
|
||||||
|
Card 9: 64 68 80 83 33 1 93 66 8 73 | 51 61 20 32 39 3 8 65 21 56 6 25 86 85 76 95 14 28 62 71 69 12 83 1 22
|
||||||
|
Card 10: 60 88 52 64 87 34 93 37 56 78 | 16 57 87 20 68 98 93 63 12 96 29 51 14 10 45 52 64 83 85 72 49 82 31 44 35
|
||||||
|
Card 11: 36 78 85 63 79 86 20 6 24 28 | 55 86 79 32 84 97 22 20 25 6 29 75 41 24 38 78 23 33 63 50 56 11 85 36 28
|
||||||
|
Card 12: 51 48 95 84 65 40 54 47 35 24 | 41 91 86 2 5 19 54 83 13 98 39 44 47 33 82 48 6 58 87 88 16 29 99 38 40
|
||||||
|
Card 13: 1 3 96 69 86 76 88 24 58 27 | 19 22 25 3 89 88 71 27 76 85 15 45 96 80 70 24 34 61 83 69 47 86 44 7 1
|
||||||
|
Card 14: 64 16 68 57 10 25 51 26 36 59 | 78 27 81 61 21 57 94 41 85 68 77 4 9 56 66 2 42 15 25 7 10 93 36 59 34
|
||||||
|
Card 15: 41 42 5 37 99 19 65 27 44 35 | 99 38 1 9 72 43 84 67 7 44 79 5 29 60 41 98 30 23 27 82 35 97 74 25 90
|
||||||
|
Card 16: 8 72 53 75 61 67 78 54 1 3 | 32 41 81 86 1 95 50 20 58 92 97 60 26 23 27 67 78 53 83 75 7 66 3 59 8
|
||||||
|
Card 17: 39 50 34 66 54 19 30 37 33 24 | 34 62 27 89 49 80 67 50 20 46 4 72 74 85 45 69 40 16 73 57 79 76 95 41 56
|
||||||
|
Card 18: 67 32 84 12 50 44 5 42 69 22 | 67 64 77 83 5 85 50 84 17 7 23 78 97 76 94 39 81 44 96 37 79 61 13 3 49
|
||||||
|
Card 19: 66 39 62 2 47 63 18 19 85 26 | 60 68 9 18 59 24 47 80 86 87 56 48 54 72 16 51 26 23 95 15 38 91 79 31 27
|
||||||
|
Card 20: 48 8 91 42 64 81 16 90 82 30 | 9 65 92 3 49 68 67 52 53 47 56 54 22 10 15 86 72 88 46 75 73 6 55 80 37
|
||||||
|
Card 21: 89 35 21 61 33 44 52 83 51 79 | 64 62 14 54 72 38 80 18 67 65 56 91 94 26 92 96 88 34 81 60 25 9 28 10 55
|
||||||
|
Card 22: 98 19 57 87 65 12 80 18 48 29 | 70 56 81 95 51 48 76 68 73 21 26 67 92 46 54 58 72 45 75 34 25 8 79 55 86
|
||||||
|
Card 23: 50 94 84 86 64 67 26 72 46 96 | 11 98 97 74 47 71 88 93 3 89 2 53 57 54 66 85 52 14 31 38 24 81 44 41 68
|
||||||
|
Card 24: 53 60 37 93 49 98 89 70 72 6 | 83 21 37 94 78 7 44 34 30 58 16 84 8 10 72 48 42 27 79 6 99 67 88 64 25
|
||||||
|
Card 25: 13 18 29 62 44 92 19 58 63 6 | 97 78 16 56 19 62 18 58 63 29 14 44 40 25 70 90 13 82 98 89 51 24 92 55 83
|
||||||
|
Card 26: 75 2 35 21 74 27 45 66 3 91 | 11 8 28 74 26 23 93 2 47 3 25 7 35 6 22 27 58 96 21 75 61 15 94 65 45
|
||||||
|
Card 27: 11 35 97 64 30 50 5 90 2 19 | 7 92 18 68 95 22 86 65 91 1 6 80 66 93 27 77 90 40 45 48 89 38 32 26 78
|
||||||
|
Card 28: 89 67 61 81 98 64 49 54 70 79 | 78 81 66 70 30 49 79 10 59 67 98 61 99 43 1 77 50 90 64 89 75 85 16 71 54
|
||||||
|
Card 29: 4 94 51 84 70 21 76 55 35 66 | 68 52 61 75 50 37 71 72 14 78 19 18 93 20 79 60 86 2 59 8 47 1 90 33 30
|
||||||
|
Card 30: 84 90 5 67 66 27 3 89 41 63 | 65 66 63 32 5 97 68 13 95 12 39 27 67 25 89 90 3 1 75 40 41 19 51 9 71
|
||||||
|
Card 31: 99 88 64 27 71 97 30 47 32 11 | 73 8 7 61 45 29 62 74 49 11 80 14 75 68 63 43 4 40 72 84 82 44 96 69 87
|
||||||
|
Card 32: 49 22 35 33 44 77 24 18 74 10 | 79 68 81 31 88 33 10 74 49 30 44 35 22 23 42 73 77 55 67 13 61 25 24 53 18
|
||||||
|
Card 33: 11 54 66 33 51 59 82 24 3 88 | 70 28 24 89 66 42 22 59 88 33 99 54 31 63 47 11 98 39 3 51 82 38 87 16 68
|
||||||
|
Card 34: 26 7 38 74 20 89 78 79 73 47 | 88 64 13 18 99 9 37 61 60 97 22 67 48 95 19 76 40 31 6 90 42 2 41 1 68
|
||||||
|
Card 35: 67 65 8 4 84 62 69 66 46 36 | 27 30 2 16 45 99 65 50 37 19 78 87 49 64 12 84 11 8 4 69 44 62 48 71 17
|
||||||
|
Card 36: 80 77 50 31 90 59 75 74 37 24 | 34 64 37 90 97 75 63 50 3 95 55 94 77 52 80 24 19 32 84 59 60 72 74 8 31
|
||||||
|
Card 37: 6 60 75 78 10 71 32 91 77 97 | 60 88 71 81 74 78 32 97 1 48 91 53 4 89 13 21 67 90 56 44 77 18 46 76 61
|
||||||
|
Card 38: 48 51 53 36 99 73 3 39 70 5 | 42 25 54 98 50 68 73 77 47 33 49 99 57 70 48 5 78 22 7 39 51 2 3 36 44
|
||||||
|
Card 39: 26 4 65 75 52 54 88 37 50 49 | 23 62 60 58 90 57 33 80 29 9 86 34 56 53 42 84 12 18 24 98 72 54 50 51 45
|
||||||
|
Card 40: 48 99 71 68 21 56 90 34 28 18 | 4 34 61 62 48 98 28 65 18 90 77 88 47 68 55 92 99 70 78 14 36 93 84 21 27
|
||||||
|
Card 41: 73 27 13 41 98 47 85 33 59 84 | 15 47 50 75 40 69 12 92 14 21 68 97 87 45 56 37 84 74 3 88 35 36 24 46 54
|
||||||
|
Card 42: 99 58 27 10 18 29 4 91 93 81 | 94 15 73 50 36 49 62 68 57 5 75 42 37 41 79 60 25 86 67 35 45 70 72 34 46
|
||||||
|
Card 43: 26 17 11 50 37 5 47 67 28 31 | 12 44 81 84 48 96 97 90 21 6 10 35 77 20 4 62 76 99 64 19 18 55 43 17 30
|
||||||
|
Card 44: 14 25 88 84 83 58 54 11 80 93 | 50 20 68 16 65 59 41 26 7 13 33 18 60 72 74 55 28 2 66 42 98 78 27 63 40
|
||||||
|
Card 45: 11 24 20 22 78 26 91 54 16 29 | 32 70 83 77 22 63 89 58 68 42 2 87 50 1 95 99 98 55 80 38 76 90 93 54 31
|
||||||
|
Card 46: 35 46 37 90 8 36 12 63 97 89 | 45 18 47 92 9 11 2 79 89 61 88 77 23 33 44 28 36 22 50 52 94 15 84 38 57
|
||||||
|
Card 47: 27 16 35 8 99 21 45 89 64 23 | 42 53 11 57 9 13 75 66 62 88 36 30 49 95 59 7 63 71 34 43 92 55 29 61 52
|
||||||
|
Card 48: 10 1 11 53 97 64 24 49 52 65 | 3 28 40 92 81 58 5 35 46 33 82 77 59 78 87 85 71 61 8 70 74 18 84 56 19
|
||||||
|
Card 49: 37 40 57 47 53 77 25 94 13 58 | 15 76 56 22 35 10 12 77 72 25 27 51 88 3 13 30 26 48 63 19 84 95 34 97 7
|
||||||
|
Card 50: 64 47 51 46 54 93 94 3 53 52 | 48 61 31 96 67 88 68 7 98 87 23 37 77 73 65 83 2 4 27 76 45 97 58 1 75
|
||||||
|
Card 51: 50 84 17 72 35 66 31 40 73 53 | 84 61 74 26 33 38 75 43 53 44 39 79 50 49 65 99 62 85 46 83 21 2 29 36 10
|
||||||
|
Card 52: 9 81 53 22 58 92 90 33 30 59 | 45 12 33 83 59 96 11 65 9 52 32 30 58 77 98 19 22 84 99 92 14 76 90 49 71
|
||||||
|
Card 53: 69 13 67 60 89 50 26 68 29 55 | 29 82 86 36 50 76 69 64 60 61 6 26 42 99 89 98 96 55 68 33 45 10 79 13 67
|
||||||
|
Card 54: 49 15 51 41 75 25 42 47 50 70 | 55 44 57 41 74 25 70 26 82 85 87 67 63 34 69 75 51 49 37 28 95 59 96 83 14
|
||||||
|
Card 55: 74 2 69 5 95 93 90 47 75 14 | 51 28 82 32 49 95 15 61 33 9 58 56 68 64 46 21 99 98 38 44 7 39 36 29 86
|
||||||
|
Card 56: 68 18 77 6 53 43 91 3 57 23 | 52 47 40 96 2 8 59 28 39 74 36 72 32 89 70 92 73 46 85 43 84 5 67 38 77
|
||||||
|
Card 57: 42 9 71 63 30 16 70 77 29 54 | 39 27 24 66 76 72 93 83 47 50 37 67 52 90 11 18 19 56 99 84 41 74 59 32 48
|
||||||
|
Card 58: 28 38 63 96 31 30 18 6 82 9 | 82 9 20 91 43 60 46 52 78 67 96 28 39 92 89 8 57 31 87 84 10 75 37 23 88
|
||||||
|
Card 59: 93 89 66 99 10 9 92 65 50 12 | 48 28 46 58 38 65 2 30 8 35 6 95 97 98 10 5 44 78 37 68 32 71 72 29 83
|
||||||
|
Card 60: 43 46 57 73 75 24 56 39 23 81 | 22 57 51 96 60 44 34 94 88 10 84 67 32 7 97 68 78 56 21 95 55 59 8 92 76
|
||||||
|
Card 61: 63 66 83 81 76 40 47 97 22 26 | 28 87 16 64 12 85 89 2 45 13 39 21 31 18 24 20 96 32 3 54 56 34 52 92 5
|
||||||
|
Card 62: 71 63 44 3 88 24 79 70 82 53 | 30 96 68 25 92 39 86 75 21 98 93 17 62 28 35 8 54 12 36 7 33 91 13 85 40
|
||||||
|
Card 63: 20 89 99 39 61 91 44 45 3 38 | 26 68 88 63 69 84 16 55 60 19 50 14 2 41 6 30 98 29 65 43 4 7 67 80 37
|
||||||
|
Card 64: 70 64 27 51 11 81 8 56 2 19 | 19 27 49 80 66 86 20 39 70 73 98 2 10 81 64 33 47 88 51 11 37 8 40 56 74
|
||||||
|
Card 65: 61 1 79 74 23 88 29 52 58 31 | 11 17 89 60 98 15 12 75 52 85 93 41 88 30 2 18 79 92 40 26 29 73 94 70 34
|
||||||
|
Card 66: 91 8 53 34 43 38 89 99 79 27 | 15 67 34 70 97 74 9 11 73 49 14 54 50 47 71 91 23 18 84 65 35 5 63 46 66
|
||||||
|
Card 67: 61 42 21 34 57 12 74 52 72 88 | 61 5 72 24 16 95 2 38 42 94 21 18 12 37 57 66 34 48 88 69 52 47 74 62 96
|
||||||
|
Card 68: 78 46 10 30 2 47 92 16 64 72 | 72 65 30 17 84 88 16 41 92 45 46 11 51 2 10 81 55 47 3 18 36 97 60 12 78
|
||||||
|
Card 69: 14 91 68 42 6 4 50 98 89 90 | 6 28 76 83 68 7 88 53 27 16 98 74 5 63 48 89 40 30 50 4 85 91 92 64 20
|
||||||
|
Card 70: 86 64 33 35 36 24 67 39 77 6 | 81 74 59 25 98 48 69 80 16 47 13 8 84 50 37 2 54 51 27 15 31 26 93 45 9
|
||||||
|
Card 71: 18 12 95 25 85 56 99 13 82 77 | 88 26 44 77 73 43 14 37 35 13 21 15 45 99 86 97 54 98 38 27 42 53 93 95 83
|
||||||
|
Card 72: 7 96 8 50 63 39 46 82 43 44 | 89 2 42 65 78 7 16 73 43 72 39 1 25 58 64 50 67 46 23 87 18 82 30 24 95
|
||||||
|
Card 73: 77 97 99 54 49 48 58 24 6 73 | 68 10 89 53 50 22 14 28 83 59 18 25 2 8 92 76 70 75 85 74 4 7 3 36 72
|
||||||
|
Card 74: 24 96 56 90 46 21 1 62 94 29 | 16 78 21 97 39 4 79 65 22 24 67 69 6 86 82 5 91 51 1 87 60 32 13 77 42
|
||||||
|
Card 75: 95 26 80 37 34 43 46 62 60 24 | 54 16 68 3 55 29 18 53 79 90 14 45 41 67 21 78 8 64 72 66 40 82 73 47 94
|
||||||
|
Card 76: 8 72 87 55 75 36 86 70 45 52 | 28 76 19 5 71 17 92 64 42 80 70 91 43 29 74 47 94 21 66 35 56 88 51 63 78
|
||||||
|
Card 77: 5 62 3 77 9 54 29 12 68 86 | 58 64 7 90 65 78 36 4 29 17 13 87 40 20 83 91 41 96 39 94 80 69 84 42 74
|
||||||
|
Card 78: 4 31 22 18 53 97 42 21 72 57 | 77 1 6 45 17 52 33 15 34 5 84 29 2 23 75 50 27 39 38 70 98 89 19 69 80
|
||||||
|
Card 79: 28 64 2 71 89 44 76 34 55 67 | 28 97 44 64 48 40 76 2 66 56 15 11 92 83 34 53 71 67 89 54 41 43 60 10 55
|
||||||
|
Card 80: 97 58 41 88 57 26 14 71 83 2 | 26 73 57 55 8 97 54 58 63 90 37 98 60 66 41 2 25 87 83 95 71 46 31 14 88
|
||||||
|
Card 81: 76 20 17 38 58 30 87 96 28 12 | 40 47 52 37 48 17 35 8 77 45 21 46 80 69 57 94 50 12 55 81 70 58 25 4 28
|
||||||
|
Card 82: 50 56 9 28 78 8 6 5 45 96 | 83 64 89 39 68 29 99 81 8 45 96 53 20 62 78 9 31 23 34 46 93 50 28 71 56
|
||||||
|
Card 83: 16 9 29 27 89 35 97 6 63 48 | 29 49 6 89 44 42 63 76 21 16 27 97 37 46 31 36 23 66 35 1 33 79 9 48 45
|
||||||
|
Card 84: 24 84 32 55 59 57 70 6 43 38 | 23 26 20 69 83 6 68 47 57 27 75 28 1 56 43 48 95 98 24 51 94 88 19 45 5
|
||||||
|
Card 85: 43 56 46 52 92 64 89 39 8 7 | 25 46 37 70 52 8 68 36 85 66 43 65 10 38 56 49 15 64 12 34 79 39 98 13 90
|
||||||
|
Card 86: 59 43 34 99 39 4 90 66 33 35 | 59 98 81 4 86 95 66 92 22 35 28 80 5 90 21 11 19 33 71 15 57 68 99 75 30
|
||||||
|
Card 87: 3 73 93 21 35 97 61 84 47 58 | 11 57 63 54 73 65 67 47 9 43 31 3 68 82 58 97 35 25 84 13 24 61 21 8 93
|
||||||
|
Card 88: 99 34 88 58 37 54 50 49 53 87 | 88 61 50 75 3 33 57 37 53 54 87 8 99 34 89 74 46 44 91 72 77 49 22 96 58
|
||||||
|
Card 89: 45 94 20 23 83 82 3 39 90 48 | 47 87 80 65 49 29 63 24 1 59 3 73 25 69 32 12 9 15 33 35 82 22 46 48 43
|
||||||
|
Card 90: 11 69 91 38 51 79 15 16 22 26 | 39 80 17 24 1 21 70 82 73 84 87 46 97 94 72 68 89 66 14 65 4 64 88 10 58
|
||||||
|
Card 91: 11 27 2 95 84 13 48 24 89 54 | 6 68 56 98 70 38 95 79 89 83 39 48 17 99 57 51 67 7 28 23 13 50 2 32 93
|
||||||
|
Card 92: 26 1 2 20 16 94 13 60 11 6 | 19 99 92 58 40 82 27 74 32 59 57 86 4 53 73 98 69 48 72 65 62 61 89 56 42
|
||||||
|
Card 93: 69 7 80 87 66 64 89 75 79 53 | 54 9 93 88 36 44 45 63 68 78 22 62 82 70 73 3 98 34 1 52 28 56 55 81 67
|
||||||
|
Card 94: 55 89 2 72 16 12 63 71 41 43 | 83 60 74 68 98 18 73 75 20 87 49 94 32 22 25 6 90 31 9 95 71 11 42 88 5
|
||||||
|
Card 95: 41 72 14 56 75 35 8 3 12 78 | 20 77 80 96 61 86 35 17 95 70 41 6 54 1 79 31 11 38 39 40 4 44 64 63 49
|
||||||
|
Card 96: 18 55 72 59 30 10 58 43 66 57 | 33 46 25 71 30 9 78 88 83 95 11 75 6 20 76 15 74 92 35 61 45 87 99 94 41
|
||||||
|
Card 97: 3 73 83 39 40 63 7 94 35 2 | 64 6 26 28 36 59 98 95 21 93 18 69 42 12 55 79 15 11 70 32 60 61 87 78 4
|
||||||
|
Card 98: 11 99 6 13 40 26 94 46 58 88 | 63 2 5 17 9 72 79 31 37 59 28 95 39 62 97 4 55 83 12 76 68 33 65 10 89
|
||||||
|
Card 99: 31 83 81 22 34 12 55 92 58 29 | 68 66 74 50 91 85 33 81 87 86 98 84 96 48 6 90 70 62 1 38 59 76 16 41 25
|
||||||
|
Card 100: 64 11 22 20 53 7 10 75 9 21 | 35 78 92 88 74 51 91 84 96 25 34 83 46 4 54 81 43 87 47 44 23 59 33 73 67
|
||||||
|
Card 101: 37 87 86 41 1 91 81 29 14 72 | 6 72 1 86 44 87 41 88 3 21 29 97 89 95 64 56 20 91 99 16 14 81 37 13 71
|
||||||
|
Card 102: 4 36 32 61 26 12 85 42 60 77 | 14 40 92 7 66 89 52 54 19 6 49 35 67 46 80 27 30 56 97 83 47 82 87 78 5
|
||||||
|
Card 103: 99 3 67 24 61 34 80 43 54 68 | 34 32 54 67 80 22 24 5 82 30 36 3 69 85 61 68 21 10 99 98 52 42 53 43 26
|
||||||
|
Card 104: 7 9 77 84 53 5 81 32 13 3 | 78 84 94 20 8 56 38 82 76 41 91 90 99 74 25 70 45 32 97 77 67 3 5 13 63
|
||||||
|
Card 105: 85 77 48 14 98 3 67 89 57 43 | 56 21 26 11 81 15 46 68 36 72 50 40 31 37 23 92 24 25 99 35 29 4 12 10 45
|
||||||
|
Card 106: 30 25 66 4 40 43 99 21 89 68 | 32 6 66 25 64 58 78 30 23 35 12 21 4 99 43 89 83 20 61 71 68 16 40 84 45
|
||||||
|
Card 107: 5 74 89 62 52 80 43 42 13 40 | 36 25 84 13 73 56 57 62 46 54 18 89 26 66 28 72 11 61 35 42 14 3 67 39 2
|
||||||
|
Card 108: 79 34 81 43 98 33 24 7 22 13 | 34 98 94 93 81 84 63 17 79 44 13 26 15 18 43 6 22 91 56 33 74 7 24 30 58
|
||||||
|
Card 109: 3 50 79 55 5 30 41 20 52 91 | 33 41 19 50 86 75 91 24 60 1 30 64 52 77 95 58 22 5 70 73 3 59 20 79 55
|
||||||
|
Card 110: 49 42 83 46 84 87 64 89 95 1 | 96 64 97 1 27 79 83 42 21 25 72 59 4 89 23 45 46 71 84 87 49 52 81 95 56
|
||||||
|
Card 111: 64 62 66 74 1 73 8 29 31 19 | 13 62 64 31 78 73 1 41 19 8 80 29 39 70 77 84 40 15 66 68 56 46 94 74 48
|
||||||
|
Card 112: 55 74 88 67 3 58 87 16 97 60 | 36 17 78 66 19 85 59 28 37 24 90 7 97 95 71 27 54 87 77 44 91 64 80 31 46
|
||||||
|
Card 113: 45 76 46 7 60 24 27 21 95 87 | 67 93 12 81 24 72 83 7 60 95 75 2 47 90 46 33 1 70 21 42 16 63 27 45 76
|
||||||
|
Card 114: 71 8 4 96 98 62 69 65 5 46 | 25 43 37 45 34 39 95 24 22 68 32 88 72 73 36 89 54 8 56 35 6 51 81 85 60
|
||||||
|
Card 115: 62 69 28 91 24 53 51 89 99 95 | 74 94 86 36 27 67 69 6 76 35 16 10 18 24 12 28 4 44 15 65 80 14 51 54 88
|
||||||
|
Card 116: 52 94 9 1 51 90 36 3 81 2 | 4 88 90 15 32 35 18 86 89 45 97 5 81 69 1 22 10 57 61 3 42 37 9 93 46
|
||||||
|
Card 117: 63 77 23 81 78 83 92 48 85 25 | 73 31 12 8 34 42 21 29 26 14 75 69 37 16 11 72 41 60 7 80 3 19 95 98 89
|
||||||
|
Card 118: 86 93 55 54 20 66 88 63 94 64 | 23 33 43 35 1 91 48 82 41 55 66 32 52 96 50 54 38 47 70 84 3 11 12 86 58
|
||||||
|
Card 119: 80 69 3 77 33 30 31 99 76 44 | 55 47 57 89 22 26 37 34 23 96 86 94 79 2 38 8 68 4 91 25 97 48 52 43 98
|
||||||
|
Card 120: 9 78 59 93 74 70 66 26 61 11 | 29 95 24 96 97 77 23 42 80 53 86 51 31 92 8 55 32 43 10 56 84 72 28 6 7
|
||||||
|
Card 121: 7 51 68 86 42 96 88 39 94 75 | 22 4 46 5 20 78 94 89 31 92 85 37 41 27 97 32 21 42 2 83 49 79 17 52 69
|
||||||
|
Card 122: 71 79 63 55 2 28 36 45 29 17 | 91 34 88 83 99 92 26 9 70 64 81 98 12 35 74 47 80 82 87 23 2 90 72 52 97
|
||||||
|
Card 123: 31 54 44 21 47 64 62 65 92 10 | 98 32 71 97 66 46 99 20 3 72 76 75 40 81 30 43 61 4 82 87 7 37 36 27 91
|
||||||
|
Card 124: 14 49 77 61 15 41 27 57 29 38 | 23 38 49 41 15 27 16 90 14 50 28 29 94 91 19 2 43 98 66 57 77 71 99 74 61
|
||||||
|
Card 125: 64 46 99 34 80 85 68 73 48 10 | 43 85 98 46 37 5 34 81 49 63 9 50 30 44 64 68 10 73 66 99 97 96 52 48 80
|
||||||
|
Card 126: 89 74 85 14 66 45 55 21 86 18 | 96 13 15 18 76 39 55 27 75 87 45 74 32 49 64 21 66 86 14 89 85 77 92 82 59
|
||||||
|
Card 127: 87 31 54 37 78 58 14 36 96 71 | 10 40 77 36 41 71 84 78 32 18 8 37 87 22 58 16 26 55 43 54 25 14 96 31 38
|
||||||
|
Card 128: 62 43 69 74 5 40 3 89 59 22 | 77 52 88 59 69 74 32 96 43 40 86 16 85 62 5 70 80 89 1 2 94 22 31 18 3
|
||||||
|
Card 129: 88 10 75 71 22 8 34 15 49 61 | 59 98 85 25 88 15 10 57 8 34 74 94 4 41 72 90 71 73 75 1 9 49 61 22 95
|
||||||
|
Card 130: 46 51 4 25 45 50 47 57 35 23 | 50 63 74 10 46 4 17 35 2 11 87 26 99 84 92 65 45 57 85 51 25 47 54 23 62
|
||||||
|
Card 131: 13 73 45 63 15 43 19 11 52 55 | 38 79 21 52 91 53 69 96 13 9 48 58 43 44 46 39 32 85 31 63 73 1 15 82 37
|
||||||
|
Card 132: 89 53 76 33 18 42 23 27 43 80 | 20 53 74 86 76 27 36 75 43 93 88 65 54 68 45 29 64 3 80 37 66 69 87 90 39
|
||||||
|
Card 133: 76 92 70 84 90 5 64 26 16 41 | 97 54 56 79 31 26 82 41 58 76 68 77 13 15 90 50 29 69 60 64 10 84 87 14 67
|
||||||
|
Card 134: 9 21 86 14 37 61 69 98 88 31 | 98 58 18 65 35 6 15 33 43 54 8 82 19 87 76 78 38 20 62 86 21 57 11 3 75
|
||||||
|
Card 135: 50 10 16 57 63 24 32 29 56 88 | 16 1 98 10 45 51 50 69 47 49 21 43 29 87 85 5 73 32 24 37 57 26 61 3 7
|
||||||
|
Card 136: 77 16 62 61 73 52 3 25 6 69 | 13 70 77 94 28 17 45 67 25 22 29 10 72 16 65 73 85 79 62 90 1 6 56 74 49
|
||||||
|
Card 137: 94 91 68 5 36 88 26 37 3 15 | 68 3 7 6 20 26 99 39 44 78 88 40 53 27 1 50 36 15 79 67 37 2 5 91 84
|
||||||
|
Card 138: 98 63 62 27 71 65 88 81 55 49 | 97 96 25 88 23 92 85 49 30 76 98 40 45 67 61 24 66 91 27 37 84 18 5 75 55
|
||||||
|
Card 139: 44 27 57 99 24 80 66 34 71 12 | 60 96 78 25 15 86 74 98 7 27 62 29 80 82 65 47 32 95 99 66 92 63 2 24 37
|
||||||
|
Card 140: 73 69 45 14 70 80 2 33 71 95 | 96 59 56 63 98 32 74 97 3 78 91 99 19 39 81 2 10 25 72 65 55 87 24 48 4
|
||||||
|
Card 141: 72 35 1 53 12 78 32 61 68 87 | 93 35 29 64 82 76 37 36 4 40 53 42 63 85 87 31 1 6 32 81 55 94 11 26 10
|
||||||
|
Card 142: 39 65 95 25 34 46 73 4 23 99 | 33 78 22 6 55 67 17 35 7 94 53 64 13 69 11 75 83 82 40 23 58 61 85 10 46
|
||||||
|
Card 143: 46 15 60 76 32 10 83 47 22 1 | 23 6 51 85 12 90 35 39 21 7 53 57 27 96 80 78 70 79 25 26 56 62 17 73 41
|
||||||
|
Card 144: 28 76 1 63 66 95 81 36 94 10 | 86 59 21 46 65 66 64 38 84 14 56 52 74 33 88 13 9 39 16 32 12 29 83 85 47
|
||||||
|
Card 145: 12 77 54 56 67 90 37 76 32 46 | 12 49 58 45 19 36 98 40 77 16 17 68 73 44 30 24 2 75 35 86 65 70 50 10 47
|
||||||
|
Card 146: 63 35 23 56 96 37 14 24 18 52 | 81 1 53 86 37 68 11 10 83 78 32 2 50 3 71 15 19 17 25 29 67 8 45 61 22
|
||||||
|
Card 147: 55 94 5 53 92 87 63 56 2 23 | 34 13 93 42 1 11 31 51 41 24 95 72 57 35 9 61 90 43 75 67 10 97 7 46 89
|
||||||
|
Card 148: 80 10 79 30 5 37 25 73 81 91 | 81 79 52 72 56 69 26 24 63 65 12 25 37 71 80 32 4 38 77 5 2 10 73 43 91
|
||||||
|
Card 149: 53 46 42 20 89 16 11 60 57 2 | 68 20 53 6 2 16 61 11 54 70 91 3 8 82 57 93 79 60 92 73 89 76 56 14 78
|
||||||
|
Card 150: 87 33 53 21 26 77 28 49 51 17 | 48 6 65 61 72 77 16 94 12 57 79 75 87 34 63 52 8 88 28 85 33 41 29 31 35
|
||||||
|
Card 151: 42 82 89 14 16 28 7 77 23 54 | 89 71 14 6 15 16 82 33 28 4 78 80 54 77 53 8 7 42 50 30 23 58 76 34 74
|
||||||
|
Card 152: 89 87 91 5 37 80 81 82 70 11 | 92 50 54 78 19 71 12 45 73 82 72 18 28 62 21 1 79 35 84 56 17 95 98 76 69
|
||||||
|
Card 153: 50 2 27 20 92 34 10 63 75 89 | 75 52 5 63 50 69 89 51 2 86 10 57 28 74 34 95 92 27 84 77 46 85 4 93 20
|
||||||
|
Card 154: 52 86 12 69 88 43 2 89 66 7 | 25 2 88 39 6 42 69 17 86 97 18 26 16 43 22 51 89 32 34 66 98 46 28 21 47
|
||||||
|
Card 155: 20 53 2 15 95 77 19 4 73 96 | 32 70 75 54 4 26 76 83 30 7 44 97 39 96 25 46 15 10 67 95 77 41 35 53 71
|
||||||
|
Card 156: 91 16 30 70 87 84 19 55 21 92 | 17 41 78 7 67 50 51 34 93 59 80 47 92 32 62 82 31 24 90 97 46 5 43 40 4
|
||||||
|
Card 157: 69 16 12 19 28 89 35 43 91 11 | 68 97 45 52 38 18 20 9 34 67 6 35 28 1 94 23 25 19 73 89 76 95 21 12 57
|
||||||
|
Card 158: 54 21 50 62 96 94 43 86 30 33 | 91 57 7 11 92 20 12 89 58 36 56 6 42 71 64 47 32 88 29 67 63 97 55 98 48
|
||||||
|
Card 159: 12 90 89 88 46 40 83 27 7 95 | 65 98 71 26 21 78 42 18 91 1 82 5 86 2 53 72 41 85 73 16 35 14 52 11 74
|
||||||
|
Card 160: 92 89 2 29 25 53 65 30 38 71 | 11 53 6 63 15 50 41 37 27 96 73 57 64 85 59 1 22 49 25 52 29 80 72 58 28
|
||||||
|
Card 161: 36 66 57 82 10 1 28 25 56 83 | 23 58 38 35 97 66 55 14 85 79 54 77 93 62 67 4 11 99 94 90 32 22 12 36 63
|
||||||
|
Card 162: 61 19 76 17 81 18 87 44 45 74 | 37 15 31 67 24 4 77 81 63 68 27 94 3 62 12 90 69 2 8 34 60 53 97 43 73
|
||||||
|
Card 163: 61 97 73 13 88 93 19 75 47 89 | 68 79 15 25 59 16 78 5 40 69 92 20 4 58 22 30 67 21 76 44 81 98 65 74 46
|
||||||
|
Card 164: 3 45 59 47 12 65 8 57 98 53 | 77 96 12 8 22 63 59 88 61 43 66 39 90 45 55 47 10 73 53 34 25 3 6 99 38
|
||||||
|
Card 165: 79 54 12 6 67 92 99 15 41 72 | 37 77 1 51 55 49 92 21 71 76 5 69 74 45 23 44 83 56 66 94 96 86 79 12 97
|
||||||
|
Card 166: 33 18 55 57 68 79 35 40 17 53 | 93 26 55 97 80 84 44 21 15 75 11 79 83 9 50 35 78 43 39 18 17 53 42 68 86
|
||||||
|
Card 167: 80 75 74 26 44 41 42 88 83 12 | 26 88 53 44 97 42 75 25 16 61 1 81 58 41 98 11 93 74 91 94 90 73 83 36 46
|
||||||
|
Card 168: 59 19 45 25 64 75 70 90 84 80 | 54 19 70 89 13 92 76 26 56 80 86 64 40 8 36 25 90 59 85 47 82 45 43 75 84
|
||||||
|
Card 169: 69 95 88 94 67 36 57 79 11 56 | 53 79 94 69 56 36 57 54 73 26 86 88 10 62 12 95 39 11 28 77 98 14 83 1 67
|
||||||
|
Card 170: 64 24 9 85 57 16 91 77 29 28 | 54 43 4 16 79 6 57 47 61 13 12 91 63 77 9 29 33 64 10 98 86 28 24 85 31
|
||||||
|
Card 171: 65 54 4 35 68 81 7 47 87 92 | 50 33 42 29 81 21 1 40 93 19 95 86 28 32 16 85 58 80 4 30 79 60 71 34 27
|
||||||
|
Card 172: 26 49 46 88 71 32 58 12 42 54 | 54 26 58 10 85 12 32 88 49 70 80 68 75 42 28 61 40 79 46 3 95 45 71 11 98
|
||||||
|
Card 173: 76 39 1 91 73 44 41 66 33 96 | 47 85 53 56 88 84 23 41 68 22 71 75 66 34 72 59 45 81 38 6 70 65 40 63 11
|
||||||
|
Card 174: 1 75 14 32 81 27 38 71 45 49 | 64 52 21 1 83 22 45 84 49 53 33 27 88 70 42 43 8 14 17 75 32 38 2 81 99
|
||||||
|
Card 175: 58 22 39 11 42 60 65 46 80 27 | 10 96 22 86 60 23 47 58 17 93 5 11 90 46 39 94 77 66 67 85 33 25 80 65 82
|
||||||
|
Card 176: 22 70 83 88 99 34 38 77 71 51 | 19 96 83 4 70 94 38 64 36 99 49 71 7 15 51 68 77 95 34 6 2 88 21 59 12
|
||||||
|
Card 177: 46 6 50 30 40 75 8 72 95 56 | 86 93 49 95 87 19 80 90 78 56 76 16 92 18 27 37 94 70 59 43 1 72 44 40 81
|
||||||
|
Card 178: 81 79 65 34 71 66 4 53 85 39 | 23 50 10 59 56 60 27 24 5 70 52 67 41 30 99 75 3 37 17 62 12 22 19 93 73
|
||||||
|
Card 179: 80 74 16 31 33 81 55 85 29 53 | 47 53 79 77 2 8 10 41 27 94 28 96 69 63 22 43 90 50 99 86 34 14 5 80 84
|
||||||
|
Card 180: 24 47 72 12 42 34 76 14 15 41 | 18 11 94 82 59 12 15 29 30 9 35 61 87 7 64 95 43 37 6 26 98 78 33 48 92
|
||||||
|
Card 181: 75 31 15 54 44 21 32 8 22 72 | 87 4 24 71 38 32 14 54 44 64 67 55 7 20 74 21 93 6 76 61 91 97 18 17 52
|
||||||
|
Card 182: 17 53 25 76 48 60 80 56 39 50 | 23 5 61 46 97 72 62 55 6 66 9 87 51 7 68 79 92 65 47 26 58 18 36 90 93
|
||||||
|
Card 183: 70 41 69 74 39 43 33 7 79 48 | 51 87 28 93 15 66 58 96 44 29 26 38 94 95 80 71 2 61 32 16 47 77 90 72 3
|
||||||
|
Card 184: 27 69 74 77 85 59 62 87 31 54 | 22 57 12 18 49 26 50 4 84 28 5 67 34 16 86 9 13 42 41 76 77 37 46 98 64
|
||||||
|
Card 185: 33 1 29 47 81 36 87 93 8 99 | 95 57 34 40 35 15 66 51 3 75 53 43 11 25 80 90 48 60 89 70 85 94 14 17 78
|
||||||
|
Card 186: 93 98 37 44 96 61 56 99 52 60 | 87 89 22 61 96 50 93 56 41 30 98 42 60 52 44 37 75 28 99 65 57 88 91 86 20
|
||||||
|
Card 187: 19 84 39 68 48 5 65 93 4 71 | 1 66 81 63 25 28 75 54 86 61 38 37 17 27 32 45 12 31 33 97 34 87 58 24 3
|
||||||
|
Card 188: 58 83 80 19 52 78 43 97 87 44 | 88 73 43 97 84 55 35 9 87 65 16 93 52 40 58 80 44 41 53 19 32 83 26 78 6
|
||||||
|
Card 189: 82 2 67 87 5 55 43 40 66 80 | 88 8 3 92 78 79 65 54 2 80 66 82 75 41 55 5 40 32 25 94 98 64 99 43 76
|
||||||
|
Card 190: 12 61 25 96 98 33 70 86 5 36 | 68 29 33 71 95 72 90 46 63 77 53 88 76 22 61 73 99 75 87 20 16 47 13 89 66
|
||||||
|
Card 191: 3 21 23 71 56 65 50 75 45 15 | 81 44 25 39 83 75 60 15 71 59 2 37 86 45 47 65 55 88 91 77 54 42 76 16 21
|
||||||
|
Card 192: 61 46 82 28 59 17 8 94 36 53 | 94 59 61 20 5 23 10 66 17 64 46 68 49 28 90 79 36 53 19 81 8 55 82 89 18
|
||||||
|
Card 193: 70 22 45 35 51 12 90 29 83 61 | 70 78 11 22 4 96 66 85 51 90 69 45 29 35 23 36 61 21 27 42 91 12 72 83 5
|
||||||
|
Card 194: 33 56 96 67 75 44 71 20 24 98 | 20 80 24 26 33 8 44 4 96 23 65 57 29 98 50 61 59 55 77 28 86 71 75 67 56
|
||||||
|
Card 195: 9 1 79 39 24 95 91 4 45 93 | 39 91 18 35 96 45 58 92 7 79 9 98 67 95 30 60 10 62 54 26 25 1 93 99 50
|
||||||
|
Card 196: 43 53 38 7 78 41 57 98 89 83 | 46 38 94 81 3 56 16 41 87 68 52 95 77 92 88 72 36 17 80 58 43 97 27 99 7
|
||||||
|
Card 197: 73 49 37 31 85 45 78 46 48 97 | 73 36 82 30 3 84 15 69 45 53 37 29 85 96 91 61 78 70 71 34 62 79 22 57 64
|
||||||
|
Card 198: 52 67 30 11 88 68 96 84 48 89 | 38 66 64 88 95 27 62 46 3 16 20 48 76 97 91 74 70 73 17 75 52 30 21 58 77
|
||||||
|
Card 199: 30 15 96 2 41 56 50 81 29 60 | 42 56 5 50 40 1 6 77 61 73 60 74 79 8 53 3 75 80 36 64 89 43 81 70 90
|
||||||
|
Card 200: 86 29 15 97 91 10 62 68 19 75 | 8 12 68 18 36 62 37 16 41 97 5 64 81 80 75 6 24 59 23 33 79 1 22 63 89
|
||||||
|
Card 201: 16 72 24 22 23 44 67 3 27 85 | 54 78 25 59 87 6 98 81 49 77 83 33 82 99 90 32 65 57 30 36 28 95 92 17 71
|
||||||
|
Card 202: 69 11 38 33 26 39 84 57 98 36 | 46 35 45 80 94 26 52 92 76 90 55 31 18 73 30 15 7 39 4 34 19 47 21 29 54
|
||||||
|
Card 203: 62 87 19 82 3 28 64 9 93 80 | 50 11 71 78 36 25 66 40 43 51 81 48 44 27 75 73 14 26 99 49 69 6 55 33 67
|
||||||
|
Card 204: 82 64 58 18 73 13 2 71 24 49 | 9 61 47 31 5 89 78 99 40 54 23 68 38 95 69 84 53 27 45 33 87 90 93 44 60
|
6
day4/sample.txt
Normal file
6
day4/sample.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53
|
||||||
|
Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19
|
||||||
|
Card 3: 1 21 53 59 44 | 69 82 63 72 16 21 14 1
|
||||||
|
Card 4: 41 92 73 84 69 | 59 84 76 51 58 5 54 83
|
||||||
|
Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36
|
||||||
|
Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11
|
Loading…
Reference in New Issue
Block a user