팰린드롬?

· 백준
코드#include #include using namespace std;int n, a[2003],m,x,y,dp[2003][2003];int go(int x, int y) { if(x >= y) return 1; // x가 y보다 커지면 true int &ret = dp[x][y]; if(ret != -1) return ret; if(a[x] == a[y]) { // 같으면 계속해서 확인 ret = go(x + 1, y - 1); } else { // 다르면 0 반환 ret = 0; } return ret;}int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n..