main函数中只要调用solve()就好了,solve函数中的n即代表n个圆,先输入n,再输入n个圆的圆心坐标和半径,直接在函数中输出多圆相交的公共面积
main函数中不用做什么,所有的东西都在solve完成了
typedef long long LL;
typedef unsigned long long ULL;
typedef vector <int> VI;
const int INF = 0x3f3f3f3f;
const double eps = 1e-10;
const int MOD = 100000007;
const int MAXN = 1000010;
const double PI = acos(-1.0);
#define sqr(x) ((x)*(x))
const int N = 1010;
double area[N];
int n;
int dcmp(double x)
{
if (x < -eps) return -1;
else return x > eps;
}
struct cp
{
double x, y, r, angle;
int d;
cp() {}
cp(double xx, double yy, double ang = 0, int t = 0)
{
x = xx;
y = yy;
angle = ang;
d = t;
}
void get()
{
scanf("%lf%lf%lf", &x, &y, &r);
d = 1;
}
} cir[N], tp[N * 2];
double dis(cp a, cp b)
{
return sqr