摘要:
#include #include #include #include using namespace std; const int maxn=1000000; int Q1[maxn]; int Q2[maxn],r1,r2; int sum[maxn],dp[maxn]; int main(){ int n; while(scanf("%d",&n)!=EOF){ ... 阅读全文
posted @ 2018-04-30 20:15
lmjer
阅读(150)
评论(0)
推荐(0)
摘要:
设a[i][j]表示将矩阵压缩成线性序列的前缀和 那么我们在做dp时枚举起点 i 与终点j 最内层枚举行号,那么可以一行一行的累加, 最后更新答案即可 阅读全文
posted @ 2018-04-30 15:51
lmjer
阅读(944)
评论(0)
推荐(1)

浙公网安备 33010602011771号