Luogu P3806 [template] point divide and conquer 1

Topic background Thank you for hzwer's point divide and rule mutual test. Title Description Given a tree with n points Ask if there is a point pair with a distance of k on the tree. I / O format Input format:   n. M next n-1 edges a,b,c describe that a to b have a path of length c Next line m asks a K for each line   Output format: ...

Added by king.oslo on Mon, 04 May 2020 17:25:37 +0300

BZOJ 1001 [BJOI 2006] wolf catches rabbit

BZOJ questions On this topic, Jin commemorates the first step of blogger's sprint to provincial election   Take a look, isn't this the bare minimum cut? Min cut = = max flow; Then 5 minutes code ISAP; Hand it in... TLE... Muddle And then a wave of optimization constants without eggs (go to 1e6 fucking points, 3e6 sides!!!)   Asked Du Niang, onl ...

Added by Wien on Thu, 30 Apr 2020 23:22:45 +0300

Member Pointer and mem_fn

This article is <function>series Article 4. The member pointer is a very C++ feature.Lower-level languages (such as C) have no classes and no concept of members; higher-level languages (such as Java) have no pointers, and even if there are, there won't be anything as awkward as member pointers. Last time you saw a question on Stack Overfl ...

Added by Terriator on Thu, 23 Apr 2020 07:12:52 +0300

freecplus framework - directory operation

1, Source code description Freecplus is a C/C + + open source framework under Linux system. Please go to the C language technology network (www.freecplus.net) to download the source code. This article introduces the directory operation functions and classes of freecplus framework. The declaration file for functions and classes is freecplus / 6 ...

Added by GrexP on Mon, 20 Apr 2020 19:45:17 +0300

freecplus framework - load parameter file

1, Source code description Freecplus is a C/C + + open source framework under Linux system. Please go to the C language technology network (www.freecplus.net) to download the source code. This paper introduces the method of loading parameter file in freecplus framework. The declaration file for functions and classes is freecplus / 65124; freec ...

Added by natbrazil on Mon, 20 Apr 2020 19:41:01 +0300

Detailed description of C++ classes

Examples of Super Girls have been playing for a long time. To learn from them and leave them temporarily, I will use examples of actual project development to explain more about classes. File operations have been learned in the C language basics. In practice, in order to improve efficiency, I will encapsulate file operations into a class with ...

Added by bensonang on Sat, 18 Apr 2020 20:10:10 +0300

April 12, 2020 individual competition

A - Balloons Meaning: the meaning of this question is relatively simple. In short, it is to divide the numbers so that the sum of the numbers obtained by A is greater than the sum of the numbers obtained by B, and then output the subscript of the numbers distributed to A. Question solution: pay attention to the special judgment of n==1 and n==2 ...

Added by optimus on Sat, 18 Apr 2020 15:57:21 +0300

Polymorphism mechanism in c + +

Catalog 1. Background 2. Introduction to polymorphism 2-1 what is polymorphism Classification of 2-2 polymorphism 2-3 conditions of dynamic polymorphism 2-4 static and dynamic coupling 2-5 realization principle of dynamic polymorphism 2-6 virtual destructor 2.7 thinking about virtual function 2.8 pure virtual function, abstract class, interface ...

Added by bibby on Mon, 06 Apr 2020 03:02:24 +0300

Use of classes (classes and objects, constructors and destructors)

Recent Studies on Classes and Objects I'm good at rowing. I didn't listen to classes. It's harmful, so it's a bit cloudy. So write this blog to understand.   The use of a class is like encapsulating something, defined as a class The place and structure defined are actually a little similar. It doesn't feel like much in the algorithm. Never touc ...

Added by Ting on Sun, 05 Apr 2020 22:59:27 +0300

BZOJ1087: [SCOI2005] mutual noninvasive King (DP)

Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 5168  Solved: 3006[Submit][Status][Discuss] Description Put K kings in the N × N chessboard so that they don't attack each other. How many kinds of placement schemes are there. The king can attack it up and down, left and right, and up and leftThere are 8 squares near each of the eight d ...

Added by olivarespablo on Sun, 05 Apr 2020 14:10:51 +0300