IN :
5
jxfhvw
ahzge
hqsvd
dgbc
agzev
jxdgbc
OUT:
dgbc
IN :
5
jxfhvw
ahzge
hqsvd
dgbc
agzev
jxdgbc
OUT:
dgbc
Thanks for your example. There is a small mistake : the last line must be 7 characters long.
After correction of the input, my algorithm finds dgbc but fails at âValid wordâ final test.
You should delete the following code instead correct my example. :â(
if(!(cin && line.size() == max_size))
error("bad case");
Thanks a lot : I score 100%. What a relief !
That means that the âValid wordâ final test doesnât provide 7 letters as expected.
I hope this will help others.
strange, quantity of letters is really set to 7 in task description - but i did not rely on the length of LETTERS string in my solution so i avoided this problem
Hi,
I would also be interested in this (the large dictionnary 1/2 fail on the submission, when similar tests pass in âmanualâ).
Regards
My program passes all tests except for test 4. In the dictionary provided âwatersâ comes before âwasterâ. My program outputs âwatersâ but the test says âExpected: âwasââ. What am I missing/misunderstanding?
EDIT: I came up with a completely different way to solve the problem and it fails in the exact same way even though the approach is totally different. Fails test 4 before submission and fails the large dictionary 2 test after submission. Even when I work it out on paper I get âwatersâ as the answer for test 4. If a moderator looks at my code they will only have to comment either line with âprint firstAttemptâ or âprint secondAttemptâ to see that my codes function. Any help would be appreciated.
EDIT 2: Found an error in my structure for holding scores for letters. Still fails test 4 but gets 100% after submission and thatâs what counts I think.
EDIT 3: Just realized that it would be helpful to include the language I was using if I wanted the mods to check those tests. Python 2.7 or just Python on this site. Still no reply after 6 days. Wow. Iâm impressed by what I shouldnât be.
Iâm doing this challenge in Python.
It works completely, all manual test pass.
But after submitting the âValue better than sizeâ test fails!
I have no idea why, does anyone have a clue?
Thx in advance!
âThe only constraint is that the word must be made using the 7 letters which the player has drawn.â
No one ever said that you are not allowed to repeat letters. That should be specified in the statement, as it took me quite a while to figure that out with debugging.
Here is my tip. To gain some time (but not some space), sort the letters ! Insert them as below :
{âdorwâ => âwordâ, âabitâ => âbaitâ}
Then insert them in a tree. When you look for matches, you can perform a simple tree browsing instead of combining the letters in every single order possible.
Then you will successfully pass the last tests with big volumes of data.
Iâm getting a weird issue. When I do the tests on the editor all of them pass. But when I submit large dictionary 2 fails.
Maybe your answer is too slow.
I doubt it, Itâs a fairly fast solution and it solved large dictionary 2 fine the first time.
Your solution works sometimes? That can happen. For example when the timelimit is 100ms and your solution takes 100ms ±10ms, depending on whether the garbage collector is running or not.
Same problem with last two tests in validation. Algorithm passes in less than 100 ms in IDE testing but fails on both of large dictionaries in validation, with no possibility to debug or get error message. Python2
My solution succeed with all validators except âValid wordâ.
Same validator in dev environment succeed.
Any idea what is specific with this validator and can help me find out what is wrong with my code?
For information, I used an algorithm in which I generate all combinations with the 7 given letters. Then I return the one scoring the best and having the first index in the given dictionary.
As it is ok with large dictionaries, it can not be a performance issue.
Thank you for your help.
Iâm having the same issue and all the test cases pass and do it pretty fast, any way we could get the in for the Large Dictionary 2? Just so we can understand why only that test doesnât work. Thanks
Ok Using Pyhon, I passed all validation tests. After submitting though, failing on 2 words with different value. I am not even sure what to troubleshoot. Does anyone has a clue on what the dataset is for this case.
Interesting. I have similar issue. I passed all test cases, but on submit 2 words with the same value
fails. http://i.prntscr.com/76b2618dc4484b259196bffb397aafd9.png The code is written in Python3.
Ok, fixed that, the error was in the function that computes score of the word.