Asteroids wu-kan

int main()
{
	lf ans=0,x,y,z;
	for(int n,m,flag=1; ~scanf("%d",&n);)
	{
		vector<Coord3> p;
		for(; n--; p.push_back(Coord3(x,y,z)))
			scanf("%lf%lf%lf",&x,&y,&z);
		ConvexPolyhedron c(p);
		ans+=c.dist(c.centroid());
		if(flag^=1)printf("%.5f\n",ans),ans=0;
	}
}