Is the test case wrong for the contest problem 3?


  • 0
    B

    Anyone get the large test case for problem 3 right? The expected answer is false. However, I plot the rectangles to proof mine, which shows a perfect rectangle. Anyone got the same issue?
    0_1472363708766_figure_2.png

    The test case:
    [[218, 104, 222, 112], [5, 157, 8, 164], [105, 93, 111, 99], [98, 53, 103, 63], [137, 55, 143, 60],
    [42, 67, 50, 70], [112, 91, 118, 94], [0, 141, 8, 146], [38, 73, 42, 74], [169, 96, 174, 97],
    [224, 47, 225, 52], [116, 147, 121, 150], [110, 167, 117, 168], [102, 173, 108, 179], [62, 83, 68, 91],
    [5, 218, 10, 223], [174, 194, 175, 201], [53, 36, 57, 43], [162, 123, 172, 128], [170, 205, 177, 210],
    [41, 1, 47, 11], [25, 96, 27, 104], [106, 153, 111, 158], [48, 167, 53, 170], [26, 232, 34, 239],
    [123, 238, 125, 247], [42, 63, 46, 66], [55, 129, 60, 132], [139, 30, 144, 34], [24, 49, 28, 55],
    [144, 56, 149, 61], [145, 210, 155, 213], [200, 234, 202, 239], [130, 84, 133, 90], [193, 138, 203, 141],....

    It's too long to fit in a post. A text file attached.

    0_1472363868137_contest2problem3testcase.txt


  • 0
    H

    @brokenjade [121, 125, 126, 126] overlaps with [121, 125, 122, 126]


  • 0

    @brokenjade I think you can actually see it in your picture, there's a little white hole in the middle of the big rectangle. Btw, what did you use to create that plot?


  • 0
    B

    @hxtang Is that not axis-aligned rectangles? I'd thought that axis-aligned means no overlapping.


  • 0
    B

    @StefanPochmann matplotlib would be easy to plot them.


  • 0

    @brokenjade Axis-aligned means the rectangle sides are parallel to the x-axis or y-axis. Has nothing to do with overlapping.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.