is anyone able to get me the input lists for validator 8 and 10. I keep failing on them for hours and have no idea why
I had a similar issue, it seems that a h x1 x2 building begins in x1 but ends in x2 - 1
I can’t find a better place to put my question/optimization of the puzzle so i will do it here:
I made a solution that failed 2 of the viewable Test cases (06 and 10) but got 100% on Submitting. I have no idea why these two examples do not work and if it’s an issue for the creator that i got 100% with a wrong solution.
Any ideas what i should do?
Test cases 6 to 10 are not generated by hand but instead a parameterized program was used to generate the inputs (with the help of a random generator).
Obviously the viewable test cases contain some features that are not covered by the private validators and vice versa. So @Shiggy, you are very lucky that you got a 100% score, although the program is most likely not entirely correct. And @nphect probably has an error in his code too, otherwise the validators would succeed.
To make it clear: When a building ends at e.g. x2=10 and a second building starts at x1=11, then there is a gap between the two buildings. That means you need 7 lines to draw both.
What about validator 5 ?
I passed all test cases and all validators except this one.
I’ve been mighty annoyed by these validators too.
Quite a few things are not clearly stated in the problem definition:
is the x2 coordinate part of the building or not?
what should we do at the edges of the picture? Should a zero height line be drawn left and right?
should we draw a line between two buildings of the same height, i.e.
_ _ _ _ ___ | | + | | = | | | or | | ?
Though the problem definition seems to say that’s 5 lines anyway, that contradicts the intuitive definition of a skyline and nothing specific is said about that.
The tests don’t check any of these edge cases. I had a program passing all tests within 10 minutes, but I spent ages fiddling with various combinations of hypothesis until the damn validators turned green.