
数论
LucienShui
因为孤独是人之常态,所以陪伴才显得格外可贵。
展开
-
Mayor's posters - POJ 2528 - 线段树 + 离散
Mayor’s posters - POJ 2528 - 线段树 + 离散 前言:这道坑爹题花了我一天的时间去理解,卡在离散和更新那里,无论怎样都想不明白。最后花了张图,这才终于明白原理。 题目: The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign原创 2017-05-28 00:03:43 · 372 阅读 · 0 评论 -
POJ2689 - Prime Distance - 数论
题解链接 http://www.lucien.ink/archives/267/ 题目链接 http://poj.org/problem?id=2689 题目 Description The branch of mathematics called number theory is about properties of numbers. One of the areas ...原创 2018-06-13 19:11:08 · 353 阅读 · 5 评论 -
Codeforces-987B - High School: Become Human - 数论
题解链接 http://www.lucien.ink/archives/243/ 题目链接 http://codeforces.com/contest/987/problem/B 题目 Year 2118. Androids are in mass production for decades now, and they do all the work for human...原创 2018-05-30 02:32:10 · 565 阅读 · 0 评论 -
ARC-060D - Digit Sum - 数论
题解链接 https://lucien.ink/archives/230/ 题目链接 https://arc060.contest.atcoder.jp/tasks/arc060_b 题目 Problem Statement For integers b(b≥2) and n(n≥1), let the function f(b,n) be defined as fol...原创 2018-05-20 23:35:54 · 427 阅读 · 0 评论 -
UPCOJ-5333 - 大佬 - 数学期望
题目: 题目描述 辣鸡 ljh NOI 之后就退役了,然后就滚去学文化课了。 他发现 katarina 大佬真是太强了,于是就学习了一下 katarina 大佬的做题方法。 比如这是一本有 n 道题的练习册, katarina 大佬每天都会做 k 道题。 第一天做第 1~k 题,第二天做第 2~k + 1 题……第 n − k + 1 天做第 n − k + 1~n 道题。原创 2018-01-23 10:28:39 · 573 阅读 · 0 评论 -
扩展BSGS - 模板 - 数论
简介 BSGS算法,原名Baby Steps Giant Steps,又名大小步算法,拔山盖世算法,北上广深算法——by SLYZoier,数论基本算法之一。 问题 给定A,B,CA,B,C,求满足 Ax≡B (mod C)A^x \equiv B\ (mod\ C) 的最小非负整数xx。 模板 #include typedef long long ll; usin原创 2018-01-23 15:16:06 · 659 阅读 · 0 评论 -
HDU-6198 - number number number - 矩阵快速幂
链接: http://acm.hdu.edu.cn/showproblem.php?pid=6198题目:Problem DescriptionWe define a sequence FF:⋅ F0=0,F1=1;F_0=0,F_1=1; ⋅ Fn=Fn−1+Fn−2(n≥2)F_n=F_{n−1}+F_{n−2} (n≥2).Give you an integer k, if a posit原创 2017-09-20 08:08:59 · 431 阅读 · 0 评论 -
POJ-3090 - Visible Lattice Points - 欧拉函数
链接: http://poj.org/problem?id=3090题目:DescriptionA lattice point (x, y) in the first quadrant (x and y are integers greater than or equal to 0), other than the origin, is visible from the origin if the原创 2017-09-07 01:31:29 · 370 阅读 · 0 评论 -
Codeforces 851B - Arpa and an exam about geometry - 数学几何
链接: http://codeforces.com/contest/851/problem/B题目:Arpa is taking a geometry exam. Here is the last problem of the exam.You are given three points a, b, c.Find a point and an angle such that if we rota原创 2017-09-05 19:12:35 · 453 阅读 · 0 评论 -
[离散数学]偏序与全序的区别、解释
转自:https://github.com/liuchuo概念:偏序关系、全序关系都是公理集合论中的一种二元关系。 偏序集合:配备了偏序关系的集合。 全序集合:配备了全序关系的集合。偏序:集合内只有部分元素之间在这个关系下是可以比较的。 比如:比如复数集中并不是所有的数都可以比较大小,那么“大小”就是复数集的一个偏序关系。全序:集合内任何一对元素在在这个关系下都是相互可比较的。 比如:有限长转载 2017-08-08 17:41:01 · 25293 阅读 · 1 评论 -
Codeforces - 1152C - Neko does Maths
地址 https://codeforces.com/contest/1152/problem/C 原文地址 https://www.lucien.ink/archives/423/ 题意 给你 aaa 和 bbb ,找到一个最小的 kkk ,使得 lcm(a+k,b+k)lcm(a + k, b + k)lcm(a+k,b+k) 最小。 题解 不妨设 a>ba > ba...原创 2019-04-25 00:58:47 · 541 阅读 · 0 评论