third 032f agc one

Python exceptions All In One

Python exceptions All In One ImportError: an import fails; IndexError: a list is indexed with an out-of-range number; NameError: an unknown variable i... ......
exceptions Python All One In

3 Ways to Delete All File in a Directory Except One or Few Files with extensions

``` # https://www.tecmint.com/delete-all-files-in-directory-except-one-few-file-extensions/ # https://www.gnu.org/software/bash/manual/html_node/The-S ......
extensions Directory Delete Except Files

如何使用地图制作一个自定义的旅游线路示意图 All In One

# 如何使用地图制作一个自定义的旅游线路示意图 All In One > Vlog 视频 Vlog 视频博客 Video blog、Video log ## demos > 环球骑行路线图解 https://www.cnblogs.com/xgqfrms/p/17577179.html --> ## ......
示意图 旅游线路 线路 地图 All

Python @classmethod decorator and static method All In One

# Python @classmethod decorator and static method All In One > 修饰器/装饰器;静态方法;实例方法 ```py # cls class Rectangle: def __init__(self, width, height): self. ......
classmethod decorator Python static method

startInternal One or more listeners failed to start

org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container ... ......
startInternal listeners failed start more

The Third Letter带权并查集

Problem - 1850H - Codeforces 题意是给你a,b,c说明a在b后面c个单位(c<0就是在左边),每个位置只能有一个数,一共有n个位置,告诉你m个关系,问是否符合条件 我们可以设置d[x]表示x到它的最早的父节点的距离,然后如果两个数父节点一样,那么c!=d[a]-d[b]时 ......
Letter Third The

Python data hiding All In One

Python data hiding All In One private data / private method ⚠️ 约定:class 里面使用单个下划线,表示私有的属性或私有的方法,实际上在 class 外面是可以访问的 ......
Python hiding data All One

TypeError: error setting argument 2 - writePointer: Bufferinstance expected as third argument

electron ffi 调第三方动态库报“TypeError: error setting argument 2 - writePointer: Bufferinstance expected as third argument” 原因是我定义了一个结构体,调函数传参数需要传这个结构体的指针 co ......

AT_agc017_b 题解

