上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页
摘要: #include#include#include#include#include#includeusing namespace std;const int maxe = 50000;const int maxn = 17;const int INF = 0x3f3f3f;vector l[maxn];vector r[maxn];char s[maxn];inline int cal(int a,int b){ int ret = 0; for(int i=a;i=2;i--){ for(int j=N+1;j>i;j--){ ... 阅读全文
posted @ 2013-09-06 19:04 等待最好的两个人 阅读(143) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 100500;const int INF = 0x3f3f3f;double dp[maxn];int map[maxn];int main(){ //freopen("E:\\acm\\input.txt","r",stdin); int N,M; while(cin>>N>>M &am 阅读全文
posted @ 2013-09-06 19:02 等待最好的两个人 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1036#include #include #include #include #include #include #include using namespace std;const int maxn = 505;int m,n;int dp[maxn][maxn][2];int leftsum[maxn][maxn],upsum[maxn][maxn];int main(){ //freopen("E:\\acm\\input.txt","r" 阅读全文
posted @ 2013-09-05 22:09 等待最好的两个人 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1033#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 105;const int INF = 0x3f3f3f;int dp[maxn][maxn]; //dp[i][j]表示字符串中从i到j最少要添加的字母个数。int main(){ //freopen("E:\\acm\\. 阅读全文
posted @ 2013-09-05 19:28 等待最好的两个人 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1032#include #include #include #include #include #include #include using namespace std;const int maxn = 33;const int INF = 0x3f3f3f;long long dp[maxn];int sum[9] = {0,0,0,1,1,1,2,4,4};long long int N;inline long long res(int i){ return (1>T.. 阅读全文
posted @ 2013-09-05 19:01 等待最好的两个人 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4293#include#include#include#includeusing namespace std;const int maxn = 506;int G[maxn][maxn];int dp[maxn]; //dp[i]表示前i个人,最大有多少个人没撒谎。int main(){ //freopen("E:\\acm\\input.txt","r",stdin); int N; while(cin>>N){ memset(G,0,sizeo 阅读全文
posted @ 2013-09-05 00:03 等待最好的两个人 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2449#include#include#include#include#includeusing namespace std;const int maxn = 1005;const int maxe = 100050;const int INF = 0x3f3f3f3f;struct Edge{ int v,w; int next; Edge(int v=0,int w=0,int next=0): v(v), w(w), next(next){}};struct Heap{ int u,f... 阅读全文
posted @ 2013-09-03 11:44 等待最好的两个人 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4284#include#include#include#includeusing namespace std;const int maxn = 105;const int maxm = 16;const int INF = 0x3f3f3f3f;int dp[maxm][1>T; while(T--){ cin>>N>>M>>Money; for(int i=0;i w) dist[u][v] = dist[v][u] = w; //... 阅读全文
posted @ 2013-09-02 23:22 等待最好的两个人 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4283#include#include#include#includeusing namespace std;const int maxn = 105;const int INF = 0x3f3f3f3f;int dp[maxn][maxn];//dp[i][j]表示只考虑编号为i到编号为j的人上场的最小不开心值;//枚举i第K(1=>T; for(int cas=1;cas>N; sum[0] = 0; for(int i=1;i=1;i--) ... 阅读全文
posted @ 2013-09-02 23:20 等待最好的两个人 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2288#include#include#include#includeusing namespace std;const int maxn = 13;typedef long long int ll_int;ll_int dp[maxn][maxn][1>T; while(T--){ int n,m; cin>>n>>m; memset(G,0,sizeof(G)); memset(dp,0,sizeof(dp)); memset(way,0,sizeof... 阅读全文
posted @ 2013-09-02 23:19 等待最好的两个人 阅读(230) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页