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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education