# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198865 | 2020-01-27T22:42:15 Z | imaxblue | Jump (BOI06_jump) | C++17 | 0 ms | 0 KB |
fox(l, n){ fox(l2, n){ fox(l3, 5){ dp[l][l2][l3+1] += dp[l][l2][l3]/1000000000; dp[l][l2][l3+1] %= 1000000000; } if (l==n-1 && l2==n-1) break; scanf("%i", &a[l][l2]); fox(l3, 5){ if (l+a[l][l2]<n) dp[l+a[l][l2]][l2][l3] += dp[l][l2][l3]; if (l2+a[l][l2]<n) dp[l][l2+a[l][l2]][l3] += dp[l][l2][l3]; } //cout << dp[l][l2] << ' '; } //cout << endl; } foxr(l, 5){ if (dp[n-1][n-1][l]==0 && l!=0) continue; cout << dp[n-1][n-1][l]; } return 0; } /* 4 2 3 3 1 1 2 1 3 1 2 3 1 3 1 1 0 */