In (LPS - Longest Palindromic Substring) problem I get wrong answer with many different implementations and in the end I after taking input i made N equal to string size and i got accepted
int n;
string s;
cin >> n >> s;
n = s.size(); // this line make the code accepted