缺省源

· · 个人记录

自用缺省源。

注释:

Code:

// Coded by @Winter_LoL_ ( Luogu uid : 1281338 )
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ull unsigned long long
#define ldb long double
#define rep1(i,x,y) for(register int i=(x);i<=(y);++i)
#define rep2(i,x,y) for(register int i=(x);i>=(y);--i)
#define max(x,y) ((x)>(y)?(x):(y))
#define min(x,y) ((x)<(y)?(x):(y))
#define writesp(x) write(x),putchar(' ')
#define writeln(x) write(x),putchar('\n')
#define sp putchar(' ')
#define ln putchar('\n')
#define ls(x) (x<<1)
#define rs(x) (x<<1|1)
#define base1 199999999937
#define base2 7399999991
#define mod 998244353
inline int read(){int x=0;bool p=0;char c=getchar();while(c<'0'||c>'9'){p=(c=='-'?1:p);c=getchar();}while(c>='0'&&c<='9'){x=(x<<3)+(x<<1)+(c^48);c=getchar();}return p?~(x-1):x;}
inline void write(int x){if(x<0){putchar('-');x=~(x-1);}if(x>9)write(x/10);putchar(x%10|48);}
inline char getcha(){char c=getchar();while(c==' '||c=='\n')c=getchar();return c;}
inline void putstr(string s){for(int i=0;s[i]!='\0';i++)putchar(s[i]);}
inline void fre(){freopen(".in","r",stdin);freopen(".out","w",stdout);}
namespace Winter_LoL_{

    signed main(int ID){

        return 0;
    }
}signed main(){
//  fre();
    int TimeKeeper=1;
//  TimeKeeper=read(); 
    rep1(Vertin,1,TimeKeeper)Winter_LoL_::main(Vertin);
    return 0;
}

Update:

2024.11.25:

加入 max(x,y),min(x,y),sp,ln。\ 删除 getstr(),putstr(s)。实测没有 cin,cout 快。

2024.11.26:

听取 @scguo 大佬的意见,加入return 0;。

2024.12.20:

为了码风统一,重新加入 putstr(s)。

2025 1~3 月:

在部分函数前加入 inline,省去不必要的入栈时间。

Update : 似乎没什么用。不管了。

2025.5.24:

将 read() 中的 getchar() 改为 getchar_unlocked()。

2025.5.31:

将 read() 中的 getchar_unlocked() 改回 getchar()。

2026.4.25:

加了一些奇怪的东西。例如:

  1. mod,base1,base2 以及别的一些宏定义;
  2. 命名空间;
  3. 开头的奇怪注释;
  4. 并且现在能够更方便地多测了!(特别注意:多测不清空,爆零两行泪。不要以为封装在命名空间里就不用清空了)

    2026.5.29

    微调。使得实现多测更容易了(同时也更不容易忽略而导致保龄了)!