火车头

#include<bits/stdc++.h>
using namespace std;

typedef long long LL;
// #define int LL

random_device rd;
mt19937 gen(rd());

inline int myrand(int l,int r){
    uniform_int_distribution<>distrib(l,r);
    int x=distrib(gen);
    return x;
}

#define mt make_tuple
#define eb emplace_back

inline int read(){
    int s=0,f=1;char ch=getchar();
    while(ch<'0' or ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0' and ch<='9'){s=(s*10)+(ch^48);ch=getchar();}
    return f*s;
}

inline void write(int x){
    if(x<0){x=-x;putchar('-');}
    if(x>9)write(x/10);
    putchar(x%10+48);
}

// const int inf=1e18;
const int P=998244353;
// const double eps=1e-10;

inline int inc(int a,int b){return(a+=b)>=P?a-P:a;}
inline int dec(int a,int b){return(a-=b)<0?a+P:a;}
inline int mul(int a,int b){return (1ll*a*b%P+P)%P;}
inline void add(int &a,int b){(a+=b)>=P?a-=P:1;}
inline void sub(int &a,int b){(a-=b)<0?a+=P:1;}
inline int qpow(int a,int b){int res=1;while(b){if(b&1)res=mul(res,a);a=mul(a,a);b>>=1;}return res;}
inline int Inv(int x){return qpow(x,P-2);}
posted @ 2024-10-05 16:15  QcpyWcpyQ  阅读(8)  评论(0编辑  收藏  举报