摘要: 各种低级错误.jpg,数组开大就过.jpg 线段树离散化扫描线 cpp include include include include include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b) ((a) 阅读全文
posted @ 2019-07-20 21:54 邱涵的秘密基地 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 我怎么开始划水了。。。 cpp include include include include include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b) ((a) (b) ? (a) : (b)) de 阅读全文
posted @ 2019-07-20 18:57 邱涵的秘密基地 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 继续复习模板,加深理解ing... 阅读全文
posted @ 2019-07-20 18:37 邱涵的秘密基地 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 04年的省选这么water吗,开个滚动数组算了 cpp include include include include include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b) ((a) (b) ? ( 阅读全文
posted @ 2019-07-20 16:29 邱涵的秘密基地 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 画画图可知,三点$lca$必有两相同,$a,b,c$距离为$dis_a + dis_b + dis_c dis_{lca(a,b)} dis_{lca(b,c)} dis_{lca(a,c)}$ cpp include include include include include define R 阅读全文
posted @ 2019-07-20 15:58 邱涵的秘密基地 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 第一发lg[]没开够RE了,下了数据本地一直停止运行,还以为是dfs死了,绝望一交,A了。。。 判断$x$是否在路径$s t$上,只需满足 $dep_{x} = dep_{LCA(s,t)}$ $LCA(s, x) = x$ $or$ $LCA(t, x) = x$ cpp // include i 阅读全文
posted @ 2019-07-20 15:17 邱涵的秘密基地 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 蒟蒻又来复习模板了。~~还WA了两次~~ 阅读全文
posted @ 2019-07-20 13:22 邱涵的秘密基地 阅读(128) 评论(0) 推荐(0) 编辑