Secretary Problem

“Imagine there are eight roses in your garden; you inspect them one-by-one randomly. Take the first three roses you encounter as sample and go on. Once you encounter a rose more beautiful than any of the first three roses, you pick it up and stop. How likely is it that the one you picked up is the most beautiful one?”

Concrete Mathematics Notes

I have finished reading the second chapter of Concrete Mathematics. Here are my notes on the book and solutions to the exercises.

Miller–Rabin 素性测试

整理了 Miller–Rabin 素性测试的原理及实现方法。

区间最小公倍数

题目链接:Codeforces Hello 2015 (Div.2) - LCM Query

求出某个序列所有给定长度的连续子序列的最小公倍数中的最小值。考虑到有大量询问、无需进行修改,故采用 稀疏表 + 离线处理 的方法。

稀疏表及其应用

本文介绍了稀疏表的基本用法,以及如何在相关习题中应用它。

线段树之懒惰标记

最近在学习线段树的有关知识,期间遇到的重要的知识点和不错的习题,我会总结并记录下来。本文将持续更新,并将作为该系列的索引置顶一段时间。当前的索引如下:

[x]-基本概念
[x]-懒惰标记
[ ]-扫描线(学习中…)
[ ]-……