TLE in CHEFSHIP

Codechef judge is giving me TLE for my solutions for the problem CHEFSHIP. I tried both simple approaches and hashing but it is giving TLE. I even tried to submit the solutions which were accepted. Is this a bug of Codechef judge?

Impossible to say without seeing your code :slight_smile:

1 Like

Here are the links of my submissions including copied and accepted solutions.

CodeChef: Practical coding for everyone

CodeChef: Practical coding for everyone

@ssjgz

1 Like

Could you plz see my code , it is giving TLE https://pastebin.com/SqsSx2MU

U did brute force buddy…The test cases are updated … try something better :slight_smile:

Test cases updated … (Try hashing , KMP , or Z function )