M.A.H.M.O.O.D's blog

By M.A.H.M.O.O.D, history, 8 years ago, In English

HI. I have been trying to solve this problem but while I was second guessing myself I noticed that the first test case is not right but of course this problem was in a contest and a lot of people solved it so I thought (again) I was wrong so could anyone please explain the first test case because the point 1 (2,0) = -2 and point 2 (1,0) = -1 and x1>x2 and y1=y2 so point 1 value should be bigger that point 2 value but -2<-1 can someone please explain the link to the problem thanks in advance.

  • Vote: I like it
  • -5
  • Vote: I do not like it

»
8 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

if some point (x, y) gets number i, then all (x',y') from the set, such that x' ≥ x and y' ≥ y must be assigned a number not less than i.
that means in the final answer (x',y') will be in the i-th line and (x, y) in the j-th line
i should be >= j , not wi >= wj .
good luck ^_^