上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: 2019/5/19 这个五月份真是出乎意料的颓废啊... 每天就是 不过马上thusc了怎么能这么颓废呢? 所以写一下这篇博客~~纪念一下~~记录一下这几天想干的事... 2019/5/20 数学 [] 多项式 2 [] 小朋友与二叉树 [x] 二项式反演 [x] 几道数学题 2019/5/21 计 阅读全文
posted @ 2019-05-19 20:19 Ubospica 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 记一下日常见到的一些奇怪的 Markdown / LaTeX 用法... Markdown LaTeX QED \hfill $\blacksquare$ LaTeX 数学 1. 运算符 1.1 造运算符: a \operatorname{sin} c | \(a \operatorname {si 阅读全文
posted @ 2019-05-02 07:52 Ubospica 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 简介 对于一些区间查询问题, 当询问与数组大小同阶时, 把询问按块排序, 可以得到均摊根号复杂度的算法. 普通莫队 不含修改, 单点加入/删除均较快 ( $O(1)$ 或 $O(\log n)$ 等). 流程 1. 区间大小 $S = \sqrt n$ 1. 排序: 按 $(\lceil \frac 阅读全文
posted @ 2019-04-28 19:52 Ubospica 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 简介 2 SAT (2 satisfiability) 问题形如: 1. 给定一些变量 $x_i \in \{true, false\}$; 1. 给定一些一元/二元约束条件, 如 $x_i \land \lnot x_j$, 利用 $\land$ 连接; 1. 为每一个变量赋一个值, 满足所有约束 阅读全文
posted @ 2019-04-22 22:05 Ubospica 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 主要内容来自 . vimtutor x d del dd del whole line i a add A = $a w to next word space 分割 连续标点看做一个单词, 包括汉字标点 汉字看做一个单词 exclusive e to end of word inclusive u 阅读全文
posted @ 2019-04-03 11:45 Ubospica 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 按秩合并 && 撤销 int fa[nsz],dep[nsz]; int stk[nsz][2],top=0; void init(){rep(i,1,n)fa[i]=i,dep[i]=1;} int find(int p){return p==fa[p]?p:find(fa[p]);} int i 阅读全文
posted @ 2019-04-02 21:43 Ubospica 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Description "BZOJ" Solution 并不要求在线, 然后就有很优秀 ~~好写~~ 的离线做法... 我们考虑把每个操作建成一个点 $i$. 对于 $1$ 和 $3$ 操作, 连边 $(i 1, i)$; 对于 $2$ 操作, 连边 $(k_i, i)$. 容易发现这是一棵树, 并 阅读全文
posted @ 2019-04-02 21:39 Ubospica 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Code Result Wikipedia as an example 阅读全文
posted @ 2019-04-02 20:28 Ubospica 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 反演原理 考虑两个数列 $f_i$, $g_i$. 若存在 $a_{i,j}$, $b_{i,j}$, 使得 $$ g_n = \sum_{i=0}^n a_{n,i}f_i \tag{1.1}$$ 并且 $$ f_n = \sum_{i = 0}^n b_{n,i}g_i \tag{1.2}$$ 阅读全文
posted @ 2019-03-28 23:05 Ubospica 阅读(947) 评论(0) 推荐(0) 编辑
摘要: Solution 线段树分治, 然后直接在线段树上dfs, 在进入/回溯的过程中维护并查集的merge/split. 对于split操作, 可以在merge时按秩合并, 然后利用栈记录, split时恢复即可. Code include include include include include 阅读全文
posted @ 2019-03-27 16:28 Ubospica 阅读(337) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页