limitless number of cows on the plane, one at each point with whole number directions. Gregor is an individual from the Illuminati, and needs to construct a three-sided fence, interfacing 3 unmistakable existing wall posts. A cow stringently inside the fence is supposed to be encased. In case there are an odd number of encased cows and the space of the fence is a whole number, the fence is supposed to be intriguing.  Track down the quantity of int

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question

Python code

 

Here are n posts at particular directions on a plane. It is ensured that no three fence posts lie on a similar line. There are a limitless number of cows on the plane, one at each point with whole number directions. Gregor is an individual from the Illuminati, and needs to construct a three-sided fence, interfacing 3 unmistakable existing wall posts. A cow stringently inside the fence is supposed to be encased. In case there are an odd number of encased cows and the space of the fence is a whole number, the fence is supposed to be intriguing. 

Track down the quantity of intriguing wall. 

Information : The primary line contains the whole number n (3≤n≤6000), the quantity of fence posts which Gregor can decide to shape the vertices of a fence. 

Every one of the following n line contains two whole numbers x and y (0≤x,y≤107, x and y are even), where (x,y) is the arrange of a fence post. All fence posts lie at unmistakable directions. No three fence posts are on a similar line. 

Yield output:  Pint a solitary whole number, the quantity of intriguing wall. Two wall are considered unique in case they are built with an alternate arrangement of three fence posts.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning