#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
typedef long long ll;
const int maxn=15000+100;
const ll M=131073ll,MOD=1000000007ll,P[3]={998244353ll,1005060097ll,950009857ll},G[3]={3ll,5ll,7ll},Inv[3]={644348675ll,675933219ll,647895261ll};
ll fac[maxn],inv[maxn];
ll n,aa[6];
ll mod,g;
ll kmod(ll a,ll b,ll p){
ll ans=1;
while (b) {
if (b&1)
ans=ans*a%p;
b>>=1;
a=a*a%p;
}
return ans;
}
struct Int_128{
unsigned long long a,b;
Int_128(ll x){a=0,b=x;}
friend bool operator < (Int_128 x,Int_128 y)
{
return x.a<y.a||(x.a==y.a&&x.b<y.b);
}
friend Int_128 operator + (Int_128 x,Int_128 y)
{
Int_128 re(0);
re.a=x.a+y.a+(x.b+y.b<x.b);
re.b=x.b+y.b;
return re;
}
friend Int_128 o
FFT 模版 和 INT128模版
最新推荐文章于 2025-03-19 19:02:50 发布