上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页
摘要: 打这场的时候处于玄学状态,这 sb 题竟然搞了一个多小时 传送门 提供一个和题解不同的方法 【题意】 若给定正整数 \(n\) ,可以将其所有因数累乘,得到 \(m\) 。 现给定 \(m\) ,问是否存在该 \(n\) 。 \(m\leq 10^{15}\) 【分析】 设 \(\displayst 阅读全文
posted @ 2021-05-11 22:17 JustinRochester 阅读(100) 评论(0) 推荐(0) 编辑
摘要: A. 双阶乘 输出 \(2021!! \bmod 10^4\) for 循环每次减 \(2\) 即可 B. 格点 求第一象限整点中,\(xy\leq 2021\) 的整点个数 for 循环暴力遍历 \(2021\times 2021\) 的平面,统计答案即可 C. 整数分解 求 \(2021\) 分 阅读全文
posted @ 2021-05-09 18:59 JustinRochester 阅读(798) 评论(0) 推荐(0) 编辑
摘要: 传送门 菜鸡的 lzx 比赛的时候式子画错了,错得一塌糊涂 【分析】 令 \(f_{d, l}\) 表示 \(\gcd A=d\) 且长度为 \(l\) 的概率 令 \(g_{d, l}\) 表示 \(\gcd A\mid d\) 且长度为 \(l\) 的概率 不难得到: \(\displaysty 阅读全文
posted @ 2021-04-28 19:14 JustinRochester 阅读(1843) 评论(0) 推荐(1) 编辑
摘要: 传送门 include irvine32.inc .data answer dd 16 dup(?) cntprt dd 3 .code printInt proc pushad mov ecx, 0 mov esi, eax cmp esi, 0 je isZero mov ebx, 10 aga 阅读全文
posted @ 2021-04-12 16:23 JustinRochester 阅读(82) 评论(0) 推荐(1) 编辑
摘要: 传送门 【分析】 等价于分析 \(\quad ans\) \(\displaystyle =\sum_{i=1}^n \boldsymbol \mu^2(i)\lfloor\sqrt {n\over i}\rfloor\) 考虑莫比乌斯函数 \(\boldsymbol \mu(n)\) 不为 \(0 阅读全文
posted @ 2021-03-30 23:02 JustinRochester 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 传送门 【分析】 考虑 \((i\vee j)=(i\wedge j)\vee (i\oplus j)\) 记 \(x=i\vee j,y=i\oplus j\Rightarrow x=y\vee k\Rightarrow k=x\oplus y(k,y\subseteq x)\) \(\quad 阅读全文
posted @ 2021-03-30 22:59 JustinRochester 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 本文作者为 JustinRochester ,转载本文请先与作者本人联系,并注明本文原作者。凡未经允许,私自转载且不注明作者的人,均构成侵权 规定 \(\otimes\) 为任一位运算,给定数组 \(a_n,b_n\) ,求数组 \(\displaystyle c_n=\sum_{i\otimes 阅读全文
posted @ 2021-03-28 19:48 JustinRochester 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 传送门 【分析】 规定三个求和项: \(\displaystyle Sum_1(n)=\sum_{i=1}^ni={n(n+1)\over 2}\) \(\displaystyle Sum_2(n)=\sum_{i=1}^ni^2={n(n+1)(2n+1)\over 6}\) \(\display 阅读全文
posted @ 2021-03-07 15:51 JustinRochester 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 洛谷传送门 cf传送门 贡献一个只用到基础组合数学+容斥的做法 假设每种花都是无穷多的。那么,方案数显然相当于 \(s\) 个小球,分 \(k\) 组,每组至少 \(0\) 个的方案数。 考虑初始加入 \(n\) 个小球,按每组至少 \(1\) 个进行插空分配,之后再抽走。方案数显然为 \(\dbi 阅读全文
posted @ 2021-02-08 15:40 JustinRochester 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 传送门 好题啊,真的好题啊! 莫比乌斯反演+矩阵树定理(甚至还算加了一点点的生成函数的原理) 【分析】 根据题意,求对所有的树 \(T\) 的值: \(\displaystyle ans=\sum_{T}val(T)=\sum_{T}(\sum_{i=1}^{n-1}w_{e_i})\gcd_{i= 阅读全文
posted @ 2021-02-01 11:13 JustinRochester 阅读(100) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 17 下一页