Guest User

Untitled

a guest
Feb 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Problem Statement
  2. 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]).
  3.  
  4.  
  5.  
  6. Krolik is going to perform the following operation:
  7. Choose two of the given points, say A and B, with different y-coordinates.
  8. Consider the rectangle with sides parallel to coordinate axes and points A and B in two opposite corners.
  9. Erase all points strictly inside the rectangle.
  10. Return the maximum possible number of points Krolik can erase by a single operation.
Add Comment
Please, Sign In to add comment