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
Title Link: Turing Tree
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
Posted by Zippyaus on Fri, 11 Feb 2022 00:17:29 +0100
2022 Niuke winter vacation algorithm basic training camp 2_ACM/NOI/CSP/CCPC/ICPC algorithm programming high difficulty practice competition_ Ox guest competition OJ
A - furnace stone of Xiaosha
B - little sand's magic
D-coloring of small sand
E-xiaosha's long road
F-calculation of small sand
G-xiaosha's body m ...
Implementation, connection and difference of prim & Dijkstra & Floyd algorithm && using Floyd algorithm to find sub short path
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
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
Probability & expectation
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
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;
Posted by ceanth on Wed, 19 Jan 2022 20:18:48 +0100
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
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