03 2022 档案
摘要:
暂且就先以一道洛谷板子题作为讲解吧, 直接上代码,部分代码参考了优秀的大佬们的优秀的题解。(确实人家的码风很好呜呜呜) 1 #include<bits/stdc++.h> 2 #define ios ios::sync_with_stdio(false);cin.tie(0),cout.tie(0)
阅读全文

摘要:
类似地,鉴于STL的队列有或多或少的功能缺失,于是我们就来手写一个队列。 以下是代码,功能有待完善。 1 //数组实现队列的简单操作 2 int q[100001]; 3 int front = 1,rear = 0; 4 5 void Push(int x){ 6 q[++rear] = x; 7
阅读全文

摘要:
鉴于STL的栈有或多或少的功能缺失,于是我们就来手写一个栈。 以下是代码,功能有待完善。 1 //栈的简单操作 数组实现 2 int s[100001]; //创建栈 3 int top = 0; //创建头指针,一开始在底部 4 5 void Push(int x){ 6 s[++top] = x
阅读全文

摘要:
这里用结构体实现大整数类。 主要功能有:输入 输出 四则运算 幂运算 比较运算。 代码如下: 1 #include<bits/stdc++.h> 2 #define ios ios::sync_with_stdio(false);cin.tie(0),cout.tie(0) 3 typedef lo
阅读全文

摘要: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
阅读全文