SPOJ Classical – The Max Lines – MAXLIN

In this problem you will be given a half-circle. The half-circle’s radius is r. You can take any point A on the half-circle and draw 2 lines from the point to the two sides of the diameter(AB and AC). Let the sum of square of one line’s length and the other line’s length is s.

Like in the figure s=AB^2+AC. And BC=2r.
Continue reading SPOJ Classical – The Max Lines – MAXLIN