码迷,mamicode.com
首页 >  
搜索关键字:arbitrage    ( 88个结果
POJ 2240 Bellman_Ford
Arbitrage Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16429 Accepted: 6909 Description Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a ...
分类:其他好文   时间:2015-01-26 17:09:50    阅读次数:184
POJ 2240 Arbitrage
/**POJ 2240 Arbitrage*求从源点v0出发 到各点(包括其本身)最长路径(权值乘积)**/#include #include #define MAXN 50 //顶点数最大值#define MAXM 1000 //边最大值#define max(a, b) ((a) > (b) ?...
分类:其他好文   时间:2015-01-23 14:39:10    阅读次数:130
poj 2240 Arbitrage(bellman-ford 判断正环)
http://poj.org/problem?id=2240基本和poj 1860相同 只是把单点变成了任意点 做完1860再做这题就完全把思路套上就过了做完才发现网上的题解都用的是floyd 不过整体思路都是大同小异吧不过在效率上好像就低下了太多= =#include#include#includ...
分类:其他好文   时间:2015-01-21 21:52:56    阅读次数:191
hdu 1217 Arbitrage (Floyd + 最大路径)
AC代码: #include #include #include #include #include using namespace std; #define INF 123456 #define MAX_V 35 #define MAX_E 1005 double d[MAX_V][MAX_V]; int n, m; void Floyd(){ for(int k=1;...
分类:其他好文   时间:2015-01-21 18:16:14    阅读次数:141
poj 2240 Arbitrage
题目链接: http://poj.org/problem?id=2240题目描述: 给n种货币,给m个货币间的汇率,问能不能通过货币之间的转化而获得利益,解题思路: 由题意知,这个题不止求一条路径,所以最适合就是选择floyd去解决这个题目,判断map[i][i]有没有大于1的值ps:floy...
分类:其他好文   时间:2015-01-14 19:54:23    阅读次数:191
hdu1217——Arbitrage
Arbitrage Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4840    Accepted Submission(s): 2204 Problem Description Arbitrage is the use...
分类:其他好文   时间:2014-12-01 22:34:23    阅读次数:178
HDU 1217 Arbitrage
题意:给你n种货币,再给你m种保证每个货币能换成其他的货币,其中  两个货币之中给你它们的汇率。要你求出能不能找到一种兑换的方式,使得最后兑换为起始的货币,使得自己赚钱了 思路:这个题目也是一个建图的模型。可以假设出,从某点出发,回到原点,自己的价值还增大了,所以只需要汇率的乘积到起始点的时候大于1就可以了。所以,明显的Floyd算法。 AC代码: #include #include...
分类:其他好文   时间:2014-11-06 21:55:50    阅读次数:227
POJ 2240 Arbitrage(最短路 套汇)
题意  给你n种币种之间的汇率关系  判断能否形成套汇现象  即某币种多次换为其它币种再换回来结果比原来多 基础的最短路  只是加号换为了乘号 #include #include #include #include using namespace std; map na; const int N = 31; double d[N], rate[N][N], r; int n, m, ans; ...
分类:其他好文   时间:2014-10-29 10:49:02    阅读次数:169
poj 2240 Arbitrage (Floyd)
链接:poj 2240题意:首先给出N中货币,然后给出了这N种货币之间的兑换的兑换率。如 USDollar 0.5 BritishPound 表示 :1 USDollar兑换成0.5 BritishPound。问在这N种货币中是否存在货币经过若干次兑换后,兑换成原来的货币能够使货币量添加。思路:本题...
分类:其他好文   时间:2014-10-27 10:33:13    阅读次数:206
Arbitrage(最短路-floyd算法变形求正权)
Arbitrage Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 16127   Accepted: 6780 Description Arbitrage is the use of discrepancies in currency exchange rates t...
分类:编程语言   时间:2014-10-24 09:18:36    阅读次数:225
88条   上一页 1 ... 5 6 7 8 9 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!