Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @ajaiy,validated by @DeanTheMachine and @Edjy.
If you have any issues, feel free to ping them.
Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @ajaiy,validated by @DeanTheMachine and @Edjy.
If you have any issues, feel free to ping them.
I have a problem. All testcases are green, but when I submit my code I get only 75%. One validator “Snaaaaaaaaake” isn’t working, but I have no idea what I have wrong in my code. Could you write this validator here? @ajaiy, @DeanTheMachine, @Edjy
Check that your code deals with starting from a horizontal direction “L” or “R”.
I’ve not done this puzzle but it seems that the first result would be as follows:
L:
--+
--+
R:
+--
+--
Good point, I added it, but it is still failing ![]()
I tested it locally and everything is working. Probably I missed some case, but I don’t have idea what can be wrong.
Try this custom case:
Input:
RRDDRRURRRDRRDLLDLLLULDDLLDRRRRURRRRDRRRRD
Output:
+-------+
+-----+ |
| | +----------+
| | | +------+ |
| +---+ | | +-----+
+-------+ +-----+ |
+----+ +-----+ |
| ++ | | +-----+
| || +------+ |
| |+----------+
+-----+ | +-------------+
| +-----+ | +---------+ |
| +---------+ | | +-----------+
+-------------+ +-----------+ |
| |
+-+
I tried it, I think output is correct.
My output:
+------+
+----+ |
| | +----------+
| | | +------+ |
| +---+ | | +-----+
+-------+ +-----+ |
+----+ +-----+ |
| ++ | | +-----+
| || +------+ |
| |+----------+
+-----+ | +-------------+
| +-----+ | +---------+ |
| +---------+ | | +-----------+
+-------------+ +-----------+ |
| |
+-+
Maybe I did something wrong with start size of buffer? Or I get timeout?
I created 500x500 grid at the begining and start from the middle.
No, your output isn’t the same as mine. Count the “-” carefully.