codlz
codlz
全部文章
分类
不抄模板能解题?(12)
后端开发实践(2)
未归档(21)
题解(1)
归档
标签
去牛客网
登录
/
注册
这都不会?
全部文章
(共66篇)
最朴素的线段树 模板
#include<cstring> #include<cstdio> #include<algorithm> #include<iostream> using namespace std; const int N = 2e5 + 10; using ...
2021-05-06
0
446
洛谷线段树2
第一行包含三个整数 n,m,pn,m,pn,m,p,分别表示该数列数字的个数、操作的总个数和模数。 第二行包含 nnn 个用空格分隔的整数,其中第 iii 个数字表示数列第 iii 项的初始值。 接下来 mmm 行每行包含若干个整数,表示一个操作,具体如下: 操作 111: 格式:1 x y k 含...
2021-05-06
0
393
状态压缩BFS
魔板,状态压缩BFS #include<iostream> #include<algorithm> #include<cstdio> #include<unordered_map> #include<queue> #include&l...
2021-05-06
0
461
电路维修 Acwing 双端BFS,相比单端可以有效减少开销
https://www.acwing.com/problem/content/177/ 双端队列BFS #include <bits/stdc++.h> #define x first #define y second using namespace std; const int N...
2021-05-06
0
421
AcWing 190 字串变换 双向BFS
#include <bits/stdc++.h> using namespace std; const int N = 100; string A[N], B[N]; //储存变换方式 int cnt; string st, ed; int extend_a(queue<stri...
2021-05-06
0
409
差分模板 区间加减
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int nums[N]; int dif[N]; int main() { #ifndef ONLINE_JUDGE freop...
2021-05-06
0
377
PTA树的同构 DFS道路选择
#include <bits/stdc++.h> using namespace std; struct Node { char data; int l, r; }lt[105], rt[105]; //记录左树和右树 int _list[105] = { ...
2021-05-06
0
434
区间和 离散化模板
ACWING 802 区间和 #include <bits/stdc++.h> using namespace std; const int N = 300010; using PII = pair<int, int>; int a[N]; //离散化后坐...
2021-05-06
0
359
单调栈 模板
给定一个长度为N的整数数列,输出每个数左边第一个比它小的数,如果不存在则输出-1。 #include <bits/stdc++.h> using namespace std; stack<int> stk; int main() { #ifndef ONLI...
2021-05-06
0
444
Tire 模板 高效存储和查找字符串
ACWING 835. Trie字符串统计 #include <bits/stdc++.h> using namespace std; const int N = 100005; int idx; //每个节点的唯一标识 int son[N][26], cnt[N]; ...
2021-05-06
0
510
首页
上一页
1
2
3
4
5
6
7
下一页
末页