report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Marisa - MarisaOJ: Marisa Online Judge

Marisa

Time limit: 1000 ms
Memory limit: 256 MB
Given a string $S$, count the number of non-contiguous subsequences of $S$ that form the string `marisa`. ### Input - A single line containing the string $S$. ### Output - Output a single integer representing the number of non-contiguous subsequences of $S$ that form the string `marisa`, modulo $10^9+7$. ### Constraints - $1 \le |S| \le 10^5$ ### Example Input: ``` marisa ``` Output: ``` 1 ```
Introduction to dynamic programming
Hakurei Shrine
Buying tickets
Reading 2
Longest increasing subsequence
Jealousy
Maximum path 2
Fences painting
Hall
Knapsack 2
Longest common subsequence
Yet another build array problem
Rectangle cutting
Palindrome query
Marisa
Merging elements
Brewing potion 8
Topic
Dynamic Programming
Rating 1100
Solution (0) Solution