随笔分类 -  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 阅读全文
posted @ 2019-08-04 12:58 Cwolf9 阅读(372) 评论(1) 推荐(0)
摘要:DP实录 还有一些水题,就不写进来了,感觉1600,1700的dp好水啊。。 CF 1447E div2 建出trie树来,然后答案是保证每个点最多有一个子树有多个叶子的情况下最少删除叶子的个数。 //https://www.cnblogs.com/Cwolf9/p/10599500.html #i 阅读全文
posted @ 2019-03-26 13:14 Cwolf9 阅读(227) 评论(0) 推荐(0)
摘要:@[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 阅读全文
posted @ 2019-03-01 21:08 Cwolf9 阅读(441) 评论(1) 推荐(0)
摘要: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== 阅读全文
posted @ 2018-10-30 13:14 Cwolf9 阅读(232) 评论(0) 推荐(0)
摘要:(有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 @[toc] 一维习题:hdu1541 "bzoj3211(hdu4027)" 二维习题:hdu2642 1892 5517 一维树状数组: 改段求点: cpp void add(int x, int y, int z){ int tmp = y; 阅读全文
posted @ 2018-08-21 18:53 Cwolf9 阅读(200) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2018-08-21 18:40 Cwolf9 阅读(403) 评论(0) 推荐(0)