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

Обсуждение задачи 1057. Количество степеней

WOW! How did all of you solve this problem so that it doesn't go out of the time limit?
Послано Algorist 7 окт 2001 02:01
Re: WOW! How did all of you solve this problem so that it doesn't go out of the time limit?
Послано Lalescu Liviu 7 окт 2001 13:24
I have a nice solution. I guess I am not allowed to put it
here (if I am, tell me please). If you want it, e-mail me
at LalescuLiviu@xnet.ro
Re: WOW! How did all of you solve this problem so that it doesn't go out of the time limit?
Послано Marat Bakirov 8 окт 2001 19:39
Well, you can post your solution, I won't delete your
message, But I will be angry about it :)

I think you'd better share your ideas, and not sources.
Re: WOW! How did all of you solve this problem so that it doesn't go out of the time limit?
Послано carol_m1 22 июн 2003 14:12
> I have a nice solution. I guess I am not allowed to put it
> here (if I am, tell me please). If you want it, e-mail me
> at LalescuLiviu@xnet.ro
please show your idea
Re: WOW! How did all of you solve this problem so that it doesn't go out of the time limit?
Послано erik 6 авг 2003 18:26
I have a function gen(n) which generates the n:th integer, which
written in base b has exactly k ones and the rest zeros.

Then, using that function, I do a binary search to find the least a
such that gen(a)>=x and the least b such that gen(b)>=y+1.

The answer is then b-a.