#include #include const int MAXFSIZE = 205; const int MAXFACES = 256; const int MAX = 1024; struct Point { int x,y,z; void Read() { scanf("%d%d%d",&x,&y,&z); } }; struct Face { Point P[MAXFSIZE]; int n; void Read(); int Horizontal(); void Add(); }; struct Line { int x1,x2,y; Line() {} Line(int xx1,int xx2,int yy):x1(xx1),x2(xx2),y(yy) {} }; int Tab[MAX][MAX]; int Volume; int nFaces; Face Faces[MAXFACES]; int min(int a,int b) { return ab?a:b; } int cmp_Face(const void *v1,const void *v2) { return ((Face*)v1)->P[0].z - ((Face*)v2)->P[0].z; } int cmp_Line(const void *v1,const void *v2) { return ((Line*)v1)->y - ((Line*)v2)->y; } void Read() { int f; scanf("%d",&nFaces); for(f=0;f