Example: consecutive interval number
Xiao Ming has been thinking about such a strange and interesting question these days:
How many consecutive intervals are there in an arrangement of 1 ∼ N?
The definition of the serial interval here is:
If all the elements in the interval [L,R] (i.e. the L-th to r-th elements of this arrangement) can ...
Posted by trrobnett on Sun, 20 Feb 2022 07:25:50 +0100
0x00 topic source
Special topics in Mathematics
Mathematics, prime, Euler sieve
0x20 1001 prime judgment
Give a number x, judge whether it is a prime number, and output all its prime factors.
0x21 prime sieve (Euler sieve)
The boards are as follows:
void init(int n)
for (i ...
Posted by stonefish on Mon, 14 Feb 2022 09:07:33 +0100
Everyone must have played the "fruit ninja" game popular all over the world in 2010? (it doesn't matter if you haven't played ~) in the game, a series of fruits and bombs will be ejected randomly in the screen. Players can complete the tasks specified in the game by cutting off all fruits as much as possible to avoid hitting t ...
Learning materials related to this training:
Euler function -- the number of Coprime numbers with N in numbers less than n
Game theory and algorithm implementation (three basic games)
Fast power (Java implementation code)
A - A^B Mod C
B - inverse element
C - number of decision primes
D - matrix ...
Posted by patrick99e99 on Wed, 19 Jan 2022 13:04:41 +0100
All the number theory knowledge involved below proves portal 1
All the number theory knowledge involved below proves Portal 2
Transform the meaning of the question into a mathematical formula
Posted by HektoR on Tue, 18 Jan 2022 07:44:38 +0100
GIGO is still single!
DS code Nong Jige is still single!
Therefore, he hates Valentine's day most in his life. Whether it's \ (214 \) or \ (77 \), he hates it!
GIGO observed the two numbers \ (214 \) and \ (77 \), and found that:
\(77=7 × 11\)
Finally, he found that all this was d ...
Posted by Garion on Thu, 13 Jan 2022 07:48:40 +0100
Just call me Shen Qi. Recently, I have gained a lot from watching the video of AcWing algorithm basic course. So I decided to open up the algorithm section and officially began to sort out the algorithm notes and clarify my ideas.
This time, we brought prime bucket. Hey, hey. Each part will be matched with the corresponding exerci ...
Posted by stezz on Sat, 08 Jan 2022 13:17:40 +0100
Portal to LOJ
This question is really, really, really, really outrageous. Better from
First of all, we need to think of such a thing: multiple vectors and multiple vectors, fi ...
Posted by greip on Mon, 27 Dec 2021 01:58:04 +0100
1. Arithmetic Progression of Primes (20 points)
In mathematics, an arithmetic progression (AP, equal difference column) is a sequence of numbers such that the difference between the consecutive terms is constant. In 2004, Terence Tao and Ben Green proved that for any positive