# poj 1265 Area Pick定理

pick定理： 一个计算点阵中顶点在格点上的多边形面积公式：S=a+b÷2-1，其中a表示多边形内部的点数，b表示多边形边界上的点数，s表示多边形的面积

```#include <iostream>
#include <vector>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <string>
#include <queue>
#include <stack>
#include <bitset>
using namespace std;
#define pb(x) push_back(x)
#define ll long long
#define mk(x, y) make_pair(x, y)
#define lson l, m, rt<<1
#define mem(a) memset(a, 0, sizeof(a))
#define rson m+1, r, rt<<1|1
#define mem1(a) memset(a, -1, sizeof(a))
#define mem2(a) memset(a, 0x3f, sizeof(a))
#define rep(i, n, a) for(int i = a; i<n; i++)
#define fi first
#define se second
typedef pair<int, int> pll;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int mod = 1e9+7;
const int inf = 1061109567;
const int dir[][2] = { {-1, 0}, {1, 0}, {0, -1}, {0, 1} };
struct point
{
int x, y;
}a[105];
int gcd(int x, int y) {
return y?gcd(y, x%y):x;
}
int main()
{
int t, n;
cin>>t;
for(int casee = 1; casee<=t; casee++) {
printf("Scenario #%d:\n", casee);
cin>>n;
int ans1 = 0, ans3 = 0;
double ans2 = 0;
a[0].x = 0, a[0].y = 0;
for(int i = 1; i<=n; i++) {
scanf("%d%d", &a[i].x, &a[i].y);
ans1 += gcd(abs(a[i].x), abs(a[i].y));
a[i].x+=a[i-1].x, a[i].y+=a[i-1].y;
ans2 += a[i-1].x*a[i].y-a[i-1].y*a[i].x;
}
ans2 = fabs(ans2/2);
ans3 = ans2+1-ans1/2;
printf("%d %d %.1f\n\n", ans3, ans1, ans2);
}
return 0;
}```

## POJ 1265 Area

Area Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 4713   Accepted: 2129 Description Being well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-new resear

## poj 1265 Area 面积+多边形内点数

Area Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 5861   Accepted: 2612 Description Being well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-new resear

## POJ1265——Area(Pick定理+多边形面积)

Area DescriptionBeing well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-new research and development facility the company has installed the latest system of surveilla

## POJ 1265 Area POJ 2954 Triangle Pick定理

Area Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 5227   Accepted: 2342 Description Being well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-new resear

## poj 1265 Area（Pick定理）

Area Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 5666   Accepted: 2533 Description Being well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-new resear