C++

C++常用函数

Posted by Liao on 2020-06-09

1、string substr(int pos, int len)

从第pos开始,截取长度为len的字符串

2、随机函数

1
rand() % n // 表示随机返回[0 ~ n-1] 的数

LC384. 打乱数组