CSES Coin Combinations I Java TLE.

Revision en2, by pranav232323, 2021-01-25 22:44:50

I'm getting TLE despite having an optimal time complexity: $$$O(nk)$$$ where $$$k$$$ is the target and $$$n$$$ is the number of coins. I even tried optimizing the modulo operation according to https://codeforces.com/blog/entry/77506, but I still have one test case that keeps TLE-ing. Further, downloading and running that test case locally indicates that my code is executing in well under the time limit of $$$1$$$ second.

Is there anything I can do at this point?

Submission: https://cses.fi/paste/6a1dc1e39bbd5552186afe/

Problem: https://cses.fi/problemset/task/1635

P.S. Tagging pllk in case this is an issue with the judging servers.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English pranav232323 2021-01-25 22:44:50 39
en1 English pranav232323 2021-01-25 22:05:37 706 Initial revision (published)