C + + self-study NOTE 2

#include using namespace Std;Class complex{Privateint rear;int imag;PublicComplex () {rear=0;imag=0;}Complex (int r, int i) {Rear=r;Imag=i;}Complex Complex_add (Complex &d) {Complex C; C.rear=rear+d.rear;C.imag=imag+d.imag;return C;}void print ();

Hdu1561The more, The Better tree dp

Hdu1561The more, The Better tree dp/*Dp [I] [j] indicates the maximum value obtained by j for the I node and Its subtree.There are multiple son nodes in node I, and the maximum value can be obtained only when several nodes are selected for each son

1501131824-blue bridge cup-algorithm training Torry confusions (basic type)

1501131824-blue bridge cup-algorithm training Torry confusions (basic type)Algorithm training Torry confusion (basic type) Time Limit: 1.0 s memory limit: 512.0 MBProblem description Torry loves mathematics from an early age. One day, the teacher

[C ++] LeetCode: 99 Longest Palindromic Substring (Longest echo Substring)

[C ++] LeetCode: 99 Longest Palindromic Substring (Longest echo Substring) Topic: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic

Graph write tree Uva-10562

Graph write tree Uva-10562 Approximate question: Converts a multi-Cross Tree into a bracket expression. Each node contains only "-", "|", and spaces. Each non-leaf node always has a "|" character at the front and bottom, followed by a row of "-"

HDU5159--BC -- Card (probability writing, and combination writing)

HDU5159--BC -- Card (probability writing, and combination writing) Probability Method Requirements and expectations, basic theorem of expectations, and expectations = expected and of each part. E (sum) = E (1) + E (2) +... + E (x ); The Probability

Ural 1073. Square Country full backpack

Ural 1073. Square Country full backpack 1073. Square CountryTime limit: 1.0 secondMemory limit: 64 MBThere live square people in a square country. everything in this country is square also. thus, the Square Parliament has passed a law about a land.

What is the angle of HDU2080 II?

What is the angle of HDU2080 II? How large is the angle IITime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission (s): 7676 Accepted Submission (s): 3858 Problem Description the Problem with xhd is that

FOJ 1319 Blocks of Stones [interval]

FOJ 1319 Blocks of Stones [interval] Blocks of Stones Description There are n blocks of stones in a line laying on the ground. now you are to merge these blocks of stones together with the restriction that you can only merge the neighbouring blocks

POJ 1459-Power Network (Network stream_maximum stream ISAP algorithm)

POJ 1459-Power Network (Network stream_maximum stream ISAP algorithm) Power Network Time Limit:2000 MS Memory Limit:32768 K Total Submissions:23724 Accepted:12401 DescriptionA power network consists of nodes (

HDU 1505 City Game

HDU 1505 City Game The question is to find the largest submatrix. Examples in the white book. If the upper-left corner of the brute-force enumeration is displayed, the length and width are the same. The time complexity is O (m ^ 3 * n ^ 3 ). You can

CMarkUp reads and writes XML and cmarkup reads and writes xml

CMarkUp reads and writes XML (for conversion) and cmarkup reads and writes xmlFast start to XML in C ++ Enough bull. you want to create XML or read and find things in XML. all you need to know about CMarkup is that it is just one object per XML

NOJ1601 several statistics hash simple application

NOJ1601 several statistics hash simple application Description In a scientific research survey, n natural numbers are obtained, each of which cannot exceed 1500000000 (1.5*109 ). It is known that the number of different numbers cannot exceed 10000.

POJ 2528 Mayor & amp; #39; s posters (discretization line segment tree)

POJ 2528 Mayor & #39; s posters (discretization line segment tree) DescriptionThe citizens of Bytetown, AB, cocould not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim.

Number of NYOJ full partitions

Number of NYOJ full partitionsTotal number of workers time limit: 6500 MS | memory limit: 65535 KB difficulty: 2 Description The given Integer Range [A, B] is used to query the number of full partitions. Input

HPUOJ1295 Nuclear Reactors

HPUOJ1295 Nuclear Reactors Nuclear reactor Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission (s): 10959 Accepted Submission (s): 4990 Problem Description there are two types of incidents in a nuclear

HDU 5074 Hatsune Miku (simple two-dimensional dp)

HDU 5074 Hatsune Miku (simple two-dimensional dp) Question: give you some connections between notes, give you a string, and let you find the maximum value of this string. -1 can be replaced randomly. In other cases, it must be the number of

Sgu-218 Unstable Systems

Sgu-218 Unstable Systems Question: Sasha is the administrator of a network composed of N computers. There are now N programs required to be assigned to these computers for running. Due to machine instability, each computer has an "error value" for

BZOJ 3856 Monster C ++

BZOJ 3856 Monster C ++ The question is: Give the monster's blood volume, the attack power of the character, the ability of the monster to return blood every round, and the character needs to take a break for several rounds, asking whether the

Binary Tree Postorder Traversal

Binary Tree Postorder Traversal       Given a binary tree, return the postorder traversal of its nodes 'values. For example:Given binary tree{1,#,2,3}, 1 2 / 3   Return[3,2,1]. Note: Recursive solution is trivial, cocould you do it

Total Pages: 5902 1 .... 4580 4581 4582 4583 4584 .... 5902 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.