/* HDU 6060 - RXD and dividing [ 分析,图论 ] | 2017 Multi-University Training Contest 3 题意: 给一个 n 个节点的树,要求将 2-n 号节点分成 k 部分,然后将每一部分加上节点 1, 每一个子树的 val 为最小斯坦纳树,求总的最大 val 分析: 考虑每条边下面所在的子树,大小为num 由于该子树至多被分成 k 块,故该边最多贡献 k 次,贡献次数当然是越多越好 所以每条边的贡献为 w * min(k, num…
RXD and math Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 568 Accepted Submission(s): 306 Problem Description RXD is a good mathematician.One day he wants to calculate: ∑i=1nkμ2(i)×⌊nki−…
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5272 Dylans loves numbers Description Who is Dylans?You can find his ID in UOJ and Codeforces.His another ID is s1451900 in BestCoder. And now today's problems are all about him. Dylans is given a number…
题目链接 Problem Description RXD is a good mathematician. One day he wants to calculate: ∑i=1nkμ2(i)×⌊nki−−−√⌋ output the answer module 109+7. 1≤n,k≤1018 μ(n)=1(n=1) μ(n)=(−1)k(n=p1p2-pk) μ(n)=0(otherwise) p1,p2,p3-pk are different prime numbers Input Th…
Humble Numbers Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1058 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9…