标签:tchar ase har getc 快速幂 getchar turn git col
快读快读快读
1 inline int rd(){ 2 int x=0,f=1; char ch=getchar(); 3 while(!isdigit(ch)) {f=ch==‘-‘?0:1; ch=getchar();} 4 while(isdigit(ch)) {x=(x<<1)+(x<<3)+ch-‘0‘; ch=getchar();} 5 return f?x:-x; 6 }
快速幂
1 ll ksm(ll a, ll b){ 2 if(b==1) return a; 3 if(b==0) return 1; 4 ll ans=1, base=a; 5 while(b>0){ 6 if(b&1){ 7 ans*=base; 8 ans%=mod; 9 } 10 base*=base; 11 base%=mod; 12 b>>=1; 13 } 14 return ans; 15 }
exgcd
标签:tchar ase har getc 快速幂 getchar turn git col
原文地址:https://www.cnblogs.com/Aze-qwq/p/9922448.html