Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 37069   Accepted: 20612 Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst th…
  Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 30454   Accepted: 16659 Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to gi…
http://poj.org/problem?id=1125. 题意:在经纪人的圈子里,他们各自都有自己的消息来源,并且也只相信自己的消息来源,他们之间的信息传输也需要一定的时间.现在有一个消息需要传播,求从哪个经纪人开始传播所需的时间是最短的,所有经纪人都要收到信息,输出时间和那个经纪人的编号. 思路:用floyd算出两个点之间的短的传播时间.当这个点传播到某个点的时间最大时,要么是传播不到,要么这个点就是最后一个经纪人所需要接受到信息的最短时间 #include <stdio.h> #in…
是一道floyd变形的题目.题目让确定有几个人的位置是确定的,如果一个点有x个点能到达此点,从该点出发能到达y个点,若x+y=n-1,则该点的位置是确定的.用floyd算发出每两个点之间的距离,最后统计时,若dis[a][b]之间无路且dis[b][a]之间无路,则该点位置不能确定.最后用点个数减去不能确定点的个数即可.题目: Cow Contest Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4813   Accep…
Arbitrage Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 17349   Accepted: 7304 Description Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currenc…
链接: http://poj.org/problem?id=1125 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22010#problem/E Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 23440   Accepted: 12854 Description Stockbrokers are known to…
点击打开链接 Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 23760   Accepted: 13050 Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amo…
Floyd算法计算每对顶点之间的最短路径的问题 题目中隐含了一个条件是一个人能够同一时候将谣言传递给多个人 题目终于的要求是时间最短.那么就要遍历一遍求出每一个点作为源点时,最长的最短路径长是多少,再求这些值其中最小的是多少,就是题目所求 #include<bits/stdc++.h> using namespace std; int n,x,p,t; int m[120][120],dist[120][120],Max[120]; void floyd(int n,int m[][120],…
1.链接地址: http://poj.org/problem?id=1125 http://bailian.openjudge.cn/practice/1125 2.题目: Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 24810   Accepted: 13674 Description Stockbrokers are known to overreact to rumou…
题目传送门 /* 最短路:Floyd模板题 主要是两点最短的距离和起始位置 http://blog.csdn.net/y990041769/article/details/37955253 */ #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <string> #include…
id=1125">[POJ 1125]Stockbroker Grapevine 最短路 只是这题数据非常水. . 主要想大牛们试试南阳OJ同题 链接例如以下: http://acm.nyist.net/JudgeOnline/talking.php?pid=426&page=2 数据增大非常多 用到非常多东西才干过 (弱没过,.. 这题就是求最短路寻找全部通路中最大权的最小值外加考验英语水平-- Floyd 208K 0MS 1162B #include using namesp…
Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000KB   64bit IO Format: %I64d & %I64u Submit Status Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation among…
id=1125">链接:poj 1125 题意:输入n个经纪人,以及他们之间传播谣言所需的时间, 问从哪个人開始传播使得全部人知道所需时间最少.这个最少时间是多少 分析:由于谣言传播是同一时候的,对于某条路径使得全部人都知道的时间.不是时间的总和,而是路径中最长的边 从多条路径的最长边,找出最小值.由于为多源最短路,用Floyd比較方便 #include<stdio.h> #include<limits.h> int a[105][105]; void floyd(…
Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 33141   Accepted: 18246 Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst th…
Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 28231   Accepted: 15659 Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst th…
题目链接:http://poj.org/problem?id=1125 主要是读懂题意 然后就很简单了 floyd算法的应用 代码: #include<iostream> #include<cstdlib> #include<cstdio> #include<cstring> using namespace std; #define maxn 110 #define INF 10000100 int dis[maxn][maxn]; int n; int m…
题目链接:http://poj.org/problem?id=1125 多源点最短路中的,最长路的,最短路. 看到这里就懵逼了,解释一下,找到一个源点,使得路最短,(遍历源点),路最短怎么求呢? 就是找到从该源点出发,到达所有点中的最长的点的路径,就是他的最短路,然后根据n个源点,找到这样的最长路最短的,就行了. 这里的具体Floyd算法,我还没推过,dis[i][j]从I到J的最短路. #include <stdio.h> #include <string.h> #include…
Stockbroker Grapevine Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 31264 Accepted: 17106 Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the st…
Stockbroker Grapevine Time Limit: 1000MS Memory Limit: 10000K Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tact…
题目链接:http://poj.org/problem?id=3660 Description N ( ≤ N ≤ ) cows, conveniently numbered ..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that is unique am…
Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 37154   Accepted: 20676 Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst th…
链接 Cow Contest Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Description N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Eac…
Description An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A, B, C, D implies that A < B, B < C and C < D.…
题目: BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee's research advisor, Jack Swigert, has asked her to benchmark…
题意:奶牛拍一系列电影,n头牛拍m部电影,同一部电影种的搭档们距离为1,求最小距离? 思路:Floyd 图 最短路径 存图: 初始化图 for (int i = 0; i <= n; i++) { for (int j = 0; j <= n; j++) f[i][j] = INF; f[i][i] = 0; } 存图: for (int i = 0; i < k; i++) { scanf("%d", &a[i]); for (int j = 0; j &l…
-->Frogger 中文翻译 Descriptions: 湖中有n块石头,编号从1到n,有两只青蛙,Bob在1号石头上,Alice在2号石头上,Bob想去看望Alice,但由于水很脏,他想避免游泳,于是跳着去找她.但是Alice的石头超出了他的跳跃范围.因此,Bob使用其他石头作为中间站,通过一系列的小跳跃到达她.两块石头之间的青蛙距离被定义为两块石头之间所有可能路径上的最小必要跳跃距离,某条路径的必要跳跃距离即这条路径中单次跳跃的最远跳跃距离.你的工作是计算Alice和Bob石头之间的青蛙距…
Six Degrees of Cowvin Bacon Descriptions 数学课上,WNJXYK忽然发现人缘也是可以被量化的,我们用一个人到其他所有人的平均距离来量化计算. 在这里定义人与人的距离:1.自己与自己的距离为02.如果A和B属于同一个小团体,那么他们之间的距离为13.如果A与B属于一个小团体,B与C属于一个小团体,且A与C不同属于任何一个小团体,那么A与C的距离为2(A联系C,经过B.C两个人)4.以此类推 班里有N个人 (2 <= N <= 300),共有M对小团体关系(…
Wormholes 题目描述 教学楼里有很多教室,这些教室由双向走廊连接.另外,还存在一些单向的秘密通道,通过它们可以回到过去.现在有 N (1 ≤ N ≤ 500) 个教室,编号 1..N, M (1 ≤ M ≤ 2500) 条走廊,和 W (1 ≤ W ≤ 200) 条秘密通道. DY在养猫之余,还是一个时间旅行爱好者.她希望从一间教室出发,经过一些走廊和秘密通道,回到她出发之前的某个时间. 共有F (1 ≤ F ≤ 5) 组数据.对每组数据,判断DY是否有回到过去的可能性.不存在耗时超过1…
  poj——1125 Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 36112   Accepted: 20033 Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformatio…
G. Stockbroker Grapevine Time Limit: 1000ms Memory Limit: 10000KB 64-bit integer IO format: %lld      Java class name: Main   Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amo…