
数学
文章平均质量分 50
LeeBooL
这个作者很懒,什么都没留下…
展开
-
E - Vasya and Polynomial
如果a == b == t != 1, 那么就是两个解 p(x) = a, p(a) = a 那么通过这种情况可以得知如果 t != a, a == b的时候 只有一个解 p(x) = a; 如果 a == b == t == 1 inf 题中强调 所有的系数都非负, 那么 p(t) = a ,当 t != 1 时候, 系数之和一定小于 a , 证明 如果原创 2015-01-31 19:42:02 · 347 阅读 · 0 评论 -
Goldbach`s Conjecture
Goldbach`s Conjecture #include #include #include #include using namespace std; #define MAXN 10000010 bool prime[MAXN]; int num[1111111]; int k; void getprime() { k = 0; memset(prime,原创 2015-04-13 01:33:10 · 395 阅读 · 0 评论 -
Bi-shoe and Phi-shoe
找规律得出答案就是比这个数大的最小素数 #include #include #include #include #include using namespace std; #define LL long long #define MAXN 1000010 int prim[MAXN]; LL a[MAXN]; bool num[MAXN]; void pre() {原创 2015-04-13 01:24:30 · 372 阅读 · 0 评论 -
Sigma Function
想了好久,打表也没看出来规律,看得题解才明白 /* * 规律:通过打表后发现,在n的范围内,只有2^x 以及 平方数 和 平方数的2倍符合要求。 * 即:2^1, 2^2,... 1*1, 2*2,... 2*1*1, 2*2*2, 2*3*3... 等等,故只要去重就可以了 * url: http://uva.onlinejudge.org/index.php?option转载 2015-04-13 01:32:02 · 429 阅读 · 0 评论 -
Aladdin and the Flying Carpet
分解面积的质因子,然后可以得到这个数的所有约数的个数, 就是边数, 然后不是正方形的情况取出, 再考虑 1 2 , 2 1这样的情况, 就是 num/2 然后取出比B小的面积的约数 #include #include #include #include #include using namespace std; #define MAXN 1000011 #define LL原创 2015-04-13 01:29:07 · 573 阅读 · 0 评论 -
hdu DZY Loves Balls
期望累加性 对于第i个位置是‘0’的情况,它的概率是n/(n+m), 第i+1个位置是‘1’的情况它的概率是m/(n+m-1),然而,1出现的位置只能是1~m+n-1 所以这个概率是n/(n+m)*m/(n+m-1)*(m+n-1) --->m*n/(m+n) #include #include #include #include using原创 2015-08-10 09:37:15 · 389 阅读 · 0 评论 -
Happy Great BG
The summer training of ZJU ICPC in July is about to end. To celebrate this great and happy day, the coaches of ZJU ICPC TeamNavi and Fancy decided to BG everyone! Beside the two coaches, there are N p原创 2015-07-20 15:54:12 · 287 阅读 · 0 评论