Anton Cheshkov


Fri Dec 27 10:16:47 2013
haskell
import Data.List
main = getLine >>= \x -> getContents >>= \i -> putStr (unlines (t (c x (t $ c x (lines i)))))
t = foldl (#) ([]).(map f)
c x k = map (\l -> r $ x @@ (r $ x @@ l) ) k
r = reverse
q = length
(@@) x y = z x (replicate (q x) ' ') y 
f = map (:[])
(#) [] [] = []
(#) [] (y:s) = [y] ++ s
(#) (x:s) [] = [x] ++ s
(#) (x:k) (y:l) = [x ++ y] ++ (k # l)
z a b s@(x:xs) = if isPrefixOf a s then b++z a b (drop (q a) s) else x:z a b xs
z _ _ [] = []
Fri Dec 27 10:11:24 2013
haskell
import Data.List

main = getLine >>= \x -> getContents >>= \i -> putStr (unlines (t (c x (t $ c x (lines i)))))
t = foldl (#) ([]) . (map f)
c x ll = map (\l -> r $ x @@ (r $ x @@ l) ) ll
r = reverse
(@@) x y = rep x (replicate (length x) ' ') y 
f = map (:[])
(#) [] [] = []
(#) [] (y:ys) = [y] ++ ys
(#) (x:xs) [] = [x] ++ xs
(#) (x:xs) (y:ys) = [x ++ y] ++ (xs # ys)
rep a b s@(x:xs) = if isPrefixOf a s then b++rep a b (drop (length a) s) else x:rep a b xs
rep _ _ [] = []

code:1:8: Could not find module ‘Data.List.Utils’ Perhaps you meant Data.List.Split (from split-0.2.2) Use -v to see a list of the files searched for.

import Data.List.Utils


              
instead of
qaw    
dsertyu
f fe234
f rew23
s resse
e fdswe
import Data.List

code:2:8: Could not find module ‘Data.String.Utils’ Use -v to see a list of the files searched for.

import Data.List
import Data.String.Utils
Fri Dec 27 00:01:28 2013
haskell
import Data.List
main=getContents>>=putStr.unlines.sort.permutations
Thu Dec 26 23:01:35 2013
haskell
main = getLine >>= putStr
Thu Dec 26 22:52:29 2013
haskell

"1"
instead of
1
main = getLine >>= print
Thu Dec 26 22:40:56 2013
Tac
haskell

code:1:1: Parse error: naked expression at top level Perhaps you intended to use TemplateHaskell

(lines . reverse)
Thu Dec 26 22:39:23 2013
Tac
perl


              
instead of
zxcv
asdf
qwer
lines . reverse