subsequence 271e path abc

abc067d <博弈 + dfs>

[D - Fennec VS. Snuke](https://atcoder.jp/contests/abc067/tasks/arc078_b) ``` // https://atcoder.jp/contests/abc067/tasks/arc078_b // // 关键点: 双方的最优策略一 ......
067d abc 067 dfs lt

abc066d <组合>

[D - 11](https://atcoder.jp/contests/abc066/tasks/arc077_b) ``` // https://atcoder.jp/contests/abc066/tasks/arc077_b // // 总组合数减去重复部分 // 对于本题求组合数方法: / ......
066d abc 066 lt gt

abc065d <贪心+最小生成树> [lambda表达式]

[D - Built?](https://atcoder.jp/contests/abc065/tasks/arc076_b) ``` // https://atcoder.jp/contests/abc065/tasks/arc076_b // 贪心+最小生成树 // 关键在于意识到, 连接x或y ......
表达式 lambda 065d abc 065

MLE / DS / AI Path

# Overview ## Phd ### 1. Knowledge **(1) Programming Tool** * Python Basics: loop, class, function, OOP, OS library * Python data science library: Num ......
Path MLE DS AI

abc309e <dfs>

[E - Family and Insurance](https://atcoder.jp/contests/abc309/tasks/abc309_e) ``` // https://atcoder.jp/contests/abc309/tasks/abc309_e // // 关键在于意识到, ......
309e abc 309 dfs lt

abc309f <线段树 + 离散化 + 双指针>

[F - Box in Box](https://atcoder.jp/contests/abc309/tasks/abc309_f) ``` // https://atcoder.jp/contests/abc309/tasks/abc309_f // [unique + lower_bound ......
线段 指针 309f abc 309

CF1702G2 Passable Paths (hard version)

## 思路 题意:判断是否存在一条链包含树上给定点集。 考虑把 $1$ 当做树的根,将无根树转化为有根树。 考虑这样一个性质:若存在满足条件的最短链,则点集中深度最深的点 $u$ 是该链的一个端点,点集中距离 $u$ 最远的点 $v$ 是该链的另一端点。 >证明:若点 $u$ 不是链的端点,则 $u ......
Passable version 1702G Paths 1702

ABC276F

设 $b_x$ 表示第 $x$ 次操作的期望权值,由题意可得: $$b_x=x^{-2}\times \sum\limits_{1 \leq i,j \leq x}\max(a_i,a_j)$$ 前面的部分可通过求逆元直接获得。设后面那部分为 $c_x$,递推计算 $c_x$ 的值,只需要计算新增添 ......
276F ABC 276

ABC276E

由于路径除起点外不能重复经过一点且需要回到起点,那么出发时和结束时一定会经过与起点 $\text{S}$ 相邻的不同的点。如果存在两个这样的点联通,那么就存在这样一条从起点出发返回起点的回路。 但题目中有对路径长大于等于 $4$ 的限制,可以发现走一个 $2\times2$ 的矩阵回到原点是满足条件 ......
276E ABC 276

[ABC200F] Minflip Summation

## 题意简述: 给定一个字符串 $S$ ($ 1\ \le\ |S|\ \le\ 10^5 $), $S$ 仅包含 $0$ , $1$ , $?$。将该字符串复制 $K$ ($ 1\ \le\ |K|\ \le\ 10^9 $) 遍,得到字符串 $S'$,$S'$ 中的 $?$ 可随意替换成 $0 ......
Summation Minflip 200F ABC 200

ABC309

## T1:[Nine](https://atcoder.jp/contests/abc309/tasks/abc309_a) 当 $A+1 = B$ 且 $A \% 3 = 1$ 时,说明 $A$ 和 $B$ 相邻 代码实现 ``` a, b = map(int, input().split()) ......
ABC 309

abc064d <贪心/前缀和>

[D - Insertion](https://atcoder.jp/contests/abc064/tasks/abc064_d) > [另一种做法](https://www.bilibili.com/read/cv24447317),注意这两种写法: >1. `max_element` >2. ......
前缀 064d abc 064 lt

abc063d <二分答案>

[D - Widespread](https://atcoder.jp/contests/abc063/tasks/arc075_b) 对二分答案的特点要敏感!!! ``` // https://atcoder.jp/contests/abc063/tasks/arc075_b // 二分答案 #i ......
答案 063d abc 063 lt

abc062d <优先队列>

[D - 3N Numbers](https://atcoder.jp/contests/abc062/tasks/arc074_b) [参考](https://blog.csdn.net/awow80285/article/details/101550652) ``` // https://atc ......
队列 062d abc 062 lt

AtCoder Grand Contest 058 D Yet Another ABC String

[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc058_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc058/tasks/agc058_d "AtCoder 传送门") Orz H6_6Q ......
AtCoder Another Contest String Grand

[ABC218G] Game on Tree 2 树上游戏

# [ABC218G] Game on Tree 2 树上游戏 [TOC] ## 题面翻译 给定一棵树,以及树各节点的点权(点权为偶数)。起初有一个棋子在树的根结点(结点 $1$)处。 - $A$ 与 $B$ 两人轮流操作:将棋子移动到其所在节点的某个叶子节点。 - 到某个节点的得分定义为:棋子经过 ......
218G Game Tree ABC 218

python 中 os.path模块

001、basename:去掉路径名,单独获取文件名 >>> import os.path >>> os.getcwd() '/home/test02' >>> os.listdir() ['a.txt', 'test_dir'] >>> os.path.basename("/home/test02 ......
模块 python path os

多线程知识:三个线程如何交替打印ABC循环100次

本文博主给大家讲解一道网上非常经典的多线程面试题目。关于三个线程如何交替打印ABC循环100次的问题。 > 下文实现代码都基于Java代码在单个JVM内实现。 ## 问题描述 给定三个线程,分别命名为A、B、C,要求这三个线程按照顺序交替打印ABC,每个字母打印100次,最终输出结果为: ``` A ......
线程 三个 知识 ABC 100

Python+selenium报错raise NoSuchDriverException(f"Unable to obtain {service.path} using Selenium Manager; {err}")...解决方案

一、问题描述 进行自动化测试执行程序报错如下图: 二、解决方案 在网上找了好久都没找到答案,最后根据以往经验想到是不是selenium版本有问题,本人python版本是3.11.0,所以将selenium版本也降到3.11.0之后问题解决。 selenium降版本: pip3 install sel ......

ABC196E 题解

## 前言 [题目传送门!](https://www.luogu.com.cn/problem/AT_abc196_e) [更好的阅读体验?](https://www.cnblogs.com/liangbowen/p/17531887.html) 很有趣的题,取决于思考方向。 ## 思路 如果你一开 ......
题解 196E ABC 196

UI PATH

最最最最重要的创建变量时,尽量不要自己在下方创建,而是在需要变量的地方,在属性Create Variable这里创建变量。 Image Exists - 图片存在:使用Image Exists识别页面某块区域的内容,是否如选取图片所示,如果匹配成功返回True,否则返回False。 提取页面某块内容 ......
PATH UI

spring各版本冲突:Failed to process import candidates for configuration class [com.example.SunApplication];或者Error creating bean with name 'configurationPropertiesBeans' defined in class path resource

# **今天又发现一个通病** ### ## springcloud-springcloud alibaba-springboot的版本对应关系 #### ### #### ## 报错如下: ``````Failed to process import candidates for configur ......

ABC306F 题解

## [题目链接](https://www.luogu.com.cn/problem/AT_abc306_f) ## 题目大意 对于 $S_1 \cap S_2 = \emptyset$, 定义长度为 $|S_1|+|S_2|$ 的序列 $A$,为 $S_1\cup S_2$ 排序后的结果。 定义二 ......
题解 306F ABC 306

ABC306E 题解

## [题目链接](https://www.luogu.com.cn/problem/AT_abc306_e) ## 题目大意 维护一个数据结构,数列长度为 $n$,$q$ 次操作,每次操作修改一个位置上的值,每次操作后输出数列里前 $k$ 小的数的和($k$ 是给定的)。 $n,k,q\leq 5 ......
题解 306E ABC 306

npm install 报错 npm ERR! gyp verb check python checking for Python executable "python2.7.15" in the PATH

今天新启动一个项目,在 npm install 安装依赖项时出现报错。 $ npm install > husky@0.14.3 install D:\programs\rubik-web\node_modules\husky > node ./bin/install.js husky settin ......
python quot executable npm checking

rsync 遇到中文乱码文件名无法同步,并报错:rsync: rename "/test1/abc/abc/opt/abc/abc/abcx-V2/img_abc/.δ\#261\#352\#314\#342-3.jpg.wdPu5C" -> "abc/xx-V2/img_abc/δ\#261\#352\#314\#342-3.jpg": Input/outputerror (5)

rsync 遇到中文文件名乱码报错 报错如下: rsync: rename "/test1/abc/def/efg/abc-V2/img_abc/.δ\#261\#352\#314\#342-3.jpg.wdPu5C" -> "event/abc-V2/img_abc/δ\#261\#352\#31 ......
abc quot img_abc rsync 乱码

Codeforces 293B Distinct Paths

发现 $n, m$ 的数据范围是假的,因为每一步一个颜色最多也就 $k\le 10$ 种颜色,所以当 $n + m - 1 > k$ 时一定无解。 接下来发现这个数据范围挺小的,考虑状压,设 $f_{x, y}$ 为走到 $(x, y)$ 点所用的颜色的集合,其可以由 $f_{x - 1, y}, ......
Codeforces Distinct Paths 293B 293

【转】python踩坑(FileNotFoundError: Could not find module '此处省略了一些路径win_amd64.dll' (or one of its dependencies). Try using the full path with constructor syntax.)

1、报错 (FileNotFoundError: Could not find module '此处省略了一些路径\site-packages\scipy\.libs\libbanded5x.GL5FZ7Y77HIKQFNMZKUOMV5GID6YMX2V.gfortran-win_amd64.dl ......

【CF1621G】Weighted Increasing Subsequences 题解(优化树状数组)

[CF 传送门](https://codeforc.es/contest/1621/problem/G) | [LG 传送门](https://www.luogu.com.cn/problem/CF1621G)。 优化树状数组 + 反向处理。 ## Solution - 发现直接做不好下手。难点主要 ......

AtCoder ABC168C : (Colon) 题解

## AtCoder ABC168C : (Colon) 题解 ### 前置知识 本题主要考察的是高中知识——余弦定理。 具体的相关信息可以参考知乎的一片文章:《[余弦定理及推理证明过程](https://zhuanlan.zhihu.com/p/359951716)》。 简单的说,就是如果两个线段 ......
题解 AtCoder Colon 168C ABC