
HDU
文章平均质量分 84
张思瑶126
If you think you can , you can !
不怕千万人阻挡,只怕自己投降 !
展开
-
HDU 4709 Herding(叉乘法)
HerdingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2194 Accepted Submission(s): 629Problem DescriptionLittle John is herd原创 2015-08-23 17:32:32 · 1646 阅读 · 2 评论 -
HDU 4707 Pet
PetTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1909 Accepted Submission(s): 924Problem DescriptionOne day, Lin Ji wake up原创 2015-08-20 17:32:14 · 680 阅读 · 0 评论 -
HDU 5082 Love
LoveTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 763 Accepted Submission(s): 455Problem DescriptionThere is a Love country原创 2015-08-21 10:30:02 · 665 阅读 · 0 评论 -
HDU 1014 Uniform Generator
Uniform GeneratorComputer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed(x+1) = [seed(x) + STEP] % MODwhere '%' is the modulus operator.原创 2015-08-16 00:09:51 · 888 阅读 · 0 评论 -
HDU 3342 Legal or Not
Legal or NotTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6069 Accepted Submission(s): 2818Problem DescriptionACM-DIY is a原创 2015-08-17 10:24:28 · 717 阅读 · 0 评论 -
spfa模板 和 拓扑排序 模板(HDU1874 和 HDU3342)
//SPFA模版://HDU 1874#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;typedef __int64 LL;const原创 2015-08-16 23:51:34 · 446 阅读 · 0 评论 -
HDU 1796 How many integers can you find
How many integers can you find Now you get a number N, and a M-integers set, you should find out how many integers which are small than N, that they can divided exactly by any integers in the set. For example, N=12, and M-integer set is {2,3}, so there i原创 2015-08-16 10:00:02 · 795 阅读 · 0 评论 -
HDU 1856 More is better
DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements. Mr Wa原创 2014-09-10 21:32:19 · 437 阅读 · 0 评论 -
HDU 1754 I Hate It(线段树维护 区间最值)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 51228 Accepted Submission(s): 20100Problem Description很多学校流行一种比较的习惯。原创 2015-08-15 11:16:07 · 422 阅读 · 0 评论 -
HDU 3501 Calculation 2 (欧拉函数)
C - Calculation 2Time Limit:1000MS Memory Limit:32768KB HDU 3501 Description Given a positive integer N, your task is to calculate the sum of原创 2015-07-29 10:51:58 · 400 阅读 · 0 评论 -
HDU 1166 敌兵布阵(线段树)
这是第二次写这道题的题解了,上次是用树状数组写的。http://blog.youkuaiyun.com/zhang_xueping/article/details/47123951虽然在去年暑假的时候曾经试过学习线段树,但是后来由于觉得麻烦所以放弃了,碰巧遇到这道题,就百度找题解,发现树状数组的代码简单多了,就认真看了几遍,大概把模板记住了,然后自己敲出来了。当时特开心,天真的以为线段树的原创 2015-08-15 10:48:47 · 602 阅读 · 0 评论 -
HDU 3460 Ancient Printer (字典树)
Ancient PrinterThe contest is beginning! While preparing the contest, iSea wanted to print the teams' names separately on a single paper. Unfortunately, what iSea could find was only an ancient printer: so ancient that you can't believe it, it only had原创 2015-08-15 17:28:33 · 812 阅读 · 0 评论 -
HDU 2553 N皇后问题(递归搜索)
/* ……N皇后的摆放问题…… 一开始没有打表,所以一直TLE,之后参考了别人的代码才反应过来可以打表, 只要掌握了递归搜索再加上皇后摆放的控制条件就ok了。 下面附上AC代码:*/#include #include #include using namespace std;int temp,p,q[11];void slove(int n原创 2015-07-20 18:07:35 · 561 阅读 · 0 评论 -
HDU 2795 Billboard (线段树)
BillboardTime Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15625 Accepted Submission(s): 6580Problem DescriptionAt the entranc原创 2015-08-15 11:35:08 · 637 阅读 · 0 评论 -
HDU 1003 Max Sum——经典dp之最大子序和
Max SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 147102 Accepted Submission(s): 34379Problem DescriptionGiven a sequence a[原创 2014-09-16 18:08:40 · 517 阅读 · 0 评论 -
HDU1166 敌兵布阵(树状数组)
/*树状数组太屌了,看了一天才模模糊糊看懂了这个题解然后自己敲了一遍,算是记住这个模板了附上原题解网址:*/#include #include #include using namespace std;int n,a[50000+5];char str[10];int lowbit(int i) //此处琢磨了许久,必须画图才能理解{ return i&(-i);原创 2015-07-29 10:56:40 · 644 阅读 · 0 评论 -
HDU 2563 统计问题 (递推)
A - 统计问题Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2563Description在一无限大的二维平面中,我们做如下假设: 1、 每次只能移动一格; 2、 不能向后走(假设你原创 2015-08-14 22:37:38 · 773 阅读 · 0 评论 -
HDU2690 Boys and girls
Boys and girlsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 900 Accepted Submission(s): 247Problem DescriptionIn a big part原创 2015-08-21 17:14:46 · 658 阅读 · 0 评论