摘要:
题目链接 状态转移 d(i,j) 为切割小木棍i~j的最优费用 d(i,j) = min{d(i,k)+d(k+j)|i<k<j}+a[j]-a[i] 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 5 const int maxn = 5 阅读全文
posted @ 2016-11-08 19:46
_yxg123
阅读(105)
评论(0)
推荐(0)
摘要:
题目链接 1 #include <stdio.h> 2 #include <iostream> 3 #include <algorithm> 4 using namespace std; 5 6 const int INF = 1e9; 7 const int maxn = 1000+5; 8 in 阅读全文
posted @ 2016-11-08 18:35
_yxg123
阅读(87)
评论(0)
推荐(0)
摘要:
题目链接 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int maxn = 1000+5; 5 int n,kase,vis[maxn][maxn],p[maxn][maxn],d[maxn]; 6 char s[maxn] 阅读全文
posted @ 2016-11-08 16:18
_yxg123
阅读(106)
评论(0)
推荐(0)
摘要:
题目链接 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int maxn = 1000+5; 5 6 struct Lamp{ 7 int v,k,c,l; 8 bool operator<(const Lamp& rhs)c 阅读全文
posted @ 2016-11-08 15:52
_yxg123
阅读(90)
评论(0)
推荐(0)
摘要:
题目链接 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int maxn = 50+5; 5 int T,n,t,a[maxn],dp[180*maxn]; 6 7 int main(int argc, char const 阅读全文
posted @ 2016-11-08 15:35
_yxg123
阅读(109)
评论(0)
推荐(0)
摘要:
1 #include 2 using namespace std; 3 4 const int maxn = 50+5; 5 int T,n,t,a[maxn],dp[180*maxn]; 6 7 int main(int argc, char const *argv[]) 8 { 9 scanf("%d",&T); 10 for(int cas=1; c... 阅读全文
posted @ 2016-11-08 15:34
_yxg123
阅读(104)
评论(0)
推荐(0)
摘要:
题目链接#include using namespace std;const int maxn = 50+5;double x[maxn],y[maxn],dist[maxn][maxn],d[maxn][maxn];int main(){ int n; while(s... 阅读全文
posted @ 2016-11-08 07:47
_yxg123
阅读(124)
评论(0)
推荐(0)
摘要:
1 #include <bits/stdc++.h> 2 using namespace std; 3 4 const int maxn = 30+5; 5 int n,blocks[maxn][3],d[maxn][3]; 6 7 void get_dimensions(int* v,int b, 阅读全文
posted @ 2016-11-08 07:40
_yxg123
阅读(159)
评论(0)
推荐(0)


浙公网安备 33010602011771号