solution 034f agc

AGC041D-Problem Scores 题解

题目链接 luogu atcoder 分析 令 \(k=\left \lfloor \frac{n}{2} \right \rfloor\) 对于第三个条件,只需要满足 \(\sum_{i=1}^{k+1}a[i]<\sum_{i=n-k+1}^{n}a[i]\) 即可 有一个 \(trick\): ......
题解 D-Problem Problem Scores AGC

AT AGC043C - Giant Graph - 总结

AT AGC043C - Giant Graph 因为 \({(10^{18})}^{x+y+z}\) 的底数很大,所以我们贪心的选择 \(x+y+z\) 大的点是存在正确性的。那么我们从小点向大点连有向边,形成 DAG 后,对于一个点,如果它指向的点都没有被选取,那么选择它,否则不选。 我们发现这 ......
Giant Graph 043C AGC 043

solution-CF1615F

LEGOndary Grandmaster https://www.luogu.com.cn/problem/CF1615F 神题!看到题解一眼就知道自己大概率想不出来了。 主要还是积累两个套路: Trick 1 考虑将原序列的奇数位位置上的数取反,惊讶地发现操作简化为了每次交换相邻两个数。显然地, ......
solution-CF solution 1615 CF

[Luogu NOIP 2023 模拟] Solution

这篇 blog 在我的博客后台躺了好几天了,只不过今天才记起来发。 种树 (plant) 首先看到因数个数,想到在质因数分解后的序列上考虑问题。进一步观察,每个不同质因子的贡献是独立的。 也就是说,我们单独考虑某一个质因子对答案的贡献,是这样的问题: 给长度为 \(n\) 的序列 \(a\) 和一个 ......
Solution Luogu 2023 NOIP

AGC063B

题意 通过不断在某个位置添加 \((1,2,\dots ,k)\) 所形成的序列称为可生成的。求给定序列有多少区间是可生成的。 分析 我们把一个可生成的序列看成很多依次加一的区间 \((x,x+1,\dots,y)\) 构成的,很明显发现,对于每一个区间,总是满足前面有一段的结尾是 \(x-1\) ......
063B AGC 063

Solutions of Soil Salinization

Soil salinization prevention bases on avoiding excessive salt penetration. Even though plants require a certain amount of salts to develop, their need ......
Salinization Solutions Soil of

The solution of soil erosion

Solution of soil erosion (1) Engineering measures: building terraces, damming and silting land, using earthwork and concrete works, fish scale pits, e ......
solution erosion soil The of

AT_agc057_e 题解

