最后开了4e5才过,可m不是≤1e5的吗? #include <iostream> #include <cstring> #include <algorithm> #include <queue> #define x first #define y second typedef long long LL; using namespace std; typedef pair<LL, int> PII; const int N = 2e5 + 10; const LL INF = 1e18; int h[N], e[N], ne[N], ...