## Editorial for TLE '17 Contest 8 P1 - Artificial Intelligence

**only**when stuck, and

**not to copy-paste code from it**. Please be respectful to the problem author and editorialist.

**Submitting an official solution before solving the problem yourself is a bannable offence.**

Author:

First, note that a linear transformation **is not** the same as a function with a linear graph, that is, a function in the form of .

We deduce a few properties about . First, we see that . Also, . If we let , then we see that for some . It can be easily proven that the first property still holds.

Exercise: show that when only satisfies the first condition, then it does not need to be in the form . Would this solution still be correct?

Therefore, we simply need to check if all points are on the same graph for some . The implementation is not very difficult, but do be wary of the corner case where .

Failing to resolve the corner case resulted in of the points, and a slow all-pairs comparison of slope was awarded of the points.

**Time Complexity:**

## Comments