【找工作】C++和算法复习(自用)
- 人工智能
- 2025-08-25 22:42:02

文章目录 C++头文件自定义排序函数stl 算法树状数组
自用随便记录
C++排序 stl
头文件全能头文件:
#include<bits/stdc++.h> 自定义排序函数 bool compare(const int &odd1,const int &odd2) { return odd1>odd2; } stl枚举map
map<int, string> mapStudent; mapStudent.insert(pair<int, string>(1, "student_one")); mapStudent.insert(pair<int, string>(2, "student_two")); mapStudent.insert(pair<int, string>(3, "student_three")); map<int, string>::reverse_iterator iter; for(iter = mapStudent.rbegin(); iter != mapStudent.rend(); iter++) { cout<<iter->first<<" "<<iter->second<<endl; }优先队列
算法堆
树状数组【找工作】C++和算法复习(自用)由讯客互联人工智能栏目发布,感谢您对讯客互联的认可,以及对我们原创作品以及文章的青睐,非常欢迎各位朋友分享到个人网站或者朋友圈,但转载请说明文章出处“【找工作】C++和算法复习(自用)”