在求前缀和时,有一步:
ans[i][i+1]=ans[i][i];//继承。
有人表示没看懂,我也+1
解答:
∵\because∵ 边界的右边一位为0 ∴\therefore∴ ans[i][i+1] 都被错误的+1 将ans[i][i+1] 赋值为 ans[i][i] 即可解决