OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbe5ec6
)
fix a note display problem
author
Shuhao Zhang
<594422141@qq.com>
Sat, 6 Jul 2019 09:19:47 +0000
(17:19 +0800)
committer
GitHub
<noreply@github.com>
Sat, 6 Jul 2019 09:19:47 +0000
(17:19 +0800)
docs/misc/random.md
patch
|
blob
|
history
diff --git
a/docs/misc/random.md
b/docs/misc/random.md
index
07f4d3e
..
7c96d5e
100644
(file)
--- a/
docs/misc/random.md
+++ b/
docs/misc/random.md
@@
-20,7
+20,7
@@
调用 `rand()` 函数会返回一个随机非负整数。在 `Linux` 系统下随机范围为 $\left[0,2^{31}\right)$。可以用取模来限制它的大小。
-!!!
+
warning
+!!! warning
在 `Windows` 系统下 `rand()` 返回值的取值范围为 $\left[0,2^{15}\right)$,当需要生成的数不小于 $2^{15}$ 时建议使用 `(rand() << 15 | rand())` 来生成更大的随机数。
### mt19937
@@
-55,7
+55,7
@@
int main()
内部使用的随机数生成器默认为 `rand()`。当然也可以传入自定义的随机数生成器。
-!!!
+
warning
+!!! warning
`random_shuffle` 已于 C++14 标准中被弃用,于 C++17 标准中被移除。
### shuffle