Min_25. Learning notes

Prime prefix statistics Find the sum of all prime numbers within \ (n \) to the power of \ (c \). Consider the Ehrlich sieve, enumerate all multiples of it with a prime number at a time, and sieve out all illegal numbers. Some definitions and explanations \(P {\ min} (x) \): the minimum prime factor of \ (x \), \ (P {\ min} (1) = + \ infty \ ...

Added by adamh91 on Thu, 13 Jan 2022 06:03:51 +0200

[Blue Bridge Cup java_group C · volume from scratch] section 6. Common mathematical formulas of Blue Bridge Cup

catalogue 1. Euclidean theorem 2. Maximum common divisor 3. Least common multiple 4. Helen formula (find triangle area) 5. Sorting formula 1. Euclidean theorem package Action; public class demo { /* * The idea of finding the least common multiple of the greatest common divisor: according to Euclidean theorem gcd(a,b)=gcd(b,a%b); ...

Added by outpost on Thu, 06 Jan 2022 02:59:21 +0200

Luo Gu: P6687 on how to play with Excel tables [judgment questions (whether there is a solution) + finding the number of pairs in reverse order]

Valley: matrix rotation It can be found by observation that: For such a two column table, a 180 ° rotation of a 2x2 square is equivalent to the exchange of upper left and lower right, lower left and upper right And this exchange won't change anything? Two numbers in any column will not be changed! But it will change the positional rela ...

Added by littledragon on Thu, 06 Jan 2022 01:08:18 +0200

Explanation uoj498 New Year's chase

Description uoj498 Solution First, consider the properties of the product of graphs Considering \ (G_1\times G_2 \), it may be assumed that \ (G_1,G_2 \) is connected. If it is not connected, it can be divided into the product of several connected blocks If a graph is an outlier, there are \ (|g_1|g_2124\) Unicom blocks Let's assume that \ (G_1 ...

Added by mikewooten on Tue, 04 Jan 2022 18:12:24 +0200

Numerical solution of trilinear equations in numerical analysis experiment

1, Purpose and requirements: 1. Familiar with the theory and method of solving linear equations; 2. Be able to prepare column principal component elimination method, LU decomposition method, Jacobian and Gauss Seidel iterative Fard procedures; 3. Through practical calculation, we can further understand the advantages and disadvantages of var ...

Added by arkismad on Wed, 29 Dec 2021 05:09:02 +0200

Niuke multi school 9 A Math Challenge

Algorithm label Geometric meaning of Euclidean like, equal power summation, Lagrange interpolation, Bernoulli number thinking Rectangular point weight sum, ∑ i = 0 ...

Added by Cleanselol on Fri, 24 Dec 2021 12:38:27 +0200

Implementation of the algorithm for finding the horizontal quasi maximum rectangle inside an arbitrary polygon

Background description Some time ago, there was a need to find out whether the point is inside the polygon, which has been tossed for a lot of time. Now we intercept the key part - finding the horizontal direction like the largest rectangle inside the arbitrary polygon - to make a blog. The algorithm is easy to find out whether the point is i ...

Added by johlwiler on Wed, 22 Dec 2021 08:06:02 +0200

Re: binomial inversion from zero

Favorite formula: Formula 1: \(\large f(n) = \displaystyle\sum^n_{k=0}\dbinom{n}{k}g(k) \\ \large \Rightarrow g(n) = \displaystyle\sum^n_{k=0}\left(-1\right)^{n - k}\dbinom{n}{k}f(k)\) Formula 2 (at most and exactly): \(\large f(n) = \displaystyle\sum^n_{k=m}\dbinom{n}{k}g(k) \\ \large \Rightarrow g(n) = \displaystyle\sum^n_{k=m}\left(-1 ...

Added by zulubanshee on Sun, 05 Dec 2021 06:58:59 +0200

[learning notes of algorithm competition] Game Theory -- SG function and classical problems

title: Game Theory (II) date : 2021-11-6 Tags: ACM, mathematics, game theory author : Linno Pre cheese - SG function You can see my last blog: https://blog.csdn.net/SC_Linno/article/details/121181361 Firstly, an ICG game model is given. Given a directed acyclic graph and a piece on a starting vertex, two players alternately move the piec ...

Added by kof20012 on Wed, 17 Nov 2021 07:05:52 +0200

[improvement group training 2021] simulation 5

B. Shortest path Title Description Given a rootless tree with \ (n \) nodes, the edge weight of each edge is \ (1 \) There are \ (m \) key points different from each other on the tree. Randomly select \ (k \) points and mark them. Ask any starting point and ending point what is the expected length of the shortest path passing through all marked ...

Added by willl on Tue, 02 Nov 2021 15:52:54 +0200