The input format is a series of lines, each containing 4 integers. Otherwise, the numbers are the x-y coordinates of two points that are opposite corners of a rectangle. Your output should be the number of squares covered by each set of rectangles. Each number should be printed on a separate line. The three rectangles in the first probelem of the sample input.
All numbers are integers.
The n points define a convex polygon. You must determine whether the query point is inside, outside, or on the border of the polygon. Here are two sample poloygons, the one on the left is not convex, the one on the right is convex. Input Format A number of lines consists of pairs of integers. The first pair of integers is the query point.