// Calculate the minimum cut and convert it to the maximum flow model to find the maximum flow // The method of the diagram is split point, change one vertex except the Source Vertex and the sink vertex to two. The capacity of each vertex is the
// Network stream-maximum stream // Add the virtual source point and virtual sink point diagram, convert to the shortest path from source to sink # include # include # include # define INF 2000000000 using namespace STD; int N, NP, NC, M;
// Because the given point can reach a maximum of 100*100 = 10000 // it is impossible to create a 10000*10000 graph to describe the traffic, MLE // but considering the shape of a grid, each vertex can be connected only to a maximum of four
// BFS breadth-first search // after creating a graph, perform extensive search for all null values in the graph, which is equivalent to expanding from the change point, until a cube or cross-border query is triggered // each time a coordinate is
// Line segment tree // question: determine the sequence number of the given series, and then determine the arrangement of the series // thought: reverse thinking, for the given N number, starting with the number of N, if the number of his
// The Line Segment tree uses the flexibility of the Line Segment tree to implement queuing // algorithm key: backward insertion. The line segment tree maintains the remaining valid space in the interval, each time a proper position is found in the
// Line segment tree // A has gained a lot. At first, I won't use bitwise operations. The vis [30] array is used to mark colors one by one, slow speed: 800 + Ms // The color is recorded by bitwise operations, and the result is doubled // pass
// Find the maximum edge in the minimal spanning tree // write the Kruskal Algorithm for the first time. Thanks to the guidance of jsh // check the superiority of the set, after the split, only the time of O (1) is required to obtain the result //
Http://imlazy.ycool.com/post.2059102.html
I read this article and learned a lot about it. I worship God!
The difficulty of network flow lies in the Construction of graphs and the simplification of graphs.
// Network stream -- maximum stream // The
// Dynamic planning // sort the Board by height // records the minimum time required to reach the Left and Right endpoints of each board, and the next board pointer for each board to jump down from the left and right sides // the minimum time
// Traditional non-scrolling Array Implementation form # include # include using namespace STD; int s [1000] [1000]; int main () { int T, M, T, V, _ max =-1; // T is the maximum time (Backpack capacity), and m is the number of herbs (total
// Simple and fast sorting. It turns out that algorithm was added with qsort on Sicily. It's no wonder that an error occurred while using next_permutation during the school competition. It turns out that was not added! Not experienced enough !! //
// Simple application for querying sets -- compress paths and query sets // After analysis, each point can be traversed once and the corresponding query set can be created, the search complexity is O (1); // calculate the number of
// The simplest method is to define the tree. // The tree has n vertices, n-1 edge // I think this question is more than the street, the data range is not given, the details so much, consider empty tree and multiple sides. # include using
Stanford Report, June 14,200 5
'You ve got to find what you love, 'Jobs says
This is the text of the commencement address by Steve Jobs, CEO of Apple Computer and of Pixar Animation Studios, delivered on June 12,200 5.
I am honored to be with you
I hope you will enjoy it ~
1. Give a blind man 52 cards and tell him that exactly 10 cards are facing up. The blind man was asked to divide the card into two heaps, so that there were as many cards in each heap. What should blind man do?
2. How to
// A very good question. Ignore the details wa Three Times // pay attention to special cases // if it is the last day of the year, note that the year must be reduced by 1 // conclusion: When performing a modulo operation, consider whether the
DescriptionStandard Web browsers contain features to move backward and forward among the pages recently visited. one way to implement these features is to use two stacks to keep track of the pages that can be reached by moving backward and forward.
Mastermind is a game for two players. One of them,Designer, Selects a secret code. The other,Breaker, Tries to break it. A code is no more than a row of colored dots. At the beginning of a game, the players agree upon the lengthNThat a code must
// Simple dictionary hash application, which can also be used by trie // learned how to use sscanf, the difficulty lies in reading data. # include using namespace STD; const int maxhash = 100003; int head [maxhash], next [maxhash]; int m;
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