# Concave Quadrilaterals

**Computer Science**Level 4

**Details and assumptions**

As an explicit example, suppose the list had \(2\) lines, and the following numbers were written on those two lines. \[1, 1, 2, 2, 3, 3, 4, 4 \\ 1, -1, 2, -2, 3, -3, 4, -4 \] We have two quadrilaterals, the first one having its vertices at points \((1, 1), (2, 2), (3, 3), \text{ and } (4, 4),\) and the second one having its vertices at points \((1, -1), (2, -2), (3, -3), \text{ and } (4, -4).\) Your job is to find out how many of them are concave.

Link to the file: http://pastebin.ca/2679837.

If one of the vertices lies on the line joining two other vertices, consider the resulting figure as convex.

This is a computer science problem, and is inspired from ProjectEuler (I don't remember the problem number at the moment).

**Your answer seems reasonable.**Find out if you're right!

**That seems reasonable.**Find out if you're right!

Already have an account? Log in here.