希胤
希胤
全部文章
分类
dp模板(4)
dp狂练(1)
图论模板(4)
小知识(3)
数论模板(1)
未归档(3)
杂模板(5)
题解(36)
归档
标签
去牛客网
登录
/
注册
希胤的博客
TA的专栏
23篇文章
0人订阅
蓝桥真题
12篇文章
800人学习
线段树和数状数组经典例题
11篇文章
281人学习
全部文章
(共60篇)
蓝桥20年(第十一届)6月
来自专栏
E、矩阵 #include<bits/stdc++.h> using namespace std; #define ll long long ll f[1017][1017]; //f[i][j]表示第一行i个数,第二行j个数的方案数 int main(){ f[0][0]...
2020-10-14
0
608
map,第一个为关键字,第二个为键值
#include<bits/stdc++.h> using namespace std; int n; map<string,string>mp; //第一个为关键字,第二个为键值 int main(){ cin >> n; for(int i...
2020-10-11
0
687
字符串存大数
参考博客 #include<bits/stdc++.h> using namespace std; int k,len; string str; int main(){ cin >> str; cin >> k; len=str.size...
2020-10-10
0
442
STL(list)(双向链表)
参考博客 #include<bits/stdc++.h> using namespace std; int n,m; int const N=1e5+7; list<int>s; list<int>::iterator pos[N]; //用find会超时,...
2020-10-10
0
619
严格不相交的两条路径,要保证一个人一定在另一个人的右边
题目: P1006 传纸条 这题虽然跟方格取数很像,但是这题要求两个人的路径严格不相交减了两条枝,复杂度已经够优秀了 include<bits/stdc++.h> using namespace std;#define low(x) x&(-x)#define ll long ...
2020-10-06
0
437
树形dp之最小支配集(树形dp模板)
题目: CellPhoneNetwork 最小支配集:一个点可以覆盖其周围所有的点包括自己 f[i][0]被其儿子覆盖 f[i][1]被自己覆盖 f[i][2]被其父亲覆盖 设j为i的儿子 f[i][0]= min(f[j][0],f[j][1])+tmp; //tmp表示维护至少有一个儿子覆盖的...
2020-10-05
0
341
错排的dp方程——f[i]=(i-1)*(f[i-1]+f[i-2])
include<bits/stdc++.h> using namespace std;namespace{ template<typename t=""> inline void read(T &s){ T f=1;s=0;char ch=g...
2020-10-02
0
532
map下标要用自定义类型时,要重载<
#include<bits stdc++.h> using namespace std; namespace{ template inline void read(T &s){ T f=1;s=0;char ch=getchar(); for(;!isdigit(ch);ch=g...
2020-09-30
0
554
二维前缀和,差分
include<bits/stdc++.h> using namespace std;namespace{ template<typename t=""> inline void read(T &s){ T f=1;s=0;char ch=g...
2020-09-30
0
579
滑动窗口和尺取法就是双指针,滑动窗口约等于尺取法
题目:日志统计(AcWing) 解析:本题的尺子长度为时间#include<bits/stdc++.h>using namespace std;namespace{ template<typename t=""> inline void read(T &s...
2020-09-12
0
542
首页
上一页
1
2
3
4
5
6
下一页
末页