![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM-DP
文章平均质量分 64
4546love
这个作者很懒,什么都没留下…
展开
-
HDU 2686 多线程
<br />http://acm.hdu.edu.cn/showproblem.php?pid=2686<br />#include<iostream> #define N 35 using 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 · 873 阅读 · 0 评论 -
HDU 3276 Star
http://acm.hdu.edu.cn/showproblem.php?pid=3276/* 题目给出了值的范围,可以二分一下答案,对每一个二分的均值,将原先序列每一个 都减去这个均值,假设这个均值可以达到,那么一定可以找到两个不连续的区间,它们 的和大于等于0.....这样原创 2011-07-20 09:34:49 · 913 阅读 · 0 评论 -
HDU 3530 Subsequence
http://acm.hdu.edu.cn/showproblem.php?pid=3530#include using namespace std; #define N 100005 int q_max[N],head_max,tail_max; int q_min[N],he原创 2011-07-20 15:38:54 · 914 阅读 · 0 评论 -
HDU 3535 混合背包
<br />http://acm.hdu.edu.cn/showproblem.php?pid=3535<br />#include<iostream> using namespace std; #define N 101 int 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 · 1667 阅读 · 0 评论 -
HDU 1559 最大子矩阵
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1559<br />#include<iostream> using namespace std; #define N 1001 int 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 · 1088 阅读 · 0 评论 -
HDU 1025 最长上升子序列
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1025<br />备忘!!<br />#include<iostream> using namespace std; #define N 500001 int 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 · 897 阅读 · 0 评论 -
HDU 2577
<br />http://acm.hdu.edu.cn/showproblem.php?pid=2577<br />#include<iostream> using namespace std; #define N 101 int 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 · 1266 阅读 · 0 评论 -
HDU 2830
http://acm.hdu.edu.cn/showproblem.php?pid=2830#include #include using namespace std; #define N 1001 int 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 · 654 阅读 · 0 评论 -
HDU 1505
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1505<br />1506的进一步运用<br />#include<iostream> using namespace std; #define N 1001 int 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 · 785 阅读 · 0 评论 -
HDU 1506
<br />http://acm.hdu.edu.cn/showproblem.php?pid=1506<br />#include<iostream> using namespace std; #define N 100001 int 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 · 1409 阅读 · 0 评论 -
HDU 2993 MAX Average Problem 斜率优化
http://acm.hdu.edu.cn/showproblem.php?pid=2993#include using namespace std; #define N 100005 double sum[N]; int n,k; int q[N],head,tail; voi原创 2011-07-21 10:11:12 · 1098 阅读 · 0 评论