1. there is a theorem in the replacement group: If T is a replacement, E is a unit replacement, t ^ K = E, then the minimum positive integer solution of K is the least common multiple of all cycle lengths of t split.
This theorem is used to solve
There are n rooms, and each room has only one outbound direction pointing to the other room. Now two people are given in two rooms. Ask them the minimum number of paths to join.
Solution: Observe the form of a graph. Because N points have n edges
[Problem] Give the root nodes of the Two Binary Trees to determine whether their structures are the same.
Bool issamestruct (treenode * node1, treenode * node2) {If (node1 | node2 = NULL) return ture; else if (node1 & node2 = NULL) return false;
Circle EliminationAlgorithm: First find the maximum stream, then search for the negative charge circle in GF, and expand along it
Improvement: add an additional arc (S, T). The cost is greater than the maximum cost of S-T (such as Vc ), when the
SPOJ 3978 Distance Query
A tree with Edge Weight (100000 points) is given, and the longest side and the shortest side on the path between the two points are questioned 100000 times.
The extended Tarjan algorithm can solve the LCA problem
Poj 1850 Code
Question: A word that consists of up to eight lower-case letters (the letters at each position of a word are listed in ascending order) is first sorted by length and then alphabetically. A word is given first, ask about the ranking of
Question link http://acm.sgu.ru/problem.php? Contest = 0 & problem = 263
Question: there are 10 ^ 6 locations (cells), and several cubes can be placed in each location. For any two numbers I
Put -put c cubes on cell x
Tput -put c cubes on
Matrix-Tree theorem (Kirchhoff Matrix-Tree theorem) is one of the most powerful weapons to solve the Tree counting problem of simple and ordinary undirected graphs.
1. G's degree matrix D [G] is a n * n matrix, and satisfies the following
Burnside theorem:Note that C (f) is the number of color schemes that remain unchanged under replacement f, so the numbers of essentially different color schemes Replace the average number of C (f) values of f.
If the method for finding the given
A square consisting of A * A square, after dividing into k blocks of B * B and A small square, A ring composed of k + 1 objects is multiplied. A = 3 has two kinds of division. Use the C color to dye each square, and the two schemes obtained by
This question is based on "NOI2008 volunteer recruitment". To do this, you must first understand the idea of "volunteer recruitment ".
It only changes from a linear structure to a tree structure, but the nature of the problem has not changed. It is
Question: Give n points. First, divide n points into k sets. Each element is required, you can find at least one element in the same set to meet the requirement that the distance between the two Manhattan is less than X, and ask what the minimum x
There are N (1 ≤ N ≤ 15) Books, each of which is different from the height of each. Now you can sort out the books in the following ways: extract a pile of books, and then keep the original order in place. In this case, we call it "one operation ".
Link: http://codeforces.com/problemset/problem/240/E
Question: In a graph with 50 thousand points and 50 thousand edges, the edge weight of each edge is 1 or 0. Ask the minimum tree structure with 1 root and output the scheme.
Solution: the
Definition: An arithmetic function of positive integer n.F (n). If f (1) = 1 and f (AB) = f (a) f (B ), in number theory, it is called a product function. If a product functionF (n), even if a and B are not mutually qualitative, f (AB) = f (a) f (B)
I have been studying for the second and next semester. I don't want to stay in the school lab, so I am not very interested in the project.
Years ago, I was thinking about going out for an internship at an external company. This idea cannot be shared
I went to the test in the morning. From to, wan'an technology has a large number of questions and a general test,
Questions:
Multiple choice questions: 1. sizeof (++ I );
2. int ** pp [3] [4]; size of pp sizeof;
3. Enumeration Value
Q & A: 1.
Today, I went to the China site for an hour's written test on the student's C ++ questions. There were 10 questions in total.
All the questions are in English, and the answer should also be in English.
1. sizeof output of different basic data types
StackIn the computer field, stack is a concept that cannot be ignored, but many people, even computer professionals, do not know that stack is actually two data structures.
Key points:
Heap: random order
STACK: Advanced and later
Stack and stack
Question: Make sure that the two sides are equal and return equal values. Otherwise, return other values and describe the complexity of the algorithm.
The data structure is:
typedef struct_TreeNode{char c;TreeNode *leftchild; TreeNode
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service