Line Segment tree. Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4302
Returns the subscript of a vertex that is the shortest distance from a vertex.
At the beginning of initialization, there was no initial pair. orz has been working for a long
Question: Here are three vertices. These three vertices are the vertices on a polygon. How many edges does a polygon have at least?
Idea: three points, triangle-> outer circle-> must be the outer circle of the convex polygon-We can place the three
In the fig 01, there are several squares with an edge of 1. Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4331
# Include # include # include # include # include # define lson l, m, RT 1; if (Pos 1; int ret = 0; If (Pos m) RET + = query
The answer is to break down the prime factor to obtain the largest quality index. 1A, huh, huh.
Square-free
# Include # define maxn 1000100int t, n; int prime [maxn]; void getprime () {Prime [0] = 0; For (INT I = 2; I = prime [I]; I ++) {If (N
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4321
Given a, B, and N, let you calculate the number 1 in B + A, B + 2 * a,... B + N *.
Question:
This question was read after too many schools. I have been reading it for a long time and haven't
I really don't want to explain why. That's it !!!
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4320
Ask if the decimal places in base A can be converted to decimal places in Base B.
Solution:
Check whether all the quality factors in a are
Question:
Let's give you a rectangle consisting of 01 and ask if it can be changed to the same row 1 or the same column 1 or the same row 1, and the corresponding output row, column, both and minimum number of exchanges.
Solution:
For a tree with n (n V path are different.
To obtain the weights and values of all valid paths. Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4303
Solution:
The problem that can be solved at one DFS is actually not complicated. The main
I always think that the pressure is a violent search. In fact, this is also a violent search... Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4317
Question: give you n numbers. You can add a value to each number to make the difference or value of
There are N number, at the beginning are 0 http://www.cnblogs.com/wuyiqi/archive/2012/05/27/2520642.htmlAdd I, j to I, and Add 1 to all the numbers in the J rangeQ I j ask the number of http://lightoj.com/volume_showproblem.php between I and j which
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4318
The question can be roughly expressed as transmitting power from node s to node T, which will consume some power during transmission, and the value of power transmission between different nodes
The original matrix and target matrix are given. Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4306
Two operations: select a horizontal line to exchange two elements (cost CA ).
Select the two-element exchange (CB) of a column ).
An operation
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4307
How do I feel like a network stream? Didn't it finally convert to a network stream?
This article explains well: http://www.cnblogs.com/staginner/archive/2012/08/13/2636826.html
In essence, the key
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4328
Find the largest pure 0 pure 1 or 01 cross matrix, 01 is the square matrix.
Solution:
Pure 0 or pure 1 uses the suspension method, and 01 interacts with another thought of DP.
# Include #
This is a disgusting question. I will not talk about it for the moment. That is, how to write the question.
Http://acm.hdu.edu.cn/showproblem.php? PID = 1,
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4309
Question: N points. Each point has an initial value. There are three channels. 1. Tunnel: it can be used to avoid it. It has a fixed capacity and can also be used for transmission. 2. Ordinary
Given n coordinates, calculate the minimum value of one of the coordinates to the sum of other coordinates.
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4311
Solution:
1. sort by X. Sumx []. Sumx [I] indicates the sum of the X coordinates of the
Ask http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4419
Calculate the coverage area of different colors.
# Include # include # include using namespace STD; typedef _ int64 LLD; # define lson l, m, RT 0) cover [RT] [c] ++; else cover [RT] [-C]
Question]
There are a total of N vacancies, all of which are initially empty. There are two kinds of operations. One is to ask whether there are R consecutive vacancies. If yes, fill all the places with R consecutive vacancies on the leftmost end.
Http://acm.hdu.edu.cn/showproblem.php? PID = 1, 4334
_ Int64 has hurt my wa many times...
Linear search is the same as fast search.
#define maxn 40010#include #include using namespace std;int T, n;__int64 a[maxn], b[maxn];__int64 m[5][210];int main(
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