摘要: 1 vector, 变长数组,倍增的思想 1 size() 返回元素个数 2 empty() 返回是否为空 3 clear() 清空 4 front()/back() 5 push_back()/pop_back() 6 begin()/end() 7 [] 8 支持比较运算,按字典序 2 pair 阅读全文
posted @ 2023-01-03 20:57 阿飞藏泪 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 一.使用方法 1 #include <bits/stdc++.h> 2 3 int main() 4 { 5 // write code here 6 7 return 0 8 } 二、头文件内容 1 // C++ includes used for precompiling -*- C++ -*- 阅读全文
posted @ 2023-01-03 20:50 阿飞藏泪 阅读(1053) 评论(0) 推荐(0) 编辑
摘要: vector 1.vector存放内置数据类型 容器:vector 算法:for_each 迭代器:vector<int>::iterator #include<iostream>#include<vector>#include<algorithm>//标准算法的头文件using namespace 阅读全文
posted @ 2023-01-03 20:22 阿飞藏泪 阅读(120) 评论(0) 推荐(0) 编辑
1 2 3
4