https://programmers.co.kr/learn/courses/30/lessons/12904#
#include <iostream>
#include <string>
using namespace std;
int solution(string s)
{
int answer=1;
int size = s.size();
for(int i=1;i<size-1;i++){
int lim = min(i, size - i-1);
for(int j=1;j<=lim;j++){
if(s[i-j] != s[i+j])
break;
else
answer = max(answer, j*2+1);
}
lim = min(i, size - i);
for(int j=1;j<=lim;j++){
if(s[i-j] != s[i+j-1])
break;
else
answer = max(answer, j*2);
}
}
return answer;
}