跳到正文

剪贴板

剪贴板 r57uphji

原文
剪贴板信息

剪贴板信息

收录
更新

日常使用

C++
#include<bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define mset(x,y) memset((x),(y),sizeof((x)))
#define mcpy(x,y) memcpy((x),(y),sizeof((y)))
#define FileIn(x) freopen(""#x".in","r",stdin)
#define FileOut(x) freopen(""#x".out","w",stdout)
#define debug(x) cerr<<""#x" = "<<(x)<<'\n'
#define Assert(x) if(!(x)) cerr<<"Failed: "#x" at line "<<__LINE__,exit(1)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef __int128 Int;
bool StM;
void Main()
{

}
bool EdM;
int main()
{
    cerr<<fabs(&StM-&EdM)/1024.0/1024.0<<" MB\n";
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    int StT=clock();
    int T=1;
    while(T--) Main();
    int EdT=clock();
    cerr<<1e3*(EdT-StT)/CLOCKS_PER_SEC<<" ms\n";
    return 0;
}

快读快写版

C++
#include<bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define mset(x,y) memset((x),(y),sizeof((x)))
#define mcpy(x,y) memcpy((x),(y),sizeof((y)))
#define FileIn(x) freopen(""#x".in","r",stdin)
#define FileOut(x) freopen(""#x".out","w",stdout)
#define debug(x) cerr<<""#x" = "<<(x)<<'\n'
#define Assert(x) if(!(x)) cerr<<"Failed: "#x" at line "<<__LINE__,exit(1)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef __int128 Int;
namespace FastIO{
    const int MAXN=(1<<23);
    char in[MAXN],*St=in,*Ed=in;
    #define getchar() (St==Ed&&(Ed=(St=in)+fread(in,1,MAXN,stdin),St==Ed)?EOF:*St++)
    char out[MAXN],*now=out;
    #define flush() (fwrite(out,1,now-out,stdout))
    #define putchar(x) (now==out+MAXN&&(flush(),now=out),*now++=(x))
    class Flush{public:~Flush(){flush();}}_;
    class In{
        public:
            template<typename T>
            inline In &operator>>(T &x)
            {
                x=0;bool f=0;
                char c=getchar();
                while(c<'0'||c>'9')
                    f|=(c=='-'),c=getchar();
                while(c>='0'&&c<='9')
                    x=x*10+c-'0',c=getchar();
                if(c=='.')
                {
                    c=getchar();double dot=0.1;
                    while(c>='0'&&c<='9')
                        x+=(c-'0')*dot,dot*=0.1,c=getchar();
                }
                return (f?x=-x:x),*this;
            }
            inline In &operator>>(char &x)
            {
                while(isspace(x=getchar()));
                return *this;
            }
            inline In &operator>>(char *x)
            {
                char c=getchar();
                while(isspace(c)) c=getchar();
                while(!isspace(c)&&~c) *(x++)=c,c=getchar();
                return *x=0,*this;
            }
            inline In &operator>>(string &x)
            {
                char c=getchar();x.clear();
                while(isspace(c)) c=getchar();
                while(!isspace(c)&&~c) x.push_back(c),c=getchar();
                return *this;
            }
            inline In &getline(char *x)
            {
                char c=getchar();
                while(!(c==' '||!isspace(c))) c=getchar();
                while(c==' '||!isspace(c)) (*x++)=c,c=getchar();
                return *x=0,(*this);
            }
            inline In &getline(string &x)
            {
                char c=getchar();x.clear();
                while(!(c==' '||!isspace(c))) c=getchar();
                while(c==' '||!isspace(c)) x.push_back(c),c=getchar();
                return (*this);
            }
            inline In &operator>>(In &in){return in;}
    };
    class Out{
        private:
            char buf[20];
            short dot=6,top=0;
        public:
            template<typename T>
            inline Out &operator<<(T x)
            {
                if(x<0) putchar('-'),x=-x;
                do buf[++top]=x%10,x/=10;while(x);
                while(top) putchar(buf[top--]^'0');
                return *this;
            }
            inline Out &operator<<(char c){return putchar(c),*this;}
            inline Out &operator<<(string x)
            {
                for(auto c:x) putchar(c);
                return *this;
            }
            inline Out &operator<<(char *x)
            {
                while(*x) putchar(*(x++));
                return *this;
            }
            inline Out &operator<<(const char *x)
            {
                while(*x) putchar(*(x++));
                return *this;
            }
            inline Out &operator<<(double x)
            {
                snprintf(buf,sizeof(buf),"%.*lf",dot,x);
                return (*this)<<buf;
            }
            inline Out &operator<<(Out &out){return out;}
            inline Out setdot(const int n){return dot=n,*this;}
    };
    In fin;Out fout;
    inline Out &setdot(const int n,Out& out=fout){return fout.setdot(n),out;}
    inline In &getline(char *x,In& in=fin){return fin.getline(x),in;}
    inline In &getline(string &x,In& in=fin){return fin.getline(x),in;}
}
using namespace FastIO;
bool StM;
void Main()
{

}
bool EdM;
int main()
{
    cerr<<fabs(&StM-&EdM)/1024.0/1024.0<<" MB\n";
    int StT=clock();
    int T=1;
    while(T--) Main();
    int EdT=clock();
    cerr<<1e3*(EdT-StT)/CLOCKS_PER_SEC<<" ms\n";
    return 0;
}