yaworsw/euler-manager

View on GitHub
data/problems/252.yml

Summary

Maintainability
Test Coverage
---
:id: 252
:name: Convex Holes
:url: https://projecteuler.net/problem=252
:content: "Given a set of points on a plane, we define a convex hole to be a convex
  polygon having as vertices any of the given points and not containing any of the
  given points in its interior (in addition to the vertices, other given points may
  lie on the perimeter of the polygon).\n\nAs an example, the image below shows a
  set of twenty points and a few such convex holes. The convex hole shown as a red
  heptagon has an area equal to 1049694.5 square units, which is the highest possible
  area for a convex hole on the given set of points.\n\n ![]({{ images_dir }}/p252_convexhole.gif)\n\nFor
  our example, we used the first 20 points (<var>T</var><sub>2<var>k</var>−1</sub>, <var>T</var><sub>2<var>k</var></sub>),
  for <var>k</var> = 1,2,…,20, produced with the pseudo-random number generator:\n\n<center><table
  class=\"p252\">\n<tr>\n<td style=\"text-align:right;\">\n<var>S</var><sub>0</sub>\n</td>\n
  \   <td>=<sub> </sub>\n</td>\n    <td>290797<sub> </sub>\n</td>\n  </tr>\n<tr>\n<td>\n<var>S</var><sub><var>n</var>+1</sub>\n</td>\n
  \   <td>=<sub> </sub>\n</td>\n    <td>\n<var>S</var><sub><var>n</var></sub><sup>2</sup>
  mod 50515093</td>\n  </tr>\n<tr>\n<td style=\"text-align:right;\">\n<var>T</var><sub><var>n</var></sub>\n</td>\n
  \   <td>=<sub> </sub>\n</td>\n    <td>( <var>S</var><sub><var>n</var></sub> mod
  2000 ) − 1000<sup> </sup>\n</td>\n  </tr>\n</table></center>\n\n_i.e._ (527, 144),
  (−488, 732), (−454, −947), …\n\nWhat is the maximum area for a convex hole on the
  set containing the first 500 points in the pseudo-random sequence?  \n Specify your
  answer including one digit after the decimal point.\n\n"