Summer training out of the first one blood feel oneself Meng Meng da ...
This problem itself is not a pit point is just a translation giant pit ...
Solution Thigh in do B ann seniors in do e i idle also nothing just a word a word translation f ...
Finally feel ...
Most of the problems do not understand ...
It doesn't really work ...
Presumably ...
is to give you a point of n ...
M-Loop ...
Ask you which circuit is the outermost ...
In the end is to let you ask which circuit composed of the largest graphics area ...
The test center is the polygon area formula ...
Fear of error will not add/2 ...
It seems to be a plus.
WA two times it was the wrong point. The first point and the last point order are reversed ...
1#include <stdio.h>2#include <string.h>3 structpoint{4 intx, y;5}p[1005];6 intArea (Point A,point b) {7 return((A.X*B.Y)-(b.x*a.y));8 }9 intMain () {Ten intT; Onescanf"%d",&T); A while(t--){ - intN; -scanf"%d",&n); the for(intI=1; i<=n;i++) -scanf"%d%d",&p[i].x,&p[i].y); - intm,q; - ints[1005]; + intmaxn=-1; - intFlag; +scanf"%d",&m); A for(intI=1; i<=m;i++){ atscanf"%d",&q); - intnow=0; -scanf"%d", &s[0]); - for(intj=1; j<q;j++){ -scanf"%d",&s[j]); -Now+=area (p[s[j-1]],p[s[j]]); in } -Now+=area (p[s[q-1]],p[s[0]]); to if(now>MAXN) { +maxn=Now ; -flag=i; the } * } $printf"%d\n", flag);Panax Notoginseng } - return 0; the}
POJ 1687 Buggy Sat Simple Computational geometry