CSP201803-4 chess game evaluation

Problem description Alice and Bob are playing jigsaw.The rules of Jingzi chess game are simple: two people take turns to put pieces on the 3 * 3 board, Alice puts "X", Bob puts "O", and Alice holds the lead. When the same piece occupies three squares of a row, a column or a diagonal, the game ends and the holder of the piece ...

Added by Sander on Fri, 27 Dec 2019 16:43:51 +0200

What is the smart pointer of c/c + + standard library

What is the smart pointer of standard library 1, Why is there a smart pointer??? c + + programmers need to deal with their own dynamic development of memory, once they forget to release, memory will leak. Smart pointers can help programmers "free up" their own memory. 2, Where do you see intelligence??? int *p = new int(11); auto_ptr& ...

Added by akillez on Thu, 26 Dec 2019 00:11:02 +0200

c + + - pure virtual functions and abstract classes

Pure virtual functions and abstract classes C Oriented Interface Programming and C polymorphism Function type syntax Foundation Analysis of the idea of function pointer as function parameter (callback function) Two ways to use function pointer as function parameter (forward call and reverse call) Pure virtual function abstract class Basic ...

Added by davitz38 on Sun, 22 Dec 2019 16:06:24 +0200

BZOJ4552: [Tjoi2016&Heoi2016] sorting (line tree bisection)

meaning of the title Title Link Sol Divine binary Orz First of all, the answer is divided into two parts, i.e. if the location of the inquiry is $x $, the one with $> = x $is regarded as $1 $, and the one with $< x $is regarded as $0$ Simulate the formed $0 / 1 $sequence and maintain the line tree. Finally, narrow the range of answers acc ...

Added by noisyscanner on Sat, 21 Dec 2019 18:36:05 +0200

[Beginner to Taurus Road 7] Switch Background Management for Multiple User Account Logins

Project Requirements Implement multiple accounts Project implementation #include <stdio.h> #include <string.h> int main(void) { // Define variables to represent user names and passwords char name[32]; char password[16]; FILE *file; //Defines a file pointer variable whose name is file char line[128]; char n ...

Added by Yaak on Sat, 21 Dec 2019 00:18:25 +0200

Nature Reserve (three points)

meaning of the title Title Link Sol I want to cry without tears.... Last night, it must have been Zhixi. qwq Say something different from the standard calculation.. Obviously, the \ (x \) axis can be divided into three parts and the radius can be divided into two parts. Congratulations on getting a TLE.. Then the second two-dimensional bisectio ...

Added by rwwd on Thu, 19 Dec 2019 22:48:08 +0200

C + + basic inline default parameter function occupation parameter function overload

1. inline function Inline functions are used to replace macros, Example: Among them, macro and + + have side effects. #include "iostream" using namespace std; #define MYFUNC(a, b) ((a) < (b) ? (a) : (b)) inline int myfunc(int a, int b) { return a < b ? a : b; } int main() { int a = 1; int b = 3; //int c = myfunc(++a, ...

Added by Leadwing on Sun, 15 Dec 2019 20:25:06 +0200

[SDUT] [linked list] 2120 - linked list 5 of data structure experiment: split of single linked list

Problem Description Input N integers to build a single chain table, and split the single chain table into two sub lists. The first sub list stores all the even numbers and the second sub list stores all the odd numbers. The relative order of data in the two sub linked lists is consistent with the original linked list. Input Enter the integer N ...

Added by altexis on Tue, 10 Dec 2019 19:16:19 +0200

Boost.Asio Source Reading: Organization Structure

(This article is based on Boost 1.69)Boost.Asio code style.Asio divides the declaration and implementation of some of the more complex classes into two header files for readability, and include s the header file of the implementation at the end of the header file of the declaration.The impl folder contains header files for these implementations ...

Added by KDesigns on Tue, 10 Dec 2019 16:44:16 +0200

Luogu P1600 days Tianai running (differential LCA barrels)

meaning of the title Title Link Sol Think step by step \(25 \% \): direct \ (O(nm) \) violence Chain case: maintain two differential arrays, representing left to right and right to left contributions respectively, \(S_i = 1 \): count the number of starting points in the subtree of each point \(T_i = 1 \): it is also the idea of difference. Sinc ...

Added by gavin101 on Mon, 09 Dec 2019 23:56:21 +0200