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

Обсуждение задачи 1720. Summit Online Judge

Please,give me some hints or advices to solve this problem
Послано ahmedov(NUUz_2) 13 окт 2009 19:21
Please,give me some hints or advices to solve this problem
Re: Please,give me some hints or advices to solve this problem
Послано svr 13 окт 2009 20:59
help fr5om mathemation.
For me was interesting mathematical nature of the problem.
I got Ac under next understanding.
We must find volume of intersection [l.r]
with dison union of [kx,ky] and [k0*x,infinity]
Re: Please,give me some hints or advices to solve this problem
Послано ahmedov(NUUz_2) 14 окт 2009 17:19
Thank you for your answer. I'm sorry, but i did not understand your method. Can you describe your method more widely.
Re: Please,give me some hints or advices to solve this problem
Послано svr 14 окт 2009 17:26
Form disjoint segments:[kx,ky],k=1,2,3..
When [kx,ky] will intersect with [(k+1)x-1,(k+1)y]
at k=k0:stop. From this moment we have [k0*x,infinity[
After standard programming task: find intersection
of given segment[l,r] and disjoint system of closed segments.

Edited by author 14.10.2009 17:30
Thank you very much.Now AC
Послано ahmedov(NUUz_2) 15 окт 2009 19:07


Edited by author 15.10.2009 19:22
Re: Thank you very much.Now AC
Послано svr 15 окт 2009 20:30
Congratulage!
To implment that isue to be great!
Re: Thank you very much.Now AC
Послано Bogatyr 5 окт 2012 21:20
Very interesting problem, took me 2 days :).   I started out wrong, but then saw the progression of [kx,ky] and the gaps between them.   My solution subtracts the gaps from [l,r].   I had an initial misconception of the progression of the gaps, but corrected it and got AC.  It's interesting that if y > x then the gaps will always shrink to size zero, eventually.