摘要:
题目传送门 数位dp. #include<iostream> #include<cstdio> #include<cstring> #define mod 1000000007 using namespace std; string l,r; int a[1005],b[1005],f[1005][ 阅读全文
posted @ 2020-09-02 23:04
Mr^Simon
阅读(104)
评论(0)
推荐(0)
摘要:
题目传送门 数位dp,没啥好说的 #include<iostream> #include<cstdio> #include<cstring> #define mod 1000000007 using namespace std; int t,s[20],len; long long l,r,ans, 阅读全文
posted @ 2020-09-02 22:59
Mr^Simon
阅读(139)
评论(0)
推荐(0)
摘要:
题目传送门 从最后倒着往前推,贪心模拟即可 #include<iostream> #include<cstdio> #include<vector> #include<queue> using namespace std; int m,n,ti,o[501],ans; vector<int> a[5 阅读全文
posted @ 2020-09-02 22:58
Mr^Simon
阅读(164)
评论(0)
推荐(0)
摘要:
题目传送门 一开始没看到题目下面的说明(只能走直线),推了好长时间没推出来.f[i][j]表示从(0,0)到(i,j)的最大矿数. #include<iostream> #include<cstdio> #include<cstring> using namespace std; int n,m,a 阅读全文
posted @ 2020-09-02 22:54
Mr^Simon
阅读(84)
评论(0)
推荐(0)
摘要:
题目传送门 区间DP,f[i][j]表示i~j区间最小答案,用ans[i][j]记录f[i][j]的断点在哪里,即括号分界处. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namesp 阅读全文
posted @ 2020-09-02 21:43
Mr^Simon
阅读(113)
评论(0)
推荐(0)
摘要:
题目传送门 分层图最短路,或者说是一个DP,f[i][j]表示用了i张免费券,到了j号点的最小花费,然后跑最短路 #include<iostream> #include<cstdio> #include<cstring> #include<queue> using namespace std; in 阅读全文
posted @ 2020-09-02 21:14
Mr^Simon
阅读(228)
评论(0)
推荐(0)

浙公网安备 33010602011771号