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

String occurences

Time limit: 1000 ms
Memory limit: 256 MB
You are given 2 string $S$ and $T$. Count the number of occurrences of $T$ in $S$ (i.e. how many substrings of $S$ equal to $T$). ### Input - First line contains string $S$. - Second line contains string $C$. ### Output - The number of occurrences of $T$ in $S$. ### Constraints - $1 \le |T| \le |S| \le 1000$. ### Example Input: ``` asasa asa ``` Output: ``` 2 ```
String
Length
Word Count
lowercase
Vowel
Digit sum
Strong password
Letter frequencies
Palindrome string
Palindrome substring
Caesar cipher
String occurences
Sum
String normalization
Run-length encoding
Expression
Topic
Basic
Rating 800
Solution (0) Solution