[Community Puzzle] Escape the madness - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Cakeisalie5,validated by @Ribak,@Chewys512 and @JeZzElLutin.
If you have any issues, feel free to ping them.

@Cakeisalie5,

I tried to do this puzzle in C. I passed all the testcases, but I keep failing the ā€œOnly known HTML entitiesā€ validator. I tried building in several additional checks, but my code does not pass the validator, while it passes the testcases every time.
Could you help me by explaining the difference between the ā€œOnly known HTML entitiesā€ testcase and the ā€œOnly known HTML entitiesā€ validator?

In the validator, there is one &#nn; where nn actually consists of 4 digits. This is not featured in any visible test. Iā€™ve requested the author to adjust the test and the validator to fix the issue.

Thank you,

It turned out that the validator included some characters that are part of the Unicode mapping but not of the ascii mapping, while all characters in the testcases could be mapped as ascii characters. The validators therefore required the use of wide characters rather than regular characters, while the test cases could be solved with regular character strings.

It turned out to be a nice puzzle in the end!

Iā€™ve just seen this problem (C++) ā€¦ maybe the author should swap the validator and the test ?
Or just remove the 4 digit code, itā€™s very boring to solve this case in C++ :smile:

I tried with [wstring, wcin and wcout] instead of [string, cin and cout] : it doesnā€™t work.

Ɖchec
TrouvƩ :
Others such as $ ($), % (%) or even € (EUR) shouldn't work either.
Attendu :
Others such as $ ($), % (%) or even € (\-30\-126\-84) shouldn't work either.

How can the validator wait for that ?


I think itā€™s unsolvable in C++

wcout << L"I want to print ā‚¬" << endl;
// I want to print EUR

Hi, as described by @5DN1L my validator covered a case not covered by any test, which is indeed a mistake on my part. It should be fixed and actually fail in the corresponding test now! :slight_smile:

Hi all,
Iā€™m trying to solve using Typescript.
Passing all test cases but failing one validator (6 - Only HTML entities).

Not sure if error on my part or something similar to javascript limitation discussed here;
what-is-your-garden-worth

Any help greatly appreciated.

Hi, could you give more details on the failure, e.g. the result you obtain and which native functions you use to parse/replace tokens? :slight_smile:

Thanks for the quick reply Cakeisalie5.
Sorry, not sure how to get details of inputs / results for validator - is this possible? If I could do it this would make finding the code problem much easier :slight_smile:

Description of code / functions for the HTML changes as this is the failing validator.
Hopefully itā€™s hidden to avoid spoilers - my first time posting.

Summary

1 - Replace the html unicodes using string.replace(regexp, replacerFn using parseInt).
2 - Use replaceAll (polyfill declared at top) for the HTML entities (via search / replace as key / value for an object), making sure to do & last.

Full code details as below (hopefully hidden);

[nope]

I canā€™t pass Validator 2 (C-style trigraphs with unsupported characters) in C++. Now that I am level 29, I can see that there is a < ĀØ > character in Validator 2. Internet tells me it is a diaresis (unicode 0xA8), I donā€™t know if getline or cout is failing on large characters ? Could the validator be adjusted to fix this issue ?

Updated to use ?". Better? :slight_smile:

1 Like

Yes, thank you Cakeisalie, fifth of the name !

Not really; in PHP, the test ā€˜6. Only HTML entitiesā€™ is also failing. Can you provide a entry and a successful example for this test? please .

Are you talking about Test 6 or Validator 6?

Huh!? Validator 6, because I already have all the expected inputs and outputs for the tests.

Noted your clarification.

If you want, you may send me your code in private message and Iā€™ll take a look.

Edit: The issue is caused by a typo in the code.

1 Like