I don’t know why i am getting TLE in CHEFSHIP.
Problem Link- https://www.codechef.com/COOK118B/problems/CHEFSHIP
My Submission - https://www.codechef.com/viewsolution/33308621
i know that complexity of substr is O(n)
Can anybody tell any alternative way to extract substring from a string in an efficient way except substr
Can anybody point out a mistake so that i can change something in my code and get AC?
Thanks in Advance!