HDU - 6066 RXD's date】的更多相关文章

Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6066 #include <iostream> using namespace std; int main() { int t; cin>>t; int n,cnt=0; for(int i=0;i<t;i++) { cin>>n; if(n<=35)cnt++; } cout<<cnt<<endl; return 0; }…
2017 多校3 hdu 6061 RXD and functions(FFT) 题意: 给一个函数\(f(x)=\sum_{i=0}^{n}c_i \cdot x^{i}\) 求\(g(x) = f(x - \sum a_i)\)后每一项\(x^{i}\)的系数mod998244353 \(n <= 10^{5},m <= 10^{5}\) \(0 <= c_i < 998244353\) \(0 <= a_i < 998244353\) 思路: 令\(d = -\s…
每次NTT都忘记初始化,真的是写一个小时,Debug两个小时- - /* HDU 6061 - RXD and functions [ NTT ] | 2017 Multi-University Training Contest 3 题意: 给定多项式 F(x) = ∑[0<=i<=n] f(i)*x^i 求多项式 G(x) = F(x-a) n <= 1e5 分析: 设 G(x) = ∑ g(i)*x^i 将 F(x-a) 按二项式定理展开后易得: g(x) = ∑[x<=y&l…
/* 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…
比赛时候面向过题队伍数目 打表- - 看了题解发现确实是这么回事,分析能力太差.. /* HDU 6063 - RXD and math [ 数学,规律 ] | 2017 Multi-University Training Contest 3 题意: 求 Σ μ(i)^2 * sqrt( n^k/i ) [ 1 <= i<= n^k ] n,k <= 1e18 分析: 首先 μ(i) 为莫比乌斯函数,若 i 是完全平方数的倍数则 μ(i) = 0 ,否则 μ(i) = ±1 所以只有不是…
Problem Description As we all know that RXD is a life winner, therefore he always goes out, dating with his female friends.Nevertheless, it is a pity that his female friends don't like extremely hot temperature. Due to this fact, they would not come…
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=6060 题意: 给定一棵 n 个节点的树,1 为根.现要将节点 2 ~ n 划分为 k 块,使得每一块与根节点形成的最小斯坦纳树的边权值总和最大. 思路: 这道题目应该往边的贡献值方向去思考,对于u(非1)结点,设它与它父亲结点的边为e,它的子节点分的块越多,那么e这条边的贡献值也就越大,因为每一分块都需要e这条边来连通.所以我们就要尽量让每条边的贡献值都最大. 下面图解一下:(分成 3 part的情况) 4.…
题目链接 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…
RXD and dividing Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1893    Accepted Submission(s): 809 Problem Description RXD has a tree T, with the size of n. Each edge has a cost.Define f(S) …