正文
增加 113 行删除 20 行
12345678910111213141516171819202122232425262728293031323334353637383921 行未改动6162636465666768697033 行未改动104105106107:::info[源代码]```cpp#include <bits/stdc++.h>#define ti chrono::system_clock::now().time_since_epoch().count()#define int long long#define pf(x) push_front(x)#define pb(x) push_back(x)#define mkp(x,y) make_pair(x,y)#define PII pair<int,int>#define fir first#define sec second#define ls o<<1#define rs o<<1|1#define lowbit(x) x&(-x)using namespace std;const int INF=1e18;mt19937 gen(ti);uniform_int_distribution<> rnd(1, 1e9);inline int read(){int x=0,f=1;char ch=getchar();while (ch<'0'||ch>'9'){if (ch=='-') f=-1;ch=getchar();}while (ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}return x*f;}inline void write(int x){if(x<0) putchar('-'),x=-x;if(x>9) write(x/10);putchar(x%10+'0');return ;}signed main(){return 0;}21 行未改动return fac[x]*ifac[y]%mod*ifac[x-y]%mod;}```线性筛欧拉函数```cppbool tag[N];int phi[N],n;int len,p[N];33 行未改动return res;}```:::123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646521 行未改动8788899091929394959697989933 行未改动133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200:::info[源代码]```cpp#include <bits/stdc++.h>#define ti chrono::system_clock::now().time_since_epoch().count()#define rep(a,l,r) for(int a=l;a<=r;a++)#define req(a,r,l) for(int a=r;a>=l;a--)#define ll long long#define ull unsigned long long#define pf(x) push_front(x)#define pb(x) push_back(x)#define mkp(x,y) make_pair(x,y)#define PII pair<int,int>#define PLL pair<ll,ll>#define fir first#define sec secondusing namespace std;const int INF=1e9;mt19937 gen(ti);uniform_int_distribution<> rnd(1, 1e9);namespace FastIO {template<typename T>inline void read(T &x) {x=0;int f=1;char c=getchar();for(;!isdigit(c);c=getchar()) if(c=='-')f=-1;for(;isdigit(c);c=getchar()) x=(x<<1)+(x<<3)+(c^48);x*=f;}inline void read(char &c) {c=getchar();while(isspace(c)) c=getchar();}inline void read(std::string &s) {s.clear();char c=getchar();for(;isspace(c);c=getchar());for(;!isspace(c)&&c!=EOF;c=getchar()) s+=c;}template<typename T,typename...Args>void read(T &x,Args&...args) {read(x);read(args...);}template<typename T>void print(T x) {if(x<0)x=-x,putchar('-');if(x>9)print(x/10);putchar((x%10)^48);}inline void print(char c) {putchar(c);}inline void print(std::string s) {rep(i,0,(int)s.size())putchar(s[i]);}inline void print(const char*s) {while(*s)putchar(*s++);}template<typename T,typename...Args>void print(const T &x,const Args&...args) {print(x);print(args...);}}using namespace FastIO;int main(){return 0;}21 行未改动return fac[x]*ifac[y]%mod*ifac[x-y]%mod;}```::::::info[线性筛欧拉函数]```cppbool tag[N];int phi[N],n;int len,p[N];33 行未改动return res;}```::::::info[树状数组]```cppstruct BIT {#define lowbit(x) x&(-x)int w[N];void upd(int pos,int v) {while(pos<=n) {w[pos]+=v;pos+=lowbit(pos);}}int qry(int pos) {int res=0;while(pos) {res+=w[pos];pos-=lowbit(pos);}return res;}};```::::::info[快速幂]```cppint qpow(int x,int y) {int res=1;while(y) {if(y&1) res=res*x%mod;x=x*x%mod;y>>=1;}return res;}```::::::info[边双连通分量]```cppint tot,dfn[N],low[N];int cnt,bel[N];int st[N],top;vector<int> col[N];void tarjan(int u,int fae) {low[u]=dfn[u]=++tot;st[++top]=u;for(int i=g1.hd[u];i;i=g1.G[i].nxt) {int v=g1.G[i].v,id=g1.G[i].idx;if(!dfn[v]) {tarjan(v,id);low[u]=min(low[u],low[v]);}else if(id!=fae)low[u]=min(low[u],dfn[v]);}if(low[u]==dfn[u]) {cnt++;int x;do {x=st[top--];bel[x]=cnt;col[cnt].pb(x);}while(x!=u);}}```:::