← All problemsSign in

Cute Substrings

CodeChefRating 942Open on judge ↗

A string whose length is **odd** is said to be *cute* if: - Every character at an odd index (i.e. the $1$-st, $3$-rd, $5$-th, ... from the beginning) is either the letter `'u'` or the letter `'o'`; and - Every character at an even index (i.e. the $2$-nd, $4$-th, $6$-th, ... from the beginning) is the letter `'w'`. For example, $\texttt{uwu}, \texttt{o}, \texttt{owuwo}, \texttt{uwowuwo}$ are examp

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start