monocarp and set the
The solution of ABC144F
都不知道什么时候做的题了 problem & blog 一开始很容易想到枚举断边然后 DP 算代价。 于是很容易想到 DP 状态定义:设 \(dp_u\) 为从 \(u\) 出发到 \(n\) 的期望步数。 那么显然有 \(dp_u = \sum^{v_n}_{v_1} \dfrac{dp_{v_{ ......
vue_error_Runtime directive used on component with non-element root node. The directives will not function as intended
翻译: '运行时指令,用于非元素根节点的组件。这些指令将无法发挥预期的作用'; 这个错误发生在我将v-show放在自定义组件上时, 我想是因为自定义组件在渲染时会被自定义组件的内部元素替换, 因此设置是无效的 解决: 在自定义组件外加一个div, 把v-show写在div上 ......
Go - Change What Is Being Logged by the Standard Logger
Problem: You want to change what the standard logger logs. Solution: Use the SetFlags function to set flags and add fields to each log line. The defau ......
Gym 104270 The 2018 ICPC Asia Qingdao Regional Programming Contest (The 1st Universal Cup, Stage 9: Qingdao)
A. Sequence and Sequence B. Kawa Exam 可以发现,对答案会产生影响的只有割边,把所有边双缩起来,然后就是一个森林。 考虑一个树的时候怎么做,就是对于每条边求出这条边两端的众数个数,考虑线段树合并,每次动态维护子树内的众数和子树外的众数。 #include<iost ......
Go - Using Multiple Versions of the Same Dependent Packages
Problem: You want to use multiple versions of the same dependent packages in your code. Solution: Use the replace directive in the go.mod file to rena ......
CF441E Valera and Number
题目链接 这道题一个朴素的思路就是:维护 \(f_{i,j}\) 表示第 \(i\) 轮后 \(x=j\) 的方案数。时间复杂度 \(O(k\times 2^k)\)。显然过不了。 我们尝试寻找一个能抛开 \(x\) 的值域的做法。不妨重新设 \(f_{i,j}\) 表示第 \(i\) 轮结束时的 ......
Setting up development environment with Ubuntu 22.04
0. Dont' use Snap & Ubuntu appliation store. 90%的问题可以通过重启解决 改了IP后需要,禁用网络后再开启才生效 1. Input: https://shurufa.sogou.com/linux/guide 2. IDE: https://www.je ......
Road of the King
2023-09-28 题目 Road of the King 难度&重要性(1~10):8.5 题目来源 luogu 题目算法 (纯)dp 解题思路 一道非常好而有意思的题目,码量巨短。 首先观察数据范围,发现是 \(n\le 300\),考虑 \(O(n^3)\) 的 dp。 主要的难点在于如何去 ......
[Linux] Compile and Build h5py with MPI
How to Install H5PY-MPI 0. Preparation linux system gcc anaconda/miniconda 1. Install open-mpi Go to "https://www.open-mpi.org/software/". Download th ......
结对项目——实现一个自动生成小学四则运算题目的命令行程序—陈泽瀚and林桂旭
软工作业3:结对项目:实现一个自动生成小学四则运算题目的命令行程序 作业属于课程 课程首页 - 计科21级1班 - 广东工业大学 - 班级博客 - 博客园 作业要求 个人项目-作业2- 计科21级1班 - 广东工业大学 - 班级博客 - 博客园 这个作业的目标 实现一个自动生成小学四则运算题目的命令 ......
pip安装包报错:PS C:\Users\Administrator\Desktop> pip install request ERROR: Could not find a version that satisfies the requirement request (from versions: none)
PS C:\Users\Administrator\Desktop> pip install requestERROR: Could not find a version that satisfies the requirement request (from versions: none)ERRO ......
The Out-of-Memory Syndrome, or: Why Do I Still Need a Pagefile?
The Out-of-Memory Syndrome, or: Why Do I Still Need a Pagefile? July 19, 2016 aziusMemory Management 13 Comments Windows’ memory management—specifical ......
lvalue and rvalue
lvalue and rvalue 好用的工具 写在前面 如何记住 排 列 组 合 ? 那如何区分这些东西呢? const int& int& const int const & const …… What is a lvalue and what is an rvalue? Awsome vide ......
qoj6735. Tree (The 1st Universal Cup. Stage 22: Shaanxi)
https://qoj.ac/contest/1287/problem/6735 考虑定一个根,然后把每个点的点权附属在父边权上,让每条边的边权变成一个 pair。 这样,一个符合条件的路径需要满足的条件是:路径内所有边的边权 pair 相同,以及 路径根节点(lca)的颜色符合。 对于当前树上每个 ......
Snapshot appears to have been created more than one day into the future!
Snapshot appears to have been created more than one day into the future! Raspberry PI 4b上安装freebsd13.2 aarch系统后,使用ssh链接,输入portsnap fetch extract命令,提示: ......
The 2021 China Collegiate Programming Contest (Harbin) JBEIDG
The 2021 China Collegiate Programming Contest (Harbin) 目录The 2021 China Collegiate Programming Contest (Harbin)VP概况J - Local MinimumB - Magical Subseq ......
[AGC012E] Camel and Oases
Camel and Oases 不难发现对于某个 V,一个点扩展出去的一段区间内所有点的区间相同。 故对于 v,\(\lfloor \frac{v}{2}\rfloor\),\(\lfloor\frac{\lfloor \frac{v}{2}\rfloor}{2}\rfloor\)...1,预处理 ......
Gym 104172 The 2023 ICPC Asia Hong Kong Regional Programming Contest (The 1st Universal Cup, Stage 2Hong Kong)
A. TreeScript 令 \(f_u\) 表示 \(u\) 及 \(u\) 子树中的节点都创建的最小数量。 如果 \(u\) 只有一个儿子,那么可以将子树最后一个节点存储在当前的 \(u\) 中,答案就是 \(f_v\)。 若 \(u\) 有多个儿子: 令 \(t=\max\limits_{v ......
连接正负极Connection of positive and negative poles
不要把物理公式看作数学公式,请也尊重自然的经验法则。 Don't see the physical formulas as mathematical formulas, please also respect the experience rules of nature. 连接正负极 Connect ......
CS61A: Structure and Interpretation of Computer Programs 笔记
Functions Environment Diagrams:左侧为 Frames,右侧为 Objects。 Name 类似变量名,它们存储在 Frame 中,指向各种各样的 Objects,比如值或函数。一个 Name 同时只能指向一个 Object,但可以改变自身指向,不受“类型”影响(Name ......
Docker|--E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
错误 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them ......
SQL注入 --【过滤or(包含information、orderby这种也寄了)和and的类型】
来自: [SWPU2019]Web1 详见博客: https://blog.csdn.net/plant1234/article/details/124205120 payload如下: 查看行数 1'/**/group/**/by/**/1,'1 ...... 直到 1'/**/group/**/ ......
数据库 - MySQL转换SQL Server时,替换 FIND_IN_SET 函数引发的问题
MySQL转换SQL Server时,替换 FIND_IN_SET 函数引发的问题 在之前的文章中,我列举出了一个当 MySQL 转换 SQL Server 时,FIND_IN_SET 函数在 SQL Server 中的解决方案:链接 就是使用 charindex(cast(匹配列 as varch ......
Wi-Fi Basic PHY and MAC
总体架构 Architecture Wi-Fi 网络的网络拓扑 首先我们从下面这张图来了解一下 Wi-Fi 网络的网络拓扑 BSS Basic Service Set 基本服务集是 802.11 网络的基本组件 building block。每个 BSS 基本服务集都一个唯一的标识,称为 BSSID ......
[892] Change the background color of a table in a Word document
ref: python-docx Changing Table Cell Background Color. To change the background color of a table in a Word document using Python, you can use the pyth ......
Solution Set - 图上问题
CF360E Link&Submission. 首先显然可以选择的边的权值一定会取端点值。事实上,第一个人经过的边选最小,第一个人不经过的边选最大,这样一定不劣。进一步,如果 \(s_1\) 到点 \(u\) 的距离小于等于 \(s_2\),则 \((u,v)\) 这条边应该取最小值。所以可以初始全 ......
How to get the original size of an image using JavaScript All In One
How to get the original size of an image using JavaScript All In One
如何使用 JavaScript 获取一个图片像的原始大小
naturalWidth & naturalHeight
aspect ratio / 纵横比
......
Codeforces Round 738 (Div. 2) A. Mocha and Math
给一个数组 \(a_1, a_2, \cdots, a_n\) 。可以执行以下操作任意次: 选择 \(l, r (1 \leq l < r \leq n)\) ,对于任意 \(l \leq i \leq r\) ,同时执行所有 \(a_{l + i} = a_{l + i} \& a_{r - i} ......
Anton and School - 2题解
2023-09-26 题目 难度&重要性(1~10): 题目来源 luogu 题目算法 组合数学 解题思路 前置知识 范德蒙德卷积公式:\(\sum\limits_{i=0}^kC_{n}^{i}\times C_{m}^{k-i}=C_{n+m}^k\)。 至于证明请看此篇文章。 Sol 我们这道 ......