标签 - 莫比乌斯函数

? 解题记录 ? ? HDU ? ? 容斥 ? ? 莫比乌斯函数 ?    2019-03-15 15:47:54    533    0    0
GTW likes tree Time Limit: 7000/3500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 191 Accepted Submission(s): 38 Problem Description GTW has a tree of n nodes, in which m nodes are special nodes. The value of node i is vi. Dis(x,y) is defined as
? 解题记录 ? ? 动态规划 ? ? Topcoder ? ? 博弈论 ? ? 莫比乌斯函数 ?    2019-02-22 09:35:37    424    0    0
Easy EraseToGCD 题意:n" role="presentation" style="position: relative;">nnn个数ai" role="presentation" style="position: relative;">aiaia_i,删除一些数使得gcd" role="presentation" style="position: relative;">gcdgcdgcd为给定值t" role="presentation" style="position: relative;">ttt,问有多少种删除方法。n≤5
? 解题记录 ? ? 莫比乌斯函数 ? ? 亚线性筛 ?    2018-12-09 17:39:22    171    0    0
Problem Description There is a function f(x),which is defined on the natural numbers set N,satisfies the following eqaution N2−3N+2=∑d|Nf(d) calulate ∑Ni=1f(i) mod 109+7. Input the first line contains a positive integer T,means the number of the test cases. next T lines there is a number
? 解题记录 ? ? BZOJ ? ? 莫比乌斯函数 ? ? 容斥 ?    2018-08-13 11:42:45    571    0    0
【题目描述】给出A,B,考虑所有满足l<=a<=A,l<=b<=B,且不存在n>1使得n^2同时整除a和b的有序数,对(a,b),求其lcm(a,b)之和。答案模2^30。 【输入】第一行一个整数T表示数据组数。接下来T行每行两个整数A,B表示一组数据。 T ≤ 2000,A,B ≤ 4 × 10^6 【输出】对每组数据输出一行一个整数表示答案模2^30的值 【输入样例】5 2 2 4 6 3 4 5 1 23333 33333 【输出样例】7 148 48 15 451085813​   这道题网上很多题解是化出了一个函数然后快速求这个函数
? 解题记录 ? ? 莫比乌斯函数 ? ? 洛谷 ?    2018-02-06 08:36:56    615    0    0
题目描述 设d(x)为x的约数个数,给定N、M,求 &#x2211;i=1N&#x2211;j=1Md(ij)" role="presentation" style="position: relative;">∑Ni=1∑Mj=1d(ij)∑i=1N∑j=1Md(ij)\sum^N_{i=1}\sum^M_{j=1}d(ij) 输入输出格式 输入格式: 输入文件包含多组测试数据。第一行,一个整数T,表示测试数据的组数。接下来的T行,每行两个整数N、M。 输出格式: T行,每行一个整数,表示你所求的答案。 输入输出样例 输入样例#1: 复制 2