版本比较
题解:CF187C Weak Memory
正文
增加 4 行删除 4 行
284 行未改动全部展开28528628728828928929029129229329429529629729829929930030130230327 行未改动331332333334335336335336337338284 行未改动全部展开 int has = 0; s--; t--; for(auto x : port) if(x == t) has = 1; if(has == 0) port.pb(t);
const int INF = 1e9; vi d (n, INF); vi p(n); priority_queue < pair<ll,int> > q; for(auto x : port) { d[x] = 0; p[x] = x; q.push (make_pair (0, x)); }
while (!q.empty()) { int v = q.top().second; ll cur_d = -q.top().first; q.pop();27 行未改动 exit(0); } } cout<<-1;
}```