Trust Me , You Can Solve It ;-)

Nafis Shahriar loves to do codeforces programming contests. He is the first candidate master in codeforces from MBSTU. One day he found a problem. As he was busy practicing the suffix array, he gave the problem to his juniors.


This is a companion discussion topic for the original entry at https://toph.co/p/trust-me-you-can-solve-it

what’s the idea to solve this problem?

Editorial: https://bit.ly/mbstu-lockdown-contest-1-editorial :slight_smile: