summaryrefslogtreecommitdiff
path: root/2023/day02
diff options
context:
space:
mode:
Diffstat (limited to '2023/day02')
-rw-r--r--2023/day02/Main.hs26
-rw-r--r--2023/day02/MySplit.hs41
-rw-r--r--2023/day02/MySplit2.hs50
-rw-r--r--2023/day02/Parsing.hs122
-rw-r--r--2023/day02/Test.hs43
-rw-r--r--2023/day02/example.txt5
-rw-r--r--2023/day02/input.txt100
7 files changed, 387 insertions, 0 deletions
diff --git a/2023/day02/Main.hs b/2023/day02/Main.hs
new file mode 100644
index 0000000..5b235d2
--- /dev/null
+++ b/2023/day02/Main.hs
@@ -0,0 +1,26 @@
+import Data.Char
+import Data.List
+
+type Parser a = String -> [(a, String)]
+
+char :: Parser Char
+char [] = []
+char (x:xs) = [(x, xs)]
+
+failure :: Parser a
+failure = (\a -> [])
+
+return :: Parser a
+return v inp = [(v, inp)]
+
+parse :: Parser a -> String -> [(a, String)]
+parse p inp = p inp
+
+main :: IO ()
+main = do
+ inputLines <- lines <$> getContents
+
+ -- let arePossible = filter isPossible lines
+
+ mapM_ putStrLn inputLines
+
diff --git a/2023/day02/MySplit.hs b/2023/day02/MySplit.hs
new file mode 100644
index 0000000..2bb5f3f
--- /dev/null
+++ b/2023/day02/MySplit.hs
@@ -0,0 +1,41 @@
+import Data.List.Split (splitOn)
+
+game :: String -> [String]
+game = splitOn [';']
+
+reveal :: String -> [String]
+reveal x = concat ( map (splitOn [',']) (game x) )
+
+colors :: String -> [(Int, String)]
+colors x = map (\x -> color (splitOn [' '] x)) (reveal x)
+
+color :: [String] -> (Int, String)
+color [_, i, s] = (read i, s)
+
+validColor :: (Int, String) -> Bool
+validColor (i, s) = case s of
+ "red" -> i <= 12
+ "green" -> i <= 13
+ "blue" -> i <= 14
+ _ -> False
+
+getColors :: String -> String
+getColors s = tail (dropWhile (/= ':') s)
+
+isGameValid :: String -> Bool
+isGameValid s = all validColor (colors (getColors s))
+
+isValid :: [String] -> Bool
+isValid s = all isGameValid s
+
+main :: IO ()
+main = do
+ inputLines <- lines <$> getContents
+
+ -- let arePossible = filter isPossible lines
+ -- myColors <- isValid inputLines
+ print (sum (map (\(_,n) -> n) (filter (\(b,_) -> b) (zip (map isGameValid inputLines) [1..]))))
+
+ -- mapM_ putStrLn myColors
+ -- mapM_ putStrLn inputLines
+
diff --git a/2023/day02/MySplit2.hs b/2023/day02/MySplit2.hs
new file mode 100644
index 0000000..baee8ae
--- /dev/null
+++ b/2023/day02/MySplit2.hs
@@ -0,0 +1,50 @@
+import Data.List.Split (splitOn)
+
+game :: String -> [String]
+game = splitOn [';']
+
+reveal :: String -> [String]
+reveal x = concat ( map (splitOn [',']) (game x) )
+
+colors :: String -> [(Int, String)]
+colors x = map (\x -> color (splitOn [' '] x)) (reveal x)
+
+color :: [String] -> (Int, String)
+color [_, i, s] = (read i, s)
+
+validColor :: (Int, String) -> Bool
+validColor (i, s) = case s of
+ "red" -> i <= 12
+ "green" -> i <= 13
+ "blue" -> i <= 14
+ _ -> False
+
+getColors :: String -> String
+getColors s = tail (dropWhile (/= ':') s)
+
+isGameValid :: String -> Bool
+isGameValid s = all validColor (colors (getColors s))
+
+isValid :: [String] -> Bool
+isValid s = all isGameValid s
+
+getMyColor :: String -> [(Int, String)]
+getMyColor s = colors (getColors s)
+
+myFilter :: String -> [(Int, String)] -> Int
+myFilter color s = maximum (map (\(i,_) -> i) (filter (\(_,c) -> c == color) s))
+
+main :: IO ()
+main = do
+ inputLines <- lines <$> getContents
+
+ -- let arePossible = filter isPossible lines
+ -- myColors <- isValid inputLines
+ -- print (sum (map (\(_,n) -> n) (filter (\(b,_) -> b) (zip (map isGameValid inputLines) [1..]))))
+ let myColors = map (\x -> getMyColor x) inputLines
+ let myResult = map (\c -> myFilter "red" c * myFilter "green" c * myFilter "blue" c) myColors
+ print (sum myResult)
+
+ -- mapM_ putStrLn myColors
+ -- mapM_ putStrLn inputLines
+
diff --git a/2023/day02/Parsing.hs b/2023/day02/Parsing.hs
new file mode 100644
index 0000000..1974be1
--- /dev/null
+++ b/2023/day02/Parsing.hs
@@ -0,0 +1,122 @@
+-- Functional parsing library from chapter 13 of Programming in Haskell,
+-- Graham Hutton, Cambridge University Press, 2016.
+
+module Parsing (module Parsing, module Control.Applicative) where
+
+import Control.Applicative
+import Data.Char
+
+-- Basic definitions
+
+newtype Parser a = P (String -> [(a,String)])
+
+parse :: Parser a -> String -> [(a,String)]
+parse (P p) inp = p inp
+
+item :: Parser Char
+item = P (\inp -> case inp of
+ [] -> []
+ (x:xs) -> [(x,xs)])
+
+-- Sequencing parsers
+
+instance Functor Parser where
+ -- fmap :: (a -> b) -> Parser a -> Parser b
+ fmap g p = P (\inp -> case parse p inp of
+ [] -> []
+ [(v,out)] -> [(g v, out)])
+
+instance Applicative Parser where
+ -- pure :: a -> Parser a
+ pure v = P (\inp -> [(v,inp)])
+
+ -- <*> :: Parser (a -> b) -> Parser a -> Parser b
+ pg <*> px = P (\inp -> case parse pg inp of
+ [] -> []
+ [(g,out)] -> parse (fmap g px) out)
+
+instance Monad Parser where
+ -- (>>=) :: Parser a -> (a -> Parser b) -> Parser b
+ p >>= f = P (\inp -> case parse p inp of
+ [] -> []
+ [(v,out)] -> parse (f v) out)
+
+-- Making choices
+
+instance Alternative Parser where
+ -- empty :: Parser a
+ empty = P (\inp -> [])
+
+ -- (<|>) :: Parser a -> Parser a -> Parser a
+ p <|> q = P (\inp -> case parse p inp of
+ [] -> parse q inp
+ [(v,out)] -> [(v,out)])
+
+-- Derived primitives
+
+sat :: (Char -> Bool) -> Parser Char
+sat p = do x <- item
+ if p x then return x else empty
+
+digit :: Parser Char
+digit = sat isDigit
+
+lower :: Parser Char
+lower = sat isLower
+
+upper :: Parser Char
+upper = sat isUpper
+
+letter :: Parser Char
+letter = sat isAlpha
+
+alphanum :: Parser Char
+alphanum = sat isAlphaNum
+
+char :: Char -> Parser Char
+char x = sat (== x)
+
+string :: String -> Parser String
+string [] = return []
+string (x:xs) = do char x
+ string xs
+ return (x:xs)
+
+ident :: Parser String
+ident = do x <- lower
+ xs <- many alphanum
+ return (x:xs)
+
+nat :: Parser Int
+nat = do xs <- some digit
+ return (read xs)
+
+int :: Parser Int
+int = do char '-'
+ n <- nat
+ return (-n)
+ <|> nat
+
+-- Handling spacing
+
+space :: Parser ()
+space = do many (sat isSpace)
+ return ()
+
+token :: Parser a -> Parser a
+token p = do space
+ v <- p
+ space
+ return v
+
+identifier :: Parser String
+identifier = token ident
+
+natural :: Parser Int
+natural = token nat
+
+integer :: Parser Int
+integer = token int
+
+symbol :: String -> Parser String
+symbol xs = token (string xs)
diff --git a/2023/day02/Test.hs b/2023/day02/Test.hs
new file mode 100644
index 0000000..6d21d48
--- /dev/null
+++ b/2023/day02/Test.hs
@@ -0,0 +1,43 @@
+import Data.Char (isDigit, isSpace)
+
+data Color = Red | Green | Blue deriving (Show, Eq)
+
+-- Parse a single digit
+digit :: Char -> Maybe Int
+digit c
+ | isDigit c = Just (read [c])
+ | otherwise = Nothing
+
+-- Parse an integer
+-- Parse an integer
+parseInt :: String -> Maybe Int
+parseInt str = case reads str of
+ [(num, "")] -> Just num
+ _ -> Nothing
+
+-- Parse color
+parseColor :: String -> Maybe Color
+parseColor "red" = Just Red
+parseColor "green" = Just Green
+parseColor "blue" = Just Blue
+parseColor _ = Nothing
+
+-- Parse the entire input string
+parseInput :: String -> Maybe Bool
+parseInput input = do
+ let (numStr, rest) = span (\c -> isDigit c ) input
+ num <- parseInt numStr
+ let colorStr = dropWhile isSpace rest
+ color <- parseColor colorStr
+ case color of
+ Red -> pure (num < 12)
+ Green -> pure (num < 13)
+ Blue -> pure (num < 14)
+
+main :: IO ()
+main = do
+ putStrLn "Enter input (e.g., '10 red'):"
+ input <- getLine
+ case parseInput input of
+ Just result -> putStrLn $ "Result: " ++ show result
+ Nothing -> putStrLn "Invalid input."
diff --git a/2023/day02/example.txt b/2023/day02/example.txt
new file mode 100644
index 0000000..295c36d
--- /dev/null
+++ b/2023/day02/example.txt
@@ -0,0 +1,5 @@
+Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green
+Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue
+Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red
+Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red
+Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green
diff --git a/2023/day02/input.txt b/2023/day02/input.txt
new file mode 100644
index 0000000..876d2a0
--- /dev/null
+++ b/2023/day02/input.txt
@@ -0,0 +1,100 @@
+Game 1: 12 blue; 2 green, 13 blue, 19 red; 13 red, 3 green, 14 blue
+Game 2: 12 blue, 1 red, 1 green; 1 red, 12 blue, 3 green; 5 green, 1 red, 9 blue; 1 red, 7 blue, 4 green
+Game 3: 1 red; 12 blue, 15 red; 1 green, 10 red, 2 blue; 1 green, 3 red, 9 blue
+Game 4: 6 blue, 5 green; 2 blue, 6 green, 6 red; 11 blue, 5 red; 6 green, 11 red, 7 blue; 4 green, 10 red; 1 green, 7 red, 13 blue
+Game 5: 10 green, 1 red, 2 blue; 3 red, 4 green, 4 blue; 5 green, 5 red
+Game 6: 1 green, 6 blue, 14 red; 9 blue, 5 red; 14 red, 12 blue
+Game 7: 1 green, 9 red, 8 blue; 9 blue, 1 green, 6 red; 1 green, 15 blue, 19 red
+Game 8: 9 red, 7 green, 2 blue; 6 red, 17 green; 18 red, 16 green, 2 blue; 10 red, 14 green
+Game 9: 1 blue, 11 red, 9 green; 8 red, 1 blue, 9 green; 4 blue, 16 red, 9 green; 8 green, 3 blue, 6 red; 8 green, 11 red, 3 blue; 11 red, 2 blue
+Game 10: 8 green, 14 blue; 1 red, 6 blue, 9 green; 6 blue, 4 green, 1 red; 16 green, 9 blue
+Game 11: 6 green, 11 blue, 1 red; 10 green, 1 red; 7 blue, 2 green, 1 red
+Game 12: 3 green, 5 blue, 2 red; 14 blue, 16 green, 4 red; 8 green, 14 blue, 4 red
+Game 13: 5 red, 12 blue, 2 green; 2 green, 1 red, 9 blue; 1 red, 2 blue, 3 green; 3 green, 3 red, 7 blue; 2 red, 13 blue; 1 red, 10 blue, 2 green
+Game 14: 5 blue, 1 red, 2 green; 8 blue, 1 green, 1 red; 1 blue, 2 green
+Game 15: 14 blue, 9 green, 1 red; 2 red, 15 blue, 12 green; 1 blue, 2 green, 1 red; 1 red, 16 green, 15 blue; 1 red, 12 green, 8 blue; 1 red, 17 blue
+Game 16: 7 red, 1 green, 18 blue; 7 blue, 5 green, 17 red; 14 blue, 8 red, 6 green
+Game 17: 4 green, 5 blue; 5 green, 1 red, 7 blue; 3 green, 6 blue, 4 red; 2 green, 5 blue; 9 green, 6 red, 6 blue
+Game 18: 8 red, 6 blue; 4 blue, 19 red; 4 blue, 9 red; 9 blue, 10 red; 2 green, 9 blue, 13 red; 3 blue, 7 red
+Game 19: 8 green, 2 red, 17 blue; 11 blue, 4 red, 5 green; 8 blue, 8 green, 10 red; 9 green, 4 blue, 2 red; 4 green, 10 red, 6 blue
+Game 20: 9 green, 3 blue, 1 red; 5 blue, 16 green, 3 red; 3 green, 3 red; 2 blue, 1 red, 5 green
+Game 21: 7 green, 1 red, 10 blue; 7 green, 5 blue, 7 red; 7 green, 9 blue
+Game 22: 5 red, 2 blue, 9 green; 6 red, 11 green; 6 green, 6 red
+Game 23: 14 red, 2 blue, 9 green; 9 green, 1 blue, 4 red; 9 red, 1 green, 1 blue; 6 green; 3 blue, 1 green, 9 red; 1 blue, 2 red
+Game 24: 3 red, 7 green, 6 blue; 1 green, 5 blue; 6 blue, 1 red, 2 green; 5 red, 1 blue, 4 green; 6 red, 2 blue, 11 green; 2 green, 2 red, 1 blue
+Game 25: 5 green, 1 red, 3 blue; 3 blue, 6 green, 3 red; 3 red, 4 green, 1 blue; 6 green, 1 blue, 9 red; 2 blue, 2 red, 1 green
+Game 26: 3 green, 4 red, 12 blue; 2 red, 1 green, 15 blue; 7 red, 16 green, 4 blue; 11 blue, 11 green, 3 red; 8 green, 15 blue, 10 red
+Game 27: 9 red; 10 red, 2 blue; 3 red; 8 red, 1 green, 2 blue; 1 red, 2 blue; 1 blue, 4 red
+Game 28: 5 blue, 8 red, 5 green; 10 blue, 4 red, 5 green; 8 red, 14 blue, 10 green; 10 blue, 4 red, 1 green; 5 red, 17 green, 4 blue
+Game 29: 16 green, 11 red, 5 blue; 11 red, 14 blue, 13 green; 13 blue, 8 green; 3 red, 18 green, 15 blue
+Game 30: 2 red, 4 blue, 8 green; 6 green, 2 red, 2 blue; 6 green, 6 blue, 2 red
+Game 31: 2 red, 1 blue, 16 green; 10 green, 1 blue, 7 red; 1 blue, 14 green, 7 red; 2 blue, 1 green, 1 red; 6 red, 13 green; 2 blue, 6 red, 10 green
+Game 32: 4 green, 4 blue; 1 green, 5 red; 6 green, 1 red; 3 green, 5 red, 2 blue; 4 red, 1 blue, 4 green; 6 green, 2 blue, 6 red
+Game 33: 5 blue, 2 red, 1 green; 5 blue; 1 blue, 1 green, 10 red; 8 red, 3 blue, 1 green
+Game 34: 15 blue, 7 green; 12 green, 17 blue; 10 blue, 11 green; 1 red, 5 blue, 9 green; 2 red, 10 blue, 11 green
+Game 35: 2 red, 6 blue; 2 red, 5 blue, 4 green; 2 red, 8 green, 10 blue
+Game 36: 4 red, 9 green, 3 blue; 4 red, 6 green; 6 red; 11 red, 4 green
+Game 37: 3 blue, 12 green, 14 red; 3 red, 5 green, 7 blue; 2 blue, 2 green, 16 red
+Game 38: 17 blue, 16 red, 8 green; 4 green, 17 blue, 4 red; 8 red, 7 blue, 6 green; 2 blue, 9 green, 17 red; 10 blue, 8 green, 11 red
+Game 39: 10 blue, 1 red, 4 green; 4 green, 4 red, 6 blue; 11 blue
+Game 40: 5 green, 17 blue; 11 blue, 4 green, 7 red; 2 green, 6 red, 13 blue; 7 blue, 12 green, 16 red; 15 red, 3 green, 8 blue; 12 green, 3 blue, 12 red
+Game 41: 13 blue, 3 red, 1 green; 2 green, 10 red; 1 blue, 5 red, 3 green; 5 green, 16 blue; 9 blue, 2 green; 14 blue, 4 green, 5 red
+Game 42: 2 blue, 15 green, 3 red; 3 red, 17 green; 6 red, 1 blue, 8 green
+Game 43: 8 green, 9 red, 3 blue; 1 blue, 13 red; 5 red, 1 blue, 6 green; 2 red, 2 blue; 17 red, 2 blue, 6 green
+Game 44: 10 red, 3 blue; 10 blue, 5 green; 4 red, 4 blue, 1 green; 16 blue, 6 red, 7 green; 3 green, 12 blue
+Game 45: 12 blue, 2 red; 2 blue, 3 red, 2 green; 8 blue, 3 green; 4 green, 8 blue, 5 red; 3 red, 2 blue, 1 green; 1 red, 2 blue, 7 green
+Game 46: 1 blue, 11 red, 6 green; 2 blue, 11 red, 6 green; 8 red, 5 green
+Game 47: 2 blue, 9 red; 1 green, 5 blue; 10 red, 2 blue, 2 green; 10 red, 3 green, 3 blue; 3 red, 6 blue, 2 green; 1 red, 1 green, 5 blue
+Game 48: 1 red, 7 green; 1 blue, 10 green, 5 red; 4 red, 8 green; 10 red, 10 green; 2 red, 16 green; 11 red, 14 green, 1 blue
+Game 49: 1 red, 1 blue, 5 green; 6 green, 5 red; 3 blue, 4 red, 3 green; 3 red, 5 green, 2 blue; 3 blue, 3 red
+Game 50: 17 red, 1 green, 7 blue; 4 blue, 1 red, 5 green; 10 red, 13 blue; 17 red
+Game 51: 2 red, 1 green; 1 green, 10 blue, 2 red; 5 red, 1 green, 7 blue; 7 blue, 1 red; 9 blue, 5 red, 2 green
+Game 52: 8 green, 1 blue; 14 green, 1 red; 10 green, 1 red
+Game 53: 17 green, 6 blue; 17 blue, 9 green; 1 red, 12 blue
+Game 54: 4 blue, 7 red, 9 green; 7 red, 2 green; 14 green, 10 red, 3 blue; 9 green, 6 blue, 5 red; 2 blue, 3 green, 11 red
+Game 55: 11 green, 4 red; 14 green; 3 red, 3 green; 3 green, 4 red, 1 blue; 15 green, 6 red, 2 blue; 4 red, 3 blue, 15 green
+Game 56: 8 blue, 5 red, 9 green; 11 green, 5 blue, 6 red; 1 green, 1 blue, 7 red; 7 green, 4 red, 1 blue; 9 blue, 5 red, 1 green; 5 red, 2 blue
+Game 57: 11 green, 19 blue, 5 red; 15 green, 5 red, 18 blue; 16 green, 5 red, 10 blue; 19 blue, 3 red; 9 green, 8 blue
+Game 58: 4 blue, 12 green; 11 green, 4 blue; 6 blue, 6 green; 1 red, 2 green; 11 green, 3 blue; 13 blue, 6 green
+Game 59: 10 blue, 1 red; 1 green, 4 blue; 4 blue
+Game 60: 7 red, 2 green, 6 blue; 1 green, 13 red, 12 blue; 9 blue, 9 green, 8 red
+Game 61: 7 green, 3 red, 2 blue; 1 red, 1 blue; 5 green, 3 blue; 4 blue, 1 red, 4 green
+Game 62: 1 green, 8 blue, 6 red; 7 blue, 3 red, 12 green; 2 blue, 7 red, 6 green
+Game 63: 3 red, 2 green; 3 green, 4 blue, 9 red; 3 blue, 3 green, 16 red; 4 red, 1 blue
+Game 64: 10 red, 2 green, 15 blue; 4 red, 14 green; 6 red, 14 green, 2 blue
+Game 65: 11 red, 14 green, 5 blue; 7 blue, 14 green, 15 red; 1 blue, 14 green; 4 green, 4 blue, 7 red
+Game 66: 6 blue, 9 green, 6 red; 6 blue, 2 red, 4 green; 3 blue; 8 blue, 5 green, 8 red; 17 blue, 11 green; 12 green, 11 blue, 4 red
+Game 67: 8 red, 4 blue, 6 green; 4 blue, 8 red, 2 green; 1 green, 6 red, 2 blue; 10 red, 1 green, 2 blue; 1 blue, 5 red; 2 red, 1 green, 2 blue
+Game 68: 10 green, 9 red, 13 blue; 2 blue, 2 green, 4 red; 11 red, 13 blue; 4 green, 2 red, 8 blue
+Game 69: 16 red; 12 red, 1 green, 4 blue; 1 green, 14 red, 9 blue; 12 blue, 2 green, 13 red; 14 red, 2 green, 10 blue; 11 blue
+Game 70: 1 red, 19 green; 4 blue, 6 green; 12 green, 2 red
+Game 71: 9 green, 2 blue, 3 red; 5 red; 1 red, 1 blue, 5 green
+Game 72: 1 green, 19 red; 12 red, 1 green, 1 blue; 16 red, 6 blue; 14 red, 7 blue; 11 blue, 1 green, 13 red; 16 blue, 4 red
+Game 73: 1 green, 1 red, 2 blue; 8 green, 2 red, 4 blue; 7 blue, 7 green, 7 red
+Game 74: 1 blue, 1 green; 1 red; 1 red, 5 blue, 4 green; 2 blue, 1 red; 1 blue
+Game 75: 8 green, 1 red; 3 blue, 1 red, 5 green; 12 green
+Game 76: 8 green, 6 red, 2 blue; 7 red, 1 blue; 2 blue, 9 green, 1 red; 8 red, 13 green; 12 green, 2 red; 7 green, 5 red
+Game 77: 3 blue, 1 green, 10 red; 13 red; 1 blue, 13 red, 1 green
+Game 78: 2 red, 3 green, 14 blue; 3 red, 16 blue, 6 green; 3 blue, 3 red, 9 green; 4 blue, 11 green; 6 green, 2 blue; 2 red, 10 green, 11 blue
+Game 79: 5 green, 10 blue, 2 red; 16 green, 15 blue, 1 red; 1 red, 11 green; 1 red, 11 blue, 16 green; 7 blue, 18 green
+Game 80: 9 blue, 10 green; 13 green, 9 blue; 1 red, 5 green, 5 blue; 13 green, 5 blue, 1 red
+Game 81: 9 green, 15 red, 11 blue; 11 blue, 9 red, 5 green; 2 green, 11 blue, 19 red; 14 green, 15 red, 5 blue
+Game 82: 4 green, 6 red, 13 blue; 5 blue, 5 red, 4 green; 2 green, 7 blue
+Game 83: 12 blue, 8 red; 6 red, 1 blue, 1 green; 7 red, 1 green, 1 blue; 6 red, 1 green, 9 blue; 10 blue, 3 red; 1 red, 5 blue
+Game 84: 9 blue, 13 red; 8 blue, 1 green; 9 blue, 1 green; 3 blue, 5 red, 1 green
+Game 85: 14 green, 5 blue, 8 red; 1 blue, 5 green, 1 red; 10 red, 7 blue, 17 green; 3 blue, 6 green; 6 red, 5 blue, 4 green; 5 blue, 4 green, 6 red
+Game 86: 14 red; 20 red, 3 blue; 1 green, 12 blue, 15 red; 16 red, 13 blue; 13 red, 12 blue; 2 blue, 20 red
+Game 87: 2 blue, 2 red, 10 green; 8 green, 9 red, 1 blue; 11 red, 1 green, 4 blue; 13 red, 1 blue; 11 green, 16 red, 3 blue
+Game 88: 5 green, 4 red, 1 blue; 3 blue, 8 red, 10 green; 11 green, 7 red, 4 blue; 11 green, 5 blue, 4 red; 9 red, 9 green; 4 blue, 6 green, 9 red
+Game 89: 2 blue, 2 red, 5 green; 2 red, 2 blue, 3 green; 2 red, 1 blue, 7 green; 6 green, 1 red, 2 blue
+Game 90: 4 green, 1 blue, 5 red; 2 blue, 2 red, 10 green; 2 green, 8 red, 1 blue; 10 green, 5 red; 2 red, 3 green, 2 blue
+Game 91: 16 blue, 5 red, 15 green; 4 green, 7 red, 3 blue; 4 red, 8 green, 12 blue; 4 green, 8 red, 17 blue
+Game 92: 13 red, 2 blue, 12 green; 19 green, 7 red; 17 green, 2 blue, 3 red; 6 blue, 11 red, 10 green; 6 red, 15 green, 3 blue; 6 blue, 20 green, 11 red
+Game 93: 2 blue, 3 green; 1 blue, 4 red; 1 red
+Game 94: 3 red, 5 green, 6 blue; 7 blue, 5 green, 6 red; 9 blue, 1 green, 2 red; 4 blue, 1 green, 4 red
+Game 95: 8 green, 9 red, 2 blue; 7 green, 7 red; 2 green, 4 blue, 6 red; 6 blue, 2 red, 2 green
+Game 96: 11 blue, 4 red; 1 green, 3 red, 14 blue; 2 green, 3 red, 8 blue; 7 red, 1 green, 3 blue; 8 blue, 6 red, 2 green; 9 blue, 3 red, 3 green
+Game 97: 5 green, 13 red, 7 blue; 2 blue, 12 red, 6 green; 10 blue, 11 red, 3 green; 4 green, 11 blue, 15 red; 8 green, 16 blue, 1 red; 15 blue, 4 red, 5 green
+Game 98: 3 blue, 1 red; 4 blue; 2 green, 1 blue; 2 green, 1 red, 5 blue
+Game 99: 4 green, 3 blue, 9 red; 6 blue, 5 red, 3 green; 2 green, 4 blue, 7 red; 8 red, 4 blue; 2 green, 15 red; 4 red, 5 blue, 3 green
+Game 100: 8 red, 4 blue, 4 green; 10 blue, 3 red, 4 green; 10 green, 4 red; 18 red, 9 blue, 2 green; 12 red, 4 green, 2 blue