Skip to content

Commit f58d51e

Browse files
Fixes
1 parent 7b416b4 commit f58d51e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

content/5_Plat/Geo_Pri.mdx

+2-7
Original file line numberDiff line numberDiff line change
@@ -359,16 +359,11 @@ struct Point {
359359
};
360360
// EndCodeSnip
361361

362-
int gcd(long long x, long long y) {
363-
if (!y) return x;
364-
return gcd(y, x % y);
365-
}
366-
367362
int main() {
368363
int n;
369364
cin >> n;
370365
vector<Point> points(n);
371-
for (auto &point : points) { cin >> point; }
366+
for (Point &point : points) { cin >> point; }
372367
points.push_back(points[0]);
373368
long long area = 0;
374369
for (int i = 0; i < n; i++) {
@@ -379,7 +374,7 @@ int main() {
379374
long long boundary_points = 0;
380375
for (int i = 0; i < n; i++) {
381376
Point diff = points[i + 1] - points[i];
382-
int g = gcd(abs(diff.x), abs(diff.y));
377+
int g = __gcd(abs(diff.x), abs(diff.y));
383378
boundary_points += g;
384379
}
385380
long long interior_points = (area - boundary_points) / 2 + 1;

0 commit comments

Comments
 (0)