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

Обсуждение задачи 1238. Folding

WA #25 - Can somebody help me?
Послано Prime 19 авг 2013 11:13
Code link: REMOVED after ac

I can't provide a test though but the bug that was causing WA was simple.

My DP recurrence was simple, dp[s][e] contains the shortest folding for the segment a[s]a[s+1]...a[e], where 'a' is the main string. Now, then I was calculating dp[s][e] I made an error and dp[s][e] was in some rare cases containing solutions of dp[s][e+1]dp[s][e+2]... ans the resulting sequence was containing lower length then actually possible.

Edited by author 19.08.2013 11:15

Edited by author 19.08.2013 15:43
Re: WA #25 - Can somebody help me?
Послано QProgS 10 апр 2014 16:09
aaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaab
aaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaab
aaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaab
aaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaab
aaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaab
aaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaab
aaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaabaaaaaaaaab