C、传统 C++

#include <assert.h>    设定插入点
#include <ctype.h>    字符处理
#include <errno.h>     定义错误码
#include <float.h>    浮点数处理
#include <fstream.h>   文件输入/输出
#include <iomanip.h>    参数化输入/输出
#include <iostream.h>   数据流输入/输出
#include <limits.h>    定义各种数据类型最值常量
#include <locale.h>    定义本地化函数
#include <math.h>     定义数学函数
#include <stdio.h>    定义输入/输出函数
#include <stdlib.h>    定义杂项函数及内存分配函数
#include <string.h>    字符串处理
#include <strstrea.h>   基于数组的输入/输出
#include <time.h>     定义关于时间的函数
#include <wchar.h>     宽字符处理及输入/输出
#include <wctype.h>    宽字符分类

标准 C++ 

#include <algorithm>     通用算法
#include <bitset>      位集容器
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex>     复数类
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>      双端队列容器
#include <exception>    异常处理类
#include <fstream>
#include <functional>    定义运算函数(代替运算符)
#include <limits>
#include <list>       线性列表容器
#include <map>       映射容器
#include <iomanip>
#include <ios>      基本输入/输出支持
#include <iosfwd>    输入/输出系统使用的前置声明
#include <iostream>
#include <istream>     基本输入流
#include <ostream>     基本输出流
#include <queue>       队列容器
#include <set>       集合容器
#include <sstream>     基于字符串的流
#include <stack>      堆栈容器    
#include <stdexcept>    标准异常类
#include <streambuf>   底层输入/输出支持
#include <string>     字符串类
#include <utility>     通用模板类
#include <vector>     动态数组容器
#include <cwchar>
#include <cwctype>

C99 增加

#include <complex.h>  复数处理
#include <fenv.h>    浮点环境
#include <inttypes.h>  整数格式转换
#include <stdbool.h>   布尔环境
#include <stdint.h>   整型环境
#include <tgmath.h>  通用类型数学宏

——————————————————————————————————————————

我的头文件模板:

  1. #include<iostream>
  2. #include<cstdio>
  3. #include<cstring>
  4. #include<cmath>
  5. #include<algorithm>
  6. #include<queue>
  7. #include<cstdlib>
  8. #include<iomanip>
  9. #include<cassert>
  10. #include<climits>
  11. #define maxn 1000001
  12. #define F(i,j,k) for(int i=j;i<=k;i++)
  13. #define M(a,b) memset(a,b,sizeof(a))
  14. #define FF(i,j,k) for(int i=j;i>=k;i--)
  15. #define inf 0x7fffffff
  16. using namespace std;
  17. int read(){
  18. int x=,f=;char ch=getchar();
  19. while(ch<''||ch>''){if(ch=='-')f=-;ch=getchar();}
  20. while(ch>=''&&ch<=''){x=x*+ch-'';ch=getchar();}
  21. return x*f;
  22. }
  23. int main()
  24. {
  25. std::ios::sync_with_stdio(false);//cout<<setiosflags(ios::fixed)<<setprecision(1)<<y;
  26. #ifdef LOCAL
  27. freopen("data.in","r",stdin);
  28. freopen("data.out","w",stdout);
  29. #endif
  30. int nm
  31.  
  32. }

C++ 竞赛常用头文件的更多相关文章

  1. ACM竞赛常用头文件模板-备忘

    备忘. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> ...

  2. linux设备驱动程序该添加哪些头文件以及驱动常用头文件介绍(转)

    原文链接:http://blog.chinaunix.net/uid-22609852-id-3506475.html 驱动常用头文件介绍 #include <linux/***.h> 是 ...

  3. C/C++常用头文件及函数汇总

    转自: C/C++常用头文件及函数汇总 C/C++头文件一览 C #include <assert.h> //设定插入点#include <ctype.h> //字符处理#in ...

  4. linux常用头文件及说明

    linux常用头文件及说明 1. Linux中一些头文件的作用: <assert.h>:ANSI C.提供断言,assert(表达式)<glib.h>:GCC.GTK,GNOM ...

  5. Linux网络常用头文件说明

    sys/types.h:数据类型定义 sys/socket.h:提供socket函数及数据结构 netinet/in.h:定义数据结构sockaddr_in arpa/inet.h:提供IP地址转换函 ...

  6. OpenCV常用头文件介绍

    转载:https://www.cnblogs.com/wangguchao/p/7244483.html 1.OpenCV包含的模块 cv – 核心函数库 cvaux – 辅助函数库 cxcore – ...

  7. opencv 常用头文件介绍

    1.OpenCV包含的模块 cv – 核心函数库 cvaux – 辅助函数库 cxcore – 数据结构与线性代数库 highgui – GUI函数库 ml – 机器学习函数库 2.常用头文件: #i ...

  8. Linux中常用头文件的作用--转

    http://blog.sina.com.cn/s/blog_5c93b2ab0100q62k.html 1. Linux中一些头文件的作用: <assert.h>:ANSI C.提供断言 ...

  9. Linux驱动开发常用头文件

    头文件目录中总共有32个.h头文件.其中主目录下有13个,asm子目录中有4个,linux子目录中有10个,sys子目录中有5个.这些头文件各自的功能如下: 1.主目录 <a.out.h> ...

随机推荐

  1. Gitlab-API各状态码解释

    200 – OK : This means that the GET , PUT, or DELETE request was successful. When you request a resou ...

  2. php匹配邮箱正则

    php匹配邮箱正则 '/[a-z0-9&\-_.]+@[\w\-_]+([\w\-.]+)?\.[\w\-]+/is'

  3. 【记录】url 中出现特殊字符该怎么办

    url中出现特殊字符+ URL 中+号表示空格 %2B 空格 URL中的空格可以用+号或者编码 %20/ 分隔目录和子目录 %2F ? 分隔实际的URL和参数 %3F % 指定特殊字符 %25 # 表 ...

  4. awk 基本函数用法

    gsub函数有点类似于sed查找和替换.它允许替换一个字符串或字符为另一个字符串或字符,并以正则表达式的形式执行.第一个函数作用于记录$0,第二个gsub函数允许指定目标,然而,如果未指定目标,缺省为 ...

  5. windows下thrift的使用(python)

    1.下载thrift,下载地址:http://archive.apache.org/dist/thrift/0.9.3/ 2.在编写python的thrift代码时,需要先安装thrift modul ...

  6. 【BZOJ 2986】 莫比乌斯函数+容斥原理

    2986: Non-Squarefree Numbers Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 337  Solved: 156 Descri ...

  7. luoguP5024 保卫王国 动态dp

    题目大意: emmmmm 题解: QAQ #include <cstdio> #include <cstring> #include <iostream> usin ...

  8. [BZOJ4592][SHOI2015]脑洞治疗仪(线段树)

    线段树基础操作题,唯一需要思考下的是将区间的前k个0覆盖为1. 线段树上二分,先递归到左子树覆盖,回溯时返回还剩多少个0未被覆盖,在根据这个信息递归到右子树.注意特判k=0的情况. 要维护的信息有:区 ...

  9. 【原创】实战padding oracle漏洞

    首先关于padding oracle漏洞的原理请看: 步入正传~~ 搭建漏洞利用环境Perl 环境下载地址:链接:http://pan.baidu.com/s/1skFxVm1 密码:anuw 首先查 ...

  10. hdu 4547 LCA **

    题意:在Windows下我们可以通过cmd运行DOS的部分功能,其中CD是一条很有意思的命令,通过CD操作,我们可以改变当前目录. 这里我们简化一下问题,假设只有一个根目录,CD操作也只有两种方式: ...