UVA 634 - Polygon

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