上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 54 下一页
  2023年6月22日
摘要: 线段树合并板子 #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 阅读(17) 评论(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 阅读(17) 评论(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 阅读(8) 评论(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 阅读(8) 评论(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 阅读(11) 评论(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 阅读(16) 评论(0) 推荐(0)
摘要: https://baijiahao.baidu.com/s?id=1614495972671761444&wfr=spider&for=pc 阅读全文
posted @ 2023-05-02 00:09 towboat 阅读(19) 评论(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 阅读(26) 评论(0) 推荐(0)
  2023年4月29日
摘要: 给定 n,求有多少树满足:任意非叶子节点的儿子不少于 2 , 叶子节点个数为 n 阅读全文
posted @ 2023-04-29 12:31 towboat 阅读(13) 评论(0) 推荐(0)
  2023年4月28日
摘要: 一家饭店,有一扇大小会变得门,变化范围为[0,k]。每过一单位时间你可以让门的大小+1,-1,或者不变。客人会在不同的时间来吃饭,但是如果门的大小和他们希望的值不一样,他们就不会进来并且直接消失。吃饭要花钱,现在问饭店最多能赚多少钱。 F[i ] [j ] =max( F[i-1][j] +v,F[ 阅读全文
posted @ 2023-04-28 19:00 towboat 阅读(12) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 54 下一页