随笔分类 - ACM模板&总结
摘要:@ sudo apt update && sudo apt upgrade sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison sudo
阅读全文
摘要:DP实录 还有一些水题,就不写进来了,感觉1600,1700的dp好水啊。。 CF 1447E div2 建出trie树来,然后答案是保证每个点最多有一个子树有多个叶子的情况下最少删除叶子的个数。 //https://www.cnblogs.com/Cwolf9/p/10599500.html #i
阅读全文
摘要:@[toc] 一些结论 $gcd(x^a 1,x^b 1)=x^{gcd(a,b)} 1$ $gcd(fib[x],fib[y])=fib[gcd(x,y)]$ 费马大定理 定理:$a^n+b^n=c^n\;\;(n\ge3时没有整数解)$ 扩展:当$a=2 k+1$为奇数时,$c=k^2+(k+1
阅读全文
摘要:struct fastio{ char s[100005]; int it,len; fastio(){it=len=0;} inline char get(){ if(it<len)return s[it++];it=0; len=fread(s,1,100000,stdin); if(len==
阅读全文
摘要:(有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 @[toc] 一维习题:hdu1541 "bzoj3211(hdu4027)" 二维习题:hdu2642 1892 5517 一维树状数组: 改段求点: cpp void add(int x, int y, int z){ int tmp = y;
阅读全文
摘要:fread读入挂 版本一 struct FastIO { static const int S = 1e7; int wpos; char wbuf[S]; FastIO() : wpos(0) {} inline int xchar() { static char buf[S]; static i
阅读全文

浙公网安备 33010602011771号