include code

Discover include code, include the articles, news, trends, analysis and practical advice about include code on alibabacloud.com

Poj 1611 the suspects

The first parallel query, which sounds very big, is not hard to understand. I feel that the essence of the query set is on the path compression, and direct the leaf node to the root And: merge the two sets. Query: query whether an element is in this

The sum of stone numbers

Manasa and her friends go hiking. She found a small river lined up with stones with numerical values. She began to walk along the river and found that the numbers on the adjacent two stones increased.AOrBThere is a treasure at the end of the river.

HDU 1548 (the most basic BFS) a strange lift

This is a one-dimensional BFs, and there is no deformation. It should be the most basic BFs. Question: There is such a wonderful elevator. When you are on the level I, you can only choose the upper or lower Ki layer, that is, you can only reach the

HDU 1285 determines the competition ranking (Topology Sorting template)

It is easy to understand the meaning of the question. The key is to see the following: the matching ranking may not be unique. At this time, the team with a small number must be in the front; Idea: this is the classic application of topological

HDU 1455 sticks

This makes me feel weak when I look at the problem-solving report. Question: Several wooden sticks of the same length were cut and cut into several segments by someone as an outputer. Then, well, it will be worse after a long memory, forget the

Poj 3287 (Basic BFS) catch that cow

This is the first BFs. It is very basic and simple. The extended search algorithm is as follows: (Use Queue)(1) Put the initial node S0 into the Open table;(2) If the Open table is empty, the problem is not resolved and fails.Exit;(3) put the

HDU 1312 red and black

Repeatable path search, no backtracking required This should also be a very simple and classic DFS topic Compared with the problem (HDU 1010 tempter of the bone) of the previous puppies, the problem can only be traced back. The reason is very simple.

HDU 1078 fatmouse and cheese

Memory-based search: the first time you do a search, Please study it! Dir stores the four search directions, top left, bottom right I am still confused here. Now I will write down the template. === !!   1 //#define LOCAL 2 #include 3 #include 4

Ultraviolet A 11078 open Credit System

Maxai is used to maintain the maximum value of the read data. Once a num is read, maxai-num is calculated. If it is larger than ans, it is updated.   1 // # define local 2 # include 3 # include 4 # include 5 using namespace STD; 6 7 int main

Ultraviolet A 11549 calculator conundrum

In the big white book, I feel that there is no fixed idea. I can only carefully understand and learn the code of rujia. Here we use the Floyd labeling method, just like the two children in the illustration, one is fast and the other is slow. If it

HDU 1506 largest rectangle in a Histogram

This is also called the largest submatrix. Returns a tree chart with a child matrix with the largest area.   The idea is this: for each unit matrix, find the subscript of the matrix with no lower left continuity than it, and put it in the L

HDU 2870 largest submatrix

The relationship between these three questions is as follows: 1505 is an enhanced version of 1506, and 2870 is an enhanced version of 1505. It would be easy to do it in the order from simplicity to ease. The idea of this question is enumeration + dp

HDU 1513 palindrome

The question is to ask a string how many characters can be inserted at least to convert the original string into a return string. Algorithm: Use the length of the original string minus the length of the maximum public string of the original string

10817 (shape pressure DP + Memory search) Headmaster's headache

Question: A total of S (S ≤ 8) courses, m in-service teachers, N job-seeking teachers. Each instructor has his/her own salary requirements and can teach one or more courses. It is required that in-service teachers should not be dismissed and asked

Nyoj parentheses (2) [DP]

Parentheses matching (2) time limit: 1000 MS | memory limit: 65535 kb difficulty: 6 Description Here is a string containing only four types of symbols, how many parentheses must be added to match these parentheses. For example: []

Ultraviolet A 11168 (convex bag + distance from a point to a straight line) Airport

Question: There are N points on the plane. Find a straight line so that all points are on the same side of the straight line. And find the minimum value of the distance between these points and the straight line. Analysis: As long as the straight

Uva10689 yet another number sequence (matrix fast power)

    Ultraviolet A 10689 yet another number sequence (matrix fast power)     It's just the power of the matrix. There's nothing to say.   Analysis: it is actually a Fibonacci series. Only the final matrix corresponding to () is (a, B) mod = 1; for

Ultraviolet A 11584 partitioning by palindromes

Question: Returns the minimum number of input substrings that can be divided into one string. Analysis: D [I] = min {d [J] + 1 | s [J + 1]... s [I] is a reply string} D [I] indicates the number of substrings that can be split with at least the first

UV 11400 Lighting System Design

Question: There are n kinds of bulbs. Different types of bulbs must use different power supplies, but the same type of bulbs can use the same power supply. Each bulb has four parameters: Voltage value V, power supply cost K, cost of each light bulb

Ultraviolet A 1025 (Dynamic Planning) a spy in the Metro

Question: There are linear n stations, numbered from left to right as 1 ~ N. M1 cars start from the first stop and drive to the right, while m2 cars start from the second stop. At, the hero starts from the 1st station and returns to the Station N's

Total Pages: 15 1 .... 9 10 11 12 13 .... 15 Go to: Go

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.