Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
equiv_strings
split xs = (take n xs, drop n xs) where n = div (length xs) 2 equiv xs ys |length xs /= length ys = False |length xs == 0 = True |length xs == 1 = xs!!0 == ys!!0 |otherwise = ((compare xs ys) == EQ) || (equiv a1 b1 && equiv a2 b2) || (equiv a1 b2 && equiv a2 b1) where (a1,a2) = split xs (b1,b2) = split ys main = do a <- getLine b <- getLine let n = (length a - 1) let s = take n a let t = take n b putStrLn $ if equiv s t then "YES" else "NO"
run
|
edit
|
history
|
help
0
Haskell remove item by index
haskell
Kleiner dan tien
State
ad-hoc braille dot rendering
Reader
divisibleBy a b
suffix trie
=)
Producter