Codeforces Round #741 (Div. 2) (A~D2)

Competition link: Click here to transfer Link to official solution: Click here to transfer 1562A The Miracle and the Sleeper topic link: Click here to transfer Meaning: Given a range [ l , r ] ...

Posted by Daddy on Mon, 20 Sep 2021 05:48:00 -0700

C-libev Learning Notes-Event Library Source Read 6-API-ev_default_loop(),ev_init()

ev_default_loop() Declarations: EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; /* returns true when successful */ Author's note: /* the default loop is the only one that handles signals and child watchers */ /* you can call ...

Posted by seoreferrals on Mon, 20 Sep 2021 02:50:55 -0700

C language: library function simulation

preface We know that there are many library functions in C language, which play a very important role in our programming. Let's write several common library functions to further understand their internal working principle. Common library functions String function strlen The string length function is a function we often use. It will not ...

Posted by bibby on Sun, 19 Sep 2021 19:53:09 -0700

Chapter IV construction data type

The basic data type can handle some simple data alone. For some complex data, it needs to be described with structural data types. Construction data type is a data type defined by users according to certain syntax rules. The constructed data types supported by C + + language include array, pointer, reference, class, structure, union, enumeratio ...

Posted by ozman26 on Sun, 19 Sep 2021 16:49:24 -0700

Use priority_queue implements a small top heap timer

Timer module design 1 Introduction to timer module Timer module is a common component in the server. This paper takes you to implement a timer module with basic functions To design a Timer module, it generally includes two parts: one is the Timer object (Timer), and the other is the manager (TimerManager) who manages the Timer object (also k ...

Posted by batfink on Sun, 19 Sep 2021 13:36:22 -0700

✨✨✨ [C language] take you to brush questions in the shortest time (with problem-solving ideas and specific codes) and constantly update them ✨✨✨

🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷 🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷🐷 💚 BC23. Time conversion Description: Given number of seconds seconds (0< seconds < 100,000,000),Convert seconds into hours, minutes, and seconds Enter Description: One line, including an integer, that is, the given number of sec ...

Posted by shonuff on Sun, 19 Sep 2021 07:22:02 -0700

The 13th day of C + + Learning (object initialization and cleaning)

1. Object initialization (constructor) and cleanup (destructor) (1) Constructor: it is mainly used to assign values to the member properties of the object when creating the object. The constructor is automatically called by the compiler. (2) Destructor: it is mainly used to automatically call the system before the object is destroyed and perfor ...

Posted by Sj0wKOoMel on Sun, 19 Sep 2021 04:56:44 -0700

C + + learning notes 4: programming exercise 1

1. Write a C + + program that displays your name and address. //myPractice201.cpp -- programming practice, displaying your name and address #include <iostream> using namespace std; int main() { cout << "full name: Tom\n Address: beautiful country" << endl; return 0; } 2. Write a C + + program, which requires the user to ...

Posted by shyish on Sun, 19 Sep 2021 02:24:09 -0700

Learning notes of data structure, algorithm and application - C + + language description - priority queue - Zuo gaoshu

1, Zuo gaoshu The heap structure learned earlier is an implicit data structure. The heap represented by a complete binary tree is stored implicitly in an array (i.e. no explicit pointer or other data can be used to reshape this structure). Because there is no storage structure information, this representation method has high space utilizat ...

Posted by Kower on Sat, 18 Sep 2021 09:08:34 -0700

STL Unit 1 String container

1. string container 1.1 string concept Essence: String is a C + + style string, and string is essentially a class. The difference between string and char *: Char * is a pointer, string is a class, and char * is encapsulated inside the class. Managing this string is a char * type container. string manages the memory allocated by char *. The ...

Posted by redbrad0 on Fri, 17 Sep 2021 22:49:56 -0700