AT_agc057_e [0] 约定 \(r_i = \sum\limits_{j = 1}^{m}[A_{i,j}\le k]\) \(r^{'}_i = \sum\limits_{j = 1}^{m}[B_{i,j}\le k]\) \(c_j = \sum\limits_{i = 1}^{n} ......
题解 AT_agc 057 agc AT

solutions to soil salinisation

1. Test soil for electrical conductance (EC).Salt raises the EC. 2. Make a site-specific management plan.Test for EC in zones radiating out from the b ......
salinisation solutions soil to

A solution to land sailnization

Biologically improved saline-alkali land is barren and soil fertility is poor. Therefore, in the process of transformation, it is an important measure ......
sailnization solution land to

Precise Temperature Control Solutions

Multi-span Temperature Controllers Provide high-performance multi-span temperature controllers to control temperatures across multiple zones or setpoi ......
Temperature Solutions Precise Control

Solutions to desertification

As global temperatures rise and the human population expands, more of the planet is vulnerable to desertification, the permanent degradation of land t ......
desertification Solutions to

A solution to desertification

What is desertification? Desertification, the process by which natural or human causes reduce the biological productivity of drylands (arid and semiar ......
desertification solution to

A solution to soil erosion

A specific measure to cope with soil erosion is to increase vegetation cover in China. How it works and its impact : Firstly, vegetation is the first ......
solution erosion soil to

A solution to soil erosion

A special measure to cope with soil erosion is to increase vegetation cover in China. Vegetation is the first barrier to protect land from outside. Ta ......
solution erosion soil to

Bioremediation Technology—— A Solution to Soil Pollution

Bioremediation Technology for Soil Polution 1. What is bioremediation technology? Bioremediation is a natural process based remediation technology for ......

AT_agc034_e Complete Compress

原题链接 这里是用 set 实现的换根 DP,时间复杂度 \(O(n\log n)\)。 记 \(siz_x,g_x,f_x\) 分别为 \(x\) 及其子树中有多少个关键点,所有关键点到 \(x\) 的距离和,将关键点尽可能两两向上合并后到 \(x\) 的距离和(我愿意理解为是将 \(g_x\) ......
Complete Compress AT_agc 034 agc

some solutions for deforestation

Deforestation is a serious problem facing our planet,and it is critical that we find ways to solve it.Forests play a vital role in our ecosystem,provi ......
deforestation solutions some for

AGC014E

居然自己想出了 AGC E。 首先考虑删边再加红边的本质是什么。容易发现,如果一条目标树上的边当前还没有被加上,且这条边所连两点在原树上的路径被切断,则此时一定无解。因为不管怎么加删边,这都是一棵树,而此时两点路径上一定有红边。 所以,我们就可以得到此时可以新增一条边 \((u,v)\) 的条件:路 ......
014E AGC 014

AGC034E

虽然做法大致相同,但是本篇题解将会讲述如何想出正解,分享我的思路。望通过。 首先看到题目,容易想到一个简单很多的情况:在一条链上,且终点确定。此时就可以把终点两边的点分开,分别计算到终点的距离之和,看是否相等即可。 没有确定终点时,枚举一个终点即可。 考虑将这种做法带入本题。先 \(O(n)\) 枚 ......
034E AGC 034

The solution of P5339

problem 容斥好题,结果题解里面一堆 \(\text{NTT}\)。 如果我们去掉有多少个人喜欢什么东西的条件,那么这个题就直接枚举有 \(i\) 组同学会一起讨论蔡徐坤。这一个问题十分容易。 使用容斥原理来做,然后容斥的系数是 \((-1)^i\) 想必这个东西对于大家来说是十分简单的。 如 ......
solution P5339 5339 The of

The Solutions of Ocean Trash

10 Things You Can Do to Save the Ocean 1. Mind Your Carbon Footprint and Reduce Energy Consumption Reduce the effects of climate change on the ocean b ......
Solutions Ocean Trash The of

The Solutions of Ocean Trash

Everyone can do something to help solve the plastic pollution problem, and millions of people worldwide are already taking action to reduce their plas ......
Solutions Ocean Trash The of

AGC027E ABBreviate

涉及知识点:DP 前言 可能是最简单的解法了。 这种做法太巧妙了,也启发了我们一些其他的类似二元字符串的问题。 题面 Link 给你一个 \(n\) 个字符的字符串 \(s\),该字符串只由小写字母 \(a\) 和 \(b\) 组成,你能进行如下两种操作: 将子串 aa 替换为 b。 将子串 bb ......
ABBreviate 027E AGC 027

[AGC030C] Coloring Torus 题解

非常巧妙的一道构造题,发现对于所构造的 \(n\) 有上限,那么对于 \(K<=500\) 的情况,很好构造,每行全是一个数就行了,对于 \(K>500\) 的情况,显然每行都是 \(1,2,...,n\) 的循环同构构造就行了,也可以理解是斜着填,然后对于剩下的 \(K-500\) 个数,每次选择 ......
题解 Coloring Torus 030C AGC

CF390B Inna, Dima and Song Solution

转裁自我的洛谷博客 :https://www.luogu.com.cn/blog/653832/solution-cf390b 题目传送门 思路: 如果 $b_i \le 1$ 则无解。 如果 ceil((double)b[i]/2)>a[i],即最好情况下,两个人的音量平均,但是较大的音量还是大于 ......
Solution 390B Inna Dima Song

Viper —— configuration solution for Go

1. support several formats of configuration config.yaml name: 'bobby' port: 12334 main.go to quick start package main import ( "fmt" "github.com/spf13 ......
configuration solution Viper for Go

AGC046C

这是一种 dp 状态不那么抽象的组合数做法。但是很复杂,仅供参考。 经过思考后发现,我们可以将字符串串按零的位置割开并分成若干个子串,设 \(a_i\) 表示第 \(i\) 个子串中 \(1\) 的个数(子串长度),这样就能转化为每一次操作将后面的一个数减 \(1\),前面的一个数加 \(1\),求 ......
046C AGC 046

Solution to OpenSSL Connection Problems With Github

Problems Uploading Files with Git Sometimes we can use git tool to successfully upload projects to Github, but in other time especially after a period ......
Connection Solution Problems OpenSSL Github

题解 AGC034D【Manhattan Max Matching】

题解 AGC034D【Manhattan Max Matching】 problem 在一个二维坐标系内,点 \((RX_i,RY_i)\) 上有 \(RC_i\) 个红球,点 \((BX_i,BY_i)\) 上有 \(BC_i\) 个蓝球,且保证 \(\sum_{i=1}^{n}RC_i=\sum ......
题解 Manhattan Matching 034D AGC