Moderator: Board moderators

test test
test test
sdfasdf
(blank Line = (Length=0))
kgds
(Space charaters)
.....
asd
The
the
1. Length of longest match: 1
2. Blank!
3. Length of longest match: 0
4. Length of longest match: 0
5. Length of longest match: 1

Julien Cornebise wrote:Hello
I'm having WA for this problem, and after having rewrote it from scratch twice, and read the whole forum. So I'm now going to an extremity I never used before : posting my algorithm and my whole source here, hoping that someone we'll help me
The algo is simple : DP with a table l[i][j] where l[i][j] is the length of the longest matching sequence (run) of words ending exactly on word i of line 1 and word j of line 2 (included).
So if the word I of line1 and word J of line2 does not match, l[i][j] = 0, else
l[i][j]= 1+l[i-1][j-1].
Here's the corresponding source... It's driving me mad ! Any help will be really appreciated.

They want to guess the intensions of other groups by checking the changed sections of messages. First they have to get the length of longest match.
This is a test.
This is not a test.
Users browsing this forum: No registered users and 1 guest