Skip to content

Commit cf576e0

Browse files
committed
add links
1 parent 6eab91b commit cf576e0

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

copypasta/fenwick_tree.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ func fenwickTree(n int) {
106106

107107
// 求逆序对的方法之一
108108
// 如果 a 范围较大则需要离散化(但这样还不如直接用归并排序)
109+
// 归并做法见 misc.go 中的 mergeCount
109110
// 扩展 https://codeforces.com/problemset/problem/362/C
110111
// 环形最小逆序对 https://www.luogu.com.cn/problem/solution/P2995
111112
// 扩展:某些位置上的数待定时的逆序对的期望值 https://codeforces.com/problemset/problem/1096/F

copypasta/geometry.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@ func vec2Collection() {
832832
// https://algs4.cs.princeton.edu/code/edu/princeton/cs/algs4/GrahamScan.java.html
833833
// NOTE: 坐标值范围不超过 M 的凸多边形的顶点数为 O(√M) 个
834834
// 模板题 https://www.luogu.com.cn/problem/P2742 LC587 https://leetcode-cn.com/problems/erect-the-fence/
835+
// 构造 LCP15 https://leetcode-cn.com/problems/you-le-yuan-de-mi-gong/
835836
// 限制区间长度的区间最大均值问题 https://codeforces.com/edu/course/2/lesson/6/4/practice/contest/285069/problem/A
836837
// todo poj 2187 1113 1912 3608 2079 3246 3689
837838
convexHull := func(ps []vec) (q []vec) {

copypasta/misc.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,11 @@ func mapPos(a, b []int) []int {
416416
return ids
417417
}
418418

419-
// 逆序对
419+
// 归并排序与逆序对
420420
// LC 面试题 51 https://leetcode-cn.com/problems/shu-zu-zhong-de-ni-xu-dui-lcof/
421-
// EXTRA: LC 327 https://leetcode-cn.com/problems/count-of-range-sum/
422-
// LC 493 https://leetcode-cn.com/problems/reverse-pairs/
421+
// EXTRA: LC315 https://leetcode-cn.com/problems/count-of-smaller-numbers-after-self/
422+
// LC327 https://leetcode-cn.com/problems/count-of-range-sum/
423+
// LC493 https://leetcode-cn.com/problems/reverse-pairs/
423424
// 一张关于归并排序的好图 https://www.cnblogs.com/chengxiao/p/6194356.html
424425
func mergeCount(a []int) int64 {
425426
n := len(a)

copypasta/sort.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,12 @@ func sortCollections() {
369369
// https://codeforces.com/gym/101649 K
370370
// https://www.luogu.com.cn/problem/P1570
371371
// https://loj.ac/p/149
372-
// 连续子段的算数平均值 https://codeforces.com/edu/course/2/lesson/6/4/practice/contest/285069/problem/A https://codeforces.com/problemset/problem/1003/C https://www.luogu.com.cn/problem/P1404 https://www.acwing.com/problem/content/104/
372+
// 有长度限制的连续子段的(最大/最小)算数平均值
373+
// https://codeforces.com/edu/course/2/lesson/6/4/practice/contest/285069/problem/A
374+
// https://codeforces.com/problemset/problem/1003/C
375+
// https://www.luogu.com.cn/problem/P1404
376+
// https://www.acwing.com/problem/content/104/
377+
// LC644 https://leetcode-cn.com/problems/maximum-average-subarray-ii/
373378
// O(n) 做法见 04 年集训队周源论文《浅谈数形结合思想在信息学竞赛中的应用》(或紫书 p.243 例题 8-9,UVa 1451 https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=447&page=show_problem&problem=4197)
374379
// 与 0-1 背包结合,即最优比率背包 https://www.luogu.com.cn/problem/P4377 https://ac.nowcoder.com/acm/contest/2271/F
375380
// 与生成树结合,即最优比率生成树 https://www.luogu.com.cn/problem/P4951 http://poj.org/problem?id=2728

0 commit comments

Comments
 (0)