File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -359,16 +359,11 @@ struct Point {
359
359
} ;
360
360
// EndCodeSnip
361
361
362
- int gcd(long long x, long long y) {
363
- if (! y ) return x ;
364
- return gcd (y , x % y );
365
- }
366
-
367
362
int main() {
368
363
int n ;
369
364
cin >> n ;
370
365
vector < Point > points (n );
371
- for (auto & point : points ) { cin >> point; }
366
+ for (Point & point : points ) { cin >> point; }
372
367
points .push_back (points [0 ]);
373
368
long long area = 0 ;
374
369
for (int i = 0 ; i < n ; i ++ ) {
@@ -379,7 +374,7 @@ int main() {
379
374
long long boundary_points = 0;
380
375
for (int i = 0; i < n; i++) {
381
376
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));
383
378
boundary_points += g;
384
379
}
385
380
long long interior_points = (area - boundary_points) / 2 + 1;
You can’t perform that action at this time.
0 commit comments