F(线段树+map) 代码 #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 9; struct node { int l, r; int v; }tr[N << 2]; int minv[N]; void pushup(int u) { tr[u].v = min(tr[u << 1].v, tr[u << 1 | 1].v); } void build(int u, int l, int r) { tr[u] = {l, r}; ...