adjacent 165f make arc

ARC162 题解

## A.Ekiden Race (450) 题意:$n$ 个人在进行往返跑比赛,其中第 $i$ 个人在回程前的排名是 $i$,总排名是 $p_i$,问有多少个人可能成为回程中跑得最快的人? 如果对于 $i$,存在某个 $j>i$,使得 $p_j<p_i$,那么 $j$ 在回程途中超过了 $i$,$ ......
题解 ARC 162

2712. Minimum Cost to Make All Characters Equal (Medium)

Description 2712. Minimum Cost to Make All Characters Equal (Medium) You are given a 0-indexed binary string s of length n on which you can apply two ......
Characters Minimum Medium Equal 2712

2712.minimum Cost to Make All Characters Equal

Description 2712. Minimum Cost to Make All Characters Equal (Medium) You are given a 0-indexed binary string s of length n on which you can apply two ......
Characters minimum Equal 2712 Cost

ARC114F Permutation Division

## 题意 给定一个 $1 \sim N$ 的排列,Alice 把它划分成 $k$ 段,Bob 把这 $k$ 段任意排列。Alice 想让字典序最小,Bob 想让字典序最大。请问最后的排列。 数据范围: $1\le k\le N\le 2 \times 10^5$。 ## 题解 首先 Bob 的排序 ......
Permutation Division 114F ARC 114

ARC117F Gateau

## 题意 有一个 $2N$ 个位置的圆,每个位置可以放任意多个物品(可以不放)。有 $2N$ 条要求,形如第 $i \sim i+N-1$ 范围内的位置上总共至少有 $A_i$ 个物品($0\le i<2N$,其中第 $j(j\ge 2N)$ 号位置其实是 $j-2N$ 号)。问放置的物品总数至少 ......
Gateau 117F ARC 117

编译make 4.2.1

# 下载源码 https://mirrors.tuna.tsinghua.edu.cn/gnu/make/make-4.2.1.tar.gz # 编译并安装 tar xzvf make-4.2.1.tar.gz cd make-4.2.1 ./configure --prefix=/home/wan ......
make

Atcoder ARC071E TrBBnsformBBtion

考虑把所有的 `B` 都变为 `A` 来处理,因为 `A` 和 `B` 是可以互换的,就只需要判断 $s_{a_i\cdots b_i}$ 和 $t_{c_i\cdots d_i}$ 对应的 `A` 的个数能不能在操作后相等。 `A` 的个数前缀和维护即可。 考虑 1 操作,发现其实可以 $1$ 个 ......
TrBBnsformBBtion Atcoder 071E ARC 071

Codeforces 1188D Make Equal

设最终所有数变为的值为 $u$,$\operatorname{bitcount}(x)$ 为 $x$ 二进制上为 $1$ 的位数,由题可得答案即为 $\sum\limits_{i = 1}^n \operatorname{bitcount}(u - a_i)$。 此时让 $a_i$ 从小到大排序,答 ......
Codeforces 1188D Equal 1188 Make

构建编译dockerfile docker build报错make: uname: Operation not permitted

