diff options
| author | Tom Smeding <tsmeding@ed.ac.uk> | 2026-12-01 18:04:23 +0100 |
|---|---|---|
| committer | Tom Smeding <tsmeding@ed.ac.uk> | 2026-12-01 18:04:23 +0100 |
| commit | 2dad8cf5d59e07637ad45c4200966816b76dcd67 (patch) | |
| tree | 30530e30b4e71a30f90ba477d0b7c4e401f3a455 /2026/1.hs | |
| parent | dbb18933b67481cc9ddfd7e8ab4aefa1d65e6a38 (diff) | |
2026: 1
Diffstat (limited to '2026/1.hs')
| -rw-r--r-- | 2026/1.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/2026/1.hs b/2026/1.hs new file mode 100644 index 0000000..e36246b --- /dev/null +++ b/2026/1.hs @@ -0,0 +1,10 @@ +{-# OPTIONS -Wno-x-partial #-} +module Main where + +import Control.Arrow +import Control.Monad (join) +import Data.Bifunctor (bimap) +import Data.List (group, sort) + +main :: IO () +main = runKleisli (const () ^<< join (***) (Kleisli print)) . join bimap (product . map snd . take 3) . (reverse &&& id) . sort . map (length &&& head) . group . sort . map (read @Int) . words =<< getContents |
