Given a rectangle of N * n, that is, to find the largest rectangle within a plane area (0, 0) to (n, m, the rectangular area must be the largest, and the ratio of length to width is a/B. The rectangular area must contain a vertex in the restricted
Question: given an integer string, There Is a q group inquiry, asking the number of different numbers in the substring with a length of W in this string. The dynamic planning of this question is very skillful.
Solution: If f [I] indicates the sum
Meaning: given some lyrics, the lyrics are given by a row and a row. All words with more than 2 times are output. words with the same number of times are grouped into one group, with the maximum output length in each group, otherwise, the last and
Given a matrix, each point in the matrix has a value. Each time you can start from any point and end from any point, the level of addition and the level of the sword can alternate at every point. How many methods can be used to make the human level
There are c cows and K milking stations. Each milking machine can serve up to M cows, and there is a certain distance between the cows and the cows, the cows and the milking station, the milking station and the milking station. Now I want to ask how
There are n intersections connected by m and the side is one-way. Now we want to send some paratroopers to air these intersections, each paratroopers can follow the crossroads of an air attack and ask how many Paratroopers should be dispatched at
Http://www.cnblogs.com/skyiv/archive/2010/03/27/1698550.html
The key point is to record that a number is decomposed and the plan does not include 1.
The following conclusions are drawn:
F [2 * n + 1] = f [2 * n]F [2 * n] = f [2 * N-1] + F [N]F [2
There is a fast lawn, and there are several cows on each lawn. Each shelter can only accommodate a certain amount of cows. Grass has edges. Now, what is the time when all the cows arrive at the rain shelter?
Solution: This question and POJ-2112 is
This is the minimal spanning tree. The question is given with an edge that must be connected. You just need not take it into consideration when sorting.
The Code is as follows:
#include #include #include #include #include #include using namespace
Question: given an adjacent matrix, find the largest group.
Solution: direct AC.
The Code is as follows:
#include #include #include #include #include using namespace std;int N, mp[55][55];int ret, st[55], cnt[55];void dfs(int x, int num) { int
A graph with n nodes requires a tree (without loops) and only one node can have the same number of nodes on each layer. How many different methods are available.
Solution: For N nodes, if the nth node is the boss of any combination of N-1 nodes,
Question: given the names and nicknames of a group of people, given some relationships, what are the requirements for determining the one-to-one correspondence between names and nicknames?
Solution: At first, we directly used the owner of the hiding
Returns the largest independent set.
The number of independence in a bipartite graph is equal to the number of vertices minus the maximum number of matches.
Since men and women are unknown in this question, we need to divide everyone into two sets,
Define a function as follows:
Q:
Given the value of F [1]-f [N], and then there are Q special points. The number of items associated with the previous one is special, the coefficient is special, and the position is also special. The value of F [N]
Question: I had a YY question, but I did not expect the conclusion to be correct. The question tells us a directed graph. What is the minimum cost of dividing every point in the graph into a ring? Each side has a price.
Solution: To build a ring,
Given a grid chart, some people are going to go to some houses. There are as many people as the houses, and the distance between people and the Manhattan of the houses serves as the overhead of walking, ask everyone about the minimum expenses for
Given a bipartite graph, N points correspond to M points, and there is a group of relationships between them. Each group has a weight value. A matching scheme is given in the question. How much does the maximum matching weight in this set of
When I first read the wrong question, I thought that all the defense should be buffered. After wa several times, I checked the question again to know that it was part of the buffer.
Ans = Total number of attacks-Number of defensesView code
1 /* 2
Question: There are n garbage items. Robots need to pick up the garbage from small to large, but the garbage in their hands cannot exceed C. Find the shortest path for robots to walk.
Practice: Set DP [I] to the shortest path of the I garbage
Given a square, each point in the grid is composed of an open space, lawn, and a wall. A robot can be placed in each blank space, and each robot can scan the laser in four directions, therefore, a solution should be given to place enough robots on
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