Need Help in further Optimization in a problem

Revision en1, by MehulJ21, 2021-04-29 15:30:11

Hi, I was solving a problem div1 94 B String

I have solved this problem using suffix array but in this problem k is small I want to know to further optimize this when k is big like n*(n+1)/2.

Here n = length of string , k = smallest kth lexicographically smallest string.

My solution link of the problem

Help me to optimize it for big k.

Thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English MehulJ21 2021-04-29 15:30:11 517 Initial revision (published)