We are asked to tell if two points have the same color. How should I answer this question with the current definition? There is no clear rule in how the colors are chosen.
I managed to get 100% by assuming that two neighbor areas should not have the same colors. But it is clearly not the case even in the first google image results of “morellet lines”:
I tried to solve the puzzle Morellet’s random lines. I was thinking I successed because I passed all the tests in the interactive window but when I submit, he failed on the last one “Mind the sign”.
Is people have met the same anoying problem ? Or I messed something in my code ?
Hi nicola1, thanks for your answer
It wasn’t two same lines, it was two same intersection point from two different lines, that I count twice instead of once…
I have problem with Morellet’s random lines. All passed from ide but last one doesn’t pass. I see that someone had that issue, but can’t figure out how he solved it.
I count all lines between two points (discarding same lines and those where points are on same side) and if that number is odd then NO, if it’s even then YES.
In some odd way my code did’nt passed all test via interactive IDE.
BUT managed to get 100% in validation!
After, review some code from other member - I also found possible logical errors there.
Consider review an test cases.
Maybe. But in this case validator tests are inconvenience. This code would not have passed the test.
More over: I carefully readed other solushion (only one published in GO). And found errors. It cant pass obvious test:
0 9 0 -9
1
0 1 1
So I conclude about wrong\incomplete tests on validator\IDE in this pazzle.
the last testcase (mind the sign) really troubled me a long time, till I finally know which part I ignored.
if you also passed all test but the last validator, try to focus on those lines may through the original point, and they also the same lines.
Can somebody explains the problem clearly? It is not understood at all from the description. How colors are defined? Some kind of image is helpful for explaining the example.