← RoseCode

ROSECODE 324

Around the poles

Philippe_57721 · Programming ·

Poles are disposed on the lattice plane.
A rubber band surrounds them.

For instance, consider poles placed at the following points:
  • {1, 1}
  • {1, 4}
  • {2, 3}
  • {3, 5}
  • {3, 3}
  • {4, 2}
  • {5, 1}
  • {5, 4}
  • {6, 6}
If we place a rubber band around these points, we obtain a polygon of area 18.

Now consider the following 1000 points:
  • P1 = {141, 592}
  • P2 = {653, 589}
  • P3 = {793, 238}
  • P4 = {462, 643}
  • ...
  • P999 = {845, 68}
  • P1000 = {772, 460}
The coordinates are made of the digits of the decimal part of PI by group of 3.

What is the area of the corresponding polygon?

You are given : 830303 for first 100 points.
[My timing: < 1 sec]