1123: [POI2008]BLO Description Byteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不同的 towns ,没有重复的road. 所有towns连通。 Byteotia城市有n个 towns m条双向roads. 每条 road 连接 ...
分类:
其他好文 时间:
2018-05-12 18:26:41
阅读次数:
157
Description There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each oth ...
分类:
其他好文 时间:
2018-05-05 12:41:03
阅读次数:
180
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9216 Accepted Submission(s): 6805 Problem Descrip ...
分类:
其他好文 时间:
2018-05-05 12:38:50
阅读次数:
147
Problem Description There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How ...
分类:
编程语言 时间:
2018-04-30 18:03:26
阅读次数:
183
http://poj.org/problem?id=1724 题意:最短路的模板,不过每条边加上一个费用,要求总费用不超过k 题解:不能用dijkstra ,直接暴力,dfs维护len和cost。 普通的剪枝:如果当前的cost大于k直接跳出,如果当前的len大于minlen(目前的最优解),跳出。 ...
分类:
其他好文 时间:
2018-04-30 13:38:33
阅读次数:
156
Problem Statement Snuke loves constructing integer sequences. There are N piles of stones, numbered 1 through N. The pile numbered i consists of ai st ...
分类:
其他好文 时间:
2018-04-28 01:30:11
阅读次数:
262
模拟就行……讲道理这个时间复杂度为啥是对的??? cpp include include using namespace std; int k,n; int dfs(int v) { if(v ...
分类:
其他好文 时间:
2018-04-27 17:52:18
阅读次数:
137
先把已有的边并查集了,然后MST即可 记得开double cpp include include include include using namespace std; const int N=1005; int n,m,f[N],con,tot; double x[N],y[N],ans; st ...
分类:
其他好文 时间:
2018-04-27 15:55:36
阅读次数:
106
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and ...
分类:
其他好文 时间:
2018-04-24 21:54:53
阅读次数:
179
In Dhaka there are too many vehicles. So, the result is well known, yes, traffic jam. So, mostly people have to spend quite a time in the roads to go ...
分类:
其他好文 时间:
2018-04-11 16:15:05
阅读次数:
152