Advertisement
Guest User

Untitled

a guest
Nov 5th, 2021
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. f a= map $ join.map (\x->[length x:head x] <> replicate (length x - 1) [0]).group.a
  2. f2 x= map (length &&& head).group.map init.sort.filter ((==1).last).join.f id $ transpose $ f (map (:[])) x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement