以下是常用的 IDE 设置。
缺省源:
#include<bits/stdc++.h>
#define re register int
#define ll long long
#define ull unsigned long long
const int inf=0x3f3f3f3f;
using namespace std;
template <typename T>
T read(){
T ret=0,sgn=0; char ch=getchar();
while(!isdigit(ch)) sgn |= ch == '-', ch = getchar();
while(isdigit(ch)) ret = ret*10 + ch-'0', ch = getchar();
return sgn ? -ret : ret;
}
void write(int x){
if(x<0) putchar('-'), x=-x;
if(x>9) write(x/10);
putchar(x%10+'0');
}
int main(){
// int n=read<int>();
return 0;
}
编译器配置集:
-O2 -Wl,--stack=102400000 -DDEBUG -std=c++14
- -O2 手动开O2
- -Wl,–stack=102400000
- -DDEBUG 支持下面的 DEBUG 操作
- -std=c++14 设置 c++14
文件操作 DEBUG:
#ifndef DEBUG
freopen("title.in","r",stdin);
freopen("title.out","w",stdout);
#endif
常用以上代码,中间内容别人 IDE 运行,自己 IDE 不运行。 把 #ifdef DEBUG 中间的 \(n\) 去掉可以实现中间内容自己 IDE 运行,别人 IDE 不运行
文档信息
- 本文作者:Nathan3122
- 本文链接:https://nathan3122.github.io/2023/08/17/IDEsetting/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)