D - Constructing Roads Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription There are N villages, which are nu...
分类:
其他好文 时间:
2015-08-29 16:39:02
阅读次数:
147
A - Jungle Roads Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThe Head Elder of the tropical island of ...
分类:
其他好文 时间:
2015-08-28 17:03:14
阅读次数:
156
Constructing Roads In JGShining's Kingdom
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 19340 Accepted Submission(s): 5473
Problem ...
分类:
其他好文 时间:
2015-08-27 23:03:56
阅读次数:
198
Secret Milking Machine
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 10625
Accepted: 3111
Description
Farmer John is constructing a new milking machine...
分类:
系统相关 时间:
2015-08-27 18:52:00
阅读次数:
248
Secret Milking Machine
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 10620
Accepted: 3110
Description
Farmer John is constructing a new milking machine a...
分类:
系统相关 时间:
2015-08-27 02:13:48
阅读次数:
363
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u
Description
Farmer John had just acquired several new farms! He wants to connect the farms with roads so that he can trave...
分类:
编程语言 时间:
2015-08-26 22:43:01
阅读次数:
495
最小生成树裸题,懒得写,直接模板
#include
#include
#include
#include
#define inf 1<<30
#define maxn 30
using namespace std;
int n;
vectormapp[maxn];
int vaule[maxn][maxn];
int visit[maxn];
void prim()
{
int d[max...
分类:
其他好文 时间:
2015-08-26 01:51:32
阅读次数:
161
正反两次最短路用于判断边是不是最短路上的边,把最短路径上的边取出来。然后求割边。#includeusing namespace std;typedef long long ll;#define fi first#define se second#define bug(x) coutdfn[u]) {...
分类:
其他好文 时间:
2015-08-21 18:58:29
阅读次数:
137
求最小生成树,有一点点的变化,就是有的边已经给出来了,所以,最小生成树里面必须有这些边,kruskal和prim算法都可以,prim更简单一些,有一点需要注意,用克鲁斯卡尔算法的时候需要将已经存在的边预处理一下,并查集转化为同一个祖先,记得要找他们的祖先再转化。普里姆算法只需要将那些已经存在的边都初始化为0就可以了。
kruskal:
#include
#include
#include
#i...
分类:
其他好文 时间:
2015-08-19 20:45:04
阅读次数:
95
There is a funny car racing in a city with n junctions and m directed roads.The funny part is: each road is open and closed periodically. Each road is...
分类:
其他好文 时间:
2015-08-18 19:03:28
阅读次数:
174