用这种方法声明头文件只需两行代码

#include<bits/stdc++.h>

using namespace std;

这个头文件包含以下等等C++中包含的所有头文件: 

#include <iostream> 
#include <cstdio> 
#include <fstream> 
#include <algorithm> 
#include <cmath> 
#include <deque> 
#include <vector> 
#include <queue> 
#include <string> 
#include <cstring> 
#include <map> 
#include <stack> 
#include <set> 

等等……

但是部分OJ站可能不支持这种写法

已知UVa可以这么用

 

 

补充:已知的弊端是,用这种方法声明库,写代码过程中,代码补全功能不会被激活

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2021-11-13
猜你喜欢
  • 2021-08-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-27
相关资源
相似解决方案