mkitkat's blog

By mkitkat, history, 5 years ago, In English

Hi, I was going through the solutions for this question Mike and Distributions and wrote this ->Solution<- using some hints from some others solution.

Help me, I can't figure out why this solution even passes as it would have given TLE. Thanks in advance.

  • Vote: I like it
  • +5
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it -13 Vote: I do not like it

there is so many different "unfair" sequences because of "k should be smaller or equal to n/2+1" which made it possible to find one fast enough with random_shuffle