You are viewing a single comment's thread. Return to all comments →
ruby:
def solve(s) counts = s.split('').group_by{|x|x}.values.map{|v| v.size/2} (1..counts.sum).reduce(:*)/(counts.map{|c| (1..c).reduce(:*) || 1}.reduce(:*))%(10**9+7) end
Seems like cookies are disabled on this browser, please enable them to open this website
Game Of Thrones - II
You are viewing a single comment's thread. Return to all comments →
ruby: