摘要:
给定一个长为 $n$ 的序列和常数 $k$,求此序列的中位数为 $k$ 的区间的数量。一个长为 $m$ 的序列的中位数定义为将此序列从小到大排序后第 $\lceil m / 2 \rceil$ 个数。 解法 直接考虑中位数 等于 $k$ 的区间是比较困难的,我们转而考虑中位数 大于等于 $k$ 的区 阅读全文
「以解决问题为乐」
真的喜欢么?真的喜欢就去做吧。
Lost Boy Calling 。。。。
... Many of these issues are best dealt with at the algorithmic level, rather than by "tweaking" the code.
This is an obscurity that catches the unwary.
原来我什么都不懂。