随笔分类 - 模板
摘要:Link Cat Tree (连喵树) 学习笔记
阅读全文
摘要:树套树,可持久化,权值线段树,离散化
阅读全文
摘要:Lucas定理 大意:给定$n,m,p$,求$C_{m+n}^n\%p$ 数据范围:$1 \le n,m,p \le 10^5$,保证$p$为质数 Code: 2018.7.10
阅读全文
摘要:P3868 "TJOI2009] [猜数字" 题目描述 现有两组数字,每组$k$个,第一组中的数字分别为:$a_1$,$a_2$,...,$a_k$表示,第二组中的数字分别用$b_1$,$b_2$,...,$b_k$表示。其中第二组中的数字是两两互素的。求最小的非负整数$n$,满足对于任意的$i$,
阅读全文
摘要:矩阵快速幂 给定n n的矩阵A,求A^k Code: include include define ll long long const ll N=102; const ll mod=1e9+7; ll k;int n; struct matrix { ll dx[N][N]; matrix() {
阅读全文
摘要:回顾了一下主席树的板子 include include define ls t[id].ch[0] define rs t[id].ch[1] define ols t[las].ch[0] define ors t[las].ch[1] define mid (l+r 1) const int N
阅读全文
摘要:``` include define ls id 1) const int N=100010; int max(int x,int y){return x y?x:y;} int min(int x,int y){return xmid) change(rs,l,r,delta); else cha
阅读全文
摘要:维护区间添加,删除,前驱,后继,排名,逆排名 "普通平衡树" include define ls t[now].ch[0] define rs t[now].ch[1] int min(int x,int y){return xy?x:y;} const int inf=0x3f3f3f3f; co
阅读全文
摘要:今天学了一下手写堆。 不太喜欢,感觉写起来不太方便,再看吧。 NOIp2004 合并果子 2018.6.9
阅读全文

浙公网安备 33010602011771号