摘要:
91 这个题的扩展满足 \(N \le 2500\),枚举每个点的位置去计算太慢,我们能否通过枚举一条线来计算答案? 考虑枚举一条斜率为 \(\frac{y}{x}\) 的一条直线,这条直线在至少可以在范围内交出 \((x, \, y)\) 这个点,我们以 \((0, \, 0), \, (x, \ 阅读全文
posted @ 2025-03-18 20:49
YipChip
阅读(49)
评论(0)
推荐(0)
摘要:
81 定义状态转移方程: \[dp[i][j] = \min(dp[i - 1][j], \, dp[i][j - 1]) + a[i][j] \]// cpp #include<bits/stdc++.h> using namespace std; const int N = 1010; int 阅读全文
posted @ 2025-03-18 00:52
YipChip
阅读(30)
评论(0)
推荐(0)

浙公网安备 33010602011771号