2013年11月6日
摘要: Time Limit:1000MSMemory Limit:10000KTotal Submissions:12123Accepted:5129DescriptionAn integer interval [a,b], a 2 #include 3 #include 4 using namespace std; 5 6 struct node 7 { 8 int s,t; 9 }L[10010];10 int cmp(const struct node &a, const struct node &b)11 {12 return a.t = L[i].s && 阅读全文
posted @ 2013-11-06 20:40 straw_berry 阅读(267) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1502刷一道模板题稳定一下心情。。。Dijkstra求单源最短路,就是输入的时候注意下,是按下三角输入的(无向图),输入字符x表示i与j不通。可以这样输入:if(scanf("%d",&w)) map[i][j] = map[j][i] = w; else scanf("x"); 1 #include 2 #include 3 const int INF = 0x3f3f3f3f; 4 5 int map[110][110],vis[110],dis[110],n; 6 void Dijkst 阅读全文
posted @ 2013-11-06 19:41 straw_berry 阅读(281) 评论(0) 推荐(0) 编辑