All problems

Watching the Curse of Dimensionality

easyPythonK-Nearest Neighbors

Marlow Utilities' data team keeps bolting extra readings onto every archived fault, believing a richer description makes the shortlist sharper. They now suspect it has done the opposite, and they want the evidence recorded. For several sizes of reading-set they measured the average distance between pairs of archived faults. The worry is that this average climbs every time the set grows: records drifting uniformly further apart is precisely what stops the word "nearest" meaning anything. One flat step, or one dip, is enough to say the pattern did not hold.

Task: Report whether the average distance rises at every step of the table.

Input

The first line holds n, the number of measurements. Each of the next n lines holds a reading-set size followed by the average distance measured at that size, separated by a space. The lines already arrive in order of increasing reading-set size.

Output

One line. Print increasing if every average distance is strictly greater than the one on the line before it, and not increasing otherwise. An average that exactly repeats the previous one is not an increase.

Example:

Input:
4
2 1.4
10 3.2
50 7.1
100 10.0

Output:
increasing

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…