0_0_22204419_1218.cpp:17:2: error: expected unqualified-id before 'if'
if (i == 1 && j == 1) return dp[1][1];
^
0_0_22204419_1218.cpp:18:2: error: expected unqualified-id before 'if'
if (dp[i][j] != MIN) return dp[i][j]; //说明dp[i][j]之间计算过,是子问题的最优解,直接返? int ans = MIN;
^
0_0_22204419_1218.cpp:19:2: error: expected unqualified-id before 'if'
if (j - 1 >= 1) ans = max(f(i, j - 1), ans); //参考左面相邻第一个,注意j - 1 >= 1边界判断
^
0_0_22204419_1218.cpp:20:2: error: expected unqualified-id before 'if'
if (!num[j].empty()) { //参考j的因数,也就是倍数是j的位? for (vector<int>::iterator k = num[j].begin(); k != num[j].end(); k++) {
^
0_0_22204419_1218.cpp:23:2: error: expected declaration before '}' token
}
^
|