summaryrefslogtreecommitdiff
path: root/2026/1.hs
blob: d6294fa5cbc533e44e6e80584a93d268514e4c92 (plain)
1
2
3
4
5
6
7
8
9
{-# OPTIONS -Wno-x-partial #-}
module Main where

import Control.Arrow
import Control.Monad (join)
import Data.List (group, sort)

main :: IO ()
main = runKleisli (const () ^<< join (***) (Kleisli print <<^ product . map snd . take 3)) . (reverse &&& id) . sort . map (length &&& head) . group . sort . map (read @Int) . words =<< getContents