Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/EndlessCheng/codeforces-go
/ functions
Functions
8,098 in github.com/EndlessCheng/codeforces-go
⨍
Functions
8,098
◇
Types & classes
911
↓ 1,340 callers
Function
AssertEqualCase
(t *testing.T, rawText string, targetCaseNum int, runFunc ioFunc)
main/testutil/testutil.go:133
↓ 913 callers
Function
f
github.com/EndlessCheng/codeforces-go
main/1600-1699/1617E.go:11
↓ 693 callers
Function
RunLeetCodeFuncWithExamples
rawExamples[i] = 输入+输出 若反射出来的函数或 rawExamples 数据不合法,则会返回一个非空的 error,否则返回 nil
leetcode/testutil/leetcode.go:234
↓ 320 callers
Function
max
(a, b int)
main/gym/101487/D.go:80
↓ 298 callers
Function
AssertEqualStringCase
(t *testing.T, testCases [][2]string, targetCaseNum int, runFunc ioFunc)
main/testutil/testutil.go:36
↓ 296 callers
Function
min
(a, b int)
main/gym/101487/D.go:73
↓ 206 callers
Method
Int
Int generates a random int in range [min, max]
main/testutil/rand.go:64
↓ 132 callers
Method
NewLine
()
main/testutil/rand.go:39
↓ 131 callers
Method
Search
(movie int)
leetcode/biweekly/55/d/d.go:35
↓ 130 callers
Function
f
(cur, rev, p10 int)
leetcode/biweekly/2/d/d.go:9
↓ 124 callers
Method
String
for random string, see Str
main/testutil/rand.go:31
↓ 121 callers
Function
NewRandGenerator
()
main/testutil/rand.go:17
↓ 117 callers
Method
IntSlice
IntSlice generates a random int slice with a fixed size and its values in range [min, max]
main/testutil/rand.go:116
↓ 115 callers
Function
f
(p []int)
leetcode/weekly/195/d/d.go:3
↓ 111 callers
Function
AssertEqualRunResultsInf
无尽对拍模式 inputGenerator 生成随机测试数据,runFuncAC 为暴力逻辑或已 AC 逻辑,runFunc 为当前测试的逻辑
main/testutil/testutil.go:206
↓ 96 callers
Function
abs
(x int)
misc/gcj/2020/1c/a/a.go:10
↓ 96 callers
Function
f
github.com/EndlessCheng/codeforces-go
leetcode/weekly/233/c/c.go:6
↓ 91 callers
Function
pow
(x, n int)
misc/nowcoder/6219/c/c.go:17
↓ 89 callers
Function
add
(a, b int)
copypasta/math_fwt.go:83
↓ 86 callers
Function
f
github.com/EndlessCheng/codeforces-go
misc/acwing/weekly/4/b/b.go:10
↓ 83 callers
Method
query
(request)
copypasta/template/interactive_problem/main.go:19
↓ 77 callers
Function
RunLeetCodeFuncWithCase
(t *testing.T, f interface{}, rawInputs [][]string, rawOutputs [][]string, targetCaseNum int)
leetcode/testutil/leetcode.go:316
↓ 73 callers
Function
RunLeetCodeFunc
(t *testing.T, f interface{}, rawInputs [][]string, rawOutputs [][]string)
leetcode/testutil/leetcode.go:324
↓ 63 callers
Function
merge
(a, b []int)
leetcode/weekly/227/d/d.go:56
↓ 58 callers
Function
build
** * Definition for a binary tree node. * type TreeNode struct { * Val int * Left *TreeNode * Right *TreeNode * } */
leetcode/weekly/180/c/c.go:17
↓ 57 callers
Method
sub
(b vec)
copypasta/geometry.go:174
↓ 54 callers
Method
Count
(tot int)
leetcode/weekly/241/c/c.go:27
↓ 50 callers
Function
do
(s []byte, _p2 byte)
leetcode/weekly/171/d/d.go:10
↓ 48 callers
Function
gcd
(a, b int64)
main/edu/2/twopointers/step2/g/g.go:48
↓ 41 callers
Method
det
(b vec)
copypasta/geometry.go:176
↓ 39 callers
Method
Bytes
(s string)
main/testutil/rand.go:47
↓ 35 callers
Function
solve
github.com/EndlessCheng/codeforces-go
misc/nowcoder/9977/a/a.go:6
↓ 31 callers
Function
AssertEqual
(t *testing.T, rawText string, runFunc ioFunc)
main/testutil/testutil.go:161
↓ 31 callers
Function
RunLeetCodeClassWithExamples
若反射出来的函数或 rawExamples 数据不合法,则会返回一个非空的 error,否则返回 nil
leetcode/testutil/leetcode.go:329
↓ 29 callers
Function
C
(n, k int)
misc/nowcoder/6219/c/c.go:27
↓ 28 callers
Function
calc
技巧:能 cache 尽量 cache
leetcode/weekly/215/d/d.go:20
↓ 28 callers
Function
q
func f(n, m int64) (c int64) { for i := int64(1); i <= n; i++ { if i%43 == 0 { c += m / 47 } else if i%47 == 0 { c += m / 43 } else {
misc/nowcoder/9247/c/c.go:22
↓ 27 callers
Method
OnesCount
返回 1 的个数
copypasta/bits.go:232
↓ 24 callers
Function
del
(i int)
leetcode/biweekly/22/d/d.go:11
↓ 22 callers
Method
isRed
()
copypasta/red_black_tree.go:20
↓ 18 callers
Method
point
(t float64)
copypasta/geometry.go:306
↓ 18 callers
Function
same
** * Definition for singly-linked list. * type ListNode struct { * Val int * Next *ListNode * } */ ** * Definition for a binary tree no
leetcode/weekly/178/c/c.go:21
↓ 17 callers
Method
Len
mh 指 modifiable heap
copypasta/heap.go:83
↓ 17 callers
Method
len
()
copypasta/geometry.go:179
↓ 16 callers
Function
search
github.com/EndlessCheng/codeforces-go
misc/nowcoder/6383/a/a.go:4
↓ 15 callers
Function
abs
(x int)
leetcode/weekly/133/b/b.go:17
↓ 15 callers
Function
max
(a, b int)
leetcode/weekly/95/d/d.go:22
↓ 14 callers
Method
Len
()
main/1-99/20C.go:16
↓ 14 callers
Method
_int
(min, max int)
main/testutil/rand.go:55
↓ 14 callers
Method
len2
()
copypasta/geometry.go:177
↓ 13 callers
Function
check
* 关键在于求出回合数 由于我们只关心总和能否被 $3$ 整除,我们可以将 $\textit{stones}[i]$ 按照模 $3$ 的结果分为 $3$ 组,即 $0$、$1$ 和 $2$。 根据题意,第一回合不能移除 $0$,否则直接输掉游戏,因此第一回合只能移除 $1$ 或者 $2$。我们可
leetcode/weekly/261/c/c.go:20
↓ 13 callers
Function
gcd
(a, b int)
misc/gcj/2020/1c/c/c.go:13
↓ 13 callers
Function
max
(a, b int)
leetcode/weekly/195/d/d.go:49
↓ 13 callers
Method
vec
方向向量 directional vector
copypasta/geometry.go:305
↓ 12 callers
Method
conv
计算 A(x) 和 B(x) 的卷积 (convolution) 入参出参都是次项从低到高的系数 模板题 https://www.luogu.com.cn/problem/P3803 https://www.luogu.com.cn/problem/P1919 https://atcoder.jp/
copypasta/math_ntt.go:171
↓ 12 callers
Method
dot
(b vec)
copypasta/geometry.go:175
↓ 12 callers
Method
resize
(n int)
copypasta/math_ntt.go:162
↓ 11 callers
Function
AssertEqualFileCaseWithName
(t *testing.T, dir, inName, ansName string, targetCaseNum int, runFunc ioFunc)
main/testutil/testutil.go:93
↓ 11 callers
Method
Space
()
main/testutil/rand.go:35
↓ 11 callers
Function
exgcd
github.com/EndlessCheng/codeforces-go
misc/atcoder/abc186/e/e.go:11
↓ 11 callers
Function
removeExtraSpace
(s string)
main/testutil/helper.go:9
↓ 10 callers
Method
Add
(name string, score int)
leetcode/biweekly/67/d/d.go:43
↓ 10 callers
Function
CheckRunResultsInf
(t *testing.T, inputGenerator func() (string, OutputChecker), runFunc ioFunc)
main/testutil/testutil.go:287
↓ 10 callers
Method
Get
0 <= i < q.Size()
copypasta/deque.go:60
↓ 10 callers
Function
min
(a, b int)
leetcode/weekly/171/d/d.go:3
↓ 10 callers
Function
min
(a, b int)
leetcode/weekly/204/c/c.go:88
↓ 10 callers
Method
ord
(c byte)
copypasta/trie.go:45
↓ 10 callers
Method
push
(v int)
copypasta/monotone_queue.go:28
↓ 10 callers
Method
put
(key int)
leetcode/weekly/236/d/d.go:59
↓ 10 callers
Function
reverse
LC 1190
leetcode/main.go:1675
↓ 10 callers
Method
sub
(b vec613)
main/600-699/613A.go:17
↓ 9 callers
Method
One
()
main/testutil/rand.go:51
↓ 9 callers
Function
_pow
(x int64, n int)
copypasta/math_ntt.go:100
↓ 9 callers
Function
abs
(x int)
leetcode/biweekly/64/d/d.go:92
↓ 9 callers
Method
dis2
(b vec)
copypasta/geometry.go:178
↓ 9 callers
Function
max
(a, b int)
main/edu/2/twopointers/step3/i/i.go:37
↓ 9 callers
Function
max
(a, b int)
misc/nowcoder/6778/c/c.go:39
↓ 9 callers
Function
max
(a, b int)
leetcode/weekly/204/b/b.go:26
↓ 9 callers
Function
max
(a, b int)
leetcode/weekly/186/d/d.go:5
↓ 9 callers
Function
min
(a, b int)
main/edu/2/twopointers/step3/i/i.go:44
↓ 9 callers
Method
put
(key int)
main/500-599/527C_treap.go:79
↓ 9 callers
Function
unique
原地去重
leetcode/biweekly/61/d/d.go:48
↓ 8 callers
Method
Str
Str generates a random string with length in range [minLen, maxLen] and its chars in range [min, max]
main/testutil/rand.go:80
↓ 8 callers
Function
abs
(x int)
misc/acwing/weekly/3/a/a.go:37
↓ 8 callers
Function
min
(a, b int)
misc/nowcoder/6778/c/c.go:33
↓ 8 callers
Function
min
(a, b int)
leetcode/biweekly/6/b/b.go:18
↓ 8 callers
Method
pop
()
copypasta/monotone_queue.go:38
↓ 8 callers
Method
rotate
d=0:左旋,返回 o 的右儿子 d=1:右旋,返回 o 的左儿子
copypasta/red_black_tree.go:41
↓ 8 callers
Method
size
()
copypasta/splay.go:43
↓ 8 callers
Method
sub
(b vec)
misc/nowcoder/10325/c/c.go:11
↓ 8 callers
Method
top
返回区间最值 调用前需保证 mq.size > 0
copypasta/monotone_queue.go:49
↓ 8 callers
Method
update
o=1 1<=i<=n
copypasta/segment_tree.go:94
↓ 7 callers
Function
abs
(x int)
leetcode/season/2021fall/a/a.go:23
↓ 7 callers
Function
abs
(x int)
leetcode/weekly/206/c/c.go:199
↓ 7 callers
Method
cmp
设置如下返回值是为了方便使用 bstNode 中的 lr 数组
copypasta/bst.go:21
↓ 7 callers
Method
delete
(key int)
leetcode/weekly/236/d/d.go:93
↓ 7 callers
Method
dft
(a []int64)
copypasta/math_ntt.go:149
↓ 7 callers
Method
dis
(b vec)
copypasta/geometry.go:180
↓ 7 callers
Method
inv
多项式乘法逆 (mod x^n, 下同) 参考 https://blog.orzsiyuan.com/archives/Polynomial-Inversion/ https://oi-wiki.org/math/poly/inv/ 模板题 https://www.luogu.com.cn/prob
copypasta/math_ntt.go:294
↓ 7 callers
Function
less
(a, b entry)
leetcode/biweekly/55/d/d.go:71
next →
1–100 of 8,098, ranked by callers