08 2021 档案

摘要: 阅读全文
posted @ 2021-08-29 11:50 上官书房 阅读(36) 评论(1) 推荐(1)
摘要:板子题:P3369 【模板】普通平衡树 题目链接:https://www.luogu.com.cn/problem/P3369 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=5e5+11,inf=1<<29; 4 int 阅读全文
posted @ 2021-08-20 22:25 上官书房 阅读(112) 评论(0) 推荐(1)
摘要:题目链接:https://www.luogu.com.cn/problem/P2633 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=200011,K=N<<5,G=31; 4 int n,m,a[N],b[N],num 阅读全文
posted @ 2021-08-20 12:19 上官书房 阅读(24) 评论(0) 推荐(1)
摘要:题目链接: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)
摘要: 阅读全文
posted @ 2021-08-19 00:16 上官书房 阅读(39) 评论(0) 推荐(0)
摘要:题目链接:https://www.luogu.com.cn/problem/P4014 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=211,M=4e4+11,inf=1<<29; 4 int n,a[N][N],st, 阅读全文
posted @ 2021-08-18 17:48 上官书房 阅读(33) 评论(0) 推荐(0)
摘要:友帖:https://blog.csdn.net/zjy_code/article/details/119673118?spm=1001.2014.3001.5501 大佬的博客:https://www.cnblogs.com/ECJTUACM-873284962/p/6398385.html 大佬 阅读全文
posted @ 2021-08-18 16:59 上官书房 阅读(65) 评论(2) 推荐(1)
摘要:题目链接:https://www.luogu.com.cn/problem/P4016 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=211,M=4011,inf=1<<29; 4 int n,m,st,ed,a[N], 阅读全文
posted @ 2021-08-17 23:21 上官书房 阅读(34) 评论(0) 推荐(0)
摘要:题目链接:https://www.luogu.com.cn/problem/P2761 1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 const int N=2e6+11; 5 const ll i 阅读全文
posted @ 2021-08-17 15:02 上官书房 阅读(32) 评论(0) 推荐(0)
摘要:题目源自洛谷,题目顺序按洛谷上难度由低到高排序,4蓝19紫1黑 Update 21.8.18:坑太深,慢慢填 1.孤岛营救问题:https://www.cnblogs.com/shangguanshufang/p/wang_luo_liu_24_ti_1_gu_dao_ying_jiu_wen_ti 阅读全文
posted @ 2021-08-17 11:59 上官书房 阅读(31) 评论(0) 推荐(1)
摘要:题目链接:https://www.luogu.com.cn/problem/P2756 1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 const int N=211,M=40011,inf=1<<2 阅读全文
posted @ 2021-08-17 11:53 上官书房 阅读(47) 评论(0) 推荐(0)
摘要:题目链接:https://www.luogu.com.cn/problem/P4011 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=21,M=1<<15; 4 const int dx[11]={1,-1,0,0},d 阅读全文
posted @ 2021-08-17 11:48 上官书房 阅读(54) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-08-16 23:11 上官书房 阅读(43) 评论(0) 推荐(0)
摘要:题目链接:https://www.luogu.com.cn/problem/P2258 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=21,MAXX=1<<29; 4 int n,m,r,c,a[N][N],lj[N], 阅读全文
posted @ 2021-08-13 23:24 上官书房 阅读(34) 评论(0) 推荐(1)
摘要:题目链接: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)
摘要:1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N=5011,mod=1e9+7; 4 int n,m,dp[N][N],g[N][N]; 5 char s[N],t[N]; 6 int main() 7 { 8 scanf( 阅读全文
posted @ 2021-08-10 17:00 上官书房 阅读(41) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-08-10 16:46 上官书房 阅读(26) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-08-10 10:16 上官书房 阅读(33) 评论(0) 推荐(0)
摘要:·康托展开: 1.先算 1~n 的阶乘 jc[1]~jc[n] 2.计算每一位后面有几个比这一位小的数 , 记为 num[i] 3.公式: ans+=num[i]*jc[n-i] ( i : 1~n ) < ※ans+1※ 即为 该展开式为全排列中的第几个 > ·康托逆展开: 1.先算 1~n 的阶 阅读全文
posted @ 2021-08-08 21:08 上官书房 阅读(112) 评论(1) 推荐(1)
摘要:博主学习自:博客https://www.cnblogs.com/czhui666/p/13381870.html 阅读全文
posted @ 2021-08-08 21:03 上官书房 阅读(46) 评论(0) 推荐(0)
摘要:博客部分引用自 背包九讲.pdf 及博客https://www.cnblogs.com/Osea/p/11470912.html 阅读全文
posted @ 2021-08-03 22:18 上官书房 阅读(36) 评论(1) 推荐(1)