Poj 3592 instantaneous transference
Question Link
Question: A graph can go to the right and down, And then * can be transferred to a position. '#' cannot go. After walking through a point, you can obtain the number value above the point, how much can be obtained
Idea: because there is a strong link contraction point in a ring, and then the problem is converted to Dag, directly DP.
Code:
#include
Poj 3592
A map with a number indicates that there are digits and minerals on it. * indicates that this point can be transferred to another point. # indicates that it cannot be taken. Only the lower and right sides of a vertex can be reached. Now, starting from (0, 0), ask how many minerals can be collected at most.
Train of Thought: This question must be illustrated, and then the longest path, the key is that with the transfer, it is possible to form a right ring, and then it will die in the spfa proces
+memset (Dist,0x3f,sizeof(Dist));//Distance Adequeint> Que (1, ST); theinq[st]=1; +dist[st]=0; - while(!que.empty ()) $ { $ intt=Que.front (); Que.pop_front (); -inq[t]=0; node E; - for(intI=HEAD[T]; i!=-1; I=e.next) the { -E=Edge[i];Wuyi if(dist[e.to]>dist[t]+E.dis) the { -dist[e.to]=dist[t]+E.dis; Wu if(!inq[e.to])//not in the queue - { About if(++cnt[e.to]>n)//too many times in the q
Click to open linkTest instructions: There are n individuals, and then x relationship and y relationship, the x relationship represents that the distance of these two people can not exceed c,y represents the distance of these two people is greater than or equal to C, if not meet all the output-1, if the position of 1 and n can be infinitely large output-2, otherwise the maximum distance to output two peopleIdea: is to check the model of the constraint, x relationship according to the location of
, output-1. If Person 1 and N can is arbitrarily far apart, output-2. Otherwise output The greatest possible distance between person 1 and N.Sample Input14 2 11 3 82 4 152 3 4Sample Output19Authoralpc20Source2010 acm-icpc multi-university Training Contest (--host by Nudt)/* ***********************************************author:ckbosscreated time:2015 July 30 Thursday 08:16 29 seconds file Name : hdoj3592.cpp************************************************ * * #include Copyright NOTICE: This art
coordinates of the arrival of the minerals owned by the edge of the weight value. The question then becomes: the longest path the minecart can reach from node 0. But in addition to the right and down the edge, considering the transmission point and the target coordinates are composed of edges, the original image will be much more back to the edge, forming a lot of the forward ring. The emergence of a forward ring, so that the mine can be picked up a part of the mineral, as long as it can go int
HDOJ 3592 World Exhibition difference constraint, hdoj3592
World Exhibition
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission (s): 1373 Accepted Submission (s): 673
Problem DescriptionNowadays, please people want to go to Shanghai to visit the World Exhibition. so there are always a lot of people who are standing along a straight line waiting for entering. assume that there are N (2
There is something
World Exhibition
Time Limit: 2000/1000 MS (Java/others) memory limit: 32768/32768 K (Java/Others)Total submission (s): 568 accepted submission (s): 264Problem description
Nowadays,
Please people want to go to Shanghai to visit the world exhibition.
Question: There are several points on the plane, and the minimum spanning tree is obtained. There are a maximum of 8 packages. Each package has a price and a number of points. Once purchased, the points in the package will be connected to each other.
World ExhibitionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission (s): 931 Accepted Submission (s): 468 Problem DescriptionNowadays, please people want to go to Shanghai to visit the World Exhibition.
It is very difficult for others to answer questions... Alas
First, this question is abstracted into a directed graph. Due to the existence of magic power, this graph has a ring, so I think of the method of reducing points with strongly connected
/* Question: Given a matrix, the southwest corner is the starting point. Each unit has a valuable gold mine (# indicates rock, inaccessible, * indicates space-time gate, and can reach a specified Unit) what benefits can be obtained at most? Strong
Click to open link
Test instructions: There are n individuals, and then x relationship and y relationship, the x relationship represents that the distance of these two people can not exceed c,y represents the distance of these two people is greater
should update it.
There is a heap of T-code below how to update is System(OLI1-9), in fact you can see the background.
---------------------------------------
1. For WM correlation (Part ):Ls09 display material data for stor. TypeLs24 display quants for MaterialLs25 display quants per storage binLs26 warehouse stocks per MaterialLs27 display quants for storage unitLs28 display storage units/binLt0g return delivery to stockLx02 Stock ListIi. Inventory re-ValuationJ1a 3 MM goods issue revaluation
Title Description Enter n integers to find the smallest number of K. For example, enter 4,5,1,6,2,7,3,8 these 8 numbers, then the smallest 4 number is 1,2,3,4,.//Heap Sort#include #include#includeusing namespacestd;classsolution{ Public: voidHeapadjust (vectorint> a,intSintN) {intRc=A[s]; for(intj=2*s+1; j1; j=j*2+1) { if(j1a[j]>a[j+1]) J++; if(rcA[j]) Break; Else{A[s]=A[j]; S=J; }} A[s]=RC; } voidCreatheap (vectorint> a,intN)
/JudgeOnline/problem? Id = 2914 question: undirected graph least cut solution: stoer-Wagner algorithm, which is determined by network flow addition Enumeration
Poj 2942-Knights of the Round Table (hard) http://acm.pku.edu.cn/JudgeOnline/problem? Double Unicom component (or block) contains odd ring solution: Find the double connected component after the black and white dyeing for Bipartite Graph determination related: http://hi.baidu.com/zfy0701/blog/item/57ada7ed104ce9d2b31cb104.html
Poj 3177-r
/problem? Id = 3352 question: how many sides can be added to a bidirectional connected graph solution: We recommend that you compare the scaled points of different parts separated by the cut edge to 1236, how many edges are added to a directed graph into a strongly connected graph poj 3249-Test for job (basic) http://acm.pku.edu.cn/JudgeOnline/problem? Id = 3249 solution: BFS/DFS + dppoj 3592-instantaneous transference (basic) http://acm.pku.edu.cn/Ju
convenient, has one fatal disadvantage: insecure, data is not encrypted. Anyone, if connected to the same network, can find a way to intercept the data you transmit, or your password.Therefore, we need to take out sftp. SFTP is the abbreviation for secure FTP. Represents "Secure FTP".SFTP is also based on SSH, so login requires username and password, use the following:SFTP [email protected]For example:SFTP [email protected]Once you have entered the username and password, the other actions are t
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.