How can I make it faster?

Revision en1, by sdKrhMn286, 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 :);

History

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