In my opinion a shadow cant cast any shadow, so test 4 has a bug for me, but it mades me change my code a couples of times to pass it. I enjoyed it.
for those with problems in test 4 you could try this custom case (remember change the setting to expert mode):
input:
1
a-a`a
expected output:
a-a`a
-----
`````
Objectively speaking, the task does not say that the shape cannot contain characters that are used to create a shadow (and it clearly says that the lines contain an ASCII art pattern), although this may seem illogical, but on the other hand, here you need to think about the display as three layers where the topmost contains the shape, which has priority over shadows, the middle one contains the dark shadow, which has priority over the light shadow, and the bottom one contains the light shadow, which has priority only over empty space, and by combining all three layers we get the final image.
For my part I only failed on the 2nd test ABC. I don’t know why ? I am in C#.
All the test in local pass. For the 4th test ASCII I replace the char ‘`’ by replaced him with ‘°’ for my calculation.
I solved my problem, the problem was on the input where the imput line was not the same size. I solvez the problem by adding some space on the shortest lines.
Hi to all
! Effectively i had the same issue in the 4th Test Case
…
→ as soon as i understood the special backticks was too in the input, i had to think differently as i did firstly,
finally it was easier for me to rewrite all the shadow processing …
And now it works : 100% Test Cases and 100% Validators
!
Thanks to @manychois for this puzzle, to the Validators @DavidAugustoVilla,@Alex-1 and @jeedayy to agree it.
And i think i can add a special mention to the community too for this so useful support
!
By to All, have
sun if possible,
fun when possible, and always
Codin’Games
..
I wish there would be more test cases, just for the fun of it - to see more ASCII art =P