Hansels Ordeal II
CodeChefOpen on judge ↗
Unable to understand Gretel's last clue, Hansel concludes that it must be nonsensical. He must now use the parchment to decode the remainder of the witch’s devious schemes. In this desperate attempt to foil her plans, Hansel requires your help yet again. Given the string A containing the plans and string B containing Gretel's nonsense, determine the number of distinct substrings of A such that th
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start