找中位数最暴力的方法是先排序再取中位数, 时间复杂度 $O(n\log n)$. 后来才得知中位数有时间复杂度 $O(n)$ 的算法, 事实上任意顺序统计量都可以用 $O(n)$ 时间找出.
Lights-Out
Each employee of MegaCorp has a separate office in the MegaCorp office building. Each office is equipped with one overhead light and one toggle switch to turn the light on and off.
Every day, the employees turn on all lights when they come to work. Each evening they turn off all lights when they go home.
One day, the employees arrive to discover that someone has played a rather elaborate hoax on them. Though all looks fine when they come in (all lights are off), every time an employee flicks the switch in her office, this not only toggles the light in her office, but also the lights in the offices of all of her friends. (Friendship is a symmetric relationship.)
The question: does there necessarily exist an arrangement of the switches that will turn all lights simultaneously on (so that work can begin)? Prove your answer.
Super Egg Drop
You are given $k$ eggs, and you have access to a building with $N$ floors from $1$ to $N$.
Each egg is identical in function, and if an egg breaks, you cannot drop it again.
You know that there exists a floor $F$ with $0 \le F \le N$ such that any egg dropped at a floor higher than $F$ will break, and any egg dropped at or below floor $F$ will not break.
Each move, you may take an egg (if you have an unbroken one) and drop it from any floor $X$ (with $1 \le X \le N$).
Your goal is to know with certainty what the value of $F$ is.
What is the minimum number of moves that you need to know with certainty what $F$ is, regardless of the initial value of $F$?
宝可梦对战入门资料集
仅仅是一些材料的堆砌, 包括 Pokémon Showdown 上的 66 单打 (gen7) 以及更习见的 VGC 64 双打.
英语杂录
工具网站
- Vocabulary.com. 释义有趣, 例句分领域.
- Oxford, Merriam-Webster, Collins. 我用得最多的三个字典, “网易有道词典” 整合了它们, 也是极其好用的 app.
- Longman 的特色是可以看搭配.
Handle vs handler
2022/9/6
参考 In programming, what is the difference between a handle and a handler? - Quora
Transparent
一次阅读马拉松经历
关于阅马
阅读马拉松是由 TELL 发起, 自身独立运营的阅读比赛, 旨在用简单有趣的方式推广阅读. 参与者需要在规定时间内读完一本书, 并达到一定的阅读质量, 其实就是做一些 “阅读理解” 选择题, 以阅读时间 + 错题罚时来判定成绩.
注: TELL 由 think, enjoy, live, link 首字母组合而成, 是一家致力于研究和传播故事讲述的艺术与技术的机构.
活动体验非常糟糕.
从提升树到 XGBoost, 原理简介
提升树是以分类树或回归树为基本分类器的提升方法, 模型表示为决策树的加法模型:
\[F_M(x) = \sum_{m=0}^M f(x;\Theta_m),\]其中 $M$ 为树的个数, $f(x;\Theta_m)$ 表示决策树, $\Theta_m$ 为其参数.
用 SVD 进行图像压缩
简单复习.