程序员们梦寐以求的头文件 <bits/stdc++.h>
2014-09-03 21:44
316 查看
偶然在CF上做题,在借鉴别人代码的时候,看到了这个神奇的头文件,生平第一次见。。。
然后就稍稍地百度了一下,才知道它这么腻害,竟然包含了C++的所有头文件!
使用和往常的头文件一样:
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; cout<<a+b<<endl; return 0; }
#include<bits/stdc++.h>这个头文件包含以下等等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中,poj,hdu 不支持这个函数,这几个oj的编译器问题,其他国外的oj,还有台湾的oj都支持,CF,Topcoder也都支持。
参考博客:http://blog.kuoe0.tw/posts/2014/01/31/install-gnu-gcc-on-os-x-and-use-the-header-bits-stdcplusplus-h-and-policy-based-data-structure
相关文章推荐
- 程序员们梦寐以求的头文件 <bits/stdc++.h>
- 关于#include<bits/stdc++.h>头文件的使用
- 2.头文件<bits/stdc++.h>
- #include<bits/stdc++.h>这个头文件的使用
- #include<bits/stdc++.h>
- #include<bits/stdc++.h>包含C++的所有头文件
- 包含所有C++头文件的头文件 <bits/stdc++.h>
- #include<bits/stdc++.h>包含C++的全部头文件
- 万能头文件#include <bits/stdc++.h>
- EOJ Monthly 2017.12 易位构词(贪心+STL特性容器 +头文件<bits/stdc++.h> )未解决
- EOJ Monthly 2017.12 易位构词(贪心+STL特性容器 +头文件<bits/stdc++.h> )未解决
- #include<bits/stdc++.h>包含C++的所有头文件
- EOJ Monthly 2017.12 易位构词(贪心+STL特性容器 +头文件<bits/stdc++.h> )未解决
- #include<bits/stdc++.h>包含C++的所有头文件
- C++头文件#include<bits/stdc++.h>
- #include<bits/stdc++.h>
- #include<bits/stdc++.h>包含C++的所有头文件
- #include<bits/stdc++.h>包含C++的全部头文件
- 包含所有C++头文件的头文件 <bits/stdc++.h>
- #include<bits/stdc++.h>