• [1251] Find the Palindrome

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • The problem is pretty easy, giving you a very long string, you have to find the first longest palindrome in the string. (Case-insensitive)
  • 输入
  • First line contain a integer T (T <= 100), means the test case.
    And the following T lines, for each line, there is a string is make up with the uppercase and lowercase.
    The string's length is less than 10000.
  • 输出
  • For each test case, you should print the longest palindrome, if there are muti-case, print first of them.
  • 样例输入
  • 3
    aaa
    aa
    Adad
  • 样例输出
  • aaa
    aa
    Ada
    
  • 提示
  • 来源
  • monkeyde17
  • 操作

显示春菜