# [Community Puzzle] PARK PILOT

Coding Games and Programming Challenges to Code Better

Created by @bk521,validated by @Teunisv,@jordan_codingame and @FredericLocquet.
If you have any issues, feel free to ping them.

Interesting but difficult to understand assumptions, especially if you donât look at Constraints (this should have been included in the description earlier). Precode is misleading (the second loop goes for the length of the road when only parking spaces are expected â this should be underlined in the code within the comments).

An example would be useful for recognizing the length of a vehicle.

Yes itâs a little bit hard to well understand the statement but with the help of images it can be done. It s an important part of the challenge, the solution is really easy to code after.

1 Like

This puzzle asks for the vehicle length. This is an interesting and easy enough challenge, and with many ways to find it.
After getting the vehicle length, the rest is quite routine.

There are rooms for improvement:

1. Constraint should be used to write constraints. Now it is used for writing statement. We are missing constraints like maxLen of a vehicle, min/max length of N, etc.

2. Too much relying on external sources. In fact, it shows the shortcoming of CG not allowing anchor to in-site graphics. Before this improvement can be realized, Iâd rather use the banner to paste one really useful graphic than linking to several outside.

3 The definition of index used in the answer can be clearer.

1 Like

Hi all,
I have a question regarding this puzzle. In the Test Case 2 the length of road is 74, however the last available space index is 79L. I am confuse as my understanding is that the parking space should be inside this lenght, so, not sure how is possible to park on 79L if the length of the road is 74.
I have passed all the test case except the second one (my last result is 73L)
So, I guess I misunderstood something, but not sure whatâŚ Could you please give me a hint??
Thanks a lot!!

2 Likes

I have updated the statement based on some of your comments. More details in the comment I have left in the contribution view.

I agree with your point regarding external sources.

I think it is an error in the description. I have now updated it as âthe number of sensor data strings to readâ. Hope that clarifies the matter.

Well done. Tks

Puzzles should be self-contained, except for the references given to help readers learn the subject further, if they so desire. A self-contained puzzle shows that the author has done a thorough homework, and is safer for readers as clicking on links always entails a level of risk, whether now or in the future.
In order to discourage the practice of referring to external sources, I wonât work on this puzzle (this will be the first âeasyâ puzzle I avoid), and I encourage everyone else to do the same (unless, of course, the problem is corrected).

1 Like

Sorry but I donât understand your precision, for me Test 2 is still confusing

From the statement:

At the start, the back of the vehicle is at index 0. The sensors collect data at that moment, and every time when the vehicle has moved forward 1 unit.

and

The sensors are located at the four corners of the vehicle, and each string gives the data of the sensors in the order of:
Front Left - Front Right - Back Right - Back Left

How do you finish the first part, It says Found: 20L
Expected: 27L
The it says, Found: 27L
Expected: 20L

Maybe you have read it wrong? The expected output for the first case should be:

5
20L
27R
28R

By the way, you can find the full expected output of the cases by clicking the button to the left of the button âPLAY ALL TESTCASESâ.

Hi,
I just did the puzzle just now, and itâs still asked to find 79L for only 74 iterations.
If 79L is not displayed in test 2, it fails.

I canât validate (during submission) test 1 and test 3âŚ and no explanation on what makes it no longer pass when it passed in the IDEâŚ

So, even if I liked this puzzle, BUT itâs boring not to be able to exceed 60% without even knowing whyâŚ

1 Like

You may PM me your code to take a look if you want.

1 Like

i have the same issue. 79L for 74 road length.
and funny enough validator 2 passes but validators 1 & 3 donât.
have you managed to get passed it? can you give me some hints on how to proceed?

@5DN1L was the â79L spotâ problem not fixed yet or is it on my side now? pls help