上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 33 下一页
  2021年8月18日
摘要: 1 //常用算法 binary_serach 2 //查找指定的元素 3 //无序序列中不可用 4 5 6 #include<iostream> 7 #include<algorithm> 8 #include<vector> 9 10 using namespace std; 11 12 void 阅读全文
posted @ 2021-08-18 10:59 Bytezero! 阅读(69) 评论(0) 推荐(0)
摘要: 1 //常用算法 adjacent_find 2 //查找相邻的重复元素 3 #include<iostream> 4 #include<string> 5 #include<algorithm> 6 #include<vector> 7 8 using namespace std; 9 10 vo 阅读全文
posted @ 2021-08-18 10:46 Bytezero! 阅读(94) 评论(0) 推荐(0)
摘要: 1 //常用查找算法 find_if 2 #include<iostream> 3 #include<string> 4 #include<vector> 5 #include<algorithm> 6 7 using namespace std; 8 9 //内置数据类型 10 11 class 阅读全文
posted @ 2021-08-18 10:37 Bytezero! 阅读(238) 评论(0) 推荐(0)
摘要: 1 //常用查找算法 find 2 #include<iostream> 3 #include<algorithm> 4 #include<functional> 5 #include<vector> 6 #include<string> 7 #include<map> 8 9 using name 阅读全文
posted @ 2021-08-18 09:15 Bytezero! 阅读(225) 评论(0) 推荐(0)
  2021年8月17日
摘要: 1 //STL 常用算法 2 //常用遍历 for_each 3 //transform 4 #include<iostream> 5 #include<string> 6 #include<functional> 7 #include<algorithm> 8 #include<vector> 9 阅读全文
posted @ 2021-08-17 10:53 Bytezero! 阅读(63) 评论(0) 推荐(0)
摘要: 1 //内建函数对象 算数仿函数 关系仿函数 //逻辑仿函数 2 #include<iostream> 3 #include<string> 4 #include<functional> //内建函数对象头文件 5 #include<vector> 6 #include<algorithm> 7 8 阅读全文
posted @ 2021-08-17 09:51 Bytezero! 阅读(69) 评论(0) 推荐(0)
  2021年8月16日
摘要: 1 //谓词 2 //一元谓词 3 //概念:返回bool类型的仿函数称为 谓词 4 //如果 operator()接受一个参数,那么叫做一元谓词 5 //如果 operator()接受 2 个参数,那么叫做一元谓词 6 7 #include<iostream> 8 #include<string> 阅读全文
posted @ 2021-08-16 18:51 Bytezero! 阅读(107) 评论(0) 推荐(0)
摘要: 1 //STL函数对象 仿函数 2 #include<iostream> 3 #include<string> 4 5 using namespace std; 6 7 8 //1.函数对象在使用时,可以向普通函数那样调用,可以有参数,可以有返回值 9 class Myadd 10 { 11 pub 阅读全文
posted @ 2021-08-16 18:02 Bytezero! 阅读(64) 评论(0) 推荐(0)
摘要: //案列-员工分组//描述:公司招聘10个员工(ABCDEFGHIJ),10名指派员工进入公司,需要指派那个员工在那个部门工作//员工信息有:姓名 工资组成; 部门分为:策划 美术 研发//随机给10名员工分配工资和部门//通过multimap进行信息的插入,key(部门编号) value员工//分 阅读全文
posted @ 2021-08-16 16:22 Bytezero! 阅读(130) 评论(0) 推荐(0)
摘要: 1 //map/multimap容器 //map容器 构造和赋值 //map大小 和 交换 2 //map插入和删除 //map查找和统计 //map容器排序 3 4 #include<iostream> 5 #include<map> 6 #include<string> 7 8 using na 阅读全文
posted @ 2021-08-16 14:56 Bytezero! 阅读(71) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 33 下一页