【HDOJ】1028 Ignatius and the Princess III
摘要:
DP问题,二维。 1 #include 2 3 #define MAXNUM 125 4 int dp[MAXNUM][MAXNUM] = {0}; 5 6 int main() { 7 int n, i, j; 8 9 for (i=1; ij)18 dp[i][j] = dp[i-j][j] + dp[i][j-1];19 if (i<j)20 dp[i][j] = dp[i][i];21 }22 while (scanf("%d",&n) != EOF)... 阅读全文
posted @ 2014-03-18 22:30 Bombe 阅读(112) 评论(0) 推荐(0) 编辑