2021 ICPC Kunming m stone games (persistent weight segment tree)

2021 ICPC Kunming m stone games (persistent weight segment tree) At that time, I just looked at it and felt it was a line segment tree, but I couldn't write it. Now let's make up for it Main idea of the title: Give you a sequence of 1e6 in length, a (a [i] < = 1e9), and q (q < = 1E5) times. Each time, ask the interval l,r, and ask the ...

Added by Ghostu on Wed, 09 Mar 2022 11:23:44 +0200

Codeforces round #772 (Div. 2)

Source code: ACM/OpenjudgeNow/Codeforces at master · abmcar/ACM (github.com) Better reading experience: Jump coordinate A. Min Or Sum Main idea of the title: Idea: A + b > = a | B, we can replace a and B with 0,a|b. in this form, finally, we can replace the array with several zeros and an array | and The final sum is the array | an ...

Added by haydndup on Tue, 08 Mar 2022 05:08:28 +0200

[historical legacy] there are also records: HDOJ - brush questions md

HDOJ travel [by_041] There was once a preface catalogue ACM Steps Chapter One - phase 1 Section One - basic input and output It is a summary of the input and output of the classic ACM competition P1089: multiple groups of data, one group occupies one line, with two numbers until the end of EOFWhile (CIN > > a ...

Added by dico on Thu, 17 Feb 2022 21:11:01 +0200

GDUT ACM2022 winter vacation training topic II D E (01 backpack)

For a better reading experience, please go to: Paxton's little broken station 1, 01 Backpack 01 backpack is to take out several items from M items and put them in a backpack with space W. the volume of each item is W1, W2 to Wn, and the corresponding value is P1,P2 to Pn. 01 knapsack is the simplest problem in knapsack problem. 01 the ...

Added by Bijan on Sat, 12 Feb 2022 09:00:17 +0200

Deep first search (DFS), read this article is enough.

1, Definition: The idea of depth first search is very similar to the pre order traversal of the tree. The following is the definition on Baidu Encyclopedia: The method of depth first traversing the graph is to start from a vertex v in the graph: (1) Access vertex v; (2) Starting from the unreachable adjacency points of v, the depth of ...

Added by Ali_baba on Fri, 11 Feb 2022 11:22:00 +0200

acwing-358. Island (base ring tree dp)

You are going to visit a park, which is composed of N islands. The local management department has built a bridge from each island to another island. You can walk in both directions without crossing the bridge. At the same time, there is a dedicated ferry between each pair of islands. You prefer walking to taking a boat. You want the total l ...

Added by Gary Tactic on Wed, 02 Feb 2022 22:49:04 +0200

2020 Jiangsu Collegiate Programming Contest-A.Array

Array Title Description Yukikaze received an array (a1,a2,⋯an)as a gift. She decided to play with it. The game consists of q turns. In each turn, she will perform some kind of operation (listed below) on all elements in a subarray of a. In this problem, we define that 00=1. Since the result of operations of the last two kinds may be large ...

Added by phpcat on Fri, 28 Jan 2022 20:55:53 +0200

CDZSC_2022 winter vacation individual training competition level 21

Today is our favorite math field Simple A C D E Medium B F G Difficulty H Strange, I think it's very difficult. H has passed so much and G is so simple that no one has passed. It's a shock that so much is true. A A Very Hard Question Gym - 101502A meaning of the title Give you the number y of oranges and the price increase x. ask how many ora ...

Added by nomo1994 on Thu, 27 Jan 2022 12:29:38 +0200

CF Round 765 Div2 problem solution

Question A Ancient Civilization There are \ (T(1\leq T \leq 100) \) groups of data. Define \ (\ operatorname{d}(x,y) \) as the distance between the number of \ (x,y \), and the value is the sum of the number of different positions under binary. (for example \ (10010)_ 2 \) and \ (01011)_ 2 \), the distance between the two numbers is 3). Now, w ...

Added by melqui on Wed, 19 Jan 2022 03:29:12 +0200

Codeforces Round #734 (Div. 3)

Hello, everyone, what I bring to you today is Codeforces Round #734 (Div. 3) Explain the whole topic. Link to this article: https://www.lanqiao.cn/questions/204012 Thank Lqyk students of blue bridge cloud class for their solutions. A. Polycarp and Coins Title Link https://codeforces.com/contest/1551/problem/A General idea of the topic ...

Added by MnM333 on Wed, 12 Jan 2022 09:50:43 +0200