You are viewing a single comment's thread. Return to all comments →
my python sol:
def solve(p): q=p[:] q.sort() if p==q: return 0 l={} f=math.factorial(len(p)) for i in range(len(p)): if p[i] in l: l[p[i]]=l[p[i]]+1 else: l[p[i]]=1 p=list(set(p)) for i in range(len(p)): f=f/(math.factorial(l[p[i]])) return ("%.6f"%f)
Seems like cookies are disabled on this browser, please enable them to open this website
Lazy Sorting
You are viewing a single comment's thread. Return to all comments →
my python sol: