Determines whether a polygon can be placed in a convex hull.
Perform a convex hull for all vertices, and add both the key and common vertices to the convex hull set.
If a vertex in the graph storm set is a polygon vertex, no is output.
Else
From: http://www.notonlysuccess.com/index.php/segment-tree-complete/
A. Posters are pasted on the wall. Posters can be covered by each other. Finally, you can see several posters.Idea: The data Scope of this question is very large, and timeout +
Key Point: sort the dimension of each box to determine whether a box can be placed in another box.
After creating a graph, find the longest path in the graph.
View code
# Include # Include String . H># Include Using Namespace STD; Const
One person game
Time limit:1 second
Memory limit:32768 KB
Special Judge
there is a very simple and interesting one-person game. you have 3 dice, namely die1 , die2 and die3 . die1 has k1 faces. die2
During enumeration, the volume and the order of the items in the group were changed.
I have a deep understanding, but I don't feel very expressive.
# Include # include int A [110] [110]; int DP [110]; int max (int A, int B) {return A> B? A: B;}
We will give you the maximum common divisor and least common multiple of the two numbers, so that you can find them to minimize the sum of them.
Solve the problem by using the minimum and maximum public multiples
Q: Why does a * I + B/I decrease
Link: http://acm.hust.edu.cn: 8080/judge/problem/viewproblem. Action? Id = 23701
Question: calculate the maximum number of N points. There are two operations: Add a number and delete a number. The deleted number must already exist.
Offline
Give you a picture to judge each side of the graph.
1. Any exists in any of the smallest spanning trees.
2. At least one exists in at least one of a minimum spanning tree.
3. None of the smallest spanning trees does not exist.
I want to
Find several rings to cover all the points to minimize the total cost.
Because each vertex can only go through one time, you can quickly think of splitting points to find the minimum cost flow.
Graph creation:
S-> I fee is 0 traffic is 1
I +
I have already done a similar question, but this question is the longest length, and that question is the total number of such sequences, they all use line segment trees or tree arrays to optimize the sum operation and reduce it to log (n)
View
Http://codeforces.com/problemset/problem/160/E
Question:
There are many stations in a straight line
There are N vehicles. The information of each vehicle is S, F, T, the site, destination, and departure time. You can stay on another station
A little special. The bottom left corner of each cube is (0, 0, 0)
Therefore, it is much easier to calculate the area.
Build the X coordinate using a line segment tree
Rm [RT]: the rightmost y value of the interval.
MX [RT]: The maximum y
Many errors have been handed over dozens of times. Haha ~
Summary:
RE: array out of bounds
WA: spelling of letters
Create a trie tree and add a query set to query graph connectivity and easily record the degree of each vertex.View Code
// Runtime
This is a typical tree-like DP, And I have understood it for a long time, I feel good about myself .........................
So make it clear and remember it later.
A tree with n vertices (1-n) and n-1 edges. Each vertex has a weight value. Start
In fact, the difficulty of this question lies in the details of Large Numbers crossing the border, taking the remainder, and so on.
First, find the generic formula
n(2n+1)(n+1)(3n² +3n-1)/30
There are two ways to evaluate (a/B) % mod
1. Original
Http://www.notonlysuccess.com/index.php/alibaba/
For more information, see not .... The explanation, understanding, and discovery are almost the same as his code .....
The meaning of the question is very simple, segment update, and segment inquiry,
After more than two hours .... Actually, it's okay.
Calculate the volume intersection of at least three overlapping areas.
Discretization of the Z axis coordinates. For each height, record the bottom surface of the cube containing the height, and
Moderate simulated questions, various brute force Enumeration
Can be used to train code capabilitiesView Code
#include#include#includeusing namespace std;struct DD{char s[25];}dic[120];int cmp(DD a,DD b){return strcmp(a.s,b.s)}char query[100];char
Process the query offline, that is, record all the queries first.
Map the current value to a subscript using map. If the current value has been mapped before, cancel the record at the previous position in the tree array.
Add the current value to the
Take the code of the hotel question directly, and use stl to do other tasks.View Code
#include#include#includeusing namespace std;#define lson l,m,rt#define rson m+1,r,rtconst int maxn = 55555;int lsum[maxnstruct node {int l,r;bool operator return
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