How can I make it faster?

Revision en1, by ValAr_MoRghulis_286, 2023-06-08 15:13:06

I wrote this solution for this problem and getting TLE on last test case. Can someone tell me how I can make my solution more optimal with or without DP .

Thanks in advance :);


  Rev. Lang. By When Δ Comment
en1 English ValAr_MoRghulis_286 2023-06-08 15:13:06 316 Initial revision (published)