小蒟蒻mlg开通 C S D N \mathcal{CSDN} CSDN啦!我写博客有个习惯,代码只 c o p y copy copy核心部分,剩下的框架挂在下面,如有需要调试,则在此框架上加入核心代码即可.
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#include<vector>
#include<set>
#include<bitset>
#include<cassert>
#include<ctime>
#define next MabLcdG
#define R register
#define debug puts("wn")
#define mod 998244353
#define chkmax(x, y) (x=max(x, y))
#define chkmin(x, y) (x=min(x, y))
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef double dl;
template<typename T> void read(T &x);
template<typename T> void write(T x);
template<typename T> void writesp(T x);
template<typename T> void writeln(T x);
int main(){
}
template<typename T> void read(T &x){
x=0; int t=1;
char wn=getchar();
while (wn<'0' || wn>'9'){
if (wn=='-') t=-1;
wn=getchar();
}
while (wn>='0' && wn<='9'){
x=x*10+wn-'0'; wn=getchar();
}
x*=t;
}
template<typename T> void write(T x){
if (x<0){putchar('-'); x=-x;}
if (x<=9){putchar(x+'0'); return;}
write(x/10); putchar(x%10+'0');
}
template<typename T> void writesp(T x){
write(x); putchar(' ');
}
template<typename T> void writeln(T x){
write(x); putchar('\n');
}