摘要:
代码计算程序运行的时间 为了计算程序运行的时间 #include<bits/stdc++.h> using namespace std; #include<ctime> void func1(){ int a[]={1,2,3}; do{ for (int i = 0; i <= 2; i++) { 阅读全文
posted @ 2020-09-20 17:14
别关注我了,私信我吧
阅读(120)
评论(0)
推荐(0)
摘要:
max_element 寻找范围 [first, last) 中的最大元素。 与之相似:min_element 返回值 指向范围 [first, last) 中最大元素的迭代器。若范围中有多个元素等价于最大元素,则返回指向首个这种元素的迭代器。若范围为空则返回 last 。 例子: #include 阅读全文
posted @ 2020-09-20 16:53
别关注我了,私信我吧
阅读(133)
评论(0)
推荐(0)
摘要:
distance 求距离 例子: #include <iostream> #include <iterator> #include <vector> using namespace std; int main() { vector<int> v; v.push_back(3); v.push_bac 阅读全文
posted @ 2020-09-20 16:49
别关注我了,私信我吧
阅读(168)
评论(0)
推荐(0)
摘要:
全排列 next_permutation() 在头文件<algorithm>里面有如下代码: int a[]; do { } while(next_permutation(a,a+n)); 例子: #include<bits/stdc++.h> #include<set> #include<vect 阅读全文
posted @ 2020-09-20 16:32
别关注我了,私信我吧
阅读(94)
评论(0)
推荐(0)

浙公网安备 33010602011771号