hbulzh
码龄6年
关注
提问 私信
  • 博客:40,010
    动态:12
    40,022
    总访问量
  • 68
    原创
  • 899,120
    排名
  • 16
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:北京市
  • 加入CSDN时间: 2018-11-04
博客简介:

lizhenhao

查看详细资料
个人成就
  • 获得31次点赞
  • 内容获得23次评论
  • 获得60次收藏
  • 代码片获得180次分享
创作历程
  • 7篇
    2021年
  • 16篇
    2020年
  • 43篇
    2019年
  • 10篇
    2018年
成就勋章
TA的专栏
  • DFS
    6篇
  • 网络流
    3篇
  • BFS
    5篇
  • 线段树
    2篇
  • 拓扑排序
    1篇
  • 区间DP
    1篇
  • POJ刷题记录
    21篇
  • 背包DP
    1篇
  • 分层图
    2篇
  • 最短路
    3篇
  • A*
    1篇
  • 贪心
    1篇
  • 单调队列dp
  • 状压dp
    1篇
  • tarjan
    1篇
  • 区间操作
    5篇
  • 可持续化数据结构
    1篇
  • 蓝桥杯
    1篇
  • 二分图
    2篇
  • 感悟
  • 前端语言及框架
  • Linux
    3篇
  • 算法
    6篇
  • Java
    2篇
  • C语言
    1篇
  • 计算机组成原理
    1篇
  • 计算机网络
  • 汇编
    1篇
  • 英语
  • PAT
    8篇
  • CCF
    18篇
  • git
    1篇
  • python
    1篇
  • 编译原理
创作活动更多

如何做好一份技术文档?

无论你是技术大神还是初涉此领域的新手,都欢迎分享你的宝贵经验、独到见解与创新方法,为技术传播之路点亮明灯!

342人参与 去创作
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

阿里笔试 反池化

#include <iostream>#include <cstring>#include <algorithm>using namespace std;int A, B, C, D;int _find(int x){ for(int i = 30; i >= 0; i --) if(x >> i & 1) return i; return 0;}int lg(int x){ int k.
原创
发布博客 2021.09.10 ·
165 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

牛客网 瞎位移群岛

#include<iostream>#include <cstring>#include <algorithm>#include <queue>using namespace std;const int N = 2e3 + 10;int flag[N];int id[N][N];pair<int, int> inputs[N];int n, m, k, s, t;int d[4][2] = {0, 1, 0, -1, -1,.
原创
发布博客 2021.09.10 ·
184 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

牛客网 柠檬树

https://ac.nowcoder.com/acm/problem/212478线段树 维护区间最近公共祖先树状数组维护颜色信息前缀和lct动态加点维护集合信息然后对查询按右端点排序,离线查询,最后输出#include <bits/stdc++.h>using namespace std;const int N = 1e6+10;int h[N], e[N], nxt[N], idx;int t[N], dep[N], fa[N][20];int c[N],
原创
发布博客 2021.07.10 ·
148 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

CCF CSP 化学方程式

模拟题 + 简单的递归#include <bits/stdc++.h>using namespace std;//2H2+2Cl2=4HClint find_ep(string &s){ for(int i = 0; i < s.size(); ++ i) if(s[i] == '=') return i; return -1;}//2//H2void work_2(string word, map<string,int> &am
原创
发布博客 2021.03.02 ·
328 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

CCF CSP 有趣的数

#include <iostream>#include <cstring>using namespace std;const int N = 1e3+10, mod = 1e9+7;int n;int C[N][N];void init(){ for(int i = 0; i < N; ++ i) for(int j = 0; j <= i; ++ j) if(!j) C[i][j] = 1; ...
原创
发布博客 2021.02.24 ·
160 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

CCF CSP 2020-06-04 1246

根据最大的测试数据 n可取到1e9 可知 应该采取logn或者 根号n的 复杂度的算法目测是一个动态规划 然后利用矩阵乘法来加速运算,根据输入的字符串推出他是由1246中的哪一个转移形成的 然后输出即可#include <bits/stdc++.h>#define LL long longusing namespace std;const int mod = 998244353;int n;string s;LL a[4][4] = { 0,1,0,0, 0,0,1,0
原创
发布博客 2021.01.21 ·
2739 阅读 ·
4 点赞 ·
13 评论 ·
5 收藏

PAT 表达式转换

链接:https://pintia.cn/problem-sets/15/problems/827跟csp认证模拟题有一拼的模拟题#include <iostream>#include <stack>#include <map>using namespace std;const int INF = 1e9;stack<int> stk;map<char ,int> mp;string s; int F;void prin
原创
发布博客 2020.10.21 ·
262 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

计算机图形学简笔画

DDALfunction img = DDA(x1, y1 ,x2 ,y2, img1)img = img1;dx = x2 - x1;dy = y2 - y1;d = max(abs(dx), abs(dy));kx = dx / d;ky = dy / d;x = x1;y = y1;for i = 1 : d img(round(x), round(y)) = 1; x = x + kx; y = y + kx;end;end;Bresenham
原创
发布博客 2020.10.21 ·
980 阅读 ·
1 点赞 ·
0 评论 ·
7 收藏

PAT 家庭财产

做不动LCT,就来敲个模拟题解解气吧dfs 存个结构体维护信息 排个序 然后没了#include <iostream>#include <cstring>#include <algorithm>using namespace std;const int N = 1e4+10, M = 1e6+10;int n, cnt;int h[N], tot;struct {int to,nxt;}e[M];int houses[N], area[N],v
原创
发布博客 2020.10.19 ·
120 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

