posts[i] = [x, y] gives the position of the i-th post on the site plan. No two posts share a point.
Return True if all the posts lie on a single straight line, and False otherwise.posts=[[0, 1], [2, 5], [-1, -1], [4, 9]] → True
Every post lies on the line y = 2x + 1.
posts=[[3, 3], [3, -2], [4, 0]] → False
The first two posts stand on the vertical line x = 3, and the third is off it.
len(posts[i]) == 2posts=[[0, 1], [2, 5], [-1, -1], [4, 9]]
True
Run checks the first 3 tests in your browser. Submit checks all 124 tests on the server, hidden ones included.