ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1410. Трещина

Help not to miss the problem(Crack 1410)
Послано svr 15 янв 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)
Послано Slam [Tartu U] 18 янв 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)
Послано svr 25 янв 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.