Problem Description
Loading...
Problem Analysis
Find the area of an arbitrary polygon
At that time I hadn’t learned cross products or anything like that yet
A small trick is to use i+1%n
to connect the last point to the first point
cpp
| |
Reference articles: Calculating the area of an arbitrary polygon - Professional Thinker and Practitioner Formula for the area of an arbitrary polygon - Caitou Solving for the area of an arbitrary polygon - songgaoyong - ChinaUnix Blog
Problem link:【HDU】[2036] Reform Spring Breeze Blows Everywhere