码迷,mamicode.com
首页 > 其他好文 > 详细

头的模板

时间:2019-04-26 22:32:57      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:queue   style   char   ring   ret   sdi   cstring   inline   flag   

#include<cstdio>
#include<iostream>
#include<cstdlib>
#include<iomanip>
#include<cmath>
#include<cstring>
#include<string>
#include<algorithm>
#include<time.h>
#include<queue>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pr;
const double pi=acos(-1);
#define rep(i,a,n) for(int i=a;i<=n;i++)
#define per(i,n,a) for(int i=n;i>=a;i--)
#define Rep(i,u) for(int i=head[u];i;i=Next[i])
#define clr(a) memset(a,0,sizeof a)
#define pb push_back
#define mp make_pair
#define fi first
#define sc second
ld eps=1e-9;
ll pp=1000000007;
ll mo(ll a,ll pp){if(a>=0 && a<pp)return a;a%=pp;if(a<0)a+=pp;return a;}
ll powmod(ll a,ll b,ll pp){ll ans=1;for(;b;b>>=1,a=mo(a*a,pp))if(b&1)ans=mo(ans*a,pp);return ans;}
ll read(){
    ll ans=0;
    char last= ,ch=getchar();
    while(ch<0 || ch>9)last=ch,ch=getchar();
    while(ch>=0 && ch<=9)ans=ans*10+ch-0,ch=getchar();
    if(last==-)ans=-ans;
    return ans;
}
//head

gh大佬快读

#include <cctype>
#include <cstdio>

template<typename T_>
inline T_ getnum()
{
    T_ res=0;
    bool flag=false;
    char ch=getchar();
    while (!isdigit(ch)){flag=flag?flag:ch==-;ch=getchar();}
    while (isdigit(ch))
    {
        res=(res<<3)+(res<<1)+ch-0;
        ch=getchar();
    }
    return res;
}

 

头的模板

标签:queue   style   char   ring   ret   sdi   cstring   inline   flag   

原文地址:https://www.cnblogs.com/lcezych/p/10776732.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!