Question Link
Question:
Give N number, n
Ideas:
Open an array pos. Pos [x] indicates the position where x appears. The array is initialized to-1.
Use the start variable to record the start point of the current enumeration sequence.
only Merge Sorting needs to be modified.
# include
# include
# include
# define infinite 1000 using namespace STD; int COUNT = 0; void input (vector
& V) {cout
data) v. push_back (data);} void
# Include # include # include using namespace STD; void input (vector & V) {cout data) v. push_back (data);} void output (const vector & V) {for (vector : const_iterator iter = v. begin () + 1; iter! = V. end (); ITER ++) cout & V, int
Obtain the child array equal to or greater than 60 from the array {10, 20, 30, 40, 50, 60.
Boolean vectors such as {0, 1, 0, 0} are used to represent the results.
# Include # include # include using namespace STD; bool validorder (vector ::
Question link:
Http://uva.onlinejudge.org/index.php? Option = com_onlinejudge & Itemid = 8 & category = 456 & page = show_problem & problem = 4081
Good question! I have to say that greed is really strong and ever-changing...
1. Binary answer P. If
Question link:
Http://uva.onlinejudge.org/index.php? Option = com_onlinejudge & Itemid = 8 & category = 460 & page = show_problem & problem = 4076
I have done a one-dimensional problem before. This problem is only two-dimensional, and other methods
Question Link
1. The coordinate value is relatively large, so the discretization coordinates
2. The absolute value of coordinates cannot exceed 10 ^ 9, indicating that there may be negative numbers. Therefore, convert all coordinates to positive
Question link:
Http://uva.onlinejudge.org/index.php? Option = com_onlinejudge & Itemid = 8 & category = 460 & page = show_problem & problem = 1696
The idea is the same as that of the two-dimensional largest submatrix, but it is changed to
Question link:
Http://uva.onlinejudge.org/index.php? Option = com_onlinejudge & Itemid = 8 & category = 461 & page = show_problem & problem = 1476
Question:
A person is holding a laser gun and standing at the coordinates (x, y). There are n walls
From http://blog.csdn.net/shuangde800
Link: poj-1947
Question
To a tree, ask at least a few sides to delete, so that the number of nodes in the remaining subtree is P.
Ideas
I read this question a few days ago, but I have no idea. I think about it
Link:
Http://uva.onlinejudge.org/index.php? Option = com_onlinejudge & Itemid = 8 & category = 456 & page = show_problem & problem = 4098
The example in Liu rujia's book (Training Guide P6.) is very good, especially the method for generating the
Link:
Http://uva.onlinejudge.org/index.php? Option = com_onlinejudge & Itemid = 8 & category = 456 & page = show_problem & problem = 3708
Ideas:
First, the rootless tree is converted into a rootless tree with s points as the root.
Then, we start to
Link:
Http://uva.onlinejudge.org/index.php? Option = com_onlinejudge & Itemid = 8 & page = show_problem & problem = 2459
Ideas:
This is because the question is not well understood. I thought it was necessary to make the sum of the nine numbers
Question link:
Http://uva.onlinejudge.org/index.php? Option = com_onlinejudge & Itemid = 8 & category = 460 & page = show_problem & problem = 4072
Question:
Select as many strings as possible for a string consisting of n upper-case letters, so that
# Include # include # include using namespace STD; int main (INT argc, char * argv []) {vector array; int data; while (CIN> data) {array. push_back (data);} For (INT I = 1; I = 0 & array [I] = J + 1; -- N) {array [n + 1] = array [N];} array [J
# Include # include # include using namespace STD; void init_v (vector & V) {v. push_back (0);} void add_elem (vector & V, int data) // Add element {v. push_back (data); int child = v. size ()-1; int parent = Child/2; while (parent! = 0 & V
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