|
||||||||||
Farmer GreedyTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2195 Accepted Submission(s): 694 Problem Description Farmer Greedy is going to buy some houses for his farm. He has money only to buy three houses. The three houses can from a triangle area, which he can own as his farm. There are many houses he can choose to buy, and there are many goldstones. They are points in a 2-dimentional plane. No three points are collinear. Farmer Greedy likes odd numbers. Now Farmer Greedy wonders how many farms he can choose to have odd goldstones in it. Input There are multiple test cases. In each case, the first line gives two integers N, M. In the next N lines, each line gives two integers (X, Y) indicating the coordinates of one house. In the next M lines, each line gives two integers (X, Y) indicating the coordinates of one goldstone. Technical Specification 3 <= N <= 100 0 <= M <= 1000 |X|, |Y| <= 100000 Output For each case, print in one line containing the case number (starting with 1) and the number of farms Farmer Greedy can choose to have odd goldstones in it. Sample Input
Sample Output
Author WHU Source | ||||||||||
|