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
arsalan_mousavian
Experienced poster
Posts: 111 Joined: Mon Jan 09, 2006 6:19 pm
Location: Tehran, Iran
Contact:
Post
by arsalan_mousavian » Mon Sep 25, 2006 10:51 pm
i misunderstood the problem statement ? can some one help me to understand the problem ?
Thanks in Advance . . .
Arsalan
In being unlucky I have the record.
vinay
Experienced poster
Posts: 104 Joined: Thu Apr 13, 2006 2:26 pm
Location: India
Contact:
Post
by vinay » Fri Sep 29, 2006 3:17 am
i too don't understand it , what could be the strings for which n will be three(3)
any cases for n=3 or n=4???
If I will myself do hashing, then who will do coding !!!
gvcormac
Problemsetter & Reviewer
Posts: 194 Joined: Fri Mar 15, 2002 2:00 am
Contact:
Post
by gvcormac » Fri Sep 29, 2006 3:32 am
vinay wrote: i too don't understand it , what could be the strings for which n will be three(3)
any cases for n=3 or n=4???
n=3:
a
aaaaaaaa
vinay
Experienced poster
Posts: 104 Joined: Thu Apr 13, 2006 2:26 pm
Location: India
Contact:
Post
by vinay » Fri Sep 29, 2006 4:26 am
ok then hoe to proceed...
has it anything to do with LCS
If I will myself do hashing, then who will do coding !!!
sclo
Guru
Posts: 519 Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:
Post
by sclo » Fri Sep 29, 2006 10:22 am
vinay wrote:
has it anything to do with LCS
Yes
joeluchoa
New poster
Posts: 28 Joined: Sat Jul 31, 2004 12:11 am
Location: Brasil
Post
by joeluchoa » Sun Oct 01, 2006 10:47 pm
I've got WA!! Can somebody help me??
I want tests cases, please!!!
This my code:
Last edited by
joeluchoa on Mon Oct 02, 2006 4:20 am, edited 1 time in total.
Jan
Guru
Posts: 1334 Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:
Post
by Jan » Mon Oct 02, 2006 3:51 am
You can try the following test cases
Input:
Output:
Hope it helps.
joeluchoa
New poster
Posts: 28 Joined: Sat Jul 31, 2004 12:11 am
Location: Brasil
Post
by joeluchoa » Mon Oct 02, 2006 4:18 am
Thanks, i got AC now!
vinay
Experienced poster
Posts: 104 Joined: Thu Apr 13, 2006 2:26 pm
Location: India
Contact:
Post
by vinay » Mon Oct 02, 2006 6:29 am
ok some more hint please
If I will myself do hashing, then who will do coding !!!
Jan
Guru
Posts: 1334 Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:
Post
by Jan » Mon Oct 02, 2006 1:23 pm
I am giving an example, hope this helps...
Suppose we are given...
abcde
mnopqrstuvab
/* Removed */
Edit : My description was wrong.
'abcde' and 'mnopqrstuvab' are second cousins.
Last edited by
Jan on Thu Nov 09, 2006 1:22 pm, edited 1 time in total.
vinay
Experienced poster
Posts: 104 Joined: Thu Apr 13, 2006 2:26 pm
Location: India
Contact:
Post
by vinay » Mon Oct 02, 2006 2:08 pm
i think a better sequence would have been this:
abcde
mnopabcd
mnopqrstabcd
mnopqrstuvab
rather than what u said..
abcde
mnoabc
mnopqrstab
mnopqrstuvab
isn't it so??
If I will myself do hashing, then who will do coding !!!
Jan
Guru
Posts: 1334 Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:
Post
by Jan » Mon Oct 02, 2006 2:26 pm
There can be a lot of sequences, I just showed one. They are second cousins. You dont have to find the sequence, but the best strategy.
Last edited by
Jan on Thu Nov 09, 2006 1:23 pm, edited 1 time in total.
vinay
Experienced poster
Posts: 104 Joined: Thu Apr 13, 2006 2:26 pm
Location: India
Contact:
Post
by vinay » Mon Oct 02, 2006 4:26 pm
still can't find the best strategy...
If I will myself do hashing, then who will do coding !!!
sunny
Experienced poster
Posts: 124 Joined: Sun Sep 11, 2005 10:22 pm
Location: Civil-BUET
Post
by sunny » Fri Oct 20, 2006 12:57 pm
so, there cant be any input where i've 2 print "not related" .
i got AC without considering this.
Jan
Guru
Posts: 1334 Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:
Post
by Jan » Tue Oct 24, 2006 11:09 pm
Actually you can always relate two strings. So, "not related" is impossible.