码迷,mamicode.com
首页 >  
搜索关键字:arbitrage    ( 88个结果
poj 2240 Arbitrage (Floyd)
题意:首先给出N中货币,然后给出了这N种货币之间的兑换的兑换率。 如 USDollar 0.5 BritishPound 表示 :1 USDollar兑换成0.5 BritishPound。 问在这N种货币中是否存在货币经过若干次兑换后,兑换成原来的货币可以使货币量增加。 思路:本题其实是Floyd的变形。将变换率作为构成图的路径的权值。不过构成的图是一个有向图。 最后将松弛操作变换为:if(dis[i][j]<dis[i][k]*dis[k][j])。...
分类:其他好文   时间:2014-07-24 17:42:46    阅读次数:184
POJ2240——Arbitrage(Floyd算法变形)
ArbitrageDescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of th...
分类:其他好文   时间:2014-07-24 17:34:26    阅读次数:380
[ACM] hdu 1217 Arbitrage (bellman_ford最短路,判断是否有正权回路或Floyed)
Arbitrage Problem 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 currency. For example, ...
分类:其他好文   时间:2014-07-16 10:05:49    阅读次数:260
Arbitrage
点击打开链接 题意:货币兑换,换取最大钱币; 解析:构图,spfa #include #include #include #include #include using namespace std; const int maxn = 1005; double cost[ maxn ][ maxn ], dis[ maxn ]; int vis[ maxn ]; int n, m; c...
分类:其他好文   时间:2014-07-14 17:37:44    阅读次数:147
poj2240(Arbitrage)
题目大意: 给你各国的货币名称,和国家与国家之间兑换的汇率,问你通过一系列的兑换能否是自己的财富增加。解题思路: 先建图,因为给的是字符串不是阿拉伯数之间的联系,所以建图可以用mapmp 建图。赋值给结构体中的u,v。然后利用bellman—ford算法,因为如果财富能够通过兑换增值说明会有一条.....
分类:其他好文   时间:2014-07-11 18:24:14    阅读次数:159
POJ-2240 -Arbitrage(Bellman)
题目链接:Arbitrage 让这题坑了,精度损失的厉害,用赋值的话,直接全部变成0.00了,无奈下,我只好往里输了,和POJ1860一样找正环,代码也差不多,稍微改改就可以了,但是这个题精度损失的比那个。。。。水过 POJ计划的最短路模块,刷完了,最短路问题,挺坑的,但是就是那点东西,变来变去,就是改改dis[]的更新条件。 明天就要开始POJ的最小生成树了, ME       ...
分类:其他好文   时间:2014-06-15 14:30:13    阅读次数:181
poj 2240
Arbitrage Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 14832   Accepted: 6255 Description Arbitrage is the use of discrepancies in currency exchange rates...
分类:其他好文   时间:2014-06-01 17:26:29    阅读次数:369
hdu 1217 Arbitrage Floyd||SPFA
转载请注明出处:http://acm.hdu.edu.cn/showproblem.php?pid=1217 Problem Description Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one u...
分类:其他好文   时间:2014-05-08 01:48:12    阅读次数:469
88条   上一页 1 ... 7 8 9
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!