FroggerTime Limit:1000MSMemory Limit:65536KTotal Submissions:28112Accepted:9136DescriptionFreddy Frog is sitting on a stone in the middle of a lake. S...
分类:
其他好文 时间:
2015-04-30 00:41:20
阅读次数:
161
Description
There are N beads which of the same shape and size, but with different weights. N is an odd number and the beads are labeled as 1, 2, ..., N. Your task is to find the bead whose weight ...
分类:
其他好文 时间:
2015-04-28 21:04:04
阅读次数:
175
O -Repairing CompanyTime Limit:1000MSMemory Limit:131072KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 3216DescriptionLily runs a repairing co...
分类:
编程语言 时间:
2015-04-27 19:57:59
阅读次数:
189
P -Treasure ExplorationTime Limit:6000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 2594DescriptionHave you ever read any...
分类:
编程语言 时间:
2015-04-27 19:45:11
阅读次数:
188
Greg has a weighed directed graph, consisting of n vertices. In this graph any pair of distinct vertices has an edge between them in both directions. Greg loves playing with the graph and now he has in...
分类:
其他好文 时间:
2015-04-27 15:17:42
阅读次数:
112
一道简单的图论题,不过穿上了很好的外衣,实质就是一个任意两点间最短路问题,比较适合用Floyd算法
#include
#include
using namespace std;
const int INF = 100000;
int n,m,t,d[305][305],a[305];
int main() {
scanf("%d%d",&n,&m);
for(int i=1;i<...
分类:
其他好文 时间:
2015-04-26 18:24:49
阅读次数:
177
大白书上P42那个计算器的题目就用到了这个办法,Floyd判圈法。当然,用STL里的map也是可以的。 1 #include 2 #include 3 4 const int maxn = 20; 5 int n; 6 int a[maxn], b[maxn], c[maxn]; 7 8 v...
分类:
其他好文 时间:
2015-04-24 14:18:58
阅读次数:
316
题目连接:http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2155&cid=1430题意:输入一个n个节点,m条边的图,然后k条记录,纪录可能为:0 x:添加上x这个节点;1 x y :输出从x到y的最短路;思路:floyd;使我更加了解了floy...
分类:
其他好文 时间:
2015-04-20 23:58:08
阅读次数:
327
弗洛伊德(Floyd)算法主要是用于计算图中所有顶点对之间的最短距离长度的算法,如果是要求某一个特定点到图中所有顶点之间的最短距离可以用Dijkstra(迪杰斯特拉)算法来求。弗洛伊德(Floyd)算法的算法过程是:1、从任意一条单边路径开始。所有两点之间的距离是边的权,如果两点之间没有边相连,则权...
分类:
编程语言 时间:
2015-04-20 16:38:13
阅读次数:
349
WuKong
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1429 Accepted Submission(s): 517
Problem Description
Liyuan wanted to rewrite...
分类:
其他好文 时间:
2015-04-18 20:40:11
阅读次数:
202