majority 134c arc the

The 13th Northeast Collegiate Programming Contest

## **Problem B. Balanced Diet** 其实就是对每种糖果从大到小的排序后,计算前缀和后再 $O(n)$ 处理,由于最多只有 $n$ 个糖果,所以最大复杂度是 $O(nlogn)$。对于题目给的每种糖果的限制 $limit$ ,就把当前小于 $limit$ 的贡献加到 $ma ......
Programming Collegiate Northeast Contest The

CF1305F Kuroni and the Punishment

# CF1305F Kuroni and the Punishment 不难发现答案上界为 $n$。 考虑我们能做什么?我们可以对一个 gcd 快速求出最少操作次数。 这启发我们将 gcd 确定在某个范围后暴力对每个 gcd 做上面的操作。 gcd 怎么来?从 $a$ 中来。如果确定 $a_i$ 的 ......
Punishment Kuroni 1305F 1305 and

ARC 157 F Sol

嫌弃讲题人的我,准备好好写一篇题解。 [link to problem](https://atcoder.jp/contests/arc157/tasks/arc157_f) 观察数据范围:$1\le N\le 50$。 如果是 $20$,想到 $2^{20}$;如果是 $40$,想到 $2^{40 ......
ARC 157 Sol

【题解】[ARC158C] All Pair Digit Sums

[传送门](https://www.luogu.com.cn/problem/AT_arc158_c) ## 题目分析 我们可以先从简单一点的情况开始分析,如果现在 $a_{[i]},a_{[j]}$ 都**不会进位**,那么最后的 $f(a_{[i]}+a_{[j]})=f(a_{[i]})+f( ......
题解 Digit 158C Pair Sums

The 2022 ICPC Asia Regionals Online Contest (I) C L A

# [The 2022 ICPC Asia Regionals Online Contest (I)](https://pintia.cn/market/item/1571156622976593920) ## C 统计度的大小,算贡献,特判 $n = 1$ ```c++ #include usin ......
Regionals Contest Online 2022 ICPC

ARC159

# ARC159 前面做过一遍,效果不佳,再来一遍 ## A 最优化问题,考虑什么情况最优 / 不优,猜测 $x$ 至多一步到 $y$ 所在的方阵中。证明考虑如果 $x$ 到其他点,可以到 $y$ 所在方阵中对应的点,一定不劣 ## B 每次减去 $\gcd$,关注 $\gcd$ 变化的条件。容易发 ......
ARC 159

vite打包报错:ERROR: Top-level await is not available in the configured target environment ("es2015" + 2 overrides)

在开发时,vita打包报错如下: 原因: ECMAScript 提案 Top-level await 由 Myles Borins 提出,它可以让你在模块的最高层中使用 await 操作符。在这之前,你只能通过在 async 函数或 async generators 中使用 await 操作符。To ......

springmvc 开启异步请求报错 Java code using the Servlet API or by adding "true" to servlet and filter declarations in web.xml.

报错内容: java.lang.IllegalStateException: Async support must be enabled on a servlet and for all filters involved in async request processing. This is do ......
quot declarations springmvc Servlet servlet

CF437C The Child and Toy

### 题目大意 $n$ 个带权点,$m$ 条无向边,删除一个点就要付出所有与之连接且没有被删除的点的点权之和的代价。 求删除所有点的最小代价。 ### 思路 考虑点的贡献异常麻烦,我们可以把点的贡献转化为边的贡献。 对于一条边,我们有如下几点: 1. 伴随着所有的点被删掉,所有的边也会被删掉; 2 ......
Child 437C 437 The and

teamcenter soa 服务报错:The server returned an internal server。操作执行期间,与Teamcenter 服务器之间的通信丢失

原因:这个是代码有一个空指针,去加载属性所以报这个错误 这一段代码,框起来的就是空 ......

CF1858B The Walkway 图解

## 思路 **注意:所有变量名与原题面相同。** 因为 $1$ 号点必须吃一块饼干,所以我们可以在 $1$ 立一个不可删除的商店,记为 $s_0$。 **注意:如果 $1$ 号附近本身就有一个商店,那就不用立。** 然后我们可以在 $n + 1$ 的位置立一个不可删除的商店,作为一个结束标志,记为 ......
Walkway 1858B 1858 The CF

the-c-programming-language-reading-notes

The C Programming Reading Notes Created: 2023-06-06T15:59+08:00 Published: 2023-08-16T12:14+08:00 Categories: C | ReadingNotes 我看的是第二版,解决了初学 C 语言和 OS ......

Docker安装Redis错误Reading the configuration file, at line 416 >>> 'locale-collate ""' Bad directive or wrong number of arguments

docker安装redis报错*** FATAL CONFIG FILE ERROR (Redis 7.0.12) *** Reading the configuration file, at line 416 >>> 'locale-collate ""' Bad directive or wro... ......

【上传文件时异常】The field file exceeds its maximum permitted size of 1048576 bytes.

1、背景描述 本项目是个spring boot 项目,需要文件上传,上传的是一个 pdf文件,大小是5MB,报错内容如下: Caused by: org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededEx ......
permitted 1048576 exceeds maximum 文件

ARC 做题记录

又来开新坑了 ~~建议改为ATC看题解记录~~ ## [[ARC103F] Distance Sums](https://www.luogu.com.cn/problem/AT_arc103_d) $tag$:构造,树的性质 [sol](https://www.luogu.com.cn/blog/c ......
ARC

【转载】The Dog and the Shadow

## Article Format Source ChatGPT ## Main Content Source Title: The City Mouse and the Country Mouse Source: https://www.zhihu.com/question/263840407/a ......
Shadow The Dog and the

nuttx-on-the-stm32f103c8t6

https://microcontrollerelectronics.com/nuttx-on-the-stm32f103c8t6/ ![](https://img2023.cnblogs.com/blog/79238/202308/79238-20230816093358501-592691937 ......
nuttx-on-the-stm nuttx 103 c8t the

执行kubeadm 出现 FATAL: the ConfigMap "kubeadm-config" in the kube-system namespace used for getting configuration information was not found

现象: [upgrade/config] Making sure the configuration is correct:[upgrade/config] Reading configuration from the cluster...[upgrade/config] FYI: You can ......

ARC160

## B 考虑题目的三个条件,只需要满足最大的两个数的乘积小于等于 $n$ 。$x,y,z$ 的大小关系无所谓,分讨两种情况 $x=y\ge z$ 和 $x>y\ge z$,分别枚举 $x,y$ 即可,复杂度 $\mathcal{O}(T\sqrt{n})$ ## C 计数,本来是对 $a$ 计数, ......
ARC 160

[LeetCode] 2682. Find the Losers of the Circular Game

There are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More formally, movin ......
the LeetCode Circular Losers 2682

[Vue warn]: Runtime directive used on component with non-element root node. The directives will not function as intended.

![](https://img2023.cnblogs.com/blog/1987782/202308/1987782-20230815231125882-1972945533.png) ### 原因 意思是自定义指令不能放到组件上,而是要放到自有的元素上,也就是这里用到的`v-dialogDrag ......

ARC161

## ARC161 ### A 排序后直接奇偶分类地填即可 ```cpp #include using namespace std; const int MAXN=2e5+5; int n; int a[MAXN]; int b[MAXN]; int main() { // freopen("dat ......
ARC 161

Unveiling the Power of Diagnostic Tools: Cat Caterpillar ET, Volvo Vocom II Interface, JLR DoIP VCI, WABCO Diagnostic Kit, and GM Tech 2

In the realm of automotive diagnostics, the right tools can make all the difference. Whether you're a professional mechanic or an avid car enthusiast, ......

[ARC096E] Everything on It 题解

## 题意 对于集合 ${1,2,\cdots,n}$,求它的子集族中,有多少个满足: 1. 任意两个子集互不相同; 2. $1,2,\cdots,n$ 都在其中至少出现了 $2$ 次。 $n \le 3000$,答案对 $M$ 取模。 ## 题解 第一个限制形同虚设,下面着重考虑第二个限制。考虑到 ......
题解 Everything 096E ARC 096

[ARC125D] Unique Subsequence

设 $pre_i$ 表示在 $i$ 之前最后一个和 $i$ 相同的数的位置,$dp_i$ 表示第 $i$ 个数为结尾的序列的合法方案数。 对于 $pre_i = 0$,即在 $i$ 之前不存在与 $i$ 相同的数,$dp_i$ 由 $\left[ 1,i - 1 \right]$ 转移过来。由于这个 ......
Subsequence Unique 125D ARC 125

[ARC126C] Maximize GCD

设 $a_x$ 为数列 $a$ 中的最大值。 一般来说,与其处理 $x | \gcd(A_1,\dots,A_N)$ ,处理 $x = \gcd(A_1,\dots,A_N)$ 更加容易。这是因为后者能够被分解为各个元素:$\forall i,x | A_i$。 因此,我们将解决下面这个问题而不是原 ......
Maximize 126C ARC 126 GCD

[ARC125C] LIS to Original Sequence

首先考虑 $k = 1$,唯一的方案就是倒序输出 $1$ 到 $n$。 我们可以想到,这道题的方法是向已经确定的序列 $A$ 中插入其他数。 对于一个数 $x(x #include #include using namespace std; const int N = 200500; int n,k ......
Original Sequence 125C ARC 125

CF1850H The Third Letter

### 题目大意 $n$ 个士兵站队,给出 $m$ 个限制,要求士兵 $b$ 站在士兵 $a$ 前面距离为 $d$ 的位置,可以有多个士兵站在同一个位置。询问给定限制下是否存在合法的列队方案。 ### 思路 我们考虑把互相有直接或间接限制的点看作一棵树,加入到树中的结点是受到限制的。 最开始的状况没 ......
Letter 1850H Third 1850 The

CF776D The Door Problem

### 题目大意 给定门和钥匙的数量,每把钥匙控制 $k_i$ 扇门,每扇门被两把钥匙控制。 给定初始时每扇门的状态,求是否存在一种方法使得所有的门都打开。 ### 思路 扩展域并查集。 考虑分类讨论: - 对于开着的门,要么两把钥匙都用,要么两把钥匙都不用; - 对于关着的门,两把钥匙只能用一把。 ......
Problem 776D Door 776 The

Lifting the Stone

Smiling & Weeping 繁花落尽,我心中仍有花落的声音 一朵,一朵,在无人的山间轻轻飘落 题目链接:1385 -- Lifting the Stone (poj.org) 思路:将多边形三角剖分,计算出每个三角形的重心,三角形的重心是顶点坐标的平均值,然后对每个三角形的有向面积求加权平均 ......
Lifting Stone the