We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c97ba1 commit fe12affCopy full SHA for fe12aff
1 file changed
题解template.md
@@ -73,6 +73,15 @@ v = heappop(pq)
73
## 大顶堆
74
push进负的值,pop出来的时候再取反
75
76
+## SortedList
77
+```python
78
+from sortedcontainers import SortedList
79
+lst = SortedList()
80
+lst.add((-score, name))
81
+
82
+print(lst[n][1]) #返回第n个最大值
83
+```
84
85
# 排列组合
86
```python
87
comb(m,n)
0 commit comments