UVA 634 - Polygon

UVA Sep 1, 2020

Problem PDF

Solution:

#include 
using namespace std;

struct info
{
    int x,y;
    info(): x(0), y(0){}
};

int main()
{
    int n;
    while(scanf("%d",&n)==1)
    {
        if(n==0)
            break;
        info a[1010];
        for(int i=0;i p.x) || (a[i].x > p.x && a[(i+1)%n].x < p.x)) && a[i].y>p.y)
            {
                cnt++;
            }
        }

        if(cnt&1)
        {
            puts("T");
        }
        else
        {
            puts("F");
        }

    }

    return 0;
}
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/634/634.cpp

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.