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

Help not to miss the problem(Crack 1410)
Posted by svr 15 Jan 2007 09:59
I advice you not to skip problems for your pleasure and scill.
So help me now in crack-problem. I have Wa2 because missunderstanding.
Example: S=aAbb cc bq hhd qss.
What  cost(S), where cost(S)is a  functional of optimization.
I think that:
1. We compress repeating letters to one sound because man onle hearing- S=ab c bd qs;
2. Form 3 possible subsequences
S1=ab bd =abbd=abd; cost(S1)=cost(abd)=3;
S2=ab qs=abqs;cost(S2)=cost(abqs)=4;
S3=c qs=cqs;cost(cqs)=3;
3. Take max result
 cost(S)=max(4,3,3)=4.
What wrong in my analysis?
Re: Help not to miss the problem(Crack 1410)
Posted by Slam [Tartu U] 18 Jan 2007 09:32
1. We compress repeating letters to one sound

it's wrong, u don't need to do this
Re: Help not to miss the problem(Crack 1410)
Posted by svr 25 Jan 2007 08:27
Thank you!
Your short message is absolute true.
Now I solved this pretty problem without any using
notion 'miamlia'.
Had 100 submits due to cout<<data[0] where char data[100000]
but should output cout<<(int) data[0].
This bug is shown in specific case N=1 where N- number of words.
After all troubles have pleasant impression from
fine contest-type problem from Top coders team.