ACM-DP
文章平均质量分 64
4546love
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU 2686 多线程
<br />http://acm.hdu.edu.cn/showproblem.php?pid=2686<br />#include<iostream>#define N 35using namespace std;int map[N][N];int ans[2*N][N];int dp[2*N][N][N];int Max(int a,int b,int c,int d){ if(a<b) a=b; if(a<c) a=c; if(a<d) a=d; retur原创 2011-05-08 20:04:00 · 944 阅读 · 0 评论 -
HDU 3276 Star
http://acm.hdu.edu.cn/showproblem.php?pid=3276/*题目给出了值的范围,可以二分一下答案,对每一个二分的均值,将原先序列每一个都减去这个均值,假设这个均值可以达到,那么一定可以找到两个不连续的区间,它们的和大于等于0.....这样原创 2011-07-20 09:34:49 · 988 阅读 · 0 评论 -
HDU 3530 Subsequence
http://acm.hdu.edu.cn/showproblem.php?pid=3530#includeusing namespace std;#define N 100005int q_max[N],head_max,tail_max;int q_min[N],he原创 2011-07-20 15:38:54 · 981 阅读 · 0 评论 -
HDU 3535 混合背包
<br />http://acm.hdu.edu.cn/showproblem.php?pid=3535<br />#include<iostream>using namespace std;#define N 101int dp[N][N];int Max(int a,int b,int c){ if(a<b) a=b; if(a<c) a=c; return a;}int main(void){ int n,v; while(~scanf(原创 2011-05-03 19:41:00 · 1736 阅读 · 0 评论 -
HDU 1559 最大子矩阵
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1559<br />#include<iostream>using namespace std;#define N 1001int dp[N][N];int main(void){ int t; int n,m,x,y; scanf("%d",&t); while(t--) { scanf("%d%d",&n,&m); scanf("%d%d",&x,&y);原创 2011-04-26 21:27:00 · 1171 阅读 · 0 评论 -
HDU 1025 最长上升子序列
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1025<br />备忘!!<br />#include<iostream>using namespace std;#define N 500001int dp[N];int a[N];int main(void){ int n,k=1; while(~scanf("%d",&n)) { int i; for(i=0;i<n;i++) { int x,原创 2011-04-26 17:29:00 · 982 阅读 · 0 评论 -
HDU 2577
<br />http://acm.hdu.edu.cn/showproblem.php?pid=2577<br />#include<iostream>using namespace std;#define N 101int main(void){ char ch[N]; int dp_close[N],dp_open[N]; int t; scanf("%d",&t); while(t--) { scanf("%s",ch); int len=strle原创 2011-04-19 13:11:00 · 1321 阅读 · 0 评论 -
HDU 2830
http://acm.hdu.edu.cn/showproblem.php?pid=2830#include#includeusing namespace std;#define N 1001int h[2][N];int real[N];char map[N][N];int main(void){ int n,m; while(~scanf("%d%d",&n,&m)) { int i,j; int ans=0; for(i=1;i原创 2011-04-19 15:18:00 · 717 阅读 · 0 评论 -
HDU 1505
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1505<br />1506的进一步运用<br />#include<iostream>using namespace std;#define N 1001int r[N],l[N];bool map[N][N];int h[2][N];int n,m;void init(){ for(int i=1;i<=m;i++) l[i]=r[i]=i;}int main原创 2011-04-19 14:42:00 · 845 阅读 · 0 评论 -
HDU 1506
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1506<br />#include<iostream>using namespace std;#define N 100001int l[N],r[N];int h[N];int main(void){ int n; while(scanf("%d",&n),n) { for(int i=1;i<=n;i++) { scanf("%d",&h[i]);原创 2011-04-19 13:43:00 · 1460 阅读 · 0 评论 -
HDU 2993 MAX Average Problem 斜率优化
http://acm.hdu.edu.cn/showproblem.php?pid=2993#includeusing namespace std;#define N 100005double sum[N];int n,k;int q[N],head,tail;voi原创 2011-07-21 10:11:12 · 1162 阅读 · 0 评论
分享