版本比较
lzm
正文
增加 2 行删除 2 行
7 行未改动891011121213141516206 行未改动全部展开22322422522622722722822923023167 行未改动7 行未改动
using namespace std;using LL = long long;
const int kMaxN = 5e5 + 5; const int kMaxN = 5e5 + 5;
LL n, ans = -1e18, f[2][kMaxN];vector<pair<LL, LL>> g[kMaxN];
206 行未改动全部展开 g[u].push_back({v, w}); g[v].push_back({u, w}); e.emplace_back(u, v, w); }
LL ans = 1e18; for (auto i : e) { memset(f, 0, sizeof f); LL u = get<0>(i), v = get<1>(i), w = get<2>(i);67 行未改动