摘要:
看上去很友好,跟很多题好像都有相同的地方qwq 实际上还是有些区别的 ‘ 这 个 二 分 有 些 巧 妙 ’ #include<bits/stdc++.h> #define int long long using namespace std; int n; int a[100005]; //来源lu 阅读全文
摘要:
#include <bits/stdc++.h> using namespace std; int t, n; long long s[200020];//区间起点 long long e[200020];//终点 long long d[200020];//每次加的数 bool ok(long l 阅读全文
摘要:
很显然的区间dp 当我们卖掉一个物品时,可以看为给延后卖的商品都加价 $ dp [ i ] [ j ] $ 表示卖掉i~j的最大收益 #include<bits/stdc++.h> using namespace std; int n; int v[2021]; int dp[2021][2021] 阅读全文