Блог пользователя bluemmb

Автор bluemmb, 10 лет назад, По-английски

Hi. I'm stuck with this problem.

Problem : Given set of distinct points and a number A. You have to find maximum number of points in a rectangle with 0 < area <= A.

I have written many different solutions for it but all of them have failed ...

Basic idea is choosing a fixed width and find largest possible height then find maximum number of points in current fixed size rectangle ... I have solved latest problem once by segment tree(Wrong Answer) and once simply by two pointers(Wrong Answer) ...

Can someone help me ? thanks in advance ...

UPDATE

The problem was that LiveArchieve didn't work correctly ...

I got accepted in POJ with modifying and optimizing above solutions : SegmentTree , TwoPointer( I couldn't compute it's complexity but I think it can be huge , however , It got accepted !!! )

  • Проголосовать: нравится
  • +19
  • Проголосовать: не нравится

»
10 лет назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

Maybe one of your solutions is really correct.

The problem is: live archive isn't working correctly, all submissions are getting "Wrong Answer" or "Compilation Error".

Yesterday I lost 2 hours trying to debug a correct solution. If you have an Accepted code from another problem, send it again, it will lead to WA.

Try to find this problem on another judge. :P

»
10 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hints for the problem? I can only think of a O(n3) solution.