摘要:
#代码: #include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; typedef long long LL; const int N = 1e5+10; LL 阅读全文
posted @ 2021-06-13 20:46
OvO1
阅读(58)
评论(0)
推荐(0)
摘要:
link #思路: 数据范围是$1e5$. 先回想数据范围为$1e3$的做法: $dp[i]$表示以第i个数为结尾的最大上升子序列和,转移就是$dp[i]=max(dp[j]+w[i]),1<=j<i$ 时间复杂度$O(n^{2})$ 这题显然过不去,考虑用数据结构优化。 每次转移过来的都是前缀的最 阅读全文
posted @ 2021-06-13 19:28
OvO1
阅读(85)
评论(0)
推荐(0)

浙公网安备 33010602011771号