Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
import Data.List
|
||||
|
||||
main = do
|
||||
f <- readFile "./../Puzzels/Rosetta/inout.txt"
|
||||
let (ioo,dt) = unzip. map ((\(_:io:_:t:_)-> (io,t)). words) . lines $ f
|
||||
cio = drop 1 . scanl (\c io -> if io == "IN" then pred c else succ c) 0 $ ioo
|
||||
mo = maximum cio
|
||||
putStrLn $ "Maximum simultaneous license use is " ++ show mo ++ " at:"
|
||||
mapM_ (putStrLn . (dt!!)) . elemIndices mo $ cio
|
||||
Loading…
Add table
Add a link
Reference in a new issue