http://acm.zju.edu.cn/onlinejudge/showProblem.do? Problemid = 586
# Include # include # define Max limit 00int edge [1010] [1010]; int adapter [1010]; int lowcost [1010]; int t, n; void Init () {int I, K; scanf ("% d", & N); for (I = 0; I
# Include # include // # define dbgusing namespace STD; const int maxsize = 10000; char map [maxsize] [maxsize]; int n, m; unsigned long lakecounts; bool ifirstlake = true; bool icounted = true; void DFS (int x, int y) {int M, N; n = x; M = y; //
HDU-1242-Rescue
Http://acm.hdu.edu.cn/showproblem.php? Pid = 1, 1242
Bfs is enough. There may be multiple 'R', and 'A' has only one. From 'A', the first 'r' is the desired one.
It should be noted that there are obstacles in this wide search. If 'X'
HDU-4038-Saving Princess Claire
Http://acm.hdu.edu.cn/showproblem.php? Pid = 1, 4308
In the given MAP, Y is the start point, C is the end point, # points cannot pass, and all P is the intercommunication portal. Therefore, all P can be considered as
POJ-2195-Going Home
Http://poj.org/problem? Id = 2195
The maximum flow with the minimum cost. Assume one source point and one sink point.
The Code imitates what is written on the Internet, so you have to study it.
#include#include#include#define
# Include # include # include # include using namespace std;/* Author: YuXun Lu Time: 23rd/2/2012 Last Time: about 7 Hours Begin Time: Unknown End Time: Unknown Test Data: abdkqopenlmcfighj qkpodbnemlacifgjh output: just look for an AC program
HDU-1520-Anniversary party
Http://acm.hdu.edu.cn/showproblem.php? Pid = 1, 1520
DFS, some nodes have a parent-child relationship, and the node with a parent-child relationship must not appear at the same time
# Include # include # include #
8 digital problems, that is, in a 3 × 3 matrix, there are 8 numbers (1 to 8) and a space, from one state to another, each time, you can only move a number adjacent to a space.
AOJ-417-8 digital
Http://icpc.ahu.edu.cn/OJ/Problem.aspx? Id = 417
This
# Include # include # include # include // # define INPUT/** Problem: UVA10167-Birthday Cake Begin Time: 22nd/Mar/2012 p. m. end Time: 22nd/Mar/2012 p. m. last Time: 2 H 35 M Thought: Search for 1.A, B, and [-500,500] based on the conditions
# Include # include # include # include # include # define INPUTusing namespace std; const int c0de4fun = 10; int x [4] = {1,-1, 0}; int y [4] = {0, 0, 1,-1}; int maze [c0de4fun] [c0de4fun]; /** Problem: HDOJ/HDU1072-Nightmare Begin Time:
# Include # include # include # include # include using namespace std;/** Reference: http://www.cnblogs.com/procedure2012/archive/2012/01/29/2331460.html Thanks: the templates and handouts provided by the lpp senior Pre-Knowledge:
Hat's WordsTime Limit: 2000/1000 ms (Java/Other) Memory Limit: 65536/32768 K (Java/Other) Total Submission (s): 7 Accepted Submission (s): 4 Font: times New Roman | Verdana | GeorgiaFont Size: Regular → Problem DescriptionA hat's word is a word in
More is betterTime Limit: 5000/1000 ms (Java/Other) Memory Limit: 327680/102400 K (Java/Other) Total Submission (s): 6 Accepted Submission (s): 6 Font: times New Roman | Verdana | GeorgiaFont Size: Drawing → Problem DescriptionMr Wang wants some
Just a HookTime Limit: 4000/2000 ms (Java/Other) Memory Limit: 32768/32768 K (Java/Other) Total Submission (s): 12 Accepted Submission (s ): 5 Problem DescriptionIn the game of DotA, Pudge's meat hook is actually the most horrible thing for most of
FDNY to the Rescue!
Time Limit:1000 MS
Memory Limit:10000 K
Total Submissions:2175
Accepted:655
DescriptionThe Fire Department of New York (FDNY) has always been proud of their response time to fires in New
Arbitrage
Time Limit:1000 MS
Memory Limit:65536 K
Total Submissions:12809
Accepted:5414
DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more
Description: How can Roy grab the most money without being caught. It provides the money that each bank can grab and the probability of being caught.
Analysis: at the beginning, we thought that the probability was only two decimal places, multiplied
Shuffle'm Up
Time Limit:1000 MS
Memory Limit:65536 K
Total Submissions:4557
Accepted:2167
Description
A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is
Because there is no weight value, you do not need to use the Floyd algorithm to find the shortest path.
Directly use bfs...
#include#includeusing namespace std;const int maxn = 21;int G[maxn][maxn];int vis[maxn][maxn];struct node{ int level;
It's not a Bug, it's a Feature!
It is a curious fact that consumers buying a new software product generally doNotFail CT the software to be bug-free. Can you imagine buying a car whose steering wheel only turns to the right? Or a
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