← Complete problem index

PROJECT EULER · #0816

Shortest Distance Among Points

Statement only · SolvedOriginal problem ↗

We create an array of points Pn in a two dimensional plane using the following random number generator:
s0=290797
sn+1=sn2mod50515093

Pn=(s2n,s2n+1)

Let d(k) be the shortest distance of any two (distinct) points among P0,,Pk1.
E.g. d(14)=546446.466846479.

Find d(2000000). Give your answer rounded to 9 places after the decimal point.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.