摘要:
第$i$次位置在$pos_0 / 2^{i 1}$ 阅读全文
摘要:
$dis[u] \bigoplus dis[v] = dis[u] \bigoplus dis[v] \bigoplus dis[lca\{x,y\}] \bigoplus dis[lca\{x,y\}]$ 阅读全文
摘要:
贪心优先子树较多者。 阅读全文
摘要:
分块易想难调。 大BUG: . 块数可能为$blockSize + 1$ . 边界为$\max\{n, block[x] blockSize\}$ . 有时块内不行了,就不能去块外,要灵活应对,因题而定 ~~话说这是道平衡树模板题来着~~ 阅读全文
摘要:
阅读理解两小时,手敲暴力思考5分钟。~~然后$n^3$就A了~~ 暴力代码 cpp include include include include include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b 阅读全文
摘要:
单调性显然,双端队列队列维护严格单调递减~~手写双端队列真的可恶~~。 cpp include include include include include define R(a,b,c) for(register int a = (b); a = (c); a) define Max(a,b) 阅读全文
摘要:
$10^18$是要long long的。 $nlogn$单调队列上维护$logn$线段树。 阅读全文