POJ 1687 Buggy Sat Simple Computational geometry

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.