, then xI =xJ, and a * X is available from the mutual quality of A and N.I mod n = A * xJ mod n (Elimination Law ).(2) A Phi (n) * X1 * X2 *... * x PHI (n) mod nRound (A * X1) * (A * x2) *... * (A * x PHI (N) mod nRound (A * X1 mod n) * (A * X2 mod n) *... * (A * x PHI (n) mod nLimit X1 * X2 *... * x PHI (n) mod nCompare the left and right sides of the equation, because XI (1 ≤ I ≤ PHI (N) and n are of mutual quality, a Phi (n) limit 1 mod n (dealignment Law ).Note:Elimination law: If gcd (C, p)
has not been printed, and new manuscripts have been written. As a result, his writing order is often the opposite of the Publishing order, making readers very depressed. It is also difficult to collect these large numbers of manuscripts. Switzerland's natural science accounting team draws a complete set of Euler's, which was compiled in nearly 100 s and finally completed in the 1990s S. He did not expect St. Petersburg to suddenly discover a batch of his manuscripts, this complete set has not y
examples Output
4
the
Given the information of n circles in a plane, these circles are divided into several regions.
train of Thought
Long-lost template problem to pretend ~ good happy ~ But the template put in the school cry chirp 〒▽〒
How many regions of a circular split plane can be separated from the Euler formula of the planar graph?
General planar diagram Eu
Test instructionsA circle of land, select n points in the circumference, and then 22 lines, asking how many pieces of this piece of land are divided?Analysis:First purple book on the formula is wrong, but according to the ideas provided in the book can be easily modified to get the correct answer!Then push the formula, here to use the Euler
Euler formula in geometry: v-e+f = 2,v, E, F represents the number of vertices, sides, and polygons of simple geometry.Prove:There are many proofs of it, and a recursive method is presented here.For any simple geometry (the boundary of the geometry is not a curve), we look at each face of the geometry, set the edge into an N-shaped shape, we connect the other vertices from a fixed vertex, we are going to tr
Title Description:principle: Euler's formulaspecific details: vertex count and number of sides//How many pieces of land#include using namespacestd;intMain () {intN; CIN>>N; intV, E, F;//Euler formula v-e+f=2 intV0 =0, E0 =0; for(inti =0; I 2; i++) {V0+ = i * (N-2-i); E0+ = i * (N-2-i) +1; } v= V0 * N/4+N; E= E0 * N/2+N; cout1Endl; return 0;}extension: to find points, lines, polygonsTo find the points, l
HDU 2824 the Euler function
Euler's function: θ (n) is the number of Integers of All integers less than N, and N. N is a positive integer.
Euler proves the following formula:
If the standard prime factor decomposition formula of N is P1 ^ A1 * P2 ^ A2 *...... * PM ^ am, where all PJ (j = ,......, M) are all prime numbe
HDU 1411:http://acm.hdu.edu.cn/showproblem.php?pid=1411
The person is one of you a hexahedral six sides, seek hexahedral volume.
Train of thought: there is no idea, is to use Euler tetrahedron formula directly into.
Euler Tetrahedron formula:
There are a lot of specific derivation online. eg. http://blog.csdn.net
I'm sorryTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total Submission (s): 3538 Accepted Submission (s): 1489Problem description Very sorry, originally excitedly engaged in a practice game, because I am not prepared enough, there are a lot of data errors, now here for a simple topic:A few days ago on the internet to find ACM data, see a high School Olympiad question, is disjoint curve segment cutting plane problem, I have sent to the forum, and LXJ has got a con
Description
Given A,b,c, you should quickly calculate the result of A^b mod C. (1
Input
There are multiply testcases. Each testcase, there are one line contains three integers a, B and C, separated by A.
Output
For each testcase, output a integer, denotes the result of A^b mod C.
Sample Input
3 2 4
2 10 1000
Sample Output
1
24
train of Thought
An exponential very scary topic, obviously fast power is not directly solved, here we need to use the power down.
Abmod C=ab Modϕ (c) +ϕ (c) MoD C A^
relationship between the number of vertices of a simple polyhedron V, the number of polygons F and the number of edges Ev+f-e=2(This topic: Vertex + polygon number -2= number of edges)You can deduce it yourself!Imagine that n points are enclosed in a closed graph, which is divided into 2 polygons.This time the line segment is the N bar.If you need to add a polygon, the segment needs to be added one more.So, input n points, divided into M-plane, it can be deduced that the segment is n-2+m.Note:
E ^ IX = cosx + is, e is the base of the natural logarithm, And I is the unit of virtual number. It expands the definite domain of trigonometric functions to the plural, establishes the relationship between trigonometric functions and exponential functions, and plays an important role in the theory of complex functions.
E ^ IX = proof of cosx + ISX:
Because e ^ x = 1 + x/1! + X ^ 2/2! + X ^ 3/3! + X ^ 4/4! + ......
Cos x = 2/2 ^! + X ^ 4/4! -X ^ 6/6 !......
SiN x = x-x ^ 3/3! + X ^ 5/5! -X ^
Label: Euler's Formula Sorry time limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)
Total submission (s): 3538 accepted submission (s): 1489
Problem description I am very sorry. I was eager to have an exercise competition. Due to my lack of preparation, there were a lot of data errors. Now I want to change to a simple question:
A few days ago, when I searched for ACM information on the Internet, I saw a middle school's Ol
I 've written an error on the second classic version of The lrj algorithm, and I thought about it for a long time...
V: number of points, E: number of sides F: Number of faces
Euler's formula v-e + F = 2;
V = N + N/4 sum (I * (N-2-I); [0
E = N + n/2 sum (I * (N-2-I) + 1); [0
Code implementation:
# Include
10213-how Many Pieces of land?
Time limit:3.000 seconds
http://uva.onlinejudge.org/index.php?option=com_onlinejudgeItemid=8page=show_problemproblem= 1154
You are given a elliptical shaped land and your are asked to choose N arbitrary in its points. Then you connect all of these points with one another with straight lines (that's N. (n-1)/2 connections for n points). What is the maximum number of pieces for you'll get by choosing the points on the boundary carefully?
Fig:when the value of n
4 5
Sample output
1999.9938
Source Northeastern Europe 2002, northern subregion
Derivation and proof process of Euler's four-dimensional Formula
1. x, y, and z Cartesian coordinate systems are recommended. Set the coordinates of A, B, and C to (A1, B1, C1), (A2, B2, C2), (A3, B3, C3 ), the six edges of the O-ABC are L, M, N, P, Q, R;2. Because we don't know how to create a vector, I have inserted an image,After this
Http: // 162.105.81.212/judgeonline/problem? Id = 2480
Given N (INT), calculate Σ gcd (I, n) 1
Analysis: when we look at the data of this question, we know that it cannot be violent. We only need to use the Euler's Function Decomposition, but our number theory is not mature and we haven't been able to solve it for a long time;
Finally, I understood it only after reading the report on solving the problem;
This solution: For gcd (m, n) = I, there is a ci m. The answer to this
value of Yi. For ordinary differential equations:, X∈[a,b] y (a) = y0The interval [a, b] can be divided into n segments, then the equation has y' (xi) = f(x) at point x i i,y(xi)), and then the forward difference quotient approximation instead of the derivative is:, here, H is the step, that is, the distance between two adjacent nodes. Therefore, yi+ can be calculated based on the values of the XI point and the Yi Point:, i=0,1,2,lThis is the Euler
Let's take a look at the most classic Eratsteni sieve method. Time Complexity of O (n loglog N)
int ANS[MAXN];
void Prime (int n)
{
int cnt=0;
memset (prime,1,sizeof (Prime));
prime[0]=prime[1]=0;
for (int i=2;i
Obviously, when a number is a prime, then his multiples must be composite numbers, the filter tag can be. From the i*i and not from the i*2, because the i*3,i*2 has already been screened by 2, 3.
As a result, we can also find that some of the composite numbers are screened repeate
Today we'll learn about Euler functions.
Definition: Euler function is the number of numbers that are less than N and N coprime. For example φ (8) = 4, because 1,3,5,7 and 8 coprime.
The formula for Euler functions is:, wherein PI represents the mass factor of X. Special statement, φ (1) = 1.
Note: Each of the quality
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.