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

Обсуждение задачи 1081. Двоичная последовательность

TLE#5, how can i solv this with fibonachchi,
Послано Bobur 23 мар 2008 16:22
i solved, but my algo so slow, how can i solve this problem faster,
sorry for my english.
thx!
Re: TLE#5, how can i solv this with fibonachchi,
Послано PersonalJesus 17 апр 2008 17:16
Lets consider the sequence for n=4:
0000
0001
0010
0100
0101
1000
1001
1010

Try to find a connection between the number of all sequences with length 4, those which begin with 0 and those which begin with 1. After that look "deeper" and "deeper" into each sequence and try to find a way to generate the k-th sequence. Sorry that I'm not telling you the algorithm directly, but the feeling when you discover it yourself is great :) (it's even greater when you get Acc from 1-st submition :P). I hope that you find this helpful.
Re: TLE#5, how can i solv this with fibonachchi,
Послано Bobur 7 май 2008 18:53
thanks a lot, i think i can find it!!
now, i've AC too!!
Послано Bobur 8 май 2008 18:49
Re: now, i've AC too!!
Послано cookie 11 сен 2009 07:48
wow
i feel good ¬¬_.'[smoke]
ty for the idea
Re: TLE#5, how can i solv this with fibonachchi,
Послано † SiriuS † [TWYT Union] 18 май 2014 16:12
Tnk u. Ur hint is very helpful. I got AC!
Re: TLE#5, how can i solv this with fibonachchi,
Послано Mewtwo 25 июл 2016 13:18
PersonalJesus писал(a) 17 апреля 2008 17:16
Lets consider the sequence for n=4:
0000
0001
0010
0100
0101
1000
1001
1010

Try to find a connection between the number of all sequences with length 4, those which begin with 0 and those which begin with 1. After that look "deeper" and "deeper" into each sequence and try to find a way to generate the k-th sequence. Sorry that I'm not telling you the algorithm directly, but the feeling when you discover it yourself is great :) (it's even greater when you get Acc from 1-st submition :P). I hope that you find this helpful.  




Thank u so much.... :)
It really feels wow... :D