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> ...
随机推荐
- 关于 eclipse启动卡死的问题 解决方法
关于 eclipse启动卡死的问题(eclipse上一次没有正确关闭,导致启动的时候卡死错误解决方法),自己常用的解决方法: 方案一(推荐使用,如果没有这个文件,就使用方案二): 到<works ...
- spring配置文件头部配置解析(applicationContext.xml)
分享一个好的学习网站:http://how2j.cn?p=4509 相信大家对spring的配置文件应该都看的很多了,那么大家对配置文件头部的那一坨坨的东西到底是什么了解吗?下面我就把自己的一些见解和 ...
- thinkphp3.2自动生成模块BIND_MODULE
thinphp3.2中提供了自定义生成模块与控制器的常量,分别是BIND_MODULE,BUILD_CONTROLLER_LIST 在 index.php 文件中定义 BIND_MODULE,BUIL ...
- Java设计模式 - 持续更新
注意,此博客来源于我的 OneNote 笔记本 因此属于图片形式进行展示,这意味着你可以: 不经过我的同意进行保存 不经过我的同意进行发布 我仍然希望搬运时留一个网址指明来处:我的博客园 多谢!以下是 ...
- Java—String,StringBuffer,StringBuilde区别和操作
Java语言有关字符串的类有三种 java.lang.String:一般作为简单字符串类型 java.lang.StringBuffer:字符串缓冲区 java.lang.StringBuider:字 ...
- 三、django rest_framework源码之权限流程剖析
1 绪言 上一篇中分析了认证部分的源码,认证后的下一个环节就是权限判定了.事实上,权限判定肯定要与认证联合使用才行,因为认证部分不会对请求进行禁止或者是允许,而只是根据请求中用户信息进行用户身份判断, ...
- eclipse 修改js文件无法编译到项目中
1.场景重现 在今天修改js文件完善功能时,发现在eclipse中修改了文件后,刷新页面功能无法同步: 2.分析原因 查看编译路径,文件没有修改: 2.1 可能是缓存问题: 2.2 项目未编译: 3. ...
- Winform 串口通讯之地磅
继上次的读卡之后,要做一个地磅的读取. 下面是我在读卡Demo上改的读取地磅的. 地磅是一直向串口发送数据的,所以需要截取数据来一直判断数据是否合法,然后计算出结果. 其中遇到了一个小问题,文末有介绍 ...
- JavaSE基础之矩阵运算
JavaSE基础之矩阵运算 1.矩阵类:Matrix.java 包括矩阵的加.乘运算,行列式的求解,最大最小元素等 package cn.com.zfc.help; import java.text. ...
- 2018-2019-2 20162318《网络对抗技术》Exp2 后门原理与实践
一.实验内容 1.使用netcat获取主机操作Shell,cron启动 2.使用socat获取主机操作Shell, 任务计划启动 3.使用MSF meterpreter(或其他软件)生成可执行文件,利 ...