2020-09-3 CCF CSP 点亮数字人生(拓扑排序 判环)

经典急了急了。。第三题判断环的存在有一万种方式,拓扑排序,甚至撸上去一个tarjan都行,非自己图快意淫出一个不存在的递归算法然后把心态调崩了。。导致只拿了五十分。100分:#include <bits/stdc++.h>using namespace std;const int N = 1e5+10;vector<int> iput[N], oput[N];string op[N];int du[N],bdu[N];int h[N], tot, n, m;
原创
发布博客 2021.03.02 ·
501 阅读 ·
4 点赞 ·
0 评论 ·
6 收藏

CCF CSP 201403-4 网络延迟

树的最长直径#include <iostream>#include <cstring>using namespace std;const int N = 1e5+10;int d[N], ans;int h[N], tot, vis[N];struct Edge{ int to,nxt,w;}e[N << 1];void add(int a,int b,int c){ e[tot].to = b, e[tot].w = c, e[
原创
发布博客 2020.09.03 ·
202 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

CCF CSP 201909-5 城市规划

有依赖的树形背包问题第一维 循环物品第二维 循环体积第三维 循环决策#include <bits/stdc++.h>#define LL long longusing namespace std;const int N = 1e5+10, M = 5e5+10;const int INF = 1e15;int h[N], ep;struct Edge{ int to, nxt, w;}e[M];int n, m, K;int du[N], vis[N], .
原创
发布博客 2020.08.31 ·
724 阅读 ·
0 点赞 ·
0 评论 ·
3 收藏

CCF CSP201912-4 区块链

说明:大多数网上说这个题目是stl跟bfs 这里纠正一下除了一开始建一个图之外 其余跟图没有半点关系,stl也只用了一个队列,手写完全没有问题,如果你看到的博客说是stl或者bfs的话,大概率他没实现 或者没写对 或者超时。 正解是写一个结构体存时间 对其排序 插入块或者查找之前对队列中之前的时间的任务都取出执行原代码思想:用priority_queue对 执行时间进行排序 但是超时参考代码:改成普通队列就可以过 但是根据分析t 不是严格递增的 这样bfs中的判断是有问题的 但是竟然可以过。感觉测试
原创
发布博客 2020.08.30 ·
460 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

CCF CSP 201809-4 再卖菜

bfs + 记忆化搜索(剪枝)#include <bits/stdc++.h>using namespace std;const int N = 310;int a[N],b[N],f[N][N][N],n;bool dfs(int u){ if(u == n + 1) { if((a[n - 1] + a[n]) / 2 == b[n]) return true; return false; } for(int i = 0; i < 3; ++i) {
原创
发布博客 2020.08.18 ·
229 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

CCF CSP 201909-3 字符画

调试字符串模拟的代码可 太虚了。。#include <bits/stdc++.h>using namespace std;const string ESC(1, char(27));int n, m, p, q;struct node{ int r, g, b; bool operator!=(const node &y)const { return r != y.r || g != y.g || b != y.b; }}RGB[2000][2000];i
原创
发布博客 2020.08.18 ·
281 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

CCF CSP 2020-06-03 Markdown渲染器

#include <bits/stdc++.h>using namespace std;int w;struct Node{ string s; int f; // 1段落 2项目开头 3项目第2-n段落 };vector<Node> all;bool f2(string &str){ return str.size() >= 2 && str[0] == '*' && str[1] == ' ';}.
原创
发布博客 2020.08.17 ·
881 阅读 ·
1 点赞 ·
0 评论 ·
3 收藏

CCF CSP 2019-12-05 魔数

BFS搜出所有转移状态 然后+线段树+懒标记+__int128乘法运算+ 动态规划优化build函数的节点初始化少了任何一个优化都过不去一个优化都不少也有可能过不去,时间卡的太极限了,可能还有极致的优化...#include <bits/stdc++.h> #define ull unsigned long longusing namespace std;const ull mod = 2009731336725594113;const int N = 1e6+10;u
原创
发布博客 2020.08.13 ·
816 阅读 ·
0 点赞 ·
1 评论 ·
1 收藏

CCF CSP 2020-06-05 乔乔和牛牛逛超市

买了x才能买y 等价于要想得到y的最大收益就必须连带着把x的最大收益(即使可能<0)也得收下,这个模型是典型的最大权闭合子图,答案应该是图中正的点权和-最小割的容量。最小割跑最大流模板就可得到。但是第二类点的建图方式还没想到,可能是需要拆点。#include <iostream>#include <cstring>#include <algorithm>#include <cmath>#define LL long longusing n
原创
发布博客 2020.08.10 ·
2138 阅读 ·
2 点赞 ·
2 评论 ·
10 收藏

CCF CSP 管道清洁 无源上下界最小费用可行流

#include <iostream>#include <cstring>#include <algorithm>using namespace std;const int N = 1e5+10, M = 1e6+10, INF = 0x3f3f3f3f;int h[N],ecnt,A[N];struct Edge{ int to,nxt,f, w;}e[M];int q[M],vis[N],dis[N], flow[N], pre[N];i.
原创
发布博客 2020.08.10 ·
364 阅读 ·
0 点赞 ·
1 评论 ·
0 收藏

CCF CSP 推荐系统

#include <iostream>#include <cstring>#include <algorithm>#include <set>#include <unordered_map>#define LL long long#define PII pair<LL,LL>using namespace std;const LL MUL = 1e9 + 10;unordered_map<LL,int> .
原创
发布博客 2020.08.05 ·
506 阅读 ·
0 点赞 ·
3 评论 ·
1 收藏
加载更多