随笔分类 -  动态规划

摘要:P1233 木棍加工 (dilworth定理) #include<bits/stdc++.h> using namespace std; const int N=1e4+10; int dp[N]; struct node{ int l,r; }a[N]; bool cmp(node &a,node 阅读全文
posted @ 2022-10-20 23:42 Dengpc 阅读(40) 评论(0) 推荐(0)
摘要:Cut Ribbon #include<bits/stdc++.h> using namespace std; const int N=4e3+10; int dp[N],v[4]; //dp[i]表示长度 为i最多能够分成几段 int main(){ int n; cin>>n>>v[0]>>v[ 阅读全文
posted @ 2022-10-19 23:29 Dengpc 阅读(48) 评论(0) 推荐(0)