上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: 不如搜索 折半搜索 第一眼2^40,死的透透滴 所以想到折半 如图: 这是普通搜索: 这是折半搜索: 原谅我图画的丑 所以,我们可以对两边开展搜索 将前一半的搜索状态存入a数组,后一半存入b数组。 排序后mlogm查找即可 #include<bits/stdc++.h> using namespac 阅读全文
posted @ 2024-09-18 19:31 yzc_is_SadBee 阅读(14) 评论(0) 推荐(0)
摘要: good rmq #include<bits/stdc++.h> using namespace std; struct node { int num; int lid,rid; int w; int data; bool operator <(node i)const { return data< 阅读全文
posted @ 2024-09-18 19:07 yzc_is_SadBee 阅读(17) 评论(0) 推荐(0)
摘要: see you again #include<bits/stdc++.h> using namespace std; int n,m,x,y,v,Lok[500010],Rok[500010],Lban[500010],Rban[500010],pre[500010],ans[500010]; bo 阅读全文
posted @ 2024-09-13 20:31 yzc_is_SadBee 阅读(15) 评论(0) 推荐(0)
摘要: 题解 总之,赞美太阳 #include <bits/stdc++.h> using namespace std; inline int read(){ char c;int f=1,res=0; while(c=getchar(),!isdigit(c))if(c=='-')f*=-1; while 阅读全文
posted @ 2024-09-13 20:14 yzc_is_SadBee 阅读(27) 评论(0) 推荐(0)
摘要: 题解其1 最终看着写的题解 #include <bits/stdc++.h> using namespace std; inline void read(long long&x){ char c11=getchar();x=0;while(!isdigit(c11))c11=getchar(); w 阅读全文
posted @ 2024-09-13 19:43 yzc_is_SadBee 阅读(16) 评论(0) 推荐(0)
摘要: treap [详解](https://www.cnblogs.com/fusiwei/p/12884254.html) treap 这里的treap指有旋treap 如何种一棵(香蕉树)有旋treap Treap=Tree+heap。 所以Treap树堆其实就是树+堆。树是二叉查找树BST,堆是二叉 阅读全文
posted @ 2024-09-13 19:14 yzc_is_SadBee 阅读(35) 评论(0) 推荐(0)
摘要: 知道kmp的请跳过这一段 dalao们表示知道思想即可 找到最清晰的解析 kmp 我看了约114514个解析才搞懂 如何求next 首先,next[i]本应表示0~i的字符串的最长相同前缀后缀的长度。 不过为了方便匹配,实际可以存最长相同前缀后缀时前缀最后一个的地址 听起来好绕 那这么说吧: 例如串 阅读全文
posted @ 2024-09-12 20:42 yzc_is_SadBee 阅读(29) 评论(0) 推荐(0)
摘要: 你说的对,但是set是一种高效的数据结构,定义于bits/stdc++.h,使用std进行调用…… #include <bits/stdc++.h> using namespace std; const int maxn = 1000000; const int INF = 1e9; int n, 阅读全文
posted @ 2024-09-12 19:35 yzc_is_SadBee 阅读(28) 评论(0) 推荐(0)
摘要: delicious #include<bits/stdc++.h> using namespace std; const int inf=0x3f3f3f3f; multiset<int>delta,full; int st[500100],ed[500100]; int srt=inf; int 阅读全文
posted @ 2024-09-12 19:07 yzc_is_SadBee 阅读(12) 评论(0) 推荐(0)
摘要: ( •̀ ω •́ )y 好fan 题解 #include <bits/stdc++.h> using namespace std; inline int read(){ char c;int f=1,res=0; while(c=getchar(),!isdigit(c))if(c=='-')f* 阅读全文
posted @ 2024-09-11 20:35 yzc_is_SadBee 阅读(22) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页