LeeBlog

导航

2011年3月9日 #

hdu 2680 Choose the best route

摘要: #include<stdio.h>int map[1024][1024],des[1024],dis[1024],s,w;int m,n,inf = 0x7fffffff,q;int Dijkstra( ){ dis[0] = 0; for( int i = 0; i <= n; ++i ) { int min = inf,t = 0,pos = -1; for( int j = 0; j <= n; ++j ) { if( !des[j] ) if( dis[j] < min ) { min = dis[j]; pos = j; } } des[pos] = 1 阅读全文

posted @ 2011-03-09 20:11 LeeBlog 阅读(163) 评论(0) 推荐(0) 编辑