Recently I want to brush DP! Weak !!!
Equation DP [I] [J] = sum (DP [I-j] [k]), 0
# Include # include # include # include # include # include # include # include # include # include # include # include # include # include #
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1425
Time is slow...
Accepted
1425
671 Ms
4204 K
2394 B
G ++
# Include # include # include # include # include # include # include # include #
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1196
Because the odd rightmost bit must be 1, and the result is also 1. You only need to process the even number.
# Include # include # include # include # include # include # include #
Simple topsort, not explained!
You can use a queue for traversal!
# Include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include #
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1166
**************************************** *******************
I made the first line segment tree question to commemorate it.
**************************************** *******************
/**********
In this question, we need to maintain two major heaps for cyclic maintenance... Note the complexity in STL heap
# Include # include # include # include # include # include # include # include # include # include # include # include #
# Include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include using namespace STD; int
This topic is very basic and classic, but I personally think there is a very error-prone place, that is, the priority of conflicting inconsistency is higher than the uncertain priority, because there is a conflict between the current and immediate
Greedy
Http://acm.zju.edu.cn/onlinejudge/showProblem.do? Problemid = 4351
Sort B from small to large.
# Pragma warning (Disable: 4786) # include using namespace STD; # include # include struct node { int A, B; } Arm [2510]; bool CMP (const
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1698
/* Modify function Update (): when modifying the range, if it exactly corresponds to the range, the value of the current vertex is changed. If it does not, the interval to be modified must be the
Http://acm.hust.edu.cn/thx/problem.php? Id = 1422
STL + DFS
# Include # include # include # include # include # include # include # include # include using namespace STD; # define INF 0x7fffff vector V [50005]; int A [50005];
For more information about binary matching, see http://blog.csdn.net/leolin_/archive/2011/05/04/6393259.aspx.
**************************************** **********************
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 2444
// Although the
Http://www.codeforces.com/contest/75/problem/ B
**************************************** **************************************** ****************
It is a simple simulated question, where the person's name is ranked in the ascending order of the
Wooden sticks
Time Limit: 2000/1000 MS (Java/others) memory limit: 65536/32768 K (Java/Others)Total submission (s): 3559 accepted submission (s): 1442Problem descriptionthere is a pile of N wooden sticks. the length and weight of each stick are
TreasureTime Limit: 2000 MS memory limit: 65535 KB
Solved: 68 tried: 140
Description loneknight is finding treasures in a maze. he is so greedy that he always takes away all the treasure he can reach. now, he has a map for the maze, and he want to
With the KMP feature, KMP can identify the number of times that the first I appeared on the primary string (overwrite), or the number of times that the last J appeared on the primary string, you only need to reverse KMP =. The specific
1. Common Data Structures
Linear: array, linked list, queue, stack,Block array (array + linked list), Hash table, double-end queue
Tree:Heap (large and small heap),Trie tree (letter tree or dictionary tree), Suffix tree,Suffix tree Group, Binary
The question is, 2n sets the key and M door. Each door has two locks, and one of them can be opened. 2n divides the key into npair and uses one of them, the other one does not appear any more, but the other one can be used cyclically. How many doors
A good number topic. Unfortunately, I can't think of it myself. I can only refer to the code of the experts ~~
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 1695
# Include # include # include # include # include # include # include #
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