https://www.codechef.com/viewsolution/32161754
Can Someone tell me the mistake in this code of mine. I am not getting where am i going wrong. Maybe i am missing some of the edge cases.
Try this testcase:
bbabbccaabcccacabcbc
ccbbbcbabcaccabbaccc
O/P should be 19.
PS: this test case was mentioned on other articles. Its not mine.
also try for test cases having either identical strings, completely different or having N = 1 ( i.e, a a OR a b ).
For which testcase was your code misbehaving?
I’m still stuck with WA. Help Please.
aaabcddd
aaaefddd
mine is working fine on this one.
O/P is 2 right?
yes output will be 2.
Just Try For This One Too.
aaabbbbaaa
ababcbdaaa
Not my own testcase but i found that my previous solution was giving wrong answer for this.
I’m getting 6 for this one. And i think it is correct. isn’t it?
btw, thanks.
Yes, it’s 6.
Can you share the link of your code, maybe I could find out the problem or a missing edge case.