Need help with problem C

Revision en1, by c1ph3rx, 2023-03-05 15:51:31

Hello. In yesterday's contest i was trying to solve its C problem but didn't finish it, so i have tried it again today but after implementing the idea that i had, i get time limit exceeded on test 3 (even though i implemented it with binary search, at least i think so). So here is what i tried: I reversed the sequence and then for every subsequence starting from index i and ending at size of vector for its maximal cost took maximal size of subsequences subsequence where its all members are >= of theirs indices+1-i; 196127370 Is the observation bad or did i implement it wrong, or both. Thanks for help.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English c1ph3rx 2023-03-05 15:51:31 656 Initial revision (published)