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

Palindromize

Time limit: 1000 ms
Memory limit: 256 MB
Given a string $S$ consisting of lowercase letters, find the minimum number of characters that need to be added to $S$ to make it a palindrome. A palindrome is a string that reads the same forwards and backwards. ### Input - A single line containing the string $S$ consisting only of lowercase letters. ### Output - Output a single integer representing the number of characters that need to be added. ### Constraints - $1 \le |S| \le 1000$. ### Exampl Input: ``` abcbe ``` Output: ``` 2 ``` One way to add characters to satisfy the condition is: `eabcbae`
Introduction to Dynamic Programming (Part two)
Sake game
Coins
Coins 2
Game on array
Longest increasing subsequence 2
Convolution
Regular bracket sequence
Faulty addition
Weird bank
Delete operation
Palindromize
Color ribbon
Unique subsequences
Unique subsequences 2
Cow exhibition
Knapsack 3
Compressing array
Regular bracket sequence 2
Maximum path 3
Concating substring
Soil
Stacking boxes
String transformation
Palindromic quadruple
Finding teammates
Topic
Dynamic Programming
Rating 1400
Solution (4) Solution