[notes] P1330 block sunshine University

Easy to read: for two points \ (u,v \), only one point can block this edge. What do you mean? If the points on this graph are colored, then for the above two points \ (u,v \), \ (u,v \) must be different colors (it is important to understand this point). So, that is to say, in this picture, if we want to "completely block" this pictur ...

Posted by Residue on Fri, 14 Feb 2020 06:20:14 -0800

# Essential C++ Reading Notes #Chapter IV Object-based Programming Style

Fundamentals The definition of a Class consists of two parts: the declaration of the class and the body immediately following the declaration.The main part is enclosed by a pair of braces and ends with a semicolon.Two keywords within the principal, public and private, are used to denote "member access" for each block.Public member s c ...

Posted by Neoraven456 on Fri, 07 Feb 2020 19:44:53 -0800

C pointer (1) - Application of pointer in array (program explanation)

2-1. Definition of C array pointer: #include <stdio.h> int main() { char str[]="China Beijing Fujian"; //Define and initialize array str char *pstr; //Define pointer variable pstr pstr=&str[6]; //Initialize pstr and make the pointer variable pstr point to array str pr ...

Posted by skylark2 on Fri, 31 Jan 2020 00:23:43 -0800

Conversion of txt novel to mobi novel by using kindlegen (C + + implementation)

I always like to read novels on the kindle. The kindle doesn't hurt my eyes. It can also help control the time of playing mobile phones. But it's a headache to read the online novels in the format of txt on the kindle. Such novels have no catalogue on the kindle, and they are very long. So I always wanted to add a catalog. So there is this arti ...

Posted by Link on Thu, 30 Jan 2020 06:25:38 -0800

Lojා121. Connectivity of "off line transitive" dynamic graphs (segment tree divide and conquer)

meaning of the title The meaning of the question is very clear.. Sol It's obvious that you can go directly to LCT.. But this problem allows offline, so there is a very ingenious offline approach, like what is called line tree divide and conquer?? The position of each edge in this question can be regarded as an interval. We use line tree ...

Posted by imamferianto on Sun, 26 Jan 2020 09:41:29 -0800

[explanation] HDU-2222 Keywords Search

Title Link: HDU-2222 Or Vjudge Brief description: The establishment of ac automata, in which the insertion process uses the dictionary tree to deal with the backtracking array (also known as the failure array) process is a widely used STL queue. The process of ac automata is still in writing. This is the first question of learning ac automata. ...

Posted by madox on Sat, 25 Jan 2020 08:18:24 -0800

Design and write code for automatic fighting games.

1) Role class CRole is the base class: Constructor, destructor; Member variables: avatar, HP (blood volume), ATK (attack), DEF (defense), Lv (rank), EXP (experience value); Member function: Weapon attack, jump. 2) Hero CHero inherits from CRole class Constructor, destructor; The new skills of heroes, kicking (member function), hugging (member f ...

Posted by schme16 on Fri, 24 Jan 2020 08:20:46 -0800

Cool liver competition

For this competition, I really rowed a little bit. I did two questions. When I did the third question, I didn't know where I was stuck. Then my family came to the guests and was taken out for dinner. ε = ('ο ')) alas!!! B - Just Eat It! This problem is a classic DP problem. I'm not very familiar with recursion. I have to find th ...

Posted by richo89 on Sat, 18 Jan 2020 10:01:36 -0800

Pocket sky

Background of topic Xiaoshan sits in the classroom and looks at the pocket like sky through the pocket like window. There are a lot of clouds floating there. They look very beautiful. Xiaoshan wants to pick some clouds that are so beautiful and make them into marshmallows. Title Description Give you the number of clouds N, and then give you ...

Posted by Xzone5 on Sat, 04 Jan 2020 19:22:11 -0800

[BZOJ2059] Buying Feed

Problem surface John drove to town. He wanted to take V tons of feed home. If he has x tons of feed in his car, it will cost X^2 yuan per kilometer, and D* X^2 yuan for driving D kilometer. John can buy feed from n stores, all of which are on the same axis. The location of the ith store is Xi. The price of feed is Ci yuan per ton, and the stoc ...

Posted by BrianM on Sat, 04 Jan 2020 08:01:30 -0800