[Community Puzzle] Graffiti on the fence

The xp difference comes from the fact that one is a community puzzle (with each difficulty 50xp) and the other is a puzzle, which originally comes from codingame (achievement unlock and depending on the difficulty 50, 100, 250 or 500 xp)

2 Likes

Hello, I also have a problem with validator 8 but when I test your example it works. I don’t know what to do

That’s validator 8:

2000000000
100
34 99
1868702166 1904973512
99 127
73 88
502492207 1278547605
6168 7099
11 80
746 4909
369 407
28701 232545
55 90
705542296 1743138276
579 6917
328430 486183
49 69
1391697198 1494765275
1563422163 1687970472
1281568712 1444930662
2765 7191
88 162
4250 9644
248 416
456667 617287
204 424
2073 7162
257697 990282
282113 848872
385570 660057
34 39
1258575818 1461977901
67336 809455
1697 9241
146407 435497
275 4028
77 200
267571 451548
94 461
294 425
66323778 1572584672
1860 3042
2478 6115
625165 679516
256 460
62747 224124
38 97
1 49
176679 564181
6863 9240
40 74
11 56
6357 6737
50 65
19 28
262115 340566
7 67
50 75
49 55
87 90
131274 566462
469907035 601407020
532739 544255
1085480825 1898460477
155 485
208531549 1630035825
3190 3732
93 397
192 378
102413 135415
156 327
213 369
288888 971060
167 499
1243739119 1357778072
31 75
4764 9063
5628 709904
152 349
740154368 1804623897
188 276
41 118
675318 844699
597531 681819
395744098 848757774
18 70
6 388
582758165 1277490955
259197893 579530364
1231340760 1483753061
424187884 1144651276
3930 4503
1229085504 1950784386
3 78
935961827 1202260285
77 90
72 92
1140 5156
717081 802543
2750 3336
347967 512062
104 402

I’m not revealing the expected output to prevent hardcode but maybe you can tell us what is your output for this validator, and we’ll give you hints.

1 Like

Thank you, I have been able to find the bug.

Could you describe your bug? This could help many others.

I’m finding this puzzle extraordinarily difficult (having refused to read how others would solve it).

As so often happens, I solved it shortly after commenting about how difficult it was.
It’s fun, but I also question whether it really belongs in Easy.

I really enjoyed this puzzle, but like others it should have been ‘Medium’ instead of ‘Easy’, because it require a bit of optimization.

Very nice little puzzle here. A little hint: Keep reported painted range sorted (based on start point), and merge the range wherever possible (e.g. (1,5), (3, 6) → (1,6)). Then just find and output unpainted range. If no range can be outputed, output All painted.

Hello, I submitted a code that was passing all tests, but which would not pass the 10th validator.
I finally figured out a simple test case on which my code would fail:

5
4
0 1
2 3
4 5
1 4

I fixed my code accordingly, and my code now passes validator 10.

Maybe it could be worth it to add this test case to the puzzle?
Cheers!

Adding one more case does not eliminate all other possible untested cases. Your post in the thread is a good contribution for anyone seeking more test cases. :+1:

2 Likes

Argh, is that thing really supposed to be in Easy???
I thought it was a good time to test my generic Interval project, but it kept erroring again and again (though it was indeed initially unfinished).
Eventually got it to work, but I wonder if my generic is still…generic.
Anyway, while my solution is definitely overkill, I still objectively think “Easy” is the wrong classification for this one.

Very late reply, but I had the exact same issue, and I bet somebody else will also!

The solution is right there in your post!

The validator is expecting the sections to arrive left to right. You are sending the furthest right section before the middle section.

Hey java_coffee_cup,
this was now the second time one of your puzzels made me sweat because it looked very easy on a first look but then turns out to be little bit more tricky.Anyway passed this one and it was way more fun than i expected. So keep going on with your great work and thank you for this.

2 Likes

Thanks I was passing all tests except Validator 5 and your test case helped me figure out my mistake

I couldn’t pass Validator 5 as well. Using C# by the way.

Does the discussion above help you?

If you refer sample from 0 to 99, no. My model returns “99 100” which is correct I assume.

Added a new minor test case. If you can pass it normally, there is some unknown bug in your code hard to guess.
If I were in a similar situation, I would invent some custom test cases for experiments.

1 Like

Thanks for the support and contributions dude! :metal: