Tag: amp error wrong scan turn GPO CLU Print STD
#include <cstdio> #include <algorithm>const int maxn = 37;int N, m, Dp[maxn][maxn];int main () {scanf ("%d%d", &A Mp;n, &m);DP [1][0] = 1; Error code for (int i = 1, i <= N; i++) {for (int j = 1; j <= M; j + +) {Dp[i][j] = Dp[i = 1? n:i-1][j-1] + Dp[i = = n? 1:i + 1][j-1];}} printf ("%d\n", Dp[1][m]);//dp[0][1] = 1; Positive solution//for (int i = 1; I <= m; i++)//for (int j = 1; J <= N; j + +)//dp[i][j] = dp[i-1][j = 1? n:j-1] + dp[i -1][j = = N 1:j + 1];////printf ("%d\n", dp[m][1]); return 0;}
DP Getting Started.
If, according to the first, DP [the ball in the hands] [the first few rounds], then directly a person through the full number of rounds, it is conceivable that some states are not transferred.
The second one shifts the state of everyone in each round.
"Error logging" about array dimension order in DP