上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 74 下一页
摘要: #include <iostream> #include <algorithm> #include <string> #include <cstring> #include <map> const int N=1000001; using namespace std; int tt=0;//用于存储 阅读全文
posted @ 2015-01-06 09:58 人艰不拆_zmc 阅读(261) 评论(0) 推荐(0)
摘要: #include #include #include #include #define N 100010 using namespace std; int n,tt,le; char a[N][3]; int m[N],X[N]; struct node { int l,r,w; } q[4*N]; void pushup(int rt) { q[rt].w=q[rt>1... 阅读全文
posted @ 2014-12-09 21:26 人艰不拆_zmc 阅读(211) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1556 Problem Description N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个 阅读全文
posted @ 2014-12-07 20:53 人艰不拆_zmc 阅读(187) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1698 Problem Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most 阅读全文
posted @ 2014-12-07 20:14 人艰不拆_zmc 阅读(288) 评论(0) 推荐(0)
摘要: 给出一个小于2^32的正整数。这个数可以用一个32位的二进制数表示(不足32位用0补足)。我们称这个二进制数的前16位为“高位”,后16位为“低位”。将它的高低位交换,我们可以得到一个新的数。试问这个新的数是多少(用十进制表示)。 例如,数1314520用二进制表示为0000 0000 0001 0 阅读全文
posted @ 2014-12-07 15:26 人艰不拆_zmc 阅读(4619) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5139 Problem Description f(n)=(∏i=1nin−i+1)%1000000007You are expected to write a program to calculate f(n) 阅读全文
posted @ 2014-12-07 10:40 人艰不拆_zmc 阅读(275) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5023 Problem Description Corrupt governors always find ways to get dirty money. Paint something, then sell t 阅读全文
posted @ 2014-12-06 00:07 人艰不拆_zmc 阅读(257) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5124 Problem Description John has several lines. The lines are covered on the X axis. Let A is a point which 阅读全文
posted @ 2014-12-05 21:22 人艰不拆_zmc 阅读(330) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1588 Problem Description Without expecting, Angel replied quickly.She says: "I'v heard that you'r a very cle 阅读全文
posted @ 2014-11-30 22:38 人艰不拆_zmc 阅读(392) 评论(0) 推荐(0)
摘要: http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2498&cid=1304 题目描述 一个无环的有向图称为无环图(Directed Acyclic Graph),简称DAG图。 AOE(Activity On Edge)网:顾名思义,用边表示活动的 阅读全文
posted @ 2014-11-30 12:01 人艰不拆_zmc 阅读(651) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1757 Problem Description Lele now is thinking about a simple function f(x).If x < 10 f(x) = x.If x >= 10 f(x 阅读全文
posted @ 2014-11-30 11:26 人艰不拆_zmc 阅读(277) 评论(0) 推荐(0)
摘要: 二分的用处太大了,不管是求简单的方程,还是求最优解方面都是不错的解题思想。 只要在线性,顺序或者有序的数据里就可以用二分来找最优的答案,而且时间平均都是O(log2 n)。题目中好像是HDU 4190吧,这题的限时是10000ms,而用二分做才用时1000ms,其优点可想而知。 不过就像《编程珠玑》 阅读全文
posted @ 2014-11-29 13:36 人艰不拆_zmc 阅读(528) 评论(0) 推荐(0)
摘要: http://wenku.baidu.com/link?url=60wguK6BIogNTyNdq6UGESAPuUW5vAVyFKo_kltrPtxFchYi-B7De3sWqr4oAxKrmwoHv9vo-sNxVwcK7Hr6vSdBV9zmAvgEZE7Vg971z_a HDU1588: 二 阅读全文
posted @ 2014-11-28 00:12 人艰不拆_zmc 阅读(194) 评论(0) 推荐(0)
摘要: Fibonacci数列:F(0)=1 , F(1)=1 , F(n)=F(n-1)+F(n-2) 我们以前快速求Fibonacci数列第n项的方法是 构造常系数矩阵 (一) Fibonacci数列f[n]=f[n-1]+f[n-2],f[1]=f[2]=1的第n项快速求法(不考虑高精度) 解法: 考 阅读全文
posted @ 2014-11-27 22:44 人艰不拆_zmc 阅读(365) 评论(0) 推荐(0)
摘要: 在数论,对正整数n,欧拉函数是少于或等于n的数中与n互质的数的数目。此函数以其首名研究者欧拉命名,它又称为Euler's totient function、φ函数、欧拉商数等。 例如φ(8)=4,因为1,3,5,7均和8互质。——————欧拉函数的定义 φ函数的值 通式:φ(x)=x(1-1/p1) 阅读全文
posted @ 2014-11-27 08:53 人艰不拆_zmc 阅读(683) 评论(0) 推荐(0)
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 74 下一页