## Notes congruence

congruence If \ (m \mid a-b \), then \ (a \equiv b \pmod m \) Important formula: \ ({a \bmod b = a-b\lfloor a/b\rfloor} \) subject AcWing202: the luckiest number It's hard (worth doing!) \Ask how many positive integers composed of at least 8 are multiples of L (\ (L ≤ 2 × 10^9\)​​) AC code Note: there is a disadvantage of fast power ...

Added by DontheCat on Tue, 08 Mar 2022 03:22:18 +0200

## LeetCode-149. Maximum number of points on a line

Topic source 149. Maximum number of points on a line Title details Give you an array of points, where points[i] = [xi, yi] represents a point on the X-Y plane. Find the maximum number of points on the same line. Example 1: Input: points = [[1,1],[2,2],[3,3]] Output: 3 Example 2: Input: points = [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]] Output: 4 ...

Added by gavin1996 on Sun, 06 Mar 2022 04:54:42 +0200

## Mathematics and simple DP

mathematical problem Example: the number you can't buy Xiao Ming opened a candy store. He is ingenious: wrap the fruit candy into two kinds: a bag of 4 and a bag of 7. Candy can't be unpacked. When a child comes to buy sugar, he uses these two kinds of packaging to combine. Of course, some candies cannot be combined, such as buying 10 can ...

Added by dfego on Sun, 13 Feb 2022 10:14:59 +0200

## TLA + -- propositional logic and examples

Propositional logic and examples Logic symbols have been used in previous examples, mainly symbols such as \ a, \ e, = >. \E E is the initial letter of "exists", which means existence. When writing down \ e x \ in S: P (x) means that there is at least one X in s, making p true. The return value of an expression starting with \ e ...

Added by illzz on Sun, 13 Feb 2022 02:45:09 +0200

## Introduction to computational geometry

preface Most of this article is blind bb, and the big guys can choose not to read it. You need to learn a little bit about linear algebra first. Because I am too good, this blog will only discuss the two-dimensional situation. Because I am too lazy, I will lack some schematic diagrams. vector Dot product / quantity product Generally expressed b ...

Added by Shizzell on Sat, 05 Feb 2022 12:19:34 +0200

## BSGS discrete logarithm

preface Generally, mathematics research in senior high school and below is mainly continuous mathematics When you think of logarithmic functions, most of you will think of the following function images: (picture drawn by desmos) But the logarithm in the modular sense is different Model Try to solve the following equation: \[\large a^x \equiv ...

Added by perficut on Thu, 03 Feb 2022 03:17:43 +0200

P3700 [CQOI2017] table of small Q Description There is a table with infinite rows and columns. The rows and columns start with \ (1 \), and the \ (a \) row \ (B \) column has an integer \ (f(a, b) \); $$f(a, b)$$ shall meet: $$\forall a, b \in \mathbb{N}^*, f(a, b) = f(b, a)$$； $$\forall a, b\in \mathbb{N}^*, b\cdot f(a, a + b) = (a + b) \c ... Added by PRSWeb on Tue, 01 Feb 2022 16:46:28 +0200 ## Simple miscellaneous questions of probability expectation preface Cloud shear plate link cnblogs I believe you! So I launched all the blog topic solving chains! Deleted or modified あウー... Please indicate the source for reprint Probability expectation notes In order to save space, the code is compressed Mivik's code press ), you can format it yourself if you want to see it Default source: header f ... Added by slands10 on Sat, 22 Jan 2022 15:11:57 +0200 ## [learning notes] Min_25 sieve Immortal min_ The magic sieve invented by the invention is used to sieve the prefix and of the product function. For the integrable function \ (f(x)$$ to sieve the prefix sum, the specific requirements are that \ (f(p) \) is a simple polynomial, and \ (f(p^e) \) can be calculated quickly. Complexity is sub linear, but I won't prove it. Descrip ...

Added by sheckel on Fri, 21 Jan 2022 00:43:04 +0200

## Python solves Google highway recruitment advertisement: {the top ten consecutive prime numbers in irrational number e} com

Occasionally, I saw such a story in Mr. Wu Jun's top of the wave (Fourth Edition).Google once advertised on the 101 highway in California with a large billboard:{the first ten consecutive prime numbers in irrational number e} comIf you know the answer (7427466391.com), you can enter Google's recruitment website through the above website. And it ...

Added by bcamp1973 on Sat, 15 Jan 2022 21:37:10 +0200