03 2022 档案

摘要:KMP算法简析暂且就先以一道洛谷板子题作为讲解吧, 直接上代码,部分代码参考了优秀的大佬们的优秀的题解。(确实人家的码风很好呜呜呜) 1 #include<bits/stdc++.h> 2 #define ios ios::sync_with_stdio(false);cin.tie(0),cout.tie(0) 阅读全文
posted @ 2022-03-31 22:06 Conqueror712 阅读(44) 评论(0) 推荐(0) 编辑
摘要:Queue队列的基本功能数组实现类似地,鉴于STL的队列有或多或少的功能缺失,于是我们就来手写一个队列。 以下是代码,功能有待完善。 1 //数组实现队列的简单操作 2 int q[100001]; 3 int front = 1,rear = 0; 4 5 void Push(int x){ 6 q[++rear] = x; 7 阅读全文
posted @ 2022-03-29 20:26 Conqueror712 阅读(68) 评论(0) 推荐(0) 编辑
摘要:Stack栈的基本功能数组实现鉴于STL的栈有或多或少的功能缺失,于是我们就来手写一个栈。 以下是代码,功能有待完善。 1 //栈的简单操作 数组实现 2 int s[100001]; //创建栈 3 int top = 0; //创建头指针,一开始在底部 4 5 void Push(int x){ 6 s[++top] = x 阅读全文
posted @ 2022-03-28 20:58 Conqueror712 阅读(27) 评论(0) 推荐(0) 编辑
摘要:大整数BigInteger这里用结构体实现大整数类。 主要功能有:输入 输出 四则运算 幂运算 比较运算。 代码如下: 1 #include<bits/stdc++.h> 2 #define ios ios::sync_with_stdio(false);cin.tie(0),cout.tie(0) 3 typedef lo 阅读全文
posted @ 2022-03-26 15:13 Conqueror712 阅读(34) 评论(0) 推荐(0) 编辑
摘要:Hello World 1 #include<bits/stdc++.h> 2 #define ios ios::sync_with_stdio(false);cin.tie(0),cout.tie(0) 3 #define endl "\n" 4 using namespace std; 5 in 阅读全文
posted @ 2022-03-21 22:41 Conqueror712 阅读(24) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示