【bzoj1116】[POI2008]CLO2014年5月13日3470DescriptionByteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不同的 towns ,没有重复的road. 你要把其中一些road变成单向边使得:每个town都有且只有一个入度Inp...
分类:
其他好文 时间:
2015-05-23 11:25:49
阅读次数:
117
Problem DescriptionJGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines.Half of these ci...
分类:
其他好文 时间:
2015-05-22 21:07:46
阅读次数:
122
题意: 给定一个n个点(nusing namespace std;const int N = 3009;struct edge { int v, ne;} E[N * N q; memset (vis, 0, sizeof vis); dis[k][S] = 0; vis...
分类:
其他好文 时间:
2015-05-19 22:21:50
阅读次数:
178
In some country there are exactly n cities and m bidirectional
roads connecting the cities. Cities are numbered with integers from 1 to n.
If cities a and b are
connected by a road, then in an h...
分类:
其他好文 时间:
2015-05-15 15:41:29
阅读次数:
255
最小生成树树 prim算法,第一次写
#include
#define maxn 100+5
#define inf 1<<30
using namespace std;
int n;
int mapp[maxn][maxn];
int visit[maxn];
int d[maxn];
int re;
void prim()
{
fill(visit,visit+maxn,0);
fill...
分类:
其他好文 时间:
2015-05-14 20:35:00
阅读次数:
117
The method to do the map match1 The algorithm proceduresFirst ,we should find the most nearest road to the point from all roads in haerbin;Second, we ...
分类:
数据库 时间:
2015-05-13 21:17:38
阅读次数:
164
Description
The cows have reconstructed Farmer John’s farm, with its N barns (1 <= N <= 150, number 1..N) after the terrible earthquake last May. The cows didn’t have time to rebuild any extra roads,...
分类:
其他好文 时间:
2015-05-13 10:38:19
阅读次数:
148
Problem DescriptionThere are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How f...
分类:
其他好文 时间:
2015-05-13 06:11:50
阅读次数:
214
题意:给出n个点,m条边权为1的无向边,破坏最多的道路,使得从s1到t1,s2到t2的距离不超过d1,d2因为最后s1,t1是连通的,且要破坏掉最多的道路,那么就是求s1到t1之间的最短路用bfs求出任意两个顶点之间的距离, 如果d[s1][t1]>d1||d[s2][t2]>d2,那么不可能然后就...
分类:
其他好文 时间:
2015-05-10 12:44:36
阅读次数:
348
图论图论解题报告索引DFSpoj1321 - 棋盘问题poj1416 - Shredding Companypoj2676 - Sudokupoj2488 - A Knight's Journeypoj1724 - ROADS(邻接表+DFS)BFSpoj3278 - Catch That Cow....
分类:
其他好文 时间:
2015-05-04 21:37:59
阅读次数:
162