Bailian 4116 rescue action & & 4130 Saving Tang Monk&&4115 Naruto and Sasuke simple BFS search question summary and comparison
I
Bailian 4116 rescue operation( OpenJudge - 4116: rescue operations)
This problem is to add a guard on the basis of simple BFS. Killing a guard also needs + 1. Others can follow the idea of ordinary BFS as usual. The most important thing is that killing a guard can be regarded as a point after twice, so there is no need to deal with killing ...
Added by korion on Fri, 14 Jan 2022 15:16:34 +0200
P2962 [usaco09nov] lights G
P2962 [USACO09NOV]Lights G
Luogu
Source: P2962 [USACO09NOV]Lights G
Meaning:
Given n points, the initial value is 0, m undirected edges, operate one point at a time, change itself and the point 1 connected to itself into 0, 0 into 1, and ask the minimum number of operations, so that all are 1
Idea:
I think the bosses are written by Gaus ...
Added by sunil.23413 on Fri, 14 Jan 2022 15:02:10 +0200
C + + queue: static array implementation
Winter vacation is coming. Let's summarize what we learned this semester.
Not to mention the basic properties of queues, we mainly talk about the queue in and out operations in the implementation of static arrays and the most basic constructors.
catalogue
1, Main problems:
2, Code implementation:
2.1 overview:
2.2 constructor:
2.3 destru ...
Added by kye on Fri, 14 Jan 2022 13:54:32 +0200
JNI/NDK Development Guide -- C/C + + accessing Java instance variables and static variables
In the previous chapter, we learned how to access static methods and instance methods in any Java class in local code. In this chapter, we also learned how to access and modify instance variables and static variables in Java through an example. Static variables, also known as class variables (attributes), share the same data in all instance obj ...
Added by svan_rv on Fri, 14 Jan 2022 09:10:09 +0200
Apple svg parsing adaptive long graph
Analysis of IPhone12 adaptive long graph svg
Original link: https://mp.weixin.qq.com/s/S0fpT4JbdVvdKDXG5BemWw
reference resources: https://developers.weixin.qq.com/community/develop/article/doc/0000e8f0ba8a88b7522926d9251813
One of the key codes of long graph
!<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
&l ...
Added by KingOfHeart on Fri, 14 Jan 2022 08:20:24 +0200
Create singleton mode
Singleton pattern: ensure that a class has only one instance and provide a global access point to access it.
Singleton mode
1: What is a singleton
My understanding: during the running of the program, only one instance is constructed, and all users share and use the instance.
Singleton pattern: ensure that a class has only one instance and p ...
Added by chuckjones on Fri, 14 Jan 2022 05:51:22 +0200
Functions of C + + friend functions, friend classes and #pragma once
Put the code last
Function of friend function:
You can access the private properties of this class
But there is no "class" when defining outside the class:“
Therefore, the friend function does not belong to this class
Meaning of friend function:
c + + friend function_ Bussy's blog - csdn blog_ c + + friend function csdn
1 ...
Added by Brentley_11 on Fri, 14 Jan 2022 05:26:24 +0200
C language learning notes - sorting and searching
1. Introduction of sorting algorithm
Sorting is also called sort algorithm. Sorting is the process of arranging a group of data in a specified order
1.1 classification of sorting
(1) Internal sorting: refers to loading all data to be processed into internal memory (memory) for sorting
(2) External sorting: the amount of data is too la ...
Added by Zay on Fri, 14 Jan 2022 03:18:21 +0200
PAT basic level answer + problem solving ideas + difficulties (personal question brushing record)
PAT basic level
Language used: C++ Just record your experience in the process of brushing questions
Always updated (looking forward to a better solution) There may be some problems that haven't been solved (that is, I haven't done it yet, and it will be more difficult in the future!) Welcome to discuss with me √
1001 (3n+1) conjectu ...
Added by zevious on Fri, 14 Jan 2022 03:10:08 +0200
Asio source code analysis: C + + skills and optimization used by Asio
Asio source code analysis (2): C + + skills and optimization used by Asio
Asio uses some C + + skills and optimizations. You may be confuse d when reading the source code for the first time. This article first briefly introduces a small part of it for later analysis.
Use destructors to perform cleanup operations
Asio uses the object's de ...
Added by ethan.whitt on Fri, 14 Jan 2022 01:40:39 +0200