how abc 306 ak
Codeforces Round 866 (Div. 2) ABC
https://codeforces.com/contest/1820 ###A. Yura's New Name 题目大意: 给定一个字符串,每次这个表情^^或者这个表情^_^就是合法的 问我们这个字符串至少要添加多少东西使得怎么看都是合法的? input 7 ^______^ ___^_^^^_ ......
ABC297F AtCoder Beginner Contest 297 F - Minimum Bounding Box 2
https://atcoder.jp/contests/abc297/tasks/abc297_f 在 $n \times m$ 的棋盘上放置 $k$ 个棋子,记矩形 A 为能覆盖所有 $k$ 个棋子的最小的矩形,求 A 的面积的期望 将问题反过来考虑,枚举每种矩形有多少种放置棋子的方案,对于一个 ......
How to execute a shell script in the .profiles file All In One
How to execute a shell script in the .profiles file All In One
......
UVA10943 How do you add?
两个数 n,m,求 用 m 个 [0,n] 的整数相加使其和为 n 的方案数。 #include <iostream> #include <cstring> #include <sstream> using namespace std; const int N =102; const int mod ......
How to use Linux shell command filter the IP address All In One
How to use Linux shell command filter the IP address All In One
如何使用 Linux shell 命令过滤 IP 地址
......
abc250_e Prefix Equality 题解
Prefix Equality 题意 给定长度为 $n$ 的整数序列 $a$ 和 $b$。 对于每组询问,回答以下内容: 如果 $a$ 的前 $x_i$ 项数值构成的不重复集合与 $b$ 的前 $y_i$ 项相同,输出 Yes,否则输出 No。 数据范围 $1 \leqslant x_i, y_i ......
abc250_d 250-like Number 题解
250-like Number 题意 给定一个整数 $n$,求有多少小于等于 $n$ 的满足以下条件的整数 $k$: $k$ 可以被表示为 $k = p \times q^3$,其中 $p \lt q$,并且 $p, q$ 均为质数。 数据范围 $1 \leqslant n \leqslant 10 ......
How to use the Raspberry Pi to study the Linux kernel source code All In One
How to use the Raspberry Pi to study the Linux kernel source code All In One
如何利用树莓派来研究 Linux 内核源码 All In One
在 Linux 系统中,一切皆文件!
......
ABC214G
首先可以考虑容斥,也就是 $ans=\sum_{i=0}^n (-1)^i\times h_i\times (n-i)!$ ,$h_i$ 表示有 $i$ 步限制不满足的方案数。 考虑到如果对于一个排列,连 $i\rightarrow p_i$ 的边会形成若干个环组成的有向图。那么对于两个相同大小的排 ......
abc249_f Ignore Operations 题解
Ignore Operations 题意 Takahashi 有一个整数 $x$,初始 $x = 0$。 有 $n$ 次操作。第 $i$ 次操作用两个整数 $t_i, y_i$ 描述: 如果 $t_i = 1$,将整数 $x$ 替换为 $y_i$。 如果 $t_i = 2$,将整数 $x$ 替换为 ......
abc249_d Index Trio 题解
Index Trio 题意 给定长度为 $n$ 的整数序列 $a = (a_1, a_2, \dots, a_n)$。请你求出有多少个整数三元组 $(i, j, k)$ 满足: $1 \leqslant i, j, k \leqslant N$ $\frac{a_i}{a_j} = a_k$ 数据范 ......
Udhcpc.user script documentation and how to hotplug for DHCP events
Udhcpc.user script documentation and how to hotplug for DHCP events https://forum.openwrt.org/t/udhcpc-user-script-documentation-and-how-to-hotplug-fo ......
how to use cURL with a variable in the URL string All In One
how to use cURL with a variable in the URL string All In One
如何在 cURL 的 URL 字符串中使用变量
系统变量
环境变量
shell 变量 ......
How to use SSH to access the Raspberry Pi without know the Wi-Fi IP address All In One
How to use SSH to access the Raspberry Pi without know the Wi-Fi IP address All In One
如何在不知道 Wi-Fi IP 地址的情况下使用 SSH 访问树莓派
没有显示器,不知道树莓派 IP 地址的情况下,如何通过 ... ......
ABC298解题报告
比赛传送门 C. Cards Query Problem 题意:有一些盒子,每次操作有以下三种:把数 $i$ 扔到集合 $j$ 内;查询某个集合里的所有数(升序)(可重);查询包含某个数的集合(升序)(去重)。保证输出的数个数在 $2\times 10^5$ 内。 可以维护两个 map 套 set, ......
[oeasy]python00134_[趣味拓展]python起源_历史_Guido人生_ABC编程语言_Tanenbaum
python 历史 回忆上次内容 颜文字是kaomoji 把字符变成一种图画的方法 一层叠一层 很多好玩儿的kaomoji是一层层堆叠起来的meme 添加图片注释,不超过 140 字(可选) 虚拟的表情也在真实世界有巨大影响 一步步地影响 添加图片注释,不超过 140 字(可选) 字符编码就 ......
ABC249F 题解
前言 题目传送门! 更好的阅读体验? 很好玩的贪心。 思路 如果第 $i$ 次操作为覆盖操作,那么 $1 \sim i-1$ 次操作都是无效的,原因显然。 这启示我们从后往前扫(前面的会被忽略,后面的不会啊!)。 在此基础上,就是分类讨论一下(假设当前的最大答案为 $sum$): 当前操作是覆盖操作 ......
How to use command line find all users on Linux All In One
How to use command line find all users on Linux All In One
Linux 系统中一切皆文件, 就像 js 中一切皆对象一样
/etc/passwd
......
[ABC296Ex] Unite 题解
考虑状压 dp。 设 $f_{i,j,s}$ 表示当前正在决策坐标为 $(i,j)$ 的格子,且列状态为 $s$。其中列状态维护了当前轮廓线上的连通块,我们可以使用最小表示法来简单维护。 (为什么不用广义括号序列?因为其涉及到 $5$ 个可选值,由于 $m\le 7$,所以这两个都需要用到八进制,而 ......
how to create one command line configuration tool with shell language on Linux All In One
how to create one command line configuration tool with shell language on Linux All In One
如何在 Linux 上用 shell 语言创建一个命令行配置工具
raspi-config
......
AtCoder Regular Contest 110 E Shorten ABC
洛谷传送门 AtCoder 传送门 考虑把 $\text{A}$ 看成 $1$,$\text{B}$ 看成 $2$,$\text{C}$ 看成 $3$,那么一次操作相当于选择一个 $a_i \ne a_{i+1}$ 的 $i$,将 $a_i$ 和 $a_{i+1}$ 替换成一个数 $a_i \opl ......
ABC214G/S2OJ1504
ABC214G/S2OJ1504 又是我不会的/hanx 做了一天/ng 直接做显然是不行的,所以考虑转化题意,对于 $\forall i$ ,连边 $(A_i,B_i)$ ,现在题意就变成给边染色了,这样统计的就是不合法的,考虑容斥,一个很 $\text{naive}$ 的容斥是 总数-不合法,发 ......
How to Calculate the size of archive log files each day
Calculate the size of archive log files each day SQL> SELECT TRUNC(COMPLETION_TIME) ARCHIVED_DATE, SUM(BLOCKS * BLOCK_SIZE) / 1024 / 1024 SIZE_IN_MB F ......
how to use crontab to send an email on Linux All In One
how to use crontab to send an email on Linux All In One
......
How to Disable Suspend and Hibernation Modes In Linux
How to Disable Suspend and Hibernation Modes In Linux Disable Suspend and Hibernation in Linux sudo systemctl mask sleep.target suspend.target hiberna ......
ABC297Ex - Diff Adjacent
ABC297Ex - Diff Adjacent 题目链接。 $\text{difficulty}=4.5,3$。 $\text{tags}=多项式,生成函数,容斥$。 首先如果直接计数不相邻的那么至少需要记录当前的和以及最后一个数是什么,复杂度无法接受。那么考虑容斥。 接下来对于一个固定的序列 $ ......
how to use Vim delete one line All In One
how to use Vim delete one line All In One
在正常模式下(非编辑模式 i),光标选中所在行, 连续按两下d键,即可删除一整行 ✅
......
abc248_e K-colinear Line 题解
K-colinear Line 题意 平面直角坐标系上给出 $n$ 个点,第 $i$ 个点的坐标为 $(x_i, y_i)$。 请求出平面上有多少条直线穿过 $n$ 个点中的至少 $k$ 个点。如果有无数条这样的直线,输出 Infinity。 数据范围 $1 \leqslant K \leqslan ......
abc247_f Cards 题解
Cards 题意 有 $N$ 张卡片,每张卡片上都写有两个数字,第 $i$ 张卡片上的数字分别为 $P_i, Q_i$。 同时,$P = (P_1, P_2, \dots, P_N)$ 和 $Q = (Q_1, Q_2, \dots, Q_N)$ 都是 $(1, 2, \dots, N)$ 的全排列 ......