摘要:
我怎么开始划水了。。。 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 阅读全文
摘要:
继续复习模板,加深理解ing... 阅读全文
摘要:
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) ? ( 阅读全文
摘要:
画画图可知,三点$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 阅读全文
摘要:
第一发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 阅读全文
摘要:
蒟蒻又来复习模板了。~~还WA了两次~~ 阅读全文