A Binary Game
CodeChefOpen on judge ↗
Swayam is inside a maze. The maze can be considered as a binary string which is a combination of 1’s and 0’s. Each door of the maze is either closed which requires a key or is already opened with an attached key that can be used to open any closed door inside the maze. If the doors are the characters of a string ‘S’ then the i-th character of the string denotes the i-th door of the maze where S[i]
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