
算法录
eazo
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
逆序对
定义设 A 为一个有 n 个数字的有序集 (n>1),其中所有数字各不相同。如果存在正整数 i, j 使得 1 ≤ i < j ≤ n 而且 A[i] > A[j],则 <A[i], A[j]> 这个有序对称为 A 的一个逆序对,也称作逆序数。求解方法1.暴力枚举利用两重循环进行枚举。该算法的时间复杂原创 2019-02-19 16:04:39 · 2544 阅读 · 0 评论 -
Multiple Clocks(gcd和lcm)
题目描述We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly Ti seconds.Initially, the hand of every clock stands still, pointing directly upward.Now, Dolphin starts all...原创 2019-03-26 19:36:18 · 291 阅读 · 0 评论 -
Hunter’s Apprentice(判断顺逆时针)
题目描述When you were five years old, you watched in horror as a spiked devil murdered your parents. You would have died too, except you were saved by Rose, a passing demon hunter. She ended up adopting ...原创 2019-04-12 12:01:53 · 152 阅读 · 0 评论