puss_in_boots's blog

By puss_in_boots, history, 6 years ago, In English

There is strange problem with test cases in this problem: 429D - Tricky Function.

Author's solution is O(nlog(n)), but you can see this solution: 11245064.

It works O(n2) in worst but doesn't achieve it because of s[i] - s[i + l] < l * 104 or because of some other constraints.

Moreover my O(nlog(n)) doesn't work here: 13704572

What's going on in both cases?

Read more »

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