Hdu 1253 victory big escape (3D simple bfs + pruning)

Shengli Great EscapeTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission (s): 21449 Accepted Submission (s): 8442   Problem DescriptionIgnatius was taken away by the devil. One day the devil went on a

Iterative and Recursive Implementation of binary tree traversal

Binary Tree is a very important data structure. Many other data structures have evolved based on binary trees. For binary trees, there are three traversal methods: Forward, middle, and backward. Because the tree definition itself is a recursive

Hdu 2874 (LCA)

During the virtual competition, the shortest was to find the shortest path of any two points. No matter how the optimization was done, it timed out. Recently, some tree questions were made. This is the distance from any two points to the nearest

HDU 3903-Trigonometric Function

This question took nearly an hour, and some situations such as incorrect thinking and out-of-the-boundary occurred successively. After various processing, the AC finally Start with the formula -- Cos (nA + mB) = cos (nA) cos (mB)-sin (nA) sin

UV 10163-Storage Keepers (dp)

QuestionThere are n warehouses for m to look. One warehouse can only be managed by one person, and one person can manage multiple warehouses. Each person has a capacity pi. If he takes care of k warehouses, the security value of each warehouse is pi/

Hdu-4635-Strongly connected-Strongly connected Component

Question: I will give you a directed graph and ask you how many sides you can add so that the graph is still not strongly connected. Practice: 1. Find all strongly connected components in the graph. 2. Scale the above strongly connected component

Hdu3790 shortest path problem (BFS + priority queue)

Problem DescriptionGive you n points, m undirected edges, each side has a length d and a cost p, give you a start point s end point t, it is required to output the shortest distance from the start point to the end point and its cost. If the shortest

Hdu 2817 A sequence of numbers (quick power)

During the first small competition, I couldn't even understand the question. Later I heard the teacher explain it and understood the question, but I still couldn't! Success !!! #¥ # ¥ # % ¥ % ...... ¥ % ...... &...... & * () & * (% ...... & Amp; % ¥

UVa409-Excuses, Excuses!

#include #include #include int main(){ int num[1000],maxnum; char word_list[1000][100]; char excuse[1000][100]; char s[1000][100]; int i,j,k,l; int cas=1; int n,m; while(scanf("%d %d",&m,&n)!=EOF) { for(i=0;imaxnum) maxnum=num[j]; } }

Poj 1733 Parity game

Idea: weighted and query setAnalysis:1. Given n conditions, we need to find the first number that does not meet the conditions.2 each condition gives the parity of 1 in the range [l, r]. Obviously, the number of 1 in the range [l, r] can be [0, r]-[0

Line tree-hdu-4339-Query

Question meaning: Give two strings. There are two types of operations. 1. Change a character at a certain position of a string. 2. Find the maximum number of two consecutive identical characters at the beginning of a position. Solution: The line

Hdu-1240-Asteroids!

You are in space now, but you want to go back to Earth, there are many planets in the stars, and all you have to do is to avoid these planets.Given the planetary distribution chart in a three-dimensional space, X represents the planetary area, and

POJ1947: Rebuilding Roads (tree DP)

Description The cows have reconstructed Farmer John's farm, with its N barns (1 Farmer John wants to know how much damage another earthquake cocould do. he wants to know the minimum number of roads whose destruction wowould isolate a subtree of

HDU 2056 Rectangles (calculates the area of the intersecting rectangle)

RectanglesTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission (s): 11631 Accepted Submission (s): 3716   Problem DescriptionGiven two rectangles and the coordinates of two points on the diagonals of each

Hdu 2203 affinity string

Expand the T string to two times, and KMP should note that the T length must be greater than the P length.  # Include # include # include # include using namespace std; char P [400005]; char T [400005]; int f [400005]; void getfail () {int m =

HDU 4662--MU Puzzle

The source of this question is MU conjecture in the AI field. I also referred to the relevant materials during the competition, but in the end I barely introduced the rule. Note the following attributes. First, how to change M in MI is always the

Hdu1700 Points on Cycle (Mathematics)

Problem DescriptionThere is a cycle with its center on the origin.Now give you a point on the cycle, you are to find out the other two points on it, to maximize the sum of the distance between each otherYou may assume that the radius of the cycle

HDU 4679 String

StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission (s): 695 Accepted Submission (s): 254   Problem DescriptionGiven 3 strings A, B, C, find the longest string D which satisfy the following rules:A)

HDU 4679 Terrorist's destroy (tree DP)

During the competition, due to the incomplete Consideration of the previous algorithm, the competition was completed quickly, but after a long time of tangle, as I wrote in the original method, I had to open multiple arrays for various judgments,

Hdu-3724-Encoded Barcodes

Question: There are N products with names consisting of lower-case letters and M inquiries. Each inquiry comes with a K and then a K bar code. Each bar code represents one lower-case letter, these K bar codes are connected into consecutive K letters

Total Pages: 5902 1 .... 4847 4848 4849 4850 4851 .... 5902 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.