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
  • created

    Apr '24
  • last reply

    Apr '24
  • 1

    reply

  • 272

    views

  • 2

    users

  • 1

    like

This has been mentioned several times in the comments for the problem, but it seems the problem setter doesn’t care to correct the test data. I think that’s poor, but there’s nothing I can do about it.