10679

This problem also can be solved using Suffix array but gets TLE. Code as follows:

 

Leave a Reply

Your email address will not be published. Required fields are marked *