Good Son !!
CodeChefOpen on judge ↗
It's Mother's Day and Pranav wants to gift a string to her mom. He has a string $ S $ of length $ (N−1) $ . But their is one issue that Pranav only wants to gift a "good" string to her so that her mom becomes happy. Each character in $ S $ is $ "<" or ">" $. A sequence of $ N $ non-negative integers $ a1,a2,⋯,aN $ is said to be good when the following condition is satisfied for all $ i (1≤i≤N−
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