DP - Ways to write word
CodeChefOpen on judge ↗
What are the total number of ways in which you can write a word, given number of each vowels that can be used, print that number of ways modulo 10^9+7. In that word, same vowel can be repeated contiguously,(boldness for emphasis). Check example just below: Example: aba is same as aaba, abaa, abaaaaa, abaaaaaaaaa,aaaaba,aaabaaa. But consonants must be placed as it is between the vowels. You will
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