My std

update on 2020 02 14

code
#include<bits/stdc++.h>
namespace IO
{
	using namespace std;
	char buf[1<<22],Out[1<<22],*p1=buf,*p2=buf;
	int p3=-1,f=0;
	inline void file()
	{
		#ifdef NTFOrz
		freopen("file.in","r",stdin);
		#endif
	}
	inline char getchar()
	{
		return (p1==p2)&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++;
	}
	inline void flush(){fwrite(Out,1,p3+1,stdout),p3=-1;}
	inline void check(){if (p3>(1<<21)) flush();}
	inline void putchar(char a){Out[++p3]=a;check();}
	inline void putline(string s)
	{
		int tmp=p3;
		while (p3-tmp<s.size()) putchar(s[p3-tmp]);
		putchar('\n');
	}
}
namespace my_std
{
    using namespace std;
    #define getchar IO::getchar
    #define putchar IO::putchar
    #define Re register
    #define rep(i,a,b) for (Re int i=(a);i<=(b);i++)
    #define drep(i,a,b) for (Re int i=(a);i>=(b);i--)
    #define repv(i,v) if (v.size()) rep(i,0,v.size()-1)
    #define drepv(i,v) if (v.size()) drep(i,v.size()-1,0)
    #define go(u) for (Re int i=head[(u)];i;i=e[i].nxt)
    #define pf printf
    #define writesp(x) write(x),putchar(' '),IO::check()
    #define writeln(x) write(x),putchar('\n'),IO::check()
    #define mem(x,v) memset(x,v,sizeof(x))
    #define pb push_back
    #define NTF return
    #define AKIOI 0
    typedef long long ll;
    const int INF=0x7fffffff;
    inline int read()
    {
        int sum=0,f=0;
        char c=getchar();
        while (!isdigit(c))
        {
            f|=(c=='-');
            c=getchar();
        }
        while (isdigit(c))
        {
            sum=(sum<<1)+(sum<<3)+(c^48);
            c=getchar();
        }
        return f?-sum:sum;
    }
    void write(int k)
    {
        if (k<0) putchar('-'),k=-k;
        if (k>=10) write(k/10);
        putchar(k%10+48);
    }
    #define templ template<typename T>
    templ inline void chkmax(T &x,T y){if (x<y) x=y;}
    templ inline void chkmin(T &x,T y){if (x>y) x=y;}
}
using namespace my_std;

update on 2020 06 26

code

未完待续

猜你喜欢

转载自www.cnblogs.com/ZHANG-SHENG-HAO/p/13196697.html
std
my