Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Problem Statement
- You are given a int[] y of length N. The values in y describe N points in the plane: for each x = 0, 1, ..., N - 1 there is a point at coordinates (x, y[x]).
- Krolik is going to perform the following operation:
- Choose two of the given points, say A and B, with different y-coordinates.
- Consider the rectangle with sides parallel to coordinate axes and points A and B in two opposite corners.
- Erase all points strictly inside the rectangle.
- Return the maximum possible number of points Krolik can erase by a single operation.
Add Comment
Please, Sign In to add comment