摘要: G. Vlad and the Mountains https://codeforces.com/contest/1851/problem/G 离线+并查集 首先观察路径 \(i \to j\to k\) 其必须满足如下条件: \(h_j-h_i\leq e\) \(h_k-h_j\leq e - 阅读全文
posted @ 2024-06-28 01:59 jackle 阅读(1) 评论(0) 推荐(0) 编辑