- 博客(37)
- 收藏
- 关注
原创 字节跳动 pico-客户端开发 一二三面
距面试已经有一段时间了,我仅凭回忆写出部分内容,可能存在的偏差请谅解。面试中提到的实习期间的工作在本文中已被忽略。一面:上来直接写题:一道简单正则表达式的解析,不知道有没有原题。。。然后是八股。1.介绍下虚拟内存。2.互斥锁和自旋锁有什么区别。3.有了mac地址,为什么还需要ip地址。4.进程间通信的方式,那种通信方式效率最高,为什么?5.http请求的方法有哪些。6.get,post有什么区别。7.http消息头中有哪些信息。二面:依旧是同样的流程。算法题1.宏内核和微内核的区别。
2022-01-05 02:01:39
1750
原创 小米校招 C++研发 相机部 一二面
距面试已经有一段时间了,我仅凭回忆写出部分内容,可能存在的偏差请谅解。面试中提到了大量实习期间的工作在本文中已被忽略。一面:1.介绍下C++的多态2.static成员函数和成员变量和非static有什么区别,staic成员函数能访问非staic成员成员变量吗?反之如何?3.C++父子类之间的指针转换是否不安全。4.C++内存模型5忘了,好像答的比较快就没怎么问了,面试官开始介绍部门工作内容,工作氛围,环境。。。二面:聊了聊比赛的事情,期间有一件事印象深刻:面试官:你们这个icpc竞赛是做什
2022-01-05 01:06:52
1318
原创 CCF-CSP 202009-3 点亮数字人生 拓扑排序+模拟
#include<bits/stdc++.h>using namespace std;typedef long long ll;template<class T>inline bool scan_d(T &ret){ char c; int sgn; if(c = getchar(),c==EOF) return 0; while(c!='-'&&(c<'0'||c>'9')) ...
2020-10-11 23:26:49
582
原创 2020牛客暑期多校训练营(二) A.All with Pairs
这A感觉挺水的啊,为什么没什么人写(怕是大家都自闭了。首先计算所有字符串每个后缀的hash值,记录每个hash值的出现次数。对于每个字符串的每个前缀,我们记录与其hash值相同的后缀个数,但由于我们只对最长的符合要求的前缀计数,我们还要对该个数进行筛选。假设我们的后缀集中有2个a,2个aba,1个ababa,我们对ababa进行匹配,前缀a能与a,aba,ababa匹配,共出现5次,同理aba出现3次,ababa出现一次。不难发现,若,因为,所以。同理...所以我们只须做一遍从前到后做一遍即
2020-07-14 18:21:09
323
原创 2020牛客暑期多校训练营(一) H.Minimum-cost Flow
因为题中每条边的容量都是相同的,所以每条增广路的最大容量也都相同,且等于每条边的容量。我们假设每条边的最大容量为1,跑一遍费用流,就可以求出每条增广路的花费。对于题中的每个询问,每条增广路的容量为,所需最大流为1。可以转化为每条路的容量为,所需最大流为。假设,我们可以将上述求出的增广路每条容量扩为,取前条的所有容量,第条的b容量。最后,由于我们求出的最大流为,总费用应除以。...
2020-07-13 03:01:48
395
原创 CCF CSP 2020-06 Markdown 渲染器
没想到阴沟里翻船,B题被卡了一手读入...发一下C题的代码吧#include<bits/stdc++.h>using namespace std;#define IOS ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)typedef long long ll;typedef pair <ll, ll> P;struct markdown{ int type; string s;};boo
2020-07-03 17:37:46
3256
4
原创 CCF-CSP 201912-3 化学方程式
#include <bits/stdc++.h>using namespace std;#define IOS ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);void split(string s, vector<string> &v, string c){ size_t pos1, pos2; pos2 = s.find(c); pos1 = 0; while (strin.
2020-06-26 18:45:22
331
原创 Little M s attack plan The Preliminary Contest for ICPC Asia Xuzhou 2019
官方题解说的很清楚了,提供一个实现。改了一年bug,过于菜了...#include<bits/stdc++.h>using namespace std;#define lowbit(x) ((x)&(-x))#define REP(i, a, n) for(int i=a;i<=(n);i++)#define IOS ios::sync_with_stdio(false),cin.tie(0), cout.tie(0)typedef long long .
2020-05-17 02:06:21
225
原创 线段树优化建图模板 Legacy CodeForces - 786B
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2020-02-05 10:53:39
177
原创 2-SAT模板 The Door Problem CodeForces - 776D
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2020-02-05 10:47:42
150
原创 Transformation HDU - 4578 珂朵莉树
本来是线段树的题,奈何lazy太长不想写套了个珂朵莉树板子居然过了(逃#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set&g...
2020-01-11 14:43:37
155
原创 珂朵莉树模板 Codeforces Round #449 (Div. 1) C. Willem, Chtholly and Seniorious
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-11-29 22:43:46
160
原创 树上操作 HYSBZ - 4034 树链剖分
和去年新生赛类似的题#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator...
2019-11-03 20:11:32
187
原创 2019ICPC银川站 H. Delivery Route HYSBZ - 2200 道路和航线 dijkstra + 拓扑排序
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-11-01 11:16:01
648
1
原创 P4381 [IOI2008]Island 基环树直径 单调队列优化DP
学习自https://www.luogu.org/blog/user52918/qian-tan-ji-huan-shu#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstri...
2019-10-12 21:34:15
125
原创 2019CCPC秦皇岛赛区 Forest Program Tarjan求点的双联通分量
Tarjan模板题自诩为图论选手,结果没学Tarjan,打下了新赛季第一铁第二天:这不是Tarjan点双模板题吗(摔!)背起这口锅,给队友叩头了#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>...
2019-09-28 15:39:55
429
5
原创 Bribing FIPA POJ - 3345 背包类树形DP
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-18 14:07:46
154
原创 Strategic game POJ - 1463 树形DP(水)
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-17 19:29:16
87
原创 The Preliminary Contest for ICPC Asia Shenyang 2019 D. Fish eating fruit 树形DP 换根与二次扫描
题源:https://nanti.jisuanke.com/t/41403代码抄借鉴于:https://blog.csdn.net/weixin_44282912/article/details/100833858#include<iostream>#include<vector>#include<algorithm>#include<st...
2019-09-17 16:03:41
170
原创 Count on a tree II SPOJ - COT2 树上莫队
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:52:49
115
原创 Count on a tree SPOJ - COT LCA+主席树
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:52:38
131
原创 array HDU - 6703 主席树 + set
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:52:26
100
原创 POJ - 2104 主席树模板
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int N = 100010, INF = 1e9;struct SegmentTree { int lc, rc; // 左右子...
2019-09-16 15:51:57
130
原创 ZOJ - 2112 整体二分求动态K大
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int N = 100010, INF = 1e9;struct rec {int op, x, y, z;} q[3 * N], lq[...
2019-09-16 15:51:37
150
原创 The Preliminary Contest for ICPC Asia Nanjing 2019 F. Greedy Sequence 主席树
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:51:24
125
原创 数颜色 HYSBZ - 2120 带修莫队
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:51:02
156
原创 历史研究 HYSBZ - 4241 回滚莫队
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:50:56
110
原创 楼房重建 HYSBZ - 2957 线段树
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:50:42
107
原创 动态逆序对 HYSBZ - 3295 主席树套树状数组
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:50:19
114
原创 Mokia HYSBZ - 1176 CDQ分治
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:49:35
122
原创 D - 染色 HYSBZ - 2243 树链剖分
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:46:31
116
原创 Tree POJ - 3237 树链剖分
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:46:27
128
原创 Housewife Wind POJ - 2763 边权树剖
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:46:23
124
原创 Aragorn's Story HDU - 3966 树链剖分模板
#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>#include<iterator>#include<...
2019-09-16 15:46:17
120
原创 The Preliminary Contest for ICPC Asia Shenyang 2019 B. Dudu's maze
https://nanti.jisuanke.com/t/41402显然,这是一道阅读理解题(鱼队的阅读理解太强了)#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstrin...
2019-09-16 15:41:16
116
原创 The Preliminary Contest for ICPC Asia Xuzhou 2019 I. query 树状数组
https://nanti.jisuanke.com/t/41391#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>...
2019-09-12 16:48:20
141
原创 The 2019 Asia Nanchang First Round Online Programming Contest I. Yukino With Subinterval CDQ分治
https://nanti.jisuanke.com/t/41356#include<iostream>#include<vector>#include<algorithm>#include<string>#include<stack>#include<cstring>#include<set>...
2019-09-10 09:26:17
172
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人