222 g abc

AtCoder Beginner Contest 220 G Isosceles Trapezium

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc220_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc220/tasks/abc220_g "AtCoder 传送门") 简单题。 首先肯定 ......
Isosceles Trapezium Beginner AtCoder Contest

[ABC114D] 756 题解

[题目链接](https://atcoder.jp/contests/abc114/tasks/abc114_d) ## 题意 给定一个数 $n$,求 $n!$ 的因数中,刚好有 $75$ 个因数的数的个数。 ## 分析 首先有这样一个性质,对于一个数 $a$,我们将其分解质因数,即 $$a = \ ......
题解 114D ABC 114 756

[ABC162E] Sum of gcd of Tuples (Hard)

## 题面翻译 给定$n,k$,求 $$\sum^k_{a_1=1}\sum^k_{a_2=1}\sum^k_{a_3=1}\dots\sum^k_{a_n=1}gcd(a_1,a_2,a_3,\dots,a_n)\ mod\ 1000000007$$ ### 制約 - $ 2\ \leq\ N\ ......
Tuples 162E Hard of ABC

AtCoder Beginner Contest 249 G Xor Cards

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc249_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc249/tasks/abc249_g "AtCoder 传送门") 好题。 套路地,考 ......
Beginner AtCoder Contest Cards 249

题解 ABC207F【Tree Patrolling】

