//https://www.acmicpc.net/problem/10835#include #include #include #include using namespace std;int dp[2001][2001]; // dp[x][y] : 왼쪽카드x번째, 오른쪽카드 y번째일 때, 앞으로 얻을 수 있는 점수 최대값int lc[2001]; // left cardint rc[2001]; // right cardint n; int play(int x, int y){ if(x==n+1 || y==n+1) return 0;// 둘 중 하나가 더이상 카드가 없으면 앞으로 얻을 점수 0 if(dp[x][y] != -1) return dp[x][y]; // 이미 계산한 것은 나와야함 // 앞으로 얻을 점수이므로 앞에서와는 무관하..
//https://www.acmicpc.net/problem/10942#include #include using namespace std;int num[2001];bool dp[2001][2001]; int main() { int n, m; int start, end; scanf("%d",&n); for(int i=1; i