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

Palindrome substring

Time limit: 1000 ms
Memory limit: 256 MB
Count the number of palindrome substrings of a given string $S$. A substring of $S$ is a string that can be obtained from $S$ by removing some (possibly zero) characters from the beginning of $S$ and some (possibly zero) characters from the end of $S$. ### Input - 1 line contains string $S$. ### Output - The number of palindrome substrings of $S$. ### Constraints - $1 \le |S| \le 50$. - $S$ contains only lowercase letters. ### Example Input: ``` mima ``` Output: ``` 5 ```
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 (2) Solution