[supplementary diary] CF#748 Div.3
Pro
Codeforces Round #748 (Div. 3)
Sol
D2. Half of Same
I thought of the positive solution during the game, but it took more space than the positive solution, so I didn't write it out.
It's almost the same as D1, but it's not necessarily the smallest one. Therefore, the number of enumerations at each location should be the minimum.
Then s ...
Posted by TomNomNom on Fri, 15 Oct 2021 11:36:33 -0700
JS common sorting algorithms
Reprinted from https://www.cnblogs.com/AlbertP/p/10847627.html First, summarize the above figure
Bubble sorting
Idea: swap the largest number in the remaining array to the tail each time
function bubbleSort(arr) {
var len = arr.length;
for (var i = 0; i < len; i++) {
for (var j = 0; j < len - 1 - i; j++) {
...
Posted by roadkillguy on Fri, 15 Oct 2021 11:30:31 -0700
Go Data Structure and Algorithms - Queues
introduce
A queue is a special linear table. A queue allows data to be inserted at one end and retrieved at the other end, and the data in the queue follows the First In First Our (FIFO) rule. One end of the retrieved data is called the head of the queue, and the other end of the inserted data is called the end of the queue.
Queues can be div ...
Posted by davejj on Fri, 15 Oct 2021 09:25:47 -0700
CF#744 Div.3 & 2020 ICPC Shenyang Station
Pro
Codeforces Round #744 (Div. 3)
The 2020 ICPC Asia Shenyang Regional Programming Contest
Supplementary questions, not all questions, please see problem name
Sol
C. Ticks
Forgot to look at this question during the match and enumerate each one
∗
*
, see this
...
Posted by bobleny on Thu, 14 Oct 2021 10:58:10 -0700
C language learning review
This is a review of the C language online course in station B
The learning contents are simple circular statements and three algorithm problems of while and for
First, list the three exercises directly:
1. Find a number in an ordered array;
2. Write code to demonstrate that multiple characters move from both ends and converge to the middle ...
Posted by Immortal55 on Thu, 14 Oct 2021 01:04:20 -0700
Points in triangles, circles, rectangles
1, Round
Judge the distance from the point to the center of the circle, and then compare the distance with the radius of the circle. Less than is on the inside of the circle, equal to the edge of the re circle, greater than the outside of the re circle.
bool CScenes::IsPointInCir(CPoint point)//Point is a point from the outside
{
int dis,x,y ...
Posted by shivani.shm on Wed, 13 Oct 2021 22:46:42 -0700
On differential constraint
On differential constraint
It's still a difficult thing.
introduce
Consider a limitation
A
i
≤
x
i
+
...
Posted by zulx on Wed, 13 Oct 2021 21:54:10 -0700
Python 3 implementation and improvement of Apriori algorithm
Python 3 implementation and improvement of Apriori algorithm
Code reference machine learning practice The improved methods are partly from data mining: concepts and technologies, and partly from https://blog.csdn.net/weixin_30702887/article/details/98992919 I summarize and implement here, and record my learning of Apriori algorithm
First ...
Posted by narch31 on Wed, 13 Oct 2021 21:22:17 -0700
POJ topic training, initial stage and basic algorithm
Introduction
There's nothing to say. It's done. Feudal superstition belongs to yes
Knowledge points involved
Enumeration, violence, construction, simulation
subject
1753
Main idea of the title: omitted
Idea: I've done it before. The basic idea is search, but bitset should be used to optimize storage
code
#include <iostream>
# ...
Posted by able on Wed, 13 Oct 2021 20:54:50 -0700
Data structure -- Heap introduction and implementation example of Java code
Heap heap introduction
concept
Heap is a special tree based data structure, in which the tree is a complete binary tree. In general, there are two types of heaps:
Max heap large top heap: in Max heap, the key on the root node must be the largest of the keys on all child nodes. The same properties must apply recursively to all subtrees in the ...
Posted by Perfidus on Wed, 13 Oct 2021 20:02:44 -0700