摘要: 大部分从oiwiki上看到的,有误欢迎大佬斧正 积性函数 定义 若 $f(x)f(y)=f(xy)$且$(x,y)=1$ ,则 $f(x)$为积性函数。 性质 若$f(x)$和$g(x)$均为积性函数,则以下函数也为积性函数: $$\begin{align}&h(x)=f^p(x)\\ &h(x)= 阅读全文
posted @ 2019-08-17 21:15 mool 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://www.spoj.com/problems/VLATTICE/en/ VLATTICE Visible Lattice Points Description Consider a N N N lattice. One corner is at (0,0,0) and the 阅读全文
posted @ 2019-08-17 17:16 mool 阅读(147) 评论(0) 推荐(0) 编辑
摘要: "Necklace of Beads" Description Beads of red, blue or green colors are connected together into a circular necklace of n beads ( n 设$\overline{G}$是n个对象 阅读全文
posted @ 2019-08-14 22:47 mool 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 小白整理,有误请大佬斧正 排列组合 排列 1. 无其他限制下,从n个物体种选择r个出来的所有排列情况为$A(^r_n)=\frac{n!}{(n r)!}$ r n时$A(^r_n)=0$ 2. 从n个物体种选择r个的 圆排列 为$P(^r_n)=\frac{A(^r_n)}{r}$ 多重集的排列 阅读全文
posted @ 2019-08-10 00:39 mool 阅读(7948) 评论(0) 推荐(0) 编辑
摘要: Fire Net Fire Net Problem Description Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n co 阅读全文
posted @ 2019-08-09 17:15 mool 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Problem L.Videos Problem Description C-bacteria takes charge of two kinds of videos: ’The Collection of Silly Games’ and ’The Collection of Horrible G 阅读全文
posted @ 2019-08-08 19:31 mool 阅读(250) 评论(0) 推荐(0) 编辑
摘要: --老年菜鸡的基础数论之旅 A - Bi-shoe and Phi-shoe Description 给定一个序列,序列每个值x有一个花费,x的花费为一个欧拉函数值大于等于x的数y,求最小花费 Solution 首先我们要使求得花费最小,那就找一个刚好满足欧拉函数值大于等于x的数嘛,然后我们知道素数 阅读全文
posted @ 2019-08-08 15:06 mool 阅读(526) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6435 Solution 看了题解才明白,记录一下现在的理解。 我们需要求n个主武器和m个副武器之间各取一个的曼哈顿最大距离和 考虑每一个维度只有+-两种情况,那么k维就有2^k种(每一个武器都有2^k种 阅读全文
posted @ 2019-08-07 21:17 mool 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2414 Solution 看到求最小大炮轰的次数我们很容易想到二分图的最小点覆盖,就是求最少哪些 阅读全文
posted @ 2019-08-07 20:56 mool 阅读(159) 评论(0) 推荐(0) 编辑
摘要: *有误欢迎大佬斧正* 基本定理: 威尔逊定理:一个数p为素数的充要条件是p|(p-1)!+1 费马小定理:对于素数p,以及整数a,如有(a,p)=1,则a^(p-1)=1(mod p) 欧拉定理:对于任意两个互素整数a,m ,a^φ(m) =1 (mod m), φ为欧拉函数,表示小于p且与p互素的 阅读全文
posted @ 2019-08-04 16:11 mool 阅读(1510) 评论(0) 推荐(0) 编辑