[洛谷链接](https://www.luogu.com.cn/problem/AT_agc017_b)&[Atcoder 链接](https://atcoder.jp/contests/agc017/tasks/agc017_b) 本篇题解为此题较**简单做法**,请放心阅读。 ## 题目简述 一 ......
题解 AT_agc 017 agc AT

[AGC024F] Simple Subsequence Problem

Problem StatementYou are given a set $S$ of strings consisting of 0 and 1, and an integer $K$. Find the longest string that is a subsequence of $K$ or ......
Subsequence Problem Simple 024F AGC

AGC009D题解

# 前言 这是一道神仙题 我翻阅的很多分题解,包括Atcoder官方题解 都没有看懂,应该是因为我比较菜 然后我看懂了这篇(地址放在文末) 方法可能和主流略有不同 但我觉得这个办法更好理解 # 题面 ## 题面大意 定义一个单独的节点为一棵Uninity 0的树。 将$x(x \geq 0)$棵Un ......
题解 009D AGC 009

How to make sqlplus output appear in one line

## How to make sqlplus output appear in one line ``` https://dba.stackexchange.com/questions/54149/how-to-make-sqlplus-output-appear-in-one-line # SQL ......
sqlplus appear output make line

URL.canParse API All In One

# URL.canParse API All In One ```js // Proper usage if (URL.canParse('https://davidwalsh.name/pornhub-interview')) { const parsed = new URL('https://d ......
canParse URL API All One

AGC006F Blackout

## **AGC006F** Blackout 如果一个格子 $(x, y)$ 是黑色的,那么构建边 $x\rightarrow y$,接下来对于每个弱连通块分类讨论: 1. 图中有自环 则弱连通块必然形成一个完全图 > 证明: > > 从自环开始归纳,将自环视为一个点数为 $1$ 的完全图,接下来 ......
Blackout 006F AGC 006

[ABC311G] One More Grid Task

Problem StatementThere is an $N \times M$ grid, where the square at the $i$-th row from the top and $j$-th column from the left has a non-negative int ......
311G More Grid Task ABC

[ABC311G] One More Grid Task

# [ABC311G] One More Grid Task ## 题意 给一个矩阵,定义一个矩阵的价值为其最小值乘上总和,问子矩阵中最大价值。 ## 题解 感觉有些简单,不配在G这个位置。 观察贡献的形式,我们需要维护最小值与还有和。 首先第一个想法是以最小值为分治点来分治,划分区域。 但是对比一 ......
311G More Grid Task ABC

AGC019D 爆标做法(English ver.)

Translated by [DeepL](https://www.deepl.com/translator) with my manual modification. Firstly, there is no solution if and only if $B_i\equiv0$ and the ......
做法 English 019D AGC 019

环球骑行骑行路线图解 All In One

环球骑行骑行路线图解 All In One round the world cycling 朱志文环球骑行 ......
All One In

Python【18】 pytorch中的one_hot() (独热编码函数)

参考:https://pytorch.org/docs/stable/generated/torch.nn.functional.one_hot.html ![image](https://img2023.cnblogs.com/blog/3240132/202307/3240132-2023072 ......
函数 编码 pytorch one_hot Python

AtCoder Beginner Contest 311 G One More Grid Task

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc311_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc311/tasks/abc311_g "AtCoder 传送门") 考虑一维怎么做。 ......
Beginner AtCoder Contest More Grid

Atcoder ABC311G One More Grid Task

可以想到枚举最小值同时算出包含其的最大矩阵和。 考虑枚举行的上下界,再枚举最小值然后求出最大的列的范围,因为 $a_{i, j}\ge 1$ 列的范围越广矩阵和也越大。 考虑如何算出列的范围,令第 $i$ 列在选中的行的范围内的最小值为 $mn_i$,则对于 $mn_i$ 的列 的范围 $[l, r ......
Atcoder 311G More Grid Task

AT_agc002_f [AGC002F] Leftmost Ball 思考--zhengjun

思维 + dp。 如果像题意那样先放球再染色的话不是很好做。 所以考虑有 $n$ 个白球,$n$ 种其他颜色的球各 $k-1$ 个。 那么限制就是说对于每个前缀,白球的个数 $\ge$ 其他颜色球的种数。 所以就可以设 $f_{i,j}$ 为放了 $i$ 个白球,$j$ 种颜色的 $k-1$ 个球的 ......
002 Leftmost zhengjun AT_agc 002F

【大联盟】20230703 T2 开心的序列(sequence) 题解 AT_agc049_f 【[AGC049F] Happy Sequence】

恐怖 zak 将这题加强,出到模拟赛。直接把 $A_i,B_i\le 10^5, C_i\le 5$ 变成了 $A_i,B_i,C_i\le 10^9$。 非常恐怖。 ## 题目描述 [here](https://www.luogu.com.cn/remoteJudgeRedirect/atcode ......
题解 大联盟 序列 049 20230703

Ubuntu HackRF One、GNU Radio、Gqrx相关环境搭建

本文内容、开发板及配件仅限用于学校或科研院所开展科研实验! 本文介绍的安装方法包括两种,一种是利用sudo apt-get install命令行的方式来直接安装,另一种是从github下载hackrf、gqrx等常用软件的源代码后,进行编译和安装。两种安装方法各有优劣。 第一种方法(本文称为安装方法 ......
环境 Ubuntu HackRF Radio Gqrx

AGC027F Grafting

首先如果一开始 $A$ 和 $B$ 相同,可以直接输出 $0$。 否则 $O(n^2)$ 枚举一个被操作的叶子 $x$,和 $x$ 接到了的 $y$ 点,此时 $x$ 不能再被操作,所以将其当作新树 $A'$ 和 $B$ 的根节点。 由于操作是作用于叶子的,所以一个非叶节点想要被操作,当且仅当其所有 ......
Grafting 027F AGC 027

AGC010E Rearranging

考虑先手操作完后得到的序列为 $b_i$,后手如何操作得到最大答案。 由于不互质的数不能交换,所以任意一对 $i<j,\text{gcd}(b_i,b_i)\neq 1$,后手操作后相对顺序不变。 所以可以枚举每对不互质的数,编号小的往大的连边,然后用优先队列跑最大拓扑序。 再考虑先手如何操作。 容 ......
Rearranging 010E AGC 010

AGC003D Anticube

神仙题。 由于时间限制 $5\text s$,我们可以整点怪的,比如根号分解质因子。 但是直接分解是 $O(n\sqrt w)$ 的,值域为 $w$ 即 $10^{10}$,肯定会炸。 毛估估一下,如果需要分解质因数,大概只能分解到 $O(\sqrt[3]{w})$ 的质数。 我们把小于 $\sqr ......
Anticube 003D AGC 003

AGC015E Mr.Aoki Incubator

这种点对移动互相感染的题,一般可以建笛卡尔坐标系。每个点 $i$ 坐标为 $(V_i,X_i)$,若有两个点 $a,b$ 的相遇时间为 $\dfrac{X_a-X_b}{V_b-V_a}$,即 $-k_{ab}$。 所以当且仅当两个点连接直线的斜率为负数时,两个点会在时间 $t_{ab}=-k_{a ......
Incubator 015E Aoki AGC 015

AGC005D ~K Perm Counting

经典题。 考虑 dp,然后发现你根本 d 不动。 冷静思考,发现原因在于,无法在较小的复杂度内确定选数的状态。 遇到这种情况可以考虑容斥。设 $f(i)$ 表示强制选 $i$ 个位置满足 $|p_j-j|=k$。 显然 $\text{ans}=\sum\limits_{i=0}^n(-1)^if(i ......
Counting 005D Perm AGC 005

AGC012D Colorful Balls

sweet tea. 手玩一下发现「交换」的性质是具有传递性的,所以考虑一个 $O(n^2)$ 做法: 枚举每个点对,如果满足交换条件,则连双向边。显然一个连通块内的点可以互相交换,而不同连通块之间互相独立。答案就是 $\prod\limits_{i=1}^m\dbinom{size_i}{s_{i ......
Colorful Balls 012D AGC 012