Poj 1191 board partition DP

Question:Split an 8*8 checker as follows: Cut the original checker down a rectangle checker and make the remaining part as a rectangle. Then, split the remaining part so that (n-1) is cut) after that, there are n rectangular checks in total with the

Poj 2486 apple tree tree DP

question: wshxzt traveled from the root node 1 on the apple tree. Each node on the tree will have an apple [I, it takes 1 step to get from a node to its neighboring node. Now, wshxzt can walk step by step to find the maximum number of apples she can

Poj 1328 radar installation greedy

There are many islands in the sea. Now we need to build a radar on the coast, but the coverage radius of each radar is only D. In order to make every island covered, we need the least radar. (Create a coordinate system. The coast is the X axis, and

Poj 3737 umbasketella (three points)

Question: Give the surface area of the Cone (including the bottom surface ). Calculate the maximum volume and the bottom radius and height. # Include # include using namespace STD; # define EPS 0.00000005 # define PI ACOs (-1.0) // The inverse

Poj 1269 intersecting lines (positional relationship between two straight lines)

Determine the positional relationship between two straight lines, parallel, coincidence, and Intersection Problem: Precision # Include # include using namespace STD; # define max 100 # define EPS 1e-8 # define zero (x)> 0? (X):-(x)

Poj 2262 Goldbach's Conjecture Number Theory

Assume that any two even numbers greater than 4 are equal to the sum of two odd prime numbers. Input N, evaluate N = A + B, A, and B as odd prime numbers. If such a A, B does not exist, output Goldbach's Conjecture is wrong. # Include # include

Poj 3225 help with intervals line segment tree

Question: a range of 0-65535 is given. Five operations: Operation Notation Definition Union ABytesB {X:XεAOrXεB} Intersection ABytesB {X:XεAAndXεB} Relative Complementation A−B

Poj 2503 babelfish hash/qsort + bsearch

Question: enter a dictionary and then search for words. (Enter a space as the field)Question: Do not forget to perform string binary search. # Include # include using namespace STD; # define prime 100003 struct Union {char Eng [11], fore [11];} p [

Poj 1149 (maximum stream dinic)

A pigsty Administrator does not have a pigsty key. Many customers come to buy pig every day. These customers bring their own pig keys. When a customer buys pigs, the pigs in the opened pigsty can flow freely, and all the pigsty opened after the

Poj 1679 the unique MST (sub-tree Prime/Kruskal)

Determine whether the minimum spanning tree in the graph is unique. Question: You only need to check whether there are two or more minimum spanning trees with the same weights. Note: 1. There is only one undirected edge between any two points in the

Poj 2318 toys/poj 2398 (binary, cross set)

Calculate the number of toys in each grid. 2318 when the separator board is given, it is left-to-right, And the 2398 separator board is not sorted. You have to arrange it yourself. The output of the two questions is a little different. Nothing else ·

Code of the solution report PKU 1789

# Include # Include # Define n 2001Int grah [N] [N]; Int sum; Void prim (int n){Int I, j, Pos;Int min, V [2001] = {0}, d [2001];For (I = 0; I D [I] = grah [0] [I];V [0] = 1;For (I = 1; I {Min = 99999999;For (j = 0; j {If (! V [J] & min> d [J]){Min =

Poj 2987 firing (maximum weighted closed subgraph dinic)

A: The company plans to cut employees and cut some employees to get positive benefits, while some employees will suffer losses. In addition, there is often a certain relationship between employees. When an employee is laid off, all employees under

Poj 1845 sumdiv quick power + cool + multiplication inverse element

Given a, B, calculate the sum of all the factors of a ^ B, and the modulus is 9901. Question: 1: factorization prime factor      A = p1 ^ A1 * P2 ^ A2 * P3 ^ A3 *...*Pn ^. HenceA ^ B = p1 ^ (A1 * B) * P2 ^ (A2 * B) *... * PN ^ (an * B ); 2: sum of

Poj 1691 painting a Board (DFS/status DP)

Given a rectangle, which contains N small rectangle blocks, you need to apply the given color to each small rectangle block. During the coloring process, a small rectangle must be fully painted and can be painted only when all the rectangles on a

1254-LCS (N * logn)

1254-LCs Time Limit: 3000 MS Memory limit: 65535 KB Descriptionthis problem seems a little easy. Because the two given sequences P1 P2 are just permutations of 1 ~ N. so try it and tell me the answer what the length of Longest Common subsequence

HDU 2412 party at Hali-Bula (tree DP, map)

N people form a relationship tree. Each node represents a person. The parent node of the node represents the only boss of the person. Only the root node has no boss. It is required to select a portion of the N people so that no direct

Poj 1837 balance DP

There is a balance, some weights and hooks. You need to hook up all weights to balance the balance.Problem: a negative value may cause repeated use of a weight using an array (of course, some people use two one-dimensional arrays ). The

Poj 1185 Artillery Position state compression (DP)

General of the Headquarters plans to deploy their artillery troops on the grid map of N * m. A n * m map consists of N rows and M columns. Each grid of the map may be a mountain (represented by "H") or a plain (represented by "p ), for example. A

Poj 2533 longest ordered subsequence dp (LIS)

Question: The longest subsequence.Question: When n = 0, 1 is output. N ^ 2 Algorithm #include int main(){int dp[1005], a[1005];int n, i, j, max;while ( scanf("%d",&n) != EOF ){for ( i = 1; i a[j] && dp[j] >= dp[i] )dp[i] = dp[j] + 1;if ( max N *

Total Pages: 64722 1 .... 56265 56266 56267 56268 56269 .... 64722 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.