Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
Created by @BartholomewIII,validated by @Adam798,@Chomb and @ggrn.
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 @BartholomewIII,validated by @Adam798,@Chomb and @ggrn.
If you have any issues, feel free to ping them.
I have 100% in my tests and 57% in my validators -_-â
If I find my bug, I will try to find a validator for it.
I had same problem. Watch out for dots â.â because multiple different loops can cross same dot. Focus on marking only visited â<>v^â.
If your program passed all the tests (including âoverlapping loopsâ) but not all of the validators, Iâm a little confused. Perhaps itâs a time-out issue? Double check that you donât have any conditions that would loop infinitely.
I fail at validators 2, 3 and 7.
I think I correctly managed the dots, but I will check.
Edit : OK now I pass all tests and all validators. Not completely sure what code modification did the trick, but there was definitely something strange about how I managed the dots.
Nice!
If you figure out exactly what code passes all the tests but not all of the validators, please DM me and Iâll see if I could add/modify the tests to make sure that doesnât happen. (then again, I donât know if Iâm able to do that)
Hey there
I share the same situation with @Yatagan : all tests OK but only 57% on validators (2,3, 7 as well).
Obviously, no hard-coded solution
Rather difficult to understand whatâs wrong without validatorsâŚ
i have the same issue as as everyone,
All my tests are OK but only 57% on validators (2,3, 7 as well).
No hard-coded solution of course.
Using C#
I think the test cases miss a situation when there are multiple âentriesâ into a single loop. Also a question doesnât mention anything about such a situation. I assume itâs a valid loop, an example
>.>.v
>.^..
>.^..
>.^.<
I assume an expected answer is 1
Yes it is.
Had the same issue as previous authors - tests 2, 3 and 7 are failing and only 57% score.
My mistake was: marking as visited all cells in a grid which I visited, not only cells with arrowsâŚ
The following test shows my mistake:
Input:
3 2 >.v .^<
Output: should be 0.
Here I marked cell (row=0, column=0, value=â>â) as visited, then cell (row=0, column=1, value=â.â) as visited (mistake!), then cell (row=0, column=2, value=âvâ), then cell (row=1, column=2, value=â<â), then cell (row=1, column=1, value=â^â). Now my program arrives at cell (row=0, column=1, value=â.â), which was marked as visited, and decides that this path forms a loop, which was not correct.
But if you do not mark empty cells as visited, there should be no problems like this oneâŚ
The sixth test case should cover that situation (âMultiple inputsâ).
Itâs a bit unfortunate that people are struggling with validators after passing all the tests ): I hope that people having difficulties can get some ideas after perusing through this thread.
When a validator is causing too many failure and frustration, an effective help is to open the validator to become a new test case, and create similar new cases to fill up the validators.
Iâd be willing to do that. How do you make changes? (I looked before and could not see an edit button)
We have to move them around manually.
Just like how you were editing your contribution before getting approved, in your Edit mode, copy your validator data to create a new test case.
The original validator and the new case validator should have new data to paste in.
The overlapping loops test will fail if you mark the dots on the field, so this shouldnât be the issue.
i had a time out issue, it was looping indefintely on the last 2 tests. i added a time out counter and now i have 100% for the real submission
thanks
your test case has put the focus on my mistake so that I could fix it and reached 100%
In my code, the fix consists in adding a condition when evaluating the last point closing the loop:
first condition: the point is already in âbeginning pathâ of the loop ==> 57% of validators
second condition: the point is not â.â (dot) ==> 100% of validators
thank you all