int main() { while (~scanf("%d", &hull.n)) { for (int i = 0; i < hull.n; i++) scanf("%lf%lf%lf", &hull.P[i].x, &hull.P[i].y, &hull.P[i].z); hull.construct(); printf("%d\n", hull.facetCnt()); } return 0; }
int main(){ int tc; scanf("%d", &tc); for (int t = 1; t <= tc; t++){ scanf("%d", &hull.n); for (int i = 0; i < hull.n; i++) scanf("%lf%lf%lf", &hull.P[i].x, &hull.P[i].y, &hull.P[i].z); hull.construct(); printf("Case %d: %d\n", t, hull.facetCnt()); } return 0; }
int main() { while (true) { scanf("%d",&hull.n); if (hull.n == 0) break; for (int i = 0;i < hull.n;i++) scanf("%lf%lf%lf",&hull.P[i].x,&hull.P[i].y,&hull.P[i].z); hull.construct(); int q; scanf("%d",&q); for (int i = 0;i < q;i++) { pt p; scanf("%lf%lf%lf",&p.x,&p.y,&p.z); printf("%.4f\n",hull.nearstpoint(p)); } } return 0; }