报错信息: ![](https://img2023.cnblogs.com/blog/1138462/202306/1138462-20230609223131312-1389627832.png) 查看docker版本 ![](https://img2023.cnblogs.com/blog/11 ......
dockerfile Operation permitted docker build

Atcoder ARC100D Equal Cut

发现是 $3$ 个断点且数据范围的 $n\le 2\times 10^5$,根据 2022CSP-S A 留下的心理阴影不难想到可以枚举中间的那个点的同时移动左右两个端点。 考虑如何移动,已知现在在枚举中间的断点 $i$,则现在被分为了两部分 $1\sim i$ 和 $i\sim n$,因为要使极差 ......
Atcoder Equal 100D ARC 100

golang中make与new的区别

# golang中make与new的区别 ## new函数 new官方文档的描述: ~~~~~~go // The new built-in function allocates memory. The first argument is a type, // not a value, and th ......
golang make new

ARC132E

由于一旦走到头那么这一个后缀/前缀就一定是对应的颜色,所以最终答案形如一段左脚印,一段保留原来的,一段右脚印。 保留原来的段一定是在两个洞之间的一段完整段,考虑枚举这个段,左脚印的数量是确定的,转化成算概率的问题。 这实际上等价于这样一个问题:给 $n$ 个点,每次随机一个点向左/向右,问一直触碰不 ......
132E ARC 132

Kettle连接MySQL报错:Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed

在Windows系统里面安装kettle后打算连接MySQL的时候突然报错 错误连接数据库 [wanghui] : org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connec ......
Driver MySQL 39 installed Kettle

「解题报告」CF1290F Making Shapes

最近好像一直懒得写题解,但是感觉还是写一写比较好。 首先若干个向量组成一个凸包有经典做法,就是把向量按照极角排序,然后按照极角顺序依次拼接,得到的就是一个凸包,且方案唯一(由于本题限制不存在共线的两个向量)。 那么我们实际上只需要知道每个向量最终用了多少就可以了。设第 $i$ 个向量用了 $c_i$ ......
报告 Making Shapes 1290F 1290

题解:【ARC142D】 Deterministic Placing

[题目链接](https://www.luogu.com.cn/problem/AT_arc142_d) 大佬讲解的太精简了,做点蒟蒻视角的思考补充。下面记摆放棋子的点为黑点,没有摆放棋子的为白点。 因为进行无数次操作后,占据节点集合总是唯一,所以黑点一定是在反复横跳;每个位置上只能存在一个黑点,所 ......
题解 Deterministic Placing 142D ARC

1502. Can Make Arithmetic Progression From Sequence

/** * 1502. Can Make Arithmetic Progression From Sequence * https://leetcode.com/problems/can-make-arithmetic-progression-from-sequence/description/ * ......
Progression Arithmetic Sequence 1502 Make

[LeetCode] 1347. Minimum Number of Steps to Make Two Strings Anagram 制造字母异位词的最小步骤数

You are given two strings of the same length `s` and `t`. In one step you can choose **any character** of `t` and replace it with **another character* ......
字母 LeetCode 步骤 Anagram Minimum

[ARC085F] NRE

# [[ARC085F] NRE](https://www.luogu.com.cn/problem/AT_arc085_d) 首先这道题要先将区间**按左端点排序**。我们先不考虑区间重叠的情况。 令 $f_i$ 表示前 $i$ 个区间已经决策好是否选择,而且**第 $i$ 个区间必选**的情况下 ......
085F ARC 085 NRE

[ARC118E] Avoid Permutations

## 题意 给定一个长度为 $n$ 的排列 $p$,在一个 $(n + 2)\times(n + 2)$ 的网格上,禁止通过 $(i, p_i)$ 这些点,每次只能向上或右走一格,从 $(0, 0)$ 走到 $(n + 1, n + 1)$ 的方案数,定义为排列的权值。给定一个不完整的排列,对于所有 ......
Permutations Avoid 118E ARC 118

[ARC161F] Everywhere is Sparser than Whole (Judge)

Problem StatementWe define the density of a non-empty simple undirected graph as $\displaystyle\frac{(\text{number of edges})}{(\text{number of vertic ......
Everywhere Sparser Judge Whole 161F

曲线艺术编程 coding curves 第三章 弧,圆,椭圆(ARCS, CIRCLES, ELLIPSES)

# 第三章 弧,圆,椭圆(TRIG CURVES) > 原作:Keith Peters https://www.bit-101.com/blog/2022/11/coding-curves/ > 译者:池中物王二狗(sheldon) > blog: http://cnblogs.com/willia ......
椭圆 曲线 ELLIPSES CIRCLES 第三章

Arc get_mut

/// Returns a mutable reference into the given `Arc`, if there are /// no other `Arc` or [`Weak`] pointers to the same allocation. /// /// Returns [`N ......
get_mut Arc get mut

ARC161F Everywhere is Sparser than Whole (Judge)

[题面传送门](https://www.luogu.com.cn/problem/AT_arc161_f) 先大概移个项 ,就是要你找有没有非空真导出子图满足 $E-ND\geq 0$。 如果它只问了 $E-ND>0$ 这是经典的最大权闭合子图模型,令每条边为左部点,每个点为右部点,边的权值为 $1 ......
Everywhere Sparser Judge Whole 161F

「解题报告」[ARC114E] Paper Cutting 2

Kaguya 随机点了一道题,结果还挺 educational,写一下。 不过好像挺套路的。 首先第一件事,发现从现有的线段里选一个隔开这个东西太丑了。我们考虑转化一下题意。我们仍然在原矩形上划线,但是划完线后并不割开,而是一直在原矩形上操作。可以发现,这个操作是和原来的操作是等价的,因为我们可以看 ......
Cutting 报告 Paper 114E ARC

近现代 ABC&ARC 好题选做

# ARC161D ![image](https://img2023.cnblogs.com/blog/3143679/202305/3143679-20230529205400008-198332785.png) ## 题意 定义一张简单无向图的 **密度** 为:$\displaystyle M ......
ABC amp ARC

can't not find Node.js binary ''path",make sure Node.js is installed and in your PATH,or set

vscode中node执行debug报错 报错信息如下 思路1:检查node是否安装成功 win + R 输入cmd 能够正常显示版本号,则证明没有问题,接着换个思路 思路2:根据提示打开图示的'launch.json'文件,在页面补充 runtimeExecutable 具体补充什么内容呢? 在o ......
Node installed 39 binary PATH

ARC060D - Best Representation

诈骗题。给了个模数但是答案根本达不到那个级别。 先提前给出一个引理,如果长度为 $2n$ 的 $s$ 有 $s[1,n]=s[n+1,2n]$ 并且 $s[1,m]=s[m+1,2m](mn-x$,那么就有最左边和最右边的 $n-border$ 串相等。两个拼起来,根据引理就有更小的循环节,这是不被 ......
Representation 060D Best ARC 060

[ARC161A] Make M 题解

# [ARC161A] Make M 题解 ## Link [洛谷](https://www.luogu.com.cn/problem/AT_arc161_a) [AtCoder](https://atcoder.jp/contests/arc161/tasks/arc161_a) ## Descr ......
题解 161A Make ARC 161

[重读经典论文]RepVGG: Making VGG-style ConvNets Great Again

1. 参考 视频:14.1 RepVGG网络讲解 博客:RepVGG网络简介 2. 主要内容 2.1.与其他网络对比 如下图所示,RepVGG无论是在精度还是速度上都已经超过了ResNet、EffcientNet以及ReNeXt等网络。 2.2. 创新点,结构重参数化 在训练时,使用一个类似ResN ......
VGG-style ConvNets 经典 RepVGG Making

[ARC158D] Equation

Problem StatementYou are given a positive integer $n$, and a prime number $p$ at least $5$. Find a triple of integers $(x,y,z)$ that satisfies all of ......
Equation 158D ARC 158