Why is this NOTALLFL solution not TLE?


This question was asked in February Lunch Time.
In this question constraints was 1 <= n <= 10^5, and 1 <= k <= 10^5. And this is an O(n*k) solution which got AC. Why it is not getting TLE?

Link?

1 Like

Testcases seem to be pretty weak for this Problem.

2 Likes

https://www.codechef.com/viewsolution/29980772
This is the solution.

My testcase causes this one to timeout, too.

@admin / @vijju123 - can we get a testfile added to NOTALLFL for Practice? Some variant of this, but toughened up/ randomised a little (the sum of N for this one is only 10^5, but is allowed to be over 10^6).

2 Likes