ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1010. Discrete Function

Need help solving this problem
Posted by Stefan Ciobaca 18 Feb 2002 01:56
I just can't tell how to solve this problem better then O(n^2). I'm
thinking of a O(n) algo, but I just can't find anything. Can anyone
help pls?
Re: Need help solving this problem
Posted by Mephistos 18 Feb 2002 02:14
This line must connect to successive points. (It is obvious why)