F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Farmer Greedy

Time 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
4 4 -10 0 10 0 0 10 0 -10 1 1 1 2 -1 1 -1 -1
 

Sample Output
Case 1: 2
 

Author
WHU
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-03 14:20:03, Gzip enabled