Search for 404
Om has a string $S$ consisting of characters $*$, $4$, and $0$ only. - The character $*$ can be replaced by either $4$ or $0$. Om wants to count the total number of [subsequences](https://en.wikipedia.org/wiki/Subsequence) of $404$ present in all the possible strings generated after replacing $*$. As the number can be huge, you must output the number modulo $10^{9}+7$. For example, if the give
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