11104 - Cousins

All about problems in Volume 111. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Stephan.Ritscher
New poster
Posts: 5
Joined: Wed May 17, 2006 4:00 pm

Post by Stephan.Ritscher »

I have problems with the example

Code: Select all

abcde (length 5)
mnopqrstuvab (length 12)
Consider the string

Code: Select all

rstuvabcde (length 10)
This string is first cousin of abcde (you have to drop 5 (rstuv) of 10 characters).
But it's first cousin of mnopqrstuvab, too. (The common part ist 'rstuvab'.)
Drop mnopq of mnopqrstuvab (5 of 12 characters) and drop cde of rstuvabcde (3 of 10 characters).

So the strings are second cousins.
Is this true? I got WA untill now.
rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan

Post by rio »

Yes. It is true.
Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Post by Jan »

Stephan.Ritscher wrote:I have problems with the example

Code: Select all

abcde (length 5)
mnopqrstuvab (length 12)
Yes the output should be 2. But my code produces 3. So, my description is wrong and so is my code. So, I can say that the judge's i/o files are not exhaustive enough. Thanks a lot for showing the error.
Ami ekhono shopno dekhi...
HomePage
Post Reply

Return to “Volume 111 (11100-11199)”