挺简单的树上背包,就是有点难写。 设 ${dp}_{u,i,x,y}$ 表示仅考虑 $u$ 的子树内,有 $i$ 个节点被控制,$x$ 为节点 $u$ 是否有警卫,$y$ 为节点 $u$ 是否被控制。(其实所有 $x=1,y=0$ 的状态都没用,但我懒得管了。) 每个点 $u$ 的初始值为 ${dp ......
题解 Patrolling 207F Tree ABC

GCC/G++选项 -Wl,-Bstatic和-Wl,-Bdynamic

GCC/G++选项 -Wl,-Bstatic和-Wl,-Bdynamic 参考 https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html gcc使用-Wl传递连接器参数,ld使用-Bdynamic强制连接动态库,-Bstatic强制连接静态库。所以部分 ......
Bdynamic Bstatic Wl GCC

[AGC055A] ABC Identity 题解

# [AGC055A] ABC Identity 题解 ## 题目描述 给定长度为 $3n (1 \le n \le 2e5)$ 的序列,其中字母 A,B,C 各有 $n$ 个。 一个合法序列 $T$ 满足以下条件: - 其长度为 $3k (1 \le k \le n)$。 - $T_1 = T_2 ......
题解 Identity 055A AGC 055

[ABC305E] Art Gallery on Graph

[Art Gallery on Graph の 传送门](https://www.luogu.com.cn/problem/AT_abc305_e) ## Problem 有一个由 $N$ 个点 $M$ 边的简单无向图,顶点编号为 $1$ 到 $N$,边的编号为 $1$ 到 $M$。 第 $ i $ ......
Gallery Graph 305E ABC 305

P2860 [USACO06JAN]Redundant Paths G 题解 ratjan边双连通分量

题目链接:[https://www.luogu.com.cn/problem/P2860](https://www.luogu.com.cn/problem/P2860) 题目大意: 给定一个无向连通图,求至少加几条边,能使其变成一个边双连通图。 解题思路: 边双连通分量缩点后计算度数为 $1$ 的 ......
题解 分量 Redundant ratjan P2860

[USACO06FEB]Treats for the Cows G/S

# [[USACO06FEB]Treats for the Cows G/S](https://www.luogu.com.cn/problem/P2858 "[USACO06FEB]Treats for the Cows G/S") ## 题目描述 FJ has purchased N (1 us ......
Treats USACO Cows FEB for

STM32G030F6P6+SLM332Y连接MQTT程序 美格 4G

目录 基本测试 断线重连测试 程序说明 说明 这节例程是 STM32G030F6P6 使用AT指令控制SLM332Y模组连接MQTT服务器. 连接上以后每隔一段时间测试发送16进制数据 和 字符串数据(4G信号强度). 程序代码: https://item.taobao.com/item.htm?f ......
程序 MQTT STM 030 F6P

[ABC305D] Sleep Log题解

# 题目大意 给 $N$ 个时刻: - 当 $i$ 为奇数时,$A_i$ 表示刚刚起床的时刻。 - 当 $i$ 为偶数时,$A_i$ 表示开始睡觉的时刻。 有 $Q$ 次询问,每次求在 $[l,r]$ 区间内睡了多长时间。 # 分析 首先我们要考虑处理边界情况。 每一次二分查找第一个大于等于 $l$ ......
题解 Sleep 305D ABC 305

[ABC305C] Snuke the Cookie Picker题解

# 题目大意 有一个 $H\times W$ 的网格,一种有一个矩形,矩形中间有一个点被挖空,求这个点的坐标。(. 表示空白,# 表示矩形内的点) # 解析 观察我们可以发现,每一矩形内的个点上下左右至少会有两个是 #。 如图: ![](https://cdn.luogu.com.cn/upload ......
题解 Cookie Picker Snuke 305C

已解决 DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop workingfrom collections import Iterable

场景描述 E:/worksp_py/hardwary/100day/twentyfive/itertor.py:4: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collect ......

[ABC212E] Safety Journey 题解

[Safety Journey](https://www.luogu.com.cn/problem/AT_abc212_e) ### 题目大意 给定一张缺少了 $m$ 条边的 $n$ 个点的完全图和一个正整数 $k$,你需要求出满足以下条件的序列 $A$ 的数量: - $A$ 的长度为 $k+1$。 ......
题解 Journey Safety 212E ABC

[ABC303G] Bags Game 解题分析

### 1 题目大意 **1.1 题目翻译** 有两个人轮流取物品。总共有 $n$ 个物品,第 $i$ 个物品的价值为 $w_i$。 他们按照下面的其中一种方式取物品: * 取出这一排物品最前面的或者最后面的。这一步没有代价。 * 设还剩下 $m$ 个物品,那么重复取出 $\min(B, m)$ 个 ......
303G Bags Game ABC 303

ABC305

## T1:[Water Station](https://atcoder.jp/contests/abc305/tasks/abc305_a "Water Station") 模拟 代码实现 ``` // C++实现 #include using namespace std; int main() ......
ABC 305

ATCoder [ABC167D] Teleporter

# 题目解析 这段代码的目标是处理一个含有 $n$ 个元素的整数序列,根据一定的规则,重复操作 $k$ 次后,确定操作结束时位于序列哪个位置。 ## 解题思路 1. **读取输入**:首先,我们读取输入的整数 $n$ 和 $k$ ,以及整数序列 `a`。我们需要对序列的每个元素减一,以适应从 0 开 ......
Teleporter ATCoder 167D ABC 167

ABC301

## T1:[Overall Winner](https://atcoder.jp/contests/abc301/tasks/abc301_a) 模拟 代码实现 ``` #include #define rep(i, n) for (int i = 0; i > n >> s; int t = 0 ......
ABC 301

Atcoder ABC221G Jumping sequence

发现这个 $(x, y)$ 对应的是曼哈顿距离不太好求,那直接逆时针旋转 $45$ 度(其实应该还要伸长 $\sqrt{2}$ 倍,但是可以当做 $d_i$ 也伸长 $\sqrt{2}$ 倍不用去管)转化成切比雪夫距离 $(x - y, x + y)$。 同时对应的 $4$ 个方向在旋转后对应的方向 ......
sequence Atcoder Jumping 221G ABC

[ABC166F] Three Variables Game

[Three Variables Game の 传送门](https://www.luogu.com.cn/problem/AT_abc166_f) ## Solution 首先,我们每次操作只会修改两个数。 所以考虑 dfs 枚举操作的顺序,但是这让时间复杂度变为 $O(2^n)$,不能接受。 但 ......
Variables Three 166F Game ABC

[AGC055B] ABC Supremacy 题解

# [AGC055B] ABC Supremacy 题解 ## 题目描述 给定两个长度为 $n$ 的字符串 $a$,$b$。 你可以进行若干次以下操作: - 若 $a$ 中的一个**子串**为 `ABC`,`BCA` 或 `CAB`,那么可以将这个子串替换为 `ABC`,`BCA` 或 `CAB`。 ......
题解 Supremacy 055B AGC 055

TLE6208-6G-ASEMI代理英飞电机驱动芯片TLE6208-6G

编辑:ll TLE6208-6G-ASEMI代理英飞电机驱动芯片TLE6208-6G 型号:TLE6208-6G 品牌:Infineon(英飞凌) 封装:SOP-28 类型:LED驱动、汽车芯片 TLE6208-6G产品概述 TLE 6208-6 G是一款完全保护的六角半桥驱动器,专为汽车和工业运动 ......
6208 TLE 电机 芯片 6G-ASEMI

TLE4250-2G-ASEMI代理英飞凌汽车芯片TLE4250-2G

编辑:ll TLE4250-2G-ASEMI代理英飞凌汽车芯片TLE4250-2G 型号:TLE4250-2G 品牌:Infineon(英飞凌) 封装:SCT-595-5 特性:驱动芯片、汽车芯片 温度范围-40°C~150°C 最大输入电压:-42 V~45 V TLE4250-2G产品特性 50 ......
4250 TLE 芯片 2G-ASEMI 汽车

[ABC166E] This Message Will Self-Destruct in 5s

[This Message Will Self-Destruct in 5s の 传送门](https://www.luogu.com.cn/problem/AT_abc166_e) ## Solution 首先看到 > $j-i=A_i+A_j$ 转换一下,$i+a_i=j-a_j$。 接下来,对 ......
Self-Destruct Destruct Message 166E This

Atcoder ABC221F Diameter set

不难。 第一步肯定是求出直径 $d$。 然后能发现 $d\bmod 2 = 0$ 时很好求。 可以先任意找到一条直径,再找到这个直径的中点,则容易知道以这个中点为根,其中的每个子树的节点与中点经过的边数最大值为 $\frac{d}{2}$。 所以能够得到每个子树内选两个点距离最大值也为 $d - 2 ......
Diameter Atcoder 221F ABC 221

AtCoder Beginner Contest 304 G Max of Medians

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc304_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc304/tasks/abc304_g "AtCoder 传送门") 首先显然二分答案, ......
Beginner AtCoder Contest Medians 304

算法学习day16二叉树part03-222、104、559、111

package LeetCode.Treepart03; /** * 222. 完全二叉树的节点个数 * 给你一棵 完全二叉树 的根节点 root ,求出该树的节点个数。 * 完全二叉树 的定义如下:在完全二叉树中,除了最底层节点可能没填满外, * 其余每层节点数都达到最大值,并且最下面一层的节点都 ......
算法 part day 104 111

ABC277G 题解

## 前言 [题目传送门!](https://www.luogu.com.cn/problem/AT_abc277_g) [更好的阅读体验?](https://www.cnblogs.com/liangbowen/p/17464231.html) 好题,记录一手拆贡献的 trick。 ## 思路 我 ......
题解 277G ABC 277

ABC300F 题解

前两天忘发出来了,补一下QAQ ## [题目链接](https://www.luogu.com.cn/problem/AT_abc300_f) ## 题意简述 给定一个长度为 $n$ 且只包含 $\texttt{o}$ 和 $\texttt{x}$ 的字符串 $s$ 以及正整数 $n$ $m$ $k ......
题解 300F ABC 300