The problem seems to be that your code generates coordinates outside the grid.
Yes the problem is that. Thank you ![]()
Interesting puzzle. Very funny!
I think a bit of feed back on why a validation test fails when submitting our solution would be nice. My first solution passed all test cases, but only passed 40% of the validation without being provided any reason why 60% of the validators failed it. So, what did I do? I optimized my code to run a tad bit faster, and suddenly 100% of the validators passed. The only reason I tried runtime optimization first was because it was easier than checking my algorithm for bugs and it passed all the test cases.
Edit: There was a bug in both submissions, but that bug didnāt stop the second submission from passing all validation tests. The bug was fixed in the third submission.
Is there a way to know if my problem is performance? I passe all test but miss validators 2, 3, 4. Iām using Rust and all 5 tests pass < 500us, so Iām not sure the issue is performanceā¦
You may send me your code via private message, and Iāll check it for you.
Edit:
The following case may be helpful for debugging:
Input
10
ukrqjawhpc
mgkbcwjsoq
nybadeemwk
fargufmhql
scwmughzij
vzrqlpixyz
nyljakjwck
orfpmluvwb
ecbonstdru
cuspqrefmd
Output
----------
---bc-----
---ade----
-----f----
-----gh---
------ixyz
-----kjw--
----mluv--
---onst---
---pqr----