Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
我的bfs这样写的In Reply To:我怎么就没爆掉? Posted by:TN at 2005-05-18 17:44:48 while(H > 0) { RECORD p = h[1]; int i; extract_min();//pop if(p.d < dist[p.s]) { dist[p.s] = p.d; } for(i = intv[p.s].b; i < intv[p.s].e; i++) { int tw = p.w + road[i].w; if(tw <= W) { h[++H].s = road[i].t; h[H].d = p.d + road[i].l; h[H].w = tw; decrease_key(H);//push } } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator