遍历二维数组的三种方式
//直着遍历数组
let dp = new int[m][n]
for (int i = 0; i < m; i++){
for (int j = 0; j < n; j++){
//计算dp[i][j]
}
}
//反向遍历
for (int i = m - 1; i >= 0; i--){
for (int j = n - 1; j >= 0; j--){
//计算dp[i][j]
}
}
//斜着遍历数组
for (int l = 2; l <= n; l++){
for (int i = 0; i <= n - l; i++){
//计算 dp[i][j]
}
}