-
个人简介
__int128
#include<cstdio> inline __int128 read(){ __int128 s=0,w=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-')w=-1; ch=getchar(); } while(ch>='0'&&ch<='9'){ s=s*10+ch-'0'; ch=getchar(); } return s*w; } inline void write(__int128 x){ if(x<0){ putchar('-'); x=-x; } if(x>9)write(x/10); putchar(x%10+'0'); }
快速幂模板
int pows(int a,int b){ int s=1,p=a; while(b){ if(b&1)s=s*p; p*=p; b>>=1; } return s; }