C++ 竞赛常用头文件
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> 通用类型数学宏
——————————————————————————————————————————
我的头文件模板:
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<cstdlib>
#include<iomanip>
#include<cassert>
#include<climits>
#define maxn 1000001
#define F(i,j,k) for(int i=j;i<=k;i++)
#define M(a,b) memset(a,b,sizeof(a))
#define FF(i,j,k) for(int i=j;i>=k;i--)
#define inf 0x7fffffff
using namespace std;
int read(){
int x=,f=;char ch=getchar();
while(ch<''||ch>''){if(ch=='-')f=-;ch=getchar();}
while(ch>=''&&ch<=''){x=x*+ch-'';ch=getchar();}
return x*f;
}
int main()
{
std::ios::sync_with_stdio(false);//cout<<setiosflags(ios::fixed)<<setprecision(1)<<y;
#ifdef LOCAL
freopen("data.in","r",stdin);
freopen("data.out","w",stdout);
#endif
int n,m; }
C++ 竞赛常用头文件的更多相关文章
- ACM竞赛常用头文件模板-备忘
备忘. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> ...
- linux设备驱动程序该添加哪些头文件以及驱动常用头文件介绍(转)
原文链接:http://blog.chinaunix.net/uid-22609852-id-3506475.html 驱动常用头文件介绍 #include <linux/***.h> 是 ...
- C/C++常用头文件及函数汇总
转自: C/C++常用头文件及函数汇总 C/C++头文件一览 C #include <assert.h> //设定插入点#include <ctype.h> //字符处理#in ...
- linux常用头文件及说明
linux常用头文件及说明 1. Linux中一些头文件的作用: <assert.h>:ANSI C.提供断言,assert(表达式)<glib.h>:GCC.GTK,GNOM ...
- Linux网络常用头文件说明
sys/types.h:数据类型定义 sys/socket.h:提供socket函数及数据结构 netinet/in.h:定义数据结构sockaddr_in arpa/inet.h:提供IP地址转换函 ...
- OpenCV常用头文件介绍
转载:https://www.cnblogs.com/wangguchao/p/7244483.html 1.OpenCV包含的模块 cv – 核心函数库 cvaux – 辅助函数库 cxcore – ...
- opencv 常用头文件介绍
1.OpenCV包含的模块 cv – 核心函数库 cvaux – 辅助函数库 cxcore – 数据结构与线性代数库 highgui – GUI函数库 ml – 机器学习函数库 2.常用头文件: #i ...
- Linux中常用头文件的作用--转
http://blog.sina.com.cn/s/blog_5c93b2ab0100q62k.html 1. Linux中一些头文件的作用: <assert.h>:ANSI C.提供断言 ...
- Linux驱动开发常用头文件
头文件目录中总共有32个.h头文件.其中主目录下有13个,asm子目录中有4个,linux子目录中有10个,sys子目录中有5个.这些头文件各自的功能如下: 1.主目录 <a.out.h> ...
随机推荐
- python根据字典自动生成一组省和市名
字典如下: dict={ '河北省':['石家庄','唐山','秦皇岛','承德'], '山东省':['济南','青岛','临沂','淄博'], '湖南省':['长沙','衡阳','湘潭','邵阳', ...
- 单元测试+内存、SD卡、SP读写+XmlPullParser
测试: 测试的相关概念 1.根据是否知道源代码分类: 黑盒测试: a - b - c 边值测试 测试逻辑业务 白盒测试: 根据源代码写测试方法 或者 测试用例; 2.根据测试的粒度分类: 方法测试:写 ...
- sqoop遇到的问题
我使用的是CDH版本的 这是我的sqoop脚本 sudo -u hive sqoop import --connect jdbc:mysql://xxxx/rom3 --username xxx -- ...
- 为mongodb数据库增加用户名密码权限
加固mongodb建议:修改数据库默认端口,添加数据库访问权限: 启动数据库(裸奔):C:\mongodb\bin>mongod --dbpath C:\MongoDB\data(同时用--db ...
- JAVAEE——SpringMVC第二天:高级参数绑定、@RequestMapping、方法返回值、异常处理、图片上传、Json交互、实现RESTful、拦截器
1. 课前回顾 https://www.cnblogs.com/xieyupeng/p/9093661.html 2. 课程计划 1.高级参数绑定 a) 数组类型的参数绑定 b) List类型的绑定 ...
- IdentityServer4之JWT签名(RSA加密证书)及验签
一.前言 在IdentityServer4中有两种令牌,一个是JWT和Reference Token,在IDS4中默认用的是JWT,那么这两者有什么区别呢? 二.JWT与Reference Token ...
- merge into issue
ORA-30926: unable to get a stable set of rows in the source tables 一.经检查,这个错误是由于数据来源表(即语句中,using后面的f ...
- web客户端安全之跨站脚本攻击
跨站脚本攻击,Cross-site script,是Web程序中最常见的漏洞.为了和CSS层叠样式表区分开,所以取名为 XSS. 一.XSS的重点 跨域和客户端执行. 二.XSS的原理 攻击者向有XS ...
- POJ 3155 Hard Life 最大密度子图 最大权闭合图 网络流 二分
http://poj.org/problem?id=3155 最大密度子图和最大权闭合图性质很相近(大概可以这么说吧),一个是取最多的边一个是取最多有正贡献的点,而且都是有选一种必须选另一种的限制,一 ...
- Codeforces Round #494 (Div 3) (A~E)
目录 Codeforces 1003 A.Polycarp's Pockets B.Binary String Constructing C.Intense Heat D.Coins and Quer ...