Language: C++

#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<math.h>
using namespace std;
//基?框架
const double eps = 1e-6;
const double pi = acos(-1.0);
struct Point
{
	double x, y;
	Point() {}
	Point(double x, double y) :x(x), y(y) {}
};
typedef Point Vector;
Vector operator + (Vector a, Vector b)
{
	return Vector(a.x + b.x, a.y + b.y);
}
Vector operator - (Vector a, Vector b)
{
	return Vector(a.x - b.x, a.y - b.y);
}
Vector operator * (Vector a, double p)
{
	return Vector(a.x*p, a.y*p);
}
Vector operator / (Vector a, double p)
{
	return Vector(a.x / p, a.y / p);
}
int dcmp(double x)//三?函数(>0,<0,=0)
{
	if (fabs(x)<eps)return 0;
	else if (x>0)return 1;
	return -1;
}
bool operator == (const Point &a, const Point &b)
{
	return dcmp(a.x - b.x) == 0 && dcmp(a.y - b.y) == 0;
}
 
//各??算
double Dot(Vector a, Vector b)//内? 
{
	return a.x*b.x + a.y*b.y;
}
double Length(Vector a)//模 
{
	return sqrt(Dot(a, a));
}
double Angle(Vector a, Vector b)//?角,弧度制 
{
	return acos(Dot(a, b) / Length(a) / Length(b));
}
double Cross(Vector a, Vector b)//外? 
{
	return a.x*b.y - a.y*b.x;
}
Vector Rotate(Vector a, double rad)//逆??旋?
{
	return Vector(a.x*cos(rad) - a.y*sin(rad), a.x*sin(rad) + a.y*cos(rad));
}
double Distance(Point a, Point b)//?点?距?
{
	return sqrt((a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y));
}
double Area(Point a, Point b, Point c)//三角形面?
{
	return fabs(Cross(b - a, c - a) / 2);
}
Point GetLineIntersection(Point P, Vector v, Point Q, Vector w)//?直?的交点
{
	Vector u = P - Q;
	double t = Cross(w, u) / Cross(v, w);
	return P + v*t;
}
 
//???用 
bool Intersect(Point A, Point B, Point C, Point D)//?段相交（不包括端点）
{
	double t1 = Cross(C - A, D - A)*Cross(C - B, D - B);
	double t2 = Cross(A - C, B - C)*Cross(A - D, B - D);
	return dcmp(t1) < 0 && dcmp(t2) < 0;
}
bool StrictIntersect(Point A, Point B, Point C, Point D) //?段相交（包括端点）
{
	return
		dcmp(max(A.x, B.x) - min(C.x, D.x)) >= 0
		&& dcmp(max(C.x, D.x) - min(A.x, B.x)) >= 0
		&& dcmp(max(A.y, B.y) - min(C.y, D.y)) >= 0
		&& dcmp(max(C.y, D.y) - min(A.y, B.y)) >= 0
		&& dcmp(Cross(C - A, D - A)*Cross(C - B, D - B)) <= 0
		&& dcmp(Cross(A - C, B - C)*Cross(A - D, B - D)) <= 0;
}
double DistanceToLine(Point A, Point M, Point N)//点A到直?MN的距?,Error:MN=0
{
	return fabs(Cross(A - M, A - N) / Distance(M, N));
}
bool OnSegment(Point P1, Point P2, Point P3)//判断P2是否在?段P1P3上
{
	return
		P2.x >= min(P1.x, P3.x) && P2.x <= max(P1.x, P2.x)
		&& P2.y >= min(P1.y, P3.y) && P2.y <= max(P1.y, P2.y)
		&& dcmp(Cross(P2 - P1, P3 - P1) == 0);
}
Point TriCenter(Point A, Point B, Point C) //求三角形的内心
{
	double a = Distance(B, C), b = Distance(A, C), c = Distance(A, B);
	return Point((a*A.x + b*B.x + c*C.x) / (a + b + c), (a*A.y + b*B.y + c*C.y) / (a + b + c));
}
 
//判断点是否在多?形内
/*模板?明：P[]?多?形的所有?点，下??0~n-1，n?多?形?数*/
Point P[1005];
int n;
bool InsidePolygon (Point A) //判断点是否在凸多?形内（角度和判?法）
{
	double alpha = 0;
	for (int i = 0; i < n; i++)
		alpha += fabs(Angle(P[i] - A, P[(i + 1) % n] - A));
	return dcmp(alpha - 2 * pi) == 0;
}



