HDU 1251 trie tree

the first time you write the trie tree, the template is completely copied. # Include using namespace STD; const int kind = 26; struct treenode {int count; treenode * Next [kind]; treenode () {COUNT = 1; for (INT I = 0; I next [bra NCH]) location-

Poj 2387 til the cows come home (spfa)

question: a cow returns home along the road sign and finds the shortest path. problem solving: handle duplicate edges. It feels good. In the future, we will use the vector graph for undirected graphs, which can save the processing of the duplicate

Poj 1936 all in all string questions

Question: There is nothing to say, but because I didn't see the question clearly, I wrote yes and no in upper case. I contributed twice and burst into tears. Do not write the strlen function in the loop. Otherwise, it will take more than half of the

Difference between cin. Get () and CIN. Getline ()

Cin. Getline () and CIN. Get () are both row-oriented reading for the input, that is, reading the entire row at a time instead of a single number or character, but there is a difference between them. Cin. Get () reads a whole line each time and

Poj 1503 integer inquiry high-precision Addition

Question: enter several big integers for the sum. # Include # include using namespace STD; int sum [111]; char STR [101]; int main () {int I, j, Len; while (CIN> Str) {Len = strlen (STR); If (strcmp (STR, "0") = 0) break; for (I = 110, j = len-1;

HDU 4007 Dave line segment tree

question: there are many people in the square. Now, I will give you a square with a side length of "R". The square shall have at most people that can be framed, including the border. question: # Include #include using namespace STD; # define n 201

Poj 1789 truck history prim

A group of truck codes (each code is a 7-character string). The distance between two codes is a different number of letters. Each code is regarded as a vertex, and the distance between codes is regarded as an edge right. This is the minimum spanning

Poj 2104 k-th number division tree

Question: calculates the number of K in the range [L, R ]. Question: # Include #include # include # include using namespace STD; # define maxn 100001 # define L (u) (U 1) struct segtree {int l, r;} node [maxn * 4]; int sorta [maxn]; int toleft [

Poj 1258 agri-net prim/Kruskal

Connect n villages, and the consumption of the connections between the two villages is known. The minimum consumption required to connect all villages together.Question: two groups of codes are provided.Prim: #include#define MAX 300#define INF 999999

Poj 2516 minimum cost minimum fee Max stream

There are N Customers, M warehouses, and K types of goods. It is known that each customer needs the quantity of each type of goods, each warehouse stores the quantity of each type of goods, and each warehouse carries a variety of goods to each

Poj 2823 Sliding Window Heap/monotonous queue

Given a string of numbers, a fixed-length window, the window is moved to a position at a time, and the maximum value in the output window is displayed.Question:Heap and ing Normally, we use a heap. The most common thing is to randomly add elements

Poj 1511 invitation cards (spfa)

A group of students send invitations to each station in the city. Each station has exactly one student. There is a specific fare between any two stations. If the students depart from station 1 in the morning and return to station 1 in the evening,

Poj 1860 currency exchange Bellman-Ford

Question: Is it possible to make a profit through settlement.Question: #include using namespace std;double dist[210], v;int n, m, s;struct item{int a, b;double r,c;} node[210];bool Bellman_ford (){int i, j;memset(dist,0,sizeof(dist));dist[s] = v;for

HDU 2066 travel Dijkstra

Although Cao er is a luchi (who spent more than a year in Hangzhou, he will still be lost on campus, Khan ~), However, caoer still enjoys traveling, because he will meet many people (Prince Charming, ^ 0 ^) on the road. Many things can enrich his

HDU 4006 the kth great number Heap/priority queue/line segment tree

Enter two integers, N and K. Then there are n rows of input, I stands for writing a number, and Q stands for asking how many K numbers are in all written numbers?Problem: when the number of writes is less than K, there is no inquiry. Therefore, you

Poj 2255 tree recovery binary tree traversal

A binary tree's first and middle order traversal is provided, and its back order traversal is output.Question: # Include using namespace STD; char preorder [30], inorder [30], postorder [30]; int Len; void travel (INT pstart, int pend, int instart,

Poj 1201 intervals (differential constraint system)

Q: I will give you a lot of [ai, BI] between different cells, and specify that each cell contains at least the number of CIDS. Then, find a minimum length interval Z so that the same element between each cell is greater than or equal to CI.Question:1

HDU 4041 eliminate witches! Tree traversal

Question: 2011 Beijing online competition. The path of the output traversal. # Include # include # include # include using namespace STD; # define n 1000010 # define M 50010 struct item {int flag, ID; /* flag = 1 indicates a number, and flag = 0

Codeforces beta round #96 (Div. 2) (DP)

E. LOGO turtletime limit per test 2 secondsMemory limit per test 256 megabytesInput Standard InputOutput Standard output A lot of people associate logo programming language with Turtle graphics. In this case the turtle moves along the straight line

Poj 3041 asteroids Hungary algorithm/minimum point coverage

Question: give you a matrix of N * n. There are some grids containing an minor planet. Bessie now has some powerful shells, each shot can eliminate one row or one column of the minor in the matrix, but shells are expensive. Ask you to eliminate the

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