随笔分类 -  数据结构-线段树

摘要:1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 const ll N=51; 5 ll n,m,fac[N]; 6 7 inline ll Calc(ll i,ll j,ll ii,ll jj) { 阅读全文
posted @ 2021-10-07 16:08 上官书房 阅读(60) 评论(0) 推荐(1)
摘要:1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 const int N=2e6+11,M=61,L=(1<<13)+11,St=(1<<13); 5 int n,a[M]; 6 int tot,fr[ 阅读全文
posted @ 2021-09-30 12:08 上官书房 阅读(27) 评论(0) 推荐(0)
摘要:1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 const ll N=1e6+11,St=1e6,mod=998244353; 5 ll T,n,A,B,dp[N]; 6 7 inline ll re 阅读全文
posted @ 2021-09-12 23:21 上官书房 阅读(43) 评论(0) 推荐(0)
摘要:1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 const ll N=51; 5 ll n,m,a[N],lj[N],ans,sum,len,tmp; 6 7 inline ll re_ad() { 阅读全文
posted @ 2021-09-07 22:19 上官书房 阅读(44) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-09-06 15:36 上官书房 阅读(17) 评论(0) 推荐(0)
摘要:1 #include<bits/stdc++.h> 2 #define int long long 3 using namespace std; 4 const int N=1e5+11; 5 int n,h[N],a[N],ans[N]; 6 int sta[N],top; 7 8 inline 阅读全文
posted @ 2021-09-05 11:02 上官书房 阅读(47) 评论(1) 推荐(1)
摘要:题目链接:https://www.luogu.com.cn/problem/P1505 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=5e5+11,M=N<<1,Tree_Sz=3e6+11,inf=1<<29; 4 i 阅读全文
posted @ 2021-09-05 09:48 上官书房 阅读(28) 评论(0) 推荐(0)
摘要:题目链接:https://www.luogu.com.cn/problem/P2572 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=1e5+11,Tree_Sz=5e5+11; 4 int n,m,a[N]; 5 6 阅读全文
posted @ 2021-08-19 18:39 上官书房 阅读(24) 评论(0) 推荐(0)
摘要:题目链接:https://www.luogu.com.cn/problem/P7735 Update 8.13: 再附:结构体里写的时候一定写个清空函数,不然一个不是全局变量的结构体,里面会出现一些奇奇怪怪的值 1 #include<bits/stdc++.h> 2 using namespace 阅读全文
posted @ 2021-08-13 22:41 上官书房 阅读(115) 评论(3) 推荐(1)
摘要:不是树剖教程,是一些写码时候发现的问题 具体树剖教程可以参考博文https://www.cnblogs.com/chinhhh/p/7965433.html 1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 阅读全文
posted @ 2021-08-12 21:39 上官书房 阅读(37) 评论(2) 推荐(1)
摘要:题目链接:https://www.luogu.com.cn/problem/CF580E 1 #include<bits/stdc++.h> 2 #define ull unsigned long long 3 using namespace std; 4 const int N=1000011; 阅读全文
posted @ 2021-05-29 18:17 上官书房 阅读(51) 评论(0) 推荐(0)
摘要:1 #include<bits/stdc++.h> 2 #define ull unsigned long long 3 using namespace std; 4 const int N=500011,L=2000011; 5 const ull St=233; 6 int T,n,m; 7 u 阅读全文
posted @ 2021-05-29 18:15 上官书房 阅读(54) 评论(0) 推荐(0)