Here, In WIPL I used subset-sum DP in the do-while loop, which means worst-case complexity would be k^3, and k = 4000, so the answer should be TLE, But I got AC.
It may be due to weak test cases or some other reason ??
Here, In WIPL I used subset-sum DP in the do-while loop, which means worst-case complexity would be k^3, and k = 4000, so the answer should be TLE, But I got AC.
It may be due to weak test cases or some other reason ??