首页 > TAG信息列表 > Eddy

牛客2018暑假多校训练营3

比赛链接 牛客2018暑假多校训练营3 H.Diff-prime Pairs 题目描述 Eddy has solved lots of problem involving calculating the number of coprime pairs within some range. This problem can be solved with inclusion-exclusion method. Eddy has implemented it lots of times

Eddy's爱好 HDU - 2204

原题链接 考察:容斥原理 思路:        很容易想到筛质数,然后枚举质数2k 3k 5k ...但是如果从指数的取值范围考虑,最小是2,那么最大取到109 这样必定会TLE.        换个思路,如果从指数方面考虑,x2 x3 x5 .那么1~N中,最多有N1/k 个k√ N 个取到k次方的数.因为260 > 1e18.

HDU1162 Eddy's picture

Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest pictures to let his friends appreciate. but the result it can be imagined, the fr

HDU1163 - Eddy's digital Roots

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1163 九余数:一个数除于9所得到的余数,即模9得到值 求九余数:   求出一个数的各位数字之和,如果是两位数以上,则再求各位数字之和,直到只有一位数时结束。 如果求出的和是9,则九余数为0;如果是其他数,则这个数为九余数。   思路:快速

走环概率问题(至今有点迷)--牛客第二场( Eddy Walker)

思路: 概率结论题,好像属于线性递推,现在也不太懂(lll¬ω¬) 1 #define IOS ios_base::sync_with_stdio(0); cin.tie(0); 2 #include <cstdio>//sprintf islower isupper 3 #include <cstdlib>//malloc exit strcat itoa system("cls") 4 #include <iostream>//p

PACM Team (多种重量的01背包+记录路径) 牛客

题面: Since then on, Eddy found that physics is actually the most important thing in the contest. Thus, he wants to form a team to guide the following contestants to conquer the PACM contests(PACM is short for Physics, Algorithm, Coding, Math). There ar

【HDU2204】Eddy's爱好

题目大意:求从 1 到 N 中共有多少个数可以表示成 \(M^K,K \gt 1\)。\(N \le 1e18\) 题解: 发现 N 很大,若直接枚举 M 的话有 1e9 级别的数据量,肯定超时,因此考虑枚举幂次。发现对于幂次为 k 的符合条件的数有 N 开 K 次方下取整个,同时注意到 k 的取值范围最大为 60,因为 2 的 60 次方为