摘要: 说是水题。。其实本蒟蒻1A的也只有第二道。。。惭愧惭愧。。。TYVJ1502 兴建高铁这个题目其实就是一搜索,愿意BFS或者DFS都可以,SPFA也随意。不过鉴于数据不大,推荐还是DFS(写起来比较短嘛)Code:#include <iostream>#include <cstdio>#include <cmath>#include <cstdlib>#include <algorithm>using namespace std;int n,ans=99999999,tot=99999999;int g[51][51],v[51],w 阅读全文
posted @ 2012-06-11 22:24 JS_Shining 阅读(544) 评论(0) 推荐(0) 编辑