版本比较
zzchenjunxuan
签名
增加 1 行删除 0 行
1岁月苍苍,此路茫茫;人生冉冉,此情脉脉个人介绍
增加 19 行删除 65 行
11234567891011121314151617181920212223248 行未改动3334353619202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182逆元公式:$invit_i=-⌊i/p⌋ invit_{p\%i} \%p$```扩展欧几里得定理:exgcd(a,p,x,y),a^-1=(x%p+p)%pexgcd(a,b,&x,&y) if b==0 x=1,y=0; return ; exgcd(b,a%b,x,y); int t=x; x=y; y=t-a/b*y;费马小定理:a^-1=qpow(a,p-2)
前提:gcd(a,p)=1且p是质数
线性求逆元:inv_i=(p+floor(p/i))*inv_{p%i}%p
线性求f_i=f_{i+1} * (i+1) %p->f_i表示(i!)^-1
O(1)求逆元:i^-1=(i!)^-1 * (i-1)!```https://www.luogu.ac.cn/problem/list
```112.16.216.176:298608 行未改动team0059404861```# **求关!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!**```#include<bits/stdc++.h>using namespace std;typedef long long ll;
int main(){// freopen(".in","r",stdin);// freopen(".out","w",stdout);
return 0;}/**/``````namespace IO{ constexpr int fsize = 1<<24; #define getchar() ((IO::si!=IO::ti||(IO::ti=(IO::si=IO::input)+fread(IO::input,1,IO::fsize,stdin))),IO::si!=IO::ti?*(IO::si++):EOF) #define putchar(c) ((IO::out.so!=IO::out.to||(fwrite(IO::out.output,1,IO::fsize,stdout),IO::out.so=IO::out.output)),*(IO::out.so++)=c) char input[fsize],*si = input,*ti = input; struct output_stream { char output[fsize],*so = output,*to = output + fsize; inline ~output_stream() { if(so == output) return; fwrite(output,1,so-output,stdout); so = output; } }out; template<typename T>inline void read(T &x) { int c = getchar(),p = 1; x = 0; while(c < 48||c > 57) { if(c == 45) p = -1; c = getchar(); } while(48 <= c&&c <= 57) { x = (x<<3)+(x<<1)+(c^48); c = getchar(); } x *= p; } template<typename T>inline void write(T x) { static int c[40],cnt = 0; if(x < 0) putchar(45),x = -x; if(!x) putchar(48); while(x) c[++cnt] = x%10^48,x /= 10; while(cnt) putchar(c[cnt--]); }}using IO::read;using IO::write;``````29864999120305289854289313845727939193299995981154426290```奖项
增加 0 行删除 3 行
1232025 CSP-J 二等奖2025 CSP-S 二等奖2024 CSP-J 二等奖