STL-fill()填充算法以及for_each()算法
来源:互联网 发布:电视频道直播软件下载 编辑:程序博客网 时间:2024/05/22 06:47
fill()算法确实好用,虽然不知道,时间复杂度是多少,但是用起来好方便的,,我觉得时间复杂度应该不高吧? 上百度查了一下也查不出来.
还有那个遍历算法,也是很省事的呼呼.,..
而且还可以加函数算法op();确实神奇...
#include <stdio.h>#include <string.h>#include <stdlib.h>#include <iostream>#include <algorithm>#include <time.h>using namespace std;int coun;bool op(int a){printf("%d ",a);coun++;if(coun==10){coun=0;puts("");}return 1;}int main(){int a[1000];coun=0;fill(a,a+1000,1);for_each(a,a+1000,op);return 1;}
- STL-fill()填充算法以及for_each()算法
- STL fill()填充算法以及for_each()算法 取容器中的最大最小值min_element,max_element
- STL运算算法-for_each()
- C++ STL 算法:for_each
- STL算法------for_each
- STL算法之for_each
- STL算法find,find_if,find_if_not,sort,fill,for_each,count,adjacent_find,random_shuffle,prev_permutation
- STL算法:find、fill
- STL遍历算法 “for_each ”,“transform”
- C++的STL算法for_each
- STL algorithm算法fill(14)
- C++ STL填充算法
- 变异算法之填充(fill, fill_n)
- Flood Fill(漫水填充)算法
- 泛洪填充算法(Flood Fill Algorithm)
- STL中的两个算法for_each与transform
- STL(3)之for_each算法实现
- STL algorithm算法for_each(21)
- XML编程(CRUD)
- 非常好用的文件下载使用的PHP代码
- 关闭选择的所有应用程序的脚本
- 唠唠叨叨又七夕
- 项目中js错误引起的MyEclipse的卡死
- STL-fill()填充算法以及for_each()算法
- 在linux上配置SVN服务器
- 很全面的视频编码格式表
- oracleDBA关于控制文件被移动的问题
- 一道面试题引发的思考
- 区分指针数组的好方法
- VirtualBox中VDI镜像的复制
- poj1753 Flip Game 枚举+BFS
- 秋雨寄相思