上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 54 下一页
  2023年6月22日
摘要: 可持久化线段树 #include <cstdio> #include <algorithm> using namespace std ; const int maxn=200010; int a[maxn],b[maxn],blen,n,CNT; int sum[maxn<<5],lc[maxn<< 阅读全文
posted @ 2023-06-22 15:00 towboat 阅读(30) 评论(0) 推荐(0)
摘要: 线段树合并板子 #include<iostream> #include<cstring> using namespace std; const int N =5e5+10,M =N*2; int nxt[M],hd[N],all=1,go[M],n,m; int dep[N],f[N][22],fa 阅读全文
posted @ 2023-06-22 01:36 towboat 阅读(31) 评论(0) 推荐(0)
  2023年5月6日
摘要: 错位排列板子题,plus: 组合数取模 const int N=1e6; #define int long long const int mod =1e9+7 ; int n,m,D[N+3] ; #define ll long long ll inv[N+3]; int F[N+3] ; int 阅读全文
posted @ 2023-05-06 14:23 towboat 阅读(28) 评论(0) 推荐(0)
  2023年5月2日
摘要: 要求O(1) 查找元素的存在 struct HashMap{ static const int Hash=999917,maxn=46340; int num,link[Hash],son[maxn+5],next[maxn+5],w[maxn+5]; int top,Stack[maxn+5]; 阅读全文
posted @ 2023-05-02 16:40 towboat 阅读(21) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstdio> #include<string> #include<cstring> #include<cmath> #include<algorithm> #include<stack> #include<queue> #include<ve 阅读全文
posted @ 2023-05-02 13:22 towboat 阅读(12) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/u011815404/article/details/88381586 #include<iostream> #include<vector> #include <cstring> #include<string> using namespace std; 阅读全文
posted @ 2023-05-02 12:24 towboat 阅读(27) 评论(0) 推荐(0)
摘要: 百度百科> #include<iostream> #include<vector> #include<string> using namespace std; struct wint:vector<int> { wint(int n=0) { push_back(n); check(); } win 阅读全文
posted @ 2023-05-02 11:36 towboat 阅读(21) 评论(0) 推荐(0)
摘要: https://baijiahao.baidu.com/s?id=1614495972671761444&wfr=spider&for=pc 阅读全文
posted @ 2023-05-02 00:09 towboat 阅读(31) 评论(0) 推荐(0)
  2023年4月30日
摘要: 矩阵快速幂 #include <iostream> #include <cmath> #include <algorithm> using namespace std; #define N 2 int mod; #define int long long struct matrix { int a[ 阅读全文
posted @ 2023-04-30 18:18 towboat 阅读(28) 评论(0) 推荐(0)
  2023年4月29日
摘要: 给定 n,求有多少树满足:任意非叶子节点的儿子不少于 2 , 叶子节点个数为 n 阅读全文
posted @ 2023-04-29 12:31 towboat 阅读(14) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 54 下一页