//求多?形面?
/*模板?明：P[]?多?形的所有?点，下??0~n-1，n?多?形?数*/
Point P[1005];
int n;
double PolygonArea()//求多?形面?（叉?和?算法）
{
	double sum = 0;
	Point O = Point(0, 0);
	for (int i = 0; i < n; i++)
		sum += Cross(P[i] - O, P[(i + 1) % n] - O);
	if (sum < 0)sum = -sum;
	return sum;
}
 
//求凸包
/*模板?明：n?所有点的个数，top???，P[]?所有点，下??0~n-1，result[]?凸包上的点，下??0~top，包含凸包?上的点*/
int n, top;
Point P[10005], result[10005];
bool cmp(Point A, Point B)
{
	double ans = Cross(A - P[0], B - P[0]);
	if (dcmp(ans) == 0)
		return dcmp(Distance(P[0], A) - Distance(P[0], B)) < 0;
	else
		return ans > 0;
}
void Graham()//Graham凸包?描算法
{
	for (int i = 1; i < n; i++)//?找起点
		if (P[i].y < P[0].y || (dcmp(P[i].y - P[0].y) == 0 && P[i].x < P[0].x))
			swap(P[i], P[0]);
	sort(P + 1, P + n, cmp);//?角排序，中心?起点
	result[0] = P[0];
	result[1] = P[1];
	top = 1;
	for (int i = 2; i < n; i++)
	{
		while (Cross(result[top]-result[top-1],P[i]-result[top-1])<0 && top>=1)
			top--;
		result[++top] = P[i];
	}
}
 
//求多?形的内核
/*模板?明：n?多?形的?数，m?平面分?的个数，a[]?多?形的?点,下??1~n，p?分?，下??0~n-1*/
int n, m;
Point a[1005], p[1005], tmp[1005];
void cut(Point A, Point B)//求半平面交
{
	int dn = 0;
	double t1, t2;
	for (int i = 0; i < m; i++)
	{
		t1 = Cross(B - A, p[i] - A);
		t2 = Cross(B - A, p[(i + 1) % m] - A);
		if (dcmp(t1) >= 0)
			tmp[dn++] = p[i];
		if (dcmp(t1)*dcmp(t2) < 0)
			tmp[dn++] = GetLineIntersection(A, B - A, p[i], p[(i + 1) % m] - p[i]);
	}
	m = 0;
	for (int i = 0; i < dn; i++)p[m++] = tmp[i];
}
int Core()//求多?形的核的?数，0表示不存在核，Error：点?逆??排列
{
	m = 0;
	p[m++] = Point(1e9, 1e9);
	p[m++] = Point(-1e9, 1e9);
	p[m++] = Point(-1e9, -1e9);
	p[m++] = Point(1e9, -1e9);
	a[n + 1] = a[1];
	for (int i = 1; i <= n ; i++)
	{
		cut(a[i + 1], a[i]);//不能写反！并且要保????
		if (!m)break;
	}
	return m;
}
int main()
{
	long long a, b;
	while (cin >> a >> b)cout << a + b << endl;
	return 0;
}

Compiler output:
a.cc:130:7: error: redefinition of 'Point P [1005]'
  130 | Point P[1005];
      |       ^
a.cc:116:7: note: 'Point P [1005]' previously declared here
  116 | Point P[1005];
      |       ^
a.cc:131:5: error: redefinition of 'int n'
  131 | int n;
      |     ^
a.cc:117:5: note: 'int n' previously declared here
  117 | int n;
      |     ^
a.cc:144:5: error: redefinition of 'int n'
  144 | int n, top;
      |     ^
a.cc:117:5: note: 'int n' previously declared here
  117 | int n;
      |     ^
a.cc:145:7: error: conflicting declaration 'Point P [10005]'
  145 | Point P[10005], result[10005];
      |       ^
a.cc:116:7: note: previous declaration as 'Point P [1005]'
  116 | Point P[1005];
      |       ^
a.cc:173:5: error: redefinition of 'int n'
  173 | int n, m;
      |     ^
a.cc:117:5: note: 'int n' previously declared here
  117 | int n;
      |     ^