会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
寂静_星空
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2023年4月15日
0007容器之unordered_multiset
摘要: #include <list> #include<iostream> #include<vector> #include<stdexcept> #include<string> #include<cstdlib>//abort() #include<cstdio>//snprintf();整数转字符
阅读全文
posted @ 2023-04-15 08:36 test369
阅读(16)
评论(0)
推荐(0)
2023年4月14日
0006容器之multimap
摘要: #include <list> #include<iostream> #include<vector> #include<stdexcept> #include<string> #include<cstdlib>//abort() #include<cstdio>//snprintf();整数转字符
阅读全文
posted @ 2023-04-14 08:07 test369
阅读(19)
评论(0)
推荐(0)
0005容器之multiset
摘要: #include <list> #include<iostream> #include<vector> #include<stdexcept> #include<string> #include<cstdlib>//abort() #include<cstdio>//snprintf();整数转字符
阅读全文
posted @ 2023-04-14 07:19 test369
阅读(17)
评论(0)
推荐(0)
2023年3月24日
0004.容器之vector
摘要: #include<iostream> #include<vector> #include<stdexcept> #include<string> #include<cstdlib>//abort() #include<cstdio>//snprintf();整数转字符 #include<ctime>
阅读全文
posted @ 2023-03-24 20:56 test369
阅读(24)
评论(0)
推荐(0)
2023年3月14日
1110.求数组或vector元素最大最小值
摘要: #include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { int arr[6] = {8,1,5,2,90,11}; vector<int> vec; vec.push_b
阅读全文
posted @ 2023-03-14 19:37 test369
阅读(25)
评论(0)
推荐(0)
2023年3月8日
0003.容器之array测试
摘要: #include<array> #include<ctime> #include<cstdlib>//qsort,bsearch,NULL #include<iostream> #include<algorithm> using namespace std; #define BUF 500000 i
阅读全文
posted @ 2023-03-08 06:56 test369
阅读(23)
评论(0)
推荐(0)
2023年3月7日
0002.计时函数
摘要: clock()计算结果是以内部处理器时间为计量单位的,所以必须把它除以时钟频率,从而得到以秒为单位的时间。这种方法在机器上测量的很精确。在这里Windows和Linux环境下会有所区别. Linux环境下,处理器内部时间频率为:CLOCKS_PER_SEC(WinDows为: CLK_TCK). #
阅读全文
posted @ 2023-03-07 21:40 test369
阅读(36)
评论(0)
推荐(0)
0001产生随机数
摘要: #include <iostream> #include <ctime> #include <cstdlib> //产生100以内的随机数 int main() { srand((unsigned)time(NULL)); for (int i = 0; i < 10; ++i) { cout <<
阅读全文
posted @ 2023-03-07 07:48 test369
阅读(19)
评论(0)
推荐(0)
2022年9月9日
11.小和问题(归并排序拓展)
摘要: 小和问题: 在一个数组中,每一个数左边比当前数小的数累加起来,叫做这个数 的小和。求一个数组 的小和。 例子:[1,3,4,2,5] 1左边比1小的数,没有; 3左边比3小的数,1; 4左 边比4小的数,1、3; 2左边比2小的数,1; 5左边比5小的数,1、3、4、 2; 所以小和为1+1+3+1
阅读全文
posted @ 2022-09-09 16:12 test369
阅读(76)
评论(0)
推荐(0)
10.归并排序
摘要: 1)整体就是一个简单递归,左边排好序、右边排好序、让其整体有序 2)让其整体有序的过程里用了排外序方法 3)利用master公式来求解时间复杂度 4)归并排序的实质 时间复杂度O(N*logN),额外空间复杂度O(N) void Merge(int arr[], int left, int mid,
阅读全文
posted @ 2022-09-09 09:56 test369
阅读(23)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告