蒟蒻第一次写文章不喜勿喷
你需要的堆、栈、队列、标准缺省源:
注释版:
#include <iostream>//头文件
#include <queue>//头文件
#include <cstdio>//头文件
#include <vector>//头文件
#include <cstdlib>//头文件
#include <algorithm>//头文件
#include <cmath>//头文件
#include <string>//头文件
#include <list>//头文件
#include <stack>//头文件
#pragma GCC optimize(2)//手动开O2
using namespace std;
typedef long long ll;//重定向long long ll,可以把long long写成ll,ll a = long long a
//struct node{
// bool operator <(const //struct node* x)\\const{ //重定向运算符(优先队列排序)
// return v<x.v; //重定向运算符(优先队列排序)
// } //重定向运算符(优先队列排序)
//}; //重定向运算符(优先队列排序)
//priority_queue<int,vector<int>,greater<int> > q; //堆优先序列 大
//priority_queue<int,vector<int>,less<int> > p; //堆优先序列 小
//stack<int>st; //模板栈定义
//queue<int>q; //模板队列定义
int main()
{
ios::sync_with_stdio(0);//加速
cin.tie(0);//加速
cout.tie(0);//加速
return 0;//O2要加
}非注释版:
#include <iostream>
#include <queue>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <string>
#include <list>
#include <stack>
#pragma GCC optimize(2)
using namespace std;
typedef long long ll;
//struct node{
// bool operator <(const //struct node* x)\\const{
// return v<x.v;
// }
//};
//priority_queue<int,vector<int>,greater<int> > q;
//priority_queue<int,vector<int>,less<int> > p;
//stack<int>st;
//queue<int>q;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
return 0;
}点击工具->编译器选项
点击代码/代码模板->缺省源文件/缺省源->打上蓝色勾->粘贴->确定
操作视频:
视频原网站
(视频的B站号是我的,赶紧欢迎关注)
ok了,新文件都会有代码,有问题欢迎私信/评论/QQ(QQ号:3126715455)/wx(私信获取)

