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 1410. Crack

can length of the word be 0?
Posted by vano_B1 29 Oct 2005 17:35
>If NO then in test 24 are some bags,
>because this solution must work 100 %
>//programm code//

I'm understand, where my mistake was.
(I forgot to write "a[2]:=max(a[1],a[2]);" before the main cycle)
Thank you.

Edited by author 04.11.2005 13:56
Re: can length of the word be 0?
Posted by Strebkov_VI_SSAU 29 Oct 2005 19:07
100% you tell?
input:
lala l l lol
output:
7

And you will get 5.

BUT MY SOLUTION WA ON TEST 5!! I don't understand.

Edited by author 29.10.2005 19:13
Re: can length of the word be 0?
Posted by BrainFucker Zamesova 29 Oct 2005 19:13
Fucking worms(test creators) geniosly wrote 5 test with enter in the middle
Re: can length of the word be 0?
Posted by Strebkov_VI_SSAU 29 Oct 2005 19:16
Thanks!
Re: can length of the word be 0?
Posted by vano_B1 29 Oct 2005 20:00
Thank you.
Re: can length of the word be 0?
Posted by ACM.Tolstobrov_Anatoliy[Ivanovo SPU] 31 Oct 2005 03:52
Vano i find you error

a[i]:=max(a[i-1],Max(a[i-2],a[i-3])+a[i]);

and hint when output
Writeln(max(m[n],m[n-1]);

i wish you Good Luck.
And delete you code please.

For all answer for

lala lllol

corret answer 5.
Re: can length of the word be 0?
Posted by Strebkov_VI_SSAU 4 Nov 2005 13:00
I wrote lala l l lol  (aaaa a b bbb). Correct answer is 7, isn't it?