摘要:
题意: 求多边形重心。分析: 直接利用公式。#include<stdio.h>#include<string.h>#include<math.h>struct node{ double x,y;}q[1000005],cen;double mul(node a,node b,node c){ return (a.x-c.x)*(b.y-c.y)-(a.y-c.y)*(b.x-c.x);}int main(){ double s,a; int t,n,i; scanf("%d",&t); while(t--) { scanf(&qu 阅读全文