常用头文件和一些简单的函数

常用头文件和一些简单函数

#include <bits/stdc++.h>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define IO ios::sync_with_stdio(false);\
    cin.tie(0);    cout.tie(0);

typedef long long LL;
const long long INF = 0x3f3f3f3f;
const long long mod = 1e9+7;
const double PI = acos(-1.0);
const int maxn = 100000;
const char week[7][10]= {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
const char month[12][10]= {"Janurary","February","March","April","May","June","July",
                           "August","September","October","November","December"
                          };
const int daym[2][13] = {{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
    {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
};
const int dir4[4][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};
const int dir8[8][2] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}, {1, 1}, {-1, -1}, {1, -1}, {-1, 1}};

using namespace std;

int main()
{
    IO;
    int T;
    cin>>T;
    while(T--)
    {
        ;
    }
    return 0;
}

原文地址:https://www.cnblogs.com/aiguona/p/8351247.html

时间: 2024-07-28 16:19:20

常用头文件和一些简单的函数的相关文章

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

C/C++头文件一览 C #include <assert.h> //设定插入点#include <ctype.h> //字符处理#include <errno.h> //定义错误码#include <float.h> //浮点数处理#include <iso646.h>        //对应各种运算符的宏#include <limits.h> //定义各种数据类型最值的常量#include <locale.h> //定

C++编程常用头文件及其包含函数汇总

1. #include<iostream>是标准的C++头文件,任何符合标准的C++开发环境都有这个头文件. 当使用<iostream.h>时,相当于在c中调用库函数,使用的是全局命名空间,也就是早期的c++实现:当使用<iostream>的时候,该头文件没有定义全局命名空间,必须使用namespace std:这样才能正确使用cout.   2.#include <cstdlib>是C++里面的一个常用函数库, 等价于C中的<stdlib.h>

常用头文件及函数

C语言编译器安装的时候还附带了很多标准函数库.当程序使用库中函数的时候,需要在程序开头声明程序调用的库.格式为: #include<... .h> 常用头文件: stdio.h 数据输入/输出   stdlib.h 不知道该属于什么类别的常用函数 String.h 和字符串有关的函数   math.h 各类数学函数 time.h 极少用但会用到的和时间有关的函数 如果让我给一个建议的话,就是在某个程序里把所有能想到的头文件都写上,以后每次用到就复制粘贴. 常用的输入输出函数: 输入: getc

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

原文链接:http://blog.chinaunix.net/uid-22609852-id-3506475.html 驱动常用头文件介绍 #include <linux/***.h> 是在linux-2.6.29/include/linux下面寻找源文件.#include <asm/***.h> 是在linux-2.6.29/arch/arm/include/asm下面寻找源文件.#include <mach/***.h> 是在linux-2.6.29/arch/ar

linux常用头文件及说明

linux常用头文件及说明 1. Linux中一些头文件的作用: <assert.h>:ANSI C.提供断言,assert(表达式)<glib.h>:GCC.GTK,GNOME的基础库,提供很多有用的函数,如有数据结构操作函数.使用glib只需要包含<glib.h><dirent.h>:GCC.文件夹操作函数.struct dirent,struct DIR,opendir(),closedir(),readdir(),readdir64()等 <c

Linux网络常用头文件说明

sys/types.h:数据类型定义 sys/socket.h:提供socket函数及数据结构 netinet/in.h:定义数据结构sockaddr_in arpa/inet.h:提供IP地址转换函数 netdb.h:提供设置及获取域名的函数 sys/ioctl.h:提供对I/O控制的函数 sys/poll.h:提供socket等待测试机制的函数 其他在网络程序中常见的头文件 unistd.h:提供通用的文件.目录.程序及进程操作的函数 errno.h:提供错误号errno的定义,用于错误处理

linux网络编程常用头文件

sys/types.h:数据类型定义 sys/socket.h:提供socket函数及数据结构 netinet/in.h:定义数据结构sockaddr_in arpa/inet.h:提供IP地址转换函数 netdb.h:提供设置及获取域名的函数 sys/ioctl.h:提供对I/O控制的函数 sys/poll.h:提供socket等待测试机制的函数 其他在网络程序中常见的头文件 unistd.h:提供通用的文件.目录.程序及进程操作的函数 errno.h:提供错误号errno的定义,用于错误处理

opencv 常用头文件介绍

1.OpenCV包含的模块 cv – 核心函数库 cvaux – 辅助函数库 cxcore – 数据结构与线性代数库 highgui – GUI函数库 ml – 机器学习函数库 2.常用头文件: #include <cv.h> #include <cvaux.h> #include <highgui.h> #include <ml.h> #include <cxcore.h> 2. 头文件作用   (1)cxcore.h 基础结构:CvPoint

【笔记, 转载】 linux常用头文件详解

转自: http://blog.chinaunix.net/uid-26495963-id-3142054.html 感谢原作者的无私与奉献! 一. C/C++头文件一览 C #include <assert.h> //设定插入点 #include <ctype.h> //字符处理 #include <errno.h> //定义错误码 #include <float.h> //浮点数处理 #include <iso646.h>        //