Sum of Areas of All Possible Quadrilaterals Given N Points

Revision en4, by MindTheGap, 2026-01-23 17:34:09

The title is pretty self explanatory. This was featured as a problem in the past SWERC 2012-2013, and right now it only has 8 solvers, which surprises me, given the nature of the problem. I'm no master at geometry, but the straightforwardness of the statement makes it look easier than it is. Here's the link to the problems. It's problem E, Old School Days.

LINK TO CONTEST

There is also a brief explanation on the solution available on the editorial, but it hasn't been much help to me. I'm writing this entry as a way not only to have a clearer explanation on the solution online, but also to share some other similar problems about geometry. Pretty straightforward conditions with tricky optimizations and logic.

I will edit it with any other problem I find falls under this category and every useful resource you share.

PD: I'm planning a releasing a full Editorial on CSES String Problems, focusing on the use of Suffix Automaton as a Multiuse Tool for string problems, but I wonder if it's worth it, taking into account a CSES String editorial already exists here, even tho it doesn't use Suffix Automaton. Check it out! LINK TO EDITORIAL(Not mine)

Tags geometry, solution

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English MindTheGap 2026-01-23 18:50:18 61
en4 English MindTheGap 2026-01-23 17:34:09 0 (published)
en3 English MindTheGap 2026-01-23 17:33:52 12
en2 English MindTheGap 2026-01-23 17:31:39 8
en1 English MindTheGap 2026-01-23 17:30:08 1321 Initial revision (saved to drafts)