摘要: 1 #include 2 #include 3 int main() 4 { 5 int c=1,T,t,i,n,l,j,sum[110000]; 6 scanf("%d",&T); 7 int start,end,min,max; 8 while(T--) 9 ... 阅读全文
posted @ 2014-04-25 19:24 hpu张亚飞 阅读(213) 评论(0) 推荐(0) 编辑
摘要: http://acm.nyist.net/JudgeOnline/problem.php?pid=325用dp的超时代码 1 #include 2 #include 3 int max(int a,int b) 4 { 5 return a>b?a:b; 6 } 7 int dp[20100... 阅读全文
posted @ 2014-04-25 13:06 hpu张亚飞 阅读(153) 评论(0) 推荐(0) 编辑
摘要: http://acm.nyist.net/JudgeOnline/problem.php?pid=18 1 #include 2 #include 3 int max(int a,int b) 4 { 5 return a>b?a:b ; 6 } 7 int main() 8 { 9 ... 阅读全文
posted @ 2014-04-24 19:35 hpu张亚飞 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 苹果时间限制:3000 ms | 内存限制:65535 KB难度:3描述ctest有n个苹果,要将它放入容量为v的背包。给出第i个苹果的大小和价钱,求出能放入背包的苹果的总价钱最大值。输入有多组测试数据,每组测试数据第一行为2个正整数,分别代表苹果的个数n和背包的容量v,n、v同时为0时结束测试,此... 阅读全文
posted @ 2014-04-24 17:03 hpu张亚飞 阅读(134) 评论(0) 推荐(0) 编辑
摘要: #include#includeint main(){ int a[30],i,n,t; a[1]=3;a[2]=7; for(i=3;i<=20;i++) a[i]=2*a[i-1]+a[i-2]; scanf("%d",&n); while(n--) ... 阅读全文
posted @ 2014-04-24 09:45 hpu张亚飞 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 糖果时间限制:1000 ms | 内存限制:65535 KB难度:2描述topcoder工作室的PIAOYIi超级爱吃糖果,现在他拥有一大堆不同种类的糖果,他准备一口气把它们吃完,可是他有一个习惯,他不喜欢同一种类的糖果连着吃,他喜欢先吃一种,然后再吃另一种。可是PIAOYI不知道是否存在一种顺序能... 阅读全文
posted @ 2014-04-24 08:22 hpu张亚飞 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Problem DTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 102Accepted Submission(s) : 33Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f 阅读全文
posted @ 2013-10-13 12:22 hpu张亚飞 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Problem ATime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 63Accepted Submission(s) : 13Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem DescriptionPassword security is a tricky thing. Users prefer simple passwords that are easy to remem 阅读全文
posted @ 2013-10-13 12:16 hpu张亚飞 阅读(215) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1012u Calculate eTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25495Accepted Submission(s): 11313Problem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can act 阅读全文
posted @ 2013-10-12 16:05 hpu张亚飞 阅读(166) 评论(0) 推荐(0) 编辑
摘要: We Love MOE GirlsTime Limit: 1000/500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0Accepted Submission(s): 0Problem DescriptionChikami Nanako is a girl living in many different parallel worlds. In this problem we talk about one of them.In this world, Nanako has a sp 阅读全文
posted @ 2013-09-14 15:12 hpu张亚飞 阅读(400) 评论(0) 推荐(0) 编辑