From 2dad8cf5d59e07637ad45c4200966816b76dcd67 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 1 Dec 2026 17:04:23 +0000 Subject: 2026: 1 --- 2026/1.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 2026/1.hs (limited to '2026/1.hs') 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 -- cgit v1.3.1