SDNU_2020Shenyang_Qualification problem solution
C Gym - 102822D
analysis: The answer is monotonous and can be divided into two points. Then the focus is on the writing of the judgment function. Let's assume that the answer is X. because this question needs to reduce the bomb by - 1 before it explodes, it's very awkward. Let's first consider the case that the bomb explodes when it reaches 0. ...
Posted by jhuaraya on Fri, 18 Feb 2022 07:42:23 +0100
[unofficial solution] 2022 Niuke winter vacation algorithm basic training camp 5
2022 Niuke winter vacation algorithm basic training camp 5_ACM/NOI/CSP/CCPC/ICPC algorithm programming high difficulty practice competition_ Ox guest competition OJ
catalogue
A-vaccine children
B-ping Pong children
C-chess kid
D-digital children
E-resuscitation child
F-flying child
G-163 children
H-163 children
I-bunny child
J-childr ...
Posted by hothientuan on Thu, 17 Feb 2022 14:03:24 +0100
Turing Tree (offline query + segment tree / tree array or chairman tree)
Title Link: Turing Tree
General meaning
There is a sequence of length n, numbered from 1 to n, and each position has an element value
Query: multiple queries, the sum of elements after de duplication in each query [l, r]
Problem solving ideas
Offline query + segment tree / tree array or chairman tree
Acacia topic recommendation
Solution ...
Posted by Zippyaus on Fri, 11 Feb 2022 00:17:29 +0100
[unofficial solution] 2022 Niuke winter vacation algorithm basic training camp 2
2022 Niuke winter vacation algorithm basic training camp 2_ACM/NOI/CSP/CCPC/ICPC algorithm programming high difficulty practice competition_ Ox guest competition OJ
catalogue
A - furnace stone of Xiaosha
B - little sand's magic
C-xiaosha's kill
D-coloring of small sand
E-xiaosha's long road
F-calculation of small sand
G-xiaosha's body m ...
Posted by TFD3 on Mon, 31 Jan 2022 06:42:34 +0100
Implementation, connection and difference of Prim & Dijkstra & Floyd algorithm && using Floyd algorithm to find sub short path
Implementation, connection and difference of prim & Dijkstra & Floyd algorithm && using Floyd algorithm to find sub short path
catalogue
Prim & Dijkstra L & Floyd, these algorithms are actually a handsome group, that is, the data structure class is too disgusting (I know everything), and I don't really realize the b ...
Posted by frosty1433 on Sun, 30 Jan 2022 14:12:19 +0100
Codeforces Round #767 (Div. 2) (Updated)
title : Codeforces Round #767 (Div. 2) date : 2022-1-23 Tags: ACM, practice notes author : Linno
Title link: https://codeforces.com/contest/1629
Test progress: 4/7
A-Download More RAM
Give you the initial memory capacity k and n expansion packs. If your current memory is larger than the expansion pack's requirement ai, you can increase th ...
Posted by bidntrade on Sun, 23 Jan 2022 03:08:18 +0100
Introduction to probability expectation
Probability & expectation
Basic questions
1
1
Meaning:
You are in a maze with n fans in front of you, and each door has a number k;
If k is positive, you can walk through this door for k minutes,
If it is negative, go through this door for -k minutes and return to the maze;
The probability of going through each door is the same Ask ...
Posted by alecjw on Thu, 20 Jan 2022 07:55:41 +0100
KMP algorithm (string matching problem) acm winter vacation training diary 22 / 1 / 19
First, let's look at an example:
If we don't consider overtime, we can use the most simple method (violence) to solve it
//Violence algorithm (n*m)
int ViolentMatch(char *s,char *p)
{
int sLen = strlen(s);
int pLen = strlen(p);
int i = 0;
int j = 0;
while(i<sLen&&j<pLen)
{
if(s[i]==p[j])
{
i++;
j++;
}
...
Posted by ceanth on Wed, 19 Jan 2022 20:18:48 +0100
[beginner's line segment tree, this article must be right] line segment tree (single point modification and interval modification) acm winter vacation training diary 22 / 1 / 10
Segment tree
Segment tree is a data structure commonly used to maintain interval information in algorithm competition. It is a basic and important data structure that an ACMer needs to master. The segment tree can realize single point modification, interval modification, interval query (interval summation, interval maximum value, minimum value ...
Posted by bnownlater on Mon, 10 Jan 2022 15:36:12 +0100
[Codeforces]Hello 2022(A-C) problem solution
Better reading experience: http://www.abmcar.top/archives/codeforceshello2022 Complete source code: https://github.com/abmcar/ACM/tree/master/OpenjudgeNow/Codeforces/Hello%202022 Tip from the front row: the questions in this field are very disgusting and are not recommended
A. Stable Arrangement of Rooks
Main idea of the topic: give you a bo ...
Posted by JackSevelle on Thu, 06 Jan 2022 15:20:18 +0100