ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1423. String Tale

Help!! I have WA on 6test, but I don't no where my mistake
Posted by Liceum#64_Yurik 28 Jun 2006 15:20
Help!! I have WA on 6test, but I don't no where my mistake
program Basn;

[code deleted]

Edited by moderator 06.07.2006 16:28
Re: Help!! I have WA on 6test, but I don't no where my mistake
Posted by Igor Goroshko 6 Jul 2006 16:10
Hi!!!

For input:
2
ab
ba

Your program outputs "0", but it must be "1";

I reccomend you to use KMP algo to solve this problem.

You can find KMP algo theory at http://www.codenet.ru/progr/alg/kmp.php

Good Luck!!!