摘要: "set做法" ~~正解是trie……~~ 主要是要学会 $a\ \mathrm{xor}\ b \leq a+b$ 这种操作 cpp include include include using namespace std; int q, opt, uu, vv, ww; set se[100005 阅读全文
posted @ 2018-05-17 15:29 poorpool 阅读(545) 评论(0) 推荐(0)
摘要: 分治+最短路,很套路的 cpp include include include include include using namespace std; int n, m, ans[100005], px[20005], py[20005], uu, hea[20005], cnt, q, din; 阅读全文
posted @ 2018-05-17 13:50 poorpool 阅读(123) 评论(0) 推荐(0)
摘要: loj 题面错的……去bzoj上看吧qwq 观察到 $\sqrt{|i j|}$ 的取值只有 $\sqrt{n}$ 级别个,然后就很显然了,rmq。 阅读全文
posted @ 2018-05-17 09:01 poorpool 阅读(124) 评论(0) 推荐(0)
摘要: "ref" 主要是要理解“撑到“最长这个概念 (为啥我的代码这么长QAQ cpp include include using namespace std; typedef unsigned long long ull; int n, pa[200005], pb[200005], ans; ull 阅读全文
posted @ 2018-05-17 08:14 poorpool 阅读(235) 评论(0) 推荐(0)