zoukankan      html  css  js  c++  java
  • 从ao神处偷取的头文件

    #include<bits/stdc++.h>
    using namespace std;
    #define ll long long
    #define ull unsigned long long
    #define all(x) x.begin(), x.end()
    #define mem(x, y) memset(x, y, sizeof(x))
    #define what_is(x) cerr <<  "Line " << __LINE__ << ": " << #x << " is " << (x) << endl;
    #define suf_zero(x) __builtin_ffs(x)
    #define pre_zero(x) __builtin_clz(x)
    #define num_one(x) __builtin_popcount(x)
    #define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
    #define lson l, mid, rt<<1
    #define rson mid+1, r, rt<<1|1
    void err(istream_iterator<string> it) {cerr<<endl;}
    template<typename T, typename... Args>
    void err(istream_iterator<string> it, T a, Args... args) {
        cerr << *it << " = " << a << " , ";
        err(++it, args...);
    }
    
    // fast IO
    namespace fastIO{
        #define BUF_SIZE 100000
    //     fread -> read
        bool IOerror = 0;
        inline char nc(){
            static char buf[BUF_SIZE], *p1 = buf+BUF_SIZE,
             *pend = buf+BUF_SIZE;
             if(p1==pend){
                 p1 = buf;
                 pend = buf+fread(buf, 1, BUF_SIZE, stdin);
                 if(pend==p1){
                     IOerror = 1;
                     return -1;
                 }
             }
             return *p1++;
        }
        inline bool blank(char ch){return ch==' '||ch=='
    '||ch=='
    '||ch=='	';}
        inline void read(int &x){
            char ch;
            while(blank(ch=nc()));
            if(IOerror)return ;
            for(x=ch-'0';(ch=nc())>='0'&&ch<='9';x=x*10+ch-'0');
        }
        #undef BUF_SIZE
    }
    using namespace fastIO;
    //#include<ext/pb_ds/assoc_container.hpp>
    //#include<ext/pb_ds/hash_policy.hpp>
    //using namespace __gnu_pbds;
    //ll sum_of_sq(ll n){n%=mod;return n*(n+1)%mod*(2*n+1)%mod*inv6%mod;}
    const double PI = acos(-1.0);
    const double eps = 1e-8;
    const ll mod = 1e9+7;
    ll qp(ll b, ll n){ll r=1;if(n<0)n+=mod-1;b%=mod;for(;n;n>>=1,b=b*b%mod)if(n&1)r=r*b%mod;return r;}
    //cc_hash_table<ll, ll> S;

    去掉了一些自己不太可能用上的。

  • 相关阅读:
    DedeCMS的arclist循环中判断第一个元素并添加class样式
    PC 浏览器伪装移动(微信)User-Agent
    DedeCMS后台无法保存中文字符
    java spring boot 定时器
    java spring boot 部署redis
    java spring boot 打包方法
    java spring boot返回json的写法
    关于java idea 创建spring boot没有下载依赖的解决方案
    java和golang并发测试
    php转java 系列2 Spring boo 链接数据库jdbc
  • 原文地址:https://www.cnblogs.com/Yinku/p/10486066.html
Copyright © 2011-2022 走看看