上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 63 下一页
摘要: /* dp[i][j]=max(dp[i][j-1]+a[j],max(dp[i-1][k])+a[j]) (0<k<j) dp[i][j-1]+a[j]表示的是前j-1分成i组,第j个必须放在前一组里面。 max( dp[i-1][k] ) + a[j] )表示的前(0<k<j)分成i-1组,第j 阅读全文
posted @ 2020-01-28 14:46 晴屿 阅读(180) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> #include<cstring> #include<vector> using namespace std; const int INF=0x3f3f3f3f; struct node{ int l,s,h; }; ve 阅读全文
posted @ 2020-01-28 14:44 晴屿 阅读(149) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstring> #include<cmath> #include<cstdio> #include<algorithm> #include<stack> #include<queue> using namespace std; const i 阅读全文
posted @ 2020-01-28 14:02 晴屿 阅读(99) 评论(0) 推荐(0)
摘要: //判断负环 在负环内的城市输出? #include <iostream> #include <queue> #include <cstdio> #include <algorithm> #include <string.h> #include <string> using namespace st 阅读全文
posted @ 2020-01-27 17:30 晴屿 阅读(115) 评论(0) 推荐(0)
摘要: #include<iostream> #include<algorithm> #include<queue> #include<cstdio> #include<cstring> using namespace std; const int N=1100,INF=0x3f3f3f3f; int h[ 阅读全文
posted @ 2020-01-27 16:52 晴屿 阅读(118) 评论(0) 推荐(0)
摘要: #include<cstdio> #include<cmath> #include<cstring> #include<cstring> #include<iostream> #include<queue> using namespace std; const int N=205; const do 阅读全文
posted @ 2020-01-27 14:27 晴屿 阅读(155) 评论(0) 推荐(0)
摘要: //从起点1到剩余P-1个点的最短距离之和+从剩余P-1个点到起点1的最短距离之和 #include<iostream> #include<cstring> #include<cstdio> #include<queue> using namespace std; const int LEN=100 阅读全文
posted @ 2020-01-27 14:05 晴屿 阅读(115) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstring> using namespace std; const int N=110,INF=0x3f3f3f3f; int f[N][N]; int main() { int n,m; cin>>n>>m; memset(f,0x3f, 阅读全文
posted @ 2020-01-27 13:27 晴屿 阅读(105) 评论(0) 推荐(0)
摘要: #include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> using namespace std; const int N=110; const int INF = 0x3f3f3f3f; char s[20]; 阅读全文
posted @ 2020-01-27 13:14 晴屿 阅读(106) 评论(0) 推荐(0)
摘要: //判断负环 dist初始化为正无穷 //正环 负无穷 #include<iostream> #include<cstring> #include<queue> #include<algorithm> using namespace std; const int N = 510, M = 5210; 阅读全文
posted @ 2020-01-27 12:56 晴屿 阅读(116) 评论(0) 推荐(0)
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 63 下一页