摘要: 区间dp。 转移方程见题解(doge) #include<bits/stdc++.h> using namespace std; int m[310],dp[310][310],ans; int main() { ios::sync_with_stdio(0); cin.tie(NULL); cou 阅读全文
posted @ 2024-10-11 20:36 yzc_is_SadBee 阅读(20) 评论(0) 推荐(0)
摘要: 模板区间dp. 懒癌,于是把石子合并copy了一下。 #include<bits/stdc++.h> using namespace std; int m[310],dp[310][310],anss,ans; int main() { ios::sync_with_stdio(0); cin.ti 阅读全文
posted @ 2024-10-11 19:58 yzc_is_SadBee 阅读(12) 评论(0) 推荐(0)
摘要: 简单四维dp。 #include<bits/stdc++.h> using namespace std; int a[355],b,t[5],dp[45][45][45][45]; int main(){ ios::sync_with_stdio(0); cin.tie(NULL); cout.ti 阅读全文
posted @ 2024-10-11 19:13 yzc_is_SadBee 阅读(9) 评论(0) 推荐(0)
摘要: 补交。 #include<iostream> #include<cstdio> using namespace std; int g[105],f[105],a[105],s[105]; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a 阅读全文
posted @ 2024-10-11 18:29 yzc_is_SadBee 阅读(13) 评论(0) 推荐(0)