Postman and Letters
CodeChefOpen on judge ↗
There is a street of size $N$. The street is denoted by string s that consists of : 'l' (small L) - denotes a letter to be picked by any postman. 'p' - denotes the postman '.' - denotes none of them. In a unit length either a letter is present or a postman or nothing. All letters are to be posted compulsorily so each of them should be picked up by any one postman. In moving from
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