Cut the Cake

From programming_contest
Revision as of 05:52, 27 August 2016 by imported>Kmk21 (Created page with "#circle starts at 1 slice, place lines in turn #discard a line if it doesn't intersect the circle. lines that do automatically create another slice #intersect the new line aga...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  1. circle starts at 1 slice, place lines in turn
  2. discard a line if it doesn't intersect the circle. lines that do automatically create another slice
  3. intersect the new line against every other line already placed
  4. each intersection that occurs within the circle adds an extra slice