Please,give me some hints or advices to solve this problem
Please,give me some hints or advices to solve this problem
Re: Please,give me some hints or advices to solve this problem
Posted by
svr 13 Oct 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
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
Posted by
svr 14 Oct 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
Edited by author 15.10.2009 19:22
Re: Thank you very much.Now AC
Posted by
svr 15 Oct 2009 20:30
Congratulage!
To implment that isue to be great!
Re: Thank you very much.Now AC
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.