solution set agc 037

「模拟赛」Solution Set

\(\text{heart}\) \(\text{Solution}\) 可以记 \(f(u)\) 为从 \(u\) 出发到某个点停止的方案数,\(f(u)\) 可以 \(O(n)\) 转移,显然复杂度为 \(O(n^2)\). 当前我们要转移 \(u\) 子树内,对于 \(v\in \text{s ......
模拟赛 Solution Set

Solution - Makoto and a Blackboard

Link。 朴素 dp 应该不用说了。放个用 map 的代码。 int dfs(int n, int k) { if (!k) return n; if (f[make_pair(n, k)]) return f[make_pair(n, k)]; int tot = 0, ans = 0; for ......
Blackboard Solution Makoto and

公告 & Solution - 公路旅行

以后应该会用 Obsidian 搭个博客,博客园可能会被弃用了。 为了有点价值放个不知道什么东西上来。 Link。 不会 T1!原来用到了神秘的倍增!但是我写了一个申必二分,最坏 \(O(qn \log n)\),甚至不如暴力,我是🤡。 类似于 ST 表那样,\(f_{i, j}\) 表示从 \( ......
Solution 公路 公告 amp

浅谈JVM Instruction Set (Opcode)

浅谈JVM Instruction Set (Opcode) 1. 背景 日常开发中,遇到一个潜藏bug的java代码,借此简单回顾一下JVM Instruction Set (Opcode)知识。 问题demo代码如下: public class BugDemo { public static v ......
Instruction Opcode JVM Set

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

使用 npm config set script-shell 实现跨平台的脚本执行需求

npm config set script-shell C:\\app\\Git20180223\\bin\\bash.exe 这个命令的准确含义是设置npm的脚本(shell)执行环境为"C:\app\Git20180223\bin\bash.exe"。这个命令用于修改npm的配置,具体来说,它修 ......
script-shell 脚本 需求 config script

[题解]AT_abc328_f [ABC328F] Good Set Query

思路 带权并查集模板。 如果对于一个三元组 \((a,b,c)\) 如果它能够添加到 \(S\) 中一定满足如下条件中的一条: \(X_a,X_b\) 满足其中有一个是「不确定」的。在这里 ......
题解 328 AT_abc Query 328F

当类中一个属性只有get()方法而无set()方法时,该属性是无法进行赋值的,连构造方法中的初始化都不行

执行以下程序,输出结果为() class Phone{ constructor(price){ this.price = price; } get price(){ return 999; } } var p = new Phone(888); console.log(p.price); A 999 ......
方法 属性 只有 get set

Set a Light 3D Studio: 创造逼真光线效果,轻松拍摄 mac/win版

Set a Light 3D Studio mac/win版是一款功能强大的3D摄影棚模拟布光软件,它为用户提供了一个全方位、真实的摄影棚环境,以及各种专业的布光工具和功能,让用户能够轻松地模拟并创造出各种光线效果。 →→↓↓载set.a.light 3D STUDIO 首先,Set a Light ......
光线 效果 Studio Light Set

JAVA Set集合的深拷贝

之前在做统计的时候,用到Set集合,存储到Map中,但是因为是浅拷贝,导致数据错误问题。这里记录下如何深度拷贝Set 关于浅拷贝和深拷贝的的问题,请参考另一篇文章《JAVA 的深拷贝和浅拷贝》 简而言之:深拷贝是完全创建一个新的对象,是一个全新的对象。而浅拷贝仅仅复制所考虑的对象,而不复制它所引用的 ......
拷贝 JAVA Set

husky——The '.husky/pre-commit' hook was ignored because it's not set as executable

前言 系统:mac hint: The '.husky/pre-commit' hook was ignored because it's not set as executable. hint: You can disable this warning with `git config advic ......
husky executable pre-commit 39 because

Convex Sets

1. Affine and convex sets 1.1 Affine sets ​ A set \(C\in\R^n\) is affine if the line through any two distinct points in \(C\) lies in \(C\), which mea ......
Convex Sets

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

JavaSE day05【泛型,数据结构,List接口,Set接口】测评题

选择题 题目1(单选): 查看下列代码,选出正确的传参( ) public class Test2 { public static void main(String[] args) { ArrayList<Integer> list1 = new ArrayList<Integer>(); Arra ......
接口 数据结构 结构 数据 JavaSE

JavaSEday05 泛型,数据结构,List,Set集合

javSE day05 泛型,数据结构,List,Set 今日目标 泛型使用 数据结构 List Set 1 泛型 1.1 泛型的介绍 泛型是一种类型参数,专门用来保存类型用的 最早接触泛型是在ArrayList,这个E就是所谓的泛型了。使用ArrayList时,只要给E指定某一个类型,里面所有用到 ......
数据结构 JavaSEday 结构 数据 List

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

Set接口

......
接口 Set

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

Set&List&Map

Map 概述 An object that maps keys to values. A map cannot contain duplicate keys; each key can map to at most one value. Map将key映射到value; Map的key不能重复,每个 ......
amp List Set Map

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