how abc 306 ak
How To Use UUID To Mount Partitions / Volumes Under Ubuntu Linux
sudo blkid sudo vim /etc/fstab UUID=41c22818-fbad-4da6-8196-c816df0b7aa8 /mnt/elaine ext4 defaults 0 1 https://www.cyberciti.biz/faq/linux-finding-usi ......
AT_abc195_e
博弈论dp dp[i][j]表示到了第 i 轮,此时数为j,对 当前的人对 j 数进行操作 1表示T赢,0表示A赢 初始化:dp[n+1][0]=1,T赢的条件,其余memset -1 博弈论dp用记忆化搜索dp 此时dfs( pos , num ) 将向 dfs(pos+1,num*10%7) 或 ......
ABC 297 DE
https://atcoder.jp/contests/abc297/tasks/abc297_d ###D - Count Subtractions 题目大意: 给定一个n和一个m,每次如果n>m,n-=m;如果n<m,m-=n; 问我们多少次操作才能使n=m? Sample Input 1 3 ......
「题解」ABC296Ex Unite
考虑一行一行往下 dp,一个状态需要记录每个格子是否是黑色,对于黑色还有记录其并查集。爆搜跑一下本质不同状态数不是很多,dp 就行了。 $m=7$ 的时候状态数只有 324. #include<cstdio> #include<vector> #include<queue> #include<cst ......
ABC217G
记 $f_{i,j}$ 表示前 $i$ 个数分成 $j$ 组的方案数。 首先你可以新增一个组,将当前这个数扔进去。那么 $f_{i,j} \leftarrow f_{i-1,j-1}$。 如果我们不新增一个组,那么我们可能的选择组别个数就是 $j - \frac{i-1}{m}$ ,因为在此之前已经 ......
ABC216G
将区间按照右端点排序,贪心的往最右边填 $1$,不难发现这样一定是正确的。感性理解一下就是越往右的位置对于后面的区间贡献越大。 而且每个点最多只会被放置一个 $1$,所以我们可以暴力的找到下一个可以填的位置,并填入 $1$,可以使用线段树维护,复杂度是 $\mathcal{O}(n \log n)$ ......
how to get Raspberry Pi System Information All In One
how to get Raspberry Pi System Information All In One
......
「解题报告」ABC297Ex Diff Adjacent
如果 joke 还在,这题应当会出现在他的鲜花里吧。 虽然确实不难,但是我还是不理解 5:00 切的是什么人才。 题目一眼看上去就很生成函数。先不管长度总和,先考虑求方案数。这个限制看起来就很容斥,我们钦定多少对数相等,其它任意填。那么答案的生成函数就是: $$F(x) = \frac{1}{1 - ......
How to publish a Linux package to mirror All In One
How to publish a Linux package to mirror All In One
......
AcWing 第 98 场周赛 ABC
https://www.acwing.com/activity/content/competition/problem_list/3128/ ###4947. 大整数 题目大意: 给定n,k。输出n个k。 输入样例: 3 2 输出样例: 222 #include<bits/stdc++.h> usi ......
AtCoder ABC239 E - Subtree K-th Max
AtCoder ABC239 E - Subtree K-th Max 题目描述 给定一棵 $n$ 个节点的树,$i$ 节点的权值为 $x_i$,根节点编号为 $1$。 现有 $Q$个询问,每个询问给定 $v,k$,求节点 $v$ 的子树第 $k$ 大的数。 输入输出样例 5 2 1 2 3 4 5 ......
AtCoder ABC286 C - Chinese Restaurant
AtCoder ABC286 C - Chinese Restaurant 题目描述 有 $N$ 个人从 $0$ 开始编号, 按逆时针顺序间隔均匀地坐在转盘周围。 在开始时, 第 $p_i$ 盘菜在第 $i$ 个人的前面。 现在, 你可以进行以下操作 $0$ 次或多次。 将转盘逆时针旋转 $\dfr ......
AtCoder ABC294 F - Sugar Water 2
AtCoder ABC294 F - Sugar Water 2 题意 有 $2$ 排糖和水。 第 $1$ 排有 $N$ 瓶糖和 $N$ 瓶水。糖分别有 $A_i$ 克,水分别有 $B_i$ 克。 第 $2$ 排有 $M$ 瓶糖和 $M$ 瓶水,糖分别有 $C_i$ 克,水分别有 $D_i$ 克。 ......
AtCoder ABC295 D - Three Days Ago
AtCoder ABC295 D - Three Days Ago 题目描述 给出一个数字串,问有多少子段满足,可以以某种方式将这个子段重排,将子段分成两个完全相同的部分。 样例输入输出 20230322 4 $(1, 6) (1, 8) (2, 7) (7, 8)$ 都可以满足条件 分析 如果要满 ......
How to use Xbox Series X as a DVD player All In One
How to use Xbox Series X as a DVD player All In One
如何把 Xbox Series X 做为一个 DVD 播放器使用
Blu-ray Player
蓝光播放器
DVD 播放器
......
ABC212G
ABC 212 G 直接做不好做,考虑将 $x,y$ 替换成某个幂的形式来试图去掉底数。 记 $g$ 为 $P$ 的原根,那么 $x,y$ 一定可以表示成 $g$ 的某个在模意义下的幂,不妨设 $x \equiv g^{i} (\bmod P),y \equiv x^{j}(\bmod P)$。 那 ......
牛客小白月赛61 ABCE*
https://ac.nowcoder.com/acm/contest/46597 ###A-超市里扫货 #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; const ......
How to Configure Nginx reverse proxy the domain
未测试过,自己记录待用 http { resolver 8.8.8.8; upstream example { server http://example.com resolve [use_last] ...; keepalive 1024; } 第二种负载均衡 upstream mytarget{ ......
abc296-F
题目链接:https://atcoder.jp/contests/abc296/tasks/abc296_f 思维题,自己想的时候真没啥思路,看了很多题解才渐渐明白,也能大致证明正确性。 前置知识: 交换一个排列中的两个元素一次,会改变它的奇偶性。 思路: 1.当两个数组的数的数量都不相等时,肯定是 ......
How CloudFront works with regional edge caches
CloudFront points of presence (also known as POPs or edge locations) make sure that popular content can be served quickly to your viewers. CloudFront ......
How CloudFront delivers content to your users without regional edge caches
本文主要讲述Cloudfront的工作流程、如何将用户请求的数据-资源-对象,返回给用户 本文描述的是没有使用 【区域边缘缓存】的情况,目前为止,AWS中国区的cloudfront本来也就没有使用区域边缘 After you configure CloudFront to deliver your ......
牛客小白月赛62 ABC
https://ac.nowcoder.com/acm/contest/47266#question ###A-幼稚园的树 输入 2 6 1 10 100 200 120 230 5 230 200 7 5 1 2 3 4 5 10 5 2 1 输出 31 40 130 230 150 225 1 ......
ABC295(D~G)
Tasks - AtCoder Beginner Contest 295 这篇是超级抽象的简要tj,看不懂不要骂我这个蒟蒻QWQ D - Three Days Ago (atcoder.jp) $f_i$表示$[1,i]$的所有数的奇偶情况,如果$b$有奇数个,那么$f_i|=2^b$,特别的,$f ......
ABC295 E
ABC295 E 给你一个长度为 $N$ 的序列 $A$ 满足 $\forall i\in [1,N],A_i\in[0,M]$,其中 $M$ 是一个给定的常数 执行以下两种操作 不断把序列中的一个 $0$ 换成在 $[1, M]$ 中均匀随机的一个数,直到序列中没有 $0$ 对整个序列升序排序 求 ......
洛谷 P8762 [蓝桥杯 2021 国 ABC] 123 题解
为什么可以使用前缀和,这里提供解释: 初读题目,我们发现这个数列很迷惑,似乎不能使用数学方法来解。 $$ 1,1,2,1,2,3,1,2,3,4,\cdots $$ 但是,我们可以想到 数形结合 的方式,我们将数列看作一个三角形,于是他变成了: $$1$$ $$1,2$$ $$1,2,3$$ $$1 ......
AcWing 第 97 场周赛 ABC(dfs)
https://www.acwing.com/activity/content/competition/problem_list/3088/ 果然绩点成绩和竞赛水平总得寄一个(to me ###4944. 热身计算 #include<bits/stdc++.h> using namespace st ......
How to find the "usbmodem" of Raspberry Pi Pico on macOS All In One
How to find the "usbmodem" of Raspberry Pi Pico on macOS All In One
/dev/tty.usbmodem0000000000001 not exist bug ❌
......
How to check the USB devices connected to Linux by using Terminal All In One
How to check the USB devices connected to Linux by using Terminal All In One
Raspberry Pi
macOS
......
[ABC273D] LRUD Instructions
题目链接 题解 模拟题。 观察题目,我们发现,无论问的是前/后/左/右,你都只会在一条直线上走,那对于这条直线,我们可以记录所有这条直线上的障碍物,然后找到距离当前点最近的障碍物,也就是说我们只能走到那个障碍物那块。 虽然数据范围高达 $10^9$,但是 $n\le10^5$,所以用 $map$ 套 ......