Code Library Of Others/sgtlaugh/Pick_s Theorem.cpp
long long on_border(Point poly[], int n){
    long long res = 0;
    for (int i = 0, j = n - 1; i < n; j = i++){
        res += __gcd(abs(poly[i].x - poly[j].x), abs(poly[i].y - poly[j].y));
    }
    return res;
}
/// number of lattice points strictly on polygon border
number of lattice points strictly on polygon border
number of lattice points strictly on polygon border
long long on_border(Point poly[], int n){
    long long res = 0;
    for (int i = 0, j = n - 1; i < n; j = i++){
        res += __gcd(abs(poly[i].x - poly[j].x), abs(poly[i].y - poly[j].y));
    }
    return res;
}
long long on_border ( Point poly [ ] , int n ) { long long res = 0 ; for ( int i = 0 , j = n - 1 ; i < n ; j = i ++ ) { res += __gcd ( abs ( poly [ i ] . x - poly [ j ] . x ) , abs ( poly [ i ] . y - poly [ j ] . y ) ) ; } return res ; }
number of lattice points strictly on polygon border
number of lattice points strictly on polygon border