I didn’t submit it because tym complexity for brute force solution was O(n^2) and it would have exceeded the limit. But after contest I saw even brute force solution were accepted. Setter should keep this in mind and do not set weak test cases .
same thing happen to me aslo bro
This post was flagged by the community and is temporarily hidden.
@admin @akashbhalotia if possible please judge it with better testcases brutforce passed for some cases
see here
it must be get hacked if this were submitted on CODEFORCES
Hi all,
Apologies for the weak test cases in the problem CHEFSHIP. Here’s what actually happened. After preparing and testing the problem, we observed that there’s a need to reduce the load on the servers. So, while making modifications for that, we missed out on including sufficient testcases to break the brute solution. Sorry for the inconvenience caused.
I like your problems. Please make sure it doesn’t happen again.
Its okay, shit happens.
But question was good.
Atleast I am not aware with hashing approach, so would learn something new.
Thank you
I don’t know why i am getting TLE in CHEFSHIP.
Problem Link- CodeChef: Practical coding for everyone
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
or
Can anybody point out a mistake so that i can change something in my code and get AC?
Thanks in Advance!
Pls rejudge the submissions as it can hamper ratings of individuals
This mistake also teach everyone something new.
Can you please include the KMP solution? I am not getting it.
If we reduce the time limit for python, usko nani yaad ayegi
I am just a noob so please don’t take it seriously…
I tried with kmp just like setter’s solution .Not getting how to remove overlapping length of lps .can you please elaborate a liitle about if(2*len > i+1) @rishup_nitdgp please.
{len = lps1[key][len - 1];}
Chill dude. The only problem is that bruteforce works in python (which shouldn’t happen).
Hi all,
Test cases are updated. We can’t rejudge the contest solutions but in practice, you will have new test cases.
I dont know how brute force n^2 soln get passed in the contest .
i have seen many people code passed in n^2.
#weak test case
what will happen now
I used substr() and it passed. Check my submission.