Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EndlessCheng/codeforces-go
/ functions
Functions
8,098 in github.com/EndlessCheng/codeforces-go
⨍
Functions
8,098
◇
Types & classes
911
Method
query
(l, r int)
main/edu/2/segmenttree1/step1/b/main.go:68
Method
query
(l, x int)
main/edu/2/segmenttree1/step2/d/main.go:69
Method
query
(x int)
main/edu/2/segmenttree1/step2/c/main.go:67
Method
query
(k int)
main/edu/2/segmenttree1/step2/b/main.go:57
Method
query
(l, r int)
main/edu/2/segmenttree1/step4/a/main.go:74
Method
query
(l, r, upp int)
main/edu/2/segmenttree1/step4/e/main.go:66
Method
query
(l, r int)
main/edu/2/segmenttree1/step4/c/main.go:82
Method
query
(l, r int)
main/edu/2/segmenttree1/step4/b/main.go:59
Method
query
(l, r int)
main/200-299/242E.go:79
Method
query
(o, l, r int)
main/1000-1099/1093G.go:63
Method
query
(o, l, r int)
main/1-99/52C.go:60
Method
query
(o, l, r int)
misc/luogu/p3373.go:74
Method
query
(o, l, r int)
misc/acwing/weekly/3/c/c.go:38
Method
query
(o, l, r int)
misc/acwing/weekly/12/c/c.go:56
Method
query
o=1 [l,r] 1<=l<=r<=n
misc/atcoder/abc185/f/f.go:49
Method
query
(o, l, r int)
misc/atcoder/dp/w/w.go:56
Method
query
求区间和 [l,r] 1<=l<=r<=n
copypasta/fenwick_tree.go:224
Method
query
o=1 [l,r] 1<=l<=r<=n
copypasta/segment_tree.go:108
Method
query
o=1 [l,r] 1<=l<=r<=n
copypasta/segment_tree.go:278
Method
query
(l, r int)
copypasta/segment_tree.go:374
Method
query
(l, r int)
copypasta/segment_tree.go:461
Method
query
(l, r int)
copypasta/segment_tree.go:603
Method
query
(x1, y1, x2, y2 int)
copypasta/kd_tree.go:155
Method
query
(x1, y1, x2, y2 int)
copypasta/kd_tree.go:175
Method
query
Mock query
copypasta/template/interactive_problem/main_test.go:62
Method
query
(q request)
copypasta/template/interactive_problem/main.go:33
Method
query
(o, l, r int)
leetcode/biweekly/37/d/d.go:64
Method
query
(l, r int)
leetcode/season/2019fall/e/e.go:73
Method
query
(l, r int)
leetcode/weekly/174/d_nlogn.go:58
Method
query
(l, r int)
leetcode/weekly/214/d/d.go:22
Method
query
(l, r int)
leetcode/weekly/186/d/d.go:59
Method
query
(pos int)
leetcode/weekly/206/c/c.go:115
Method
query
(l, r int)
leetcode/weekly/187/c/c.go:62
Method
queryAll
()
copypasta/segment_tree.go:124
Method
queryAll
()
copypasta/segment_tree.go:295
Method
queryFirstLessPos
EXTRA: 查询整个区间小于 v 的最靠左的位置 这里线段树维护的是区间最小值 需要先判断 t[1].min < v
copypasta/segment_tree.go:135
Method
queryFirstLessPosInRange
EXTRA: 查询 [l,r] 上小于 v 的最靠左的位置 这里线段树维护的是区间最小值 不存在时返回 0
copypasta/segment_tree.go:148
Function
rangeBitwiseAnd
LC 201
leetcode/main.go:911
Function
rangeMex
给一个数组 a 和一些询问 qs,对每个询问计算 mex(a[l..r]) a[i]>=0, 1<=l<=r<=n 遍历数组 a,记录 a[i] 最后一次出现的位置 lastPos 以及上一个 a[i] 的位置 prevPos 建立一个权值树状数组,维护 lastPos[v] 的前缀最小值 树状数组
copypasta/fenwick_tree.go:148
Function
rangeSum
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/30/b/b.go:6
Method
rank
求小于 s 的字符串个数 此时 o.cnt 保存子树字符串个数
copypasta/trie.go:110
Function
rankTeams
(votes []string)
leetcode/weekly/178/b/b.go:5
Method
rayIntersection
求射线 a b 交点,返回各自到首个交点所需的时间(射线速度由 .vec().len() 决定) 无交点返回 -1 交点为 a.point(ta) 或 b.point(tb) 若题目给了方向向量和速度:https://codeforces.com/problemset/problem/1359/F
copypasta/geometry.go:410
Method
readGraph
len(g[v]) 表示结点 v 在无向图上的度/有向图上的出度 对于树来说叶结点有 len(g[v]) == 1
copypasta/graph.go:106
Method
readGraphList
链式前向星 https://oi-wiki.org//graph/save/#_14
copypasta/graph.go:121
Method
readInitData
Mock initData
copypasta/template/interactive_problem/main_test.go:36
Method
readInitData
()
copypasta/template/interactive_problem/main.go:28
Function
readMatrix
* 矩阵加速 https://zh.wikipedia.org/wiki/%E6%96%90%E6%B3%A2%E9%82%A3%E5%A5%91%E6%95%B0%E5%88%97#%E7%B7%9A%E6%80%A7%E4%BB%A3%E6%95%B8%E8%A7%A3%E6%B3%95 htt
copypasta/math_matrix.go:30
Function
rearrangeArray
* 将数组排序后从中间分开,错开一位合并。 */ github.com/EndlessCheng/codeforces-go
leetcode/weekly/254/b/b.go:12
Function
rearrangeSticks
(n, k int)
leetcode/weekly/241/d/d.go:17
Function
reconstructMatrix
(upper int, lower int, colsum []int)
leetcode/weekly/162/b/b.go:3
Function
recoverArray
* 枚举 higher[0] + 双指针 将 $\textit{nums}$ 排序后,$\textit{lower}[0]$ 必然是 $\textit{nums}[0]$。我们可以在 $\textit{nums}$ 中枚举 $\textit{higher}[0]$ 的值,从而得到 $k=\dfra
leetcode/weekly/273/d/d.go:16
Function
recoverArray
github.com/EndlessCheng/codeforces-go
leetcode/weekly/255/d/d.go:9
Function
recoverTree
LC 99
leetcode/main.go:487
Function
reductionOperations
github.com/EndlessCheng/codeforces-go
leetcode/weekly/244/b/b.go:6
Function
reformat
(S string)
leetcode/weekly/185/a/a.go:3
Function
reformatDate
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/30/a/a.go:9
Function
reformatNumber
github.com/EndlessCheng/codeforces-go
leetcode/weekly/220/a/a.go:6
Function
regionsBySlashes
github.com/EndlessCheng/codeforces-go
leetcode/weekly/115/c/c.go:4
Function
reinitializePermutation
github.com/EndlessCheng/codeforces-go
leetcode/weekly/234/b/b.go:4
Method
remove
(i int)
copypasta/heap.go:91
Function
removeCoveredIntervals
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/15/b/b.go:6
Function
removeDuplicateLetters
LC 316 / LC 1081 去除重复字母后字典序最小的子序列
leetcode/main.go:1059
Function
removeInterval
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/14/b/b.go:4
Function
removeLeafNodes
我的憨憨写法
leetcode/weekly/172/c/c.go:6
Function
removeLeafNodes2
优雅的写法
leetcode/weekly/172/c/c.go:27
Function
removeNthFromEnd
LC 19
leetcode/main.go:44
Function
removeOccurrences
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/55/b/b.go:6
Function
removePalindromeSub
(s string)
leetcode/weekly/173/a/a.go:3
Function
removeSubfolders
(folder []string)
leetcode/weekly/159/b/b.go:8
Function
removeVowels
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/4/b/b.go:6
Function
removeZeroSumSublists
** * Definition for singly-linked list. * type ListNode struct { * Val int * Next *ListNode * } */
leetcode/weekly/151/c/c.go:14
Function
renameInputArgs
替换常见变量名(数组、字符串等)
copypasta/template/leetcode/helper.go:71
Function
reorderSpaces
github.com/EndlessCheng/codeforces-go
leetcode/weekly/207/a/a.go:6
Function
replaceDigits
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/51/a/a.go:4
Function
replaceElements
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/16/a/a.go:4
Function
restoreArray
github.com/EndlessCheng/codeforces-go
leetcode/weekly/226/b/b.go:4
Function
restoreMatrix
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/36/c/c.go:4
Function
restoreString
(s string, indices []int)
leetcode/weekly/199/a/a.go:3
Function
reverseEvenLengthGroups
github.com/EndlessCheng/codeforces-go
leetcode/weekly/267/b/b.go:6
Function
reverseParentheses
(s string)
leetcode/main.go:1681
Function
reversePrefix
模拟 github.com/EndlessCheng/codeforces-go
leetcode/weekly/258/a/a.go:8
Function
robot
(command string, obstacles [][]int, endX, endY int)
leetcode/season/2019fall/c/c.go:3
Method
rotate
(d int)
main/800-899/840D.go:90
Method
rotateCCW
顺时针旋转 90° 逆时针旋转,传入旋转的弧度
copypasta/geometry.go:208
Method
rotateCCW90
()
copypasta/geometry.go:204
Method
rotateCW90
逆时针旋转 90°
copypasta/geometry.go:205
Function
rotateGrid
github.com/EndlessCheng/codeforces-go
leetcode/weekly/247/b/b.go:4
Function
rotateMatrix
顺时针转 90°
copypasta/math_matrix.go:51
Function
rotateTheBox
github.com/EndlessCheng/codeforces-go
leetcode/biweekly/52/c/c.go:4
Function
run1
github.com/EndlessCheng/codeforces-go
misc/gcj/2018/2/c/c.go:11
Function
runAC
(_r io.Reader, _w io.Writer)
misc/gcj/2020/1b/a/a_test.go:26
Function
runG
github.com/EndlessCheng/codeforces-go
main/gym/101234/G.go:11
Function
runI
github.com/EndlessCheng/codeforces-go
main/gym/101309/I.go:10
Function
runningSum
(a []int)
leetcode/weekly/193/a/a.go:3
Method
same
(x, y int)
copypasta/union_find.go:280
Method
sccTarjan
SCC Tarjan 常数比 Kosaraju 略小(在 AtCoder 上的测试显示,5e5 的数据下比 Kosaraju 快了约 100ms) https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algor
copypasta/graph.go:2751
Function
scoreOfParentheses
github.com/EndlessCheng/codeforces-go
leetcode/weekly/90/b/b.go:4
Function
scoreOfStudents
github.com/EndlessCheng/codeforces-go
leetcode/weekly/260/d/d.go:4
Function
searchCollection
* 状态空间 一个实际问题的各种可能情况构成的集合 由小及大:当状态空间位于边界上或某个小范围内等特殊情形,该状态空间的解往往是已知的。 若能将此解的应用场景扩大到原问题的状态空间,并且扩展过程的每个步骤具有相似性,就可以考虑使用递推或递归求解。 换句话说,程序在每个步骤上应该面对相同种类的问题,这
copypasta/search.go:56
← previous
next →
7,801–7,900 of 8,098, ranked by callers