Longest Palindrome by nn

for(;l=readline();print(p[0]))for(i=r=s='';i<26;r[3*i]?s='\\'+ ++i+s:r+='(.)')p=l.match(r+s)||p

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page