代码编织梦想

poj 2502 subway-爱代码爱编程

题目大意: 题目链接 注释代码: 无注释代码: #include <iostream> #include <cstdio> #include <cmath> #include <queue> #define INF 1E15 #define MAXN 202 #define V_W 10

poj 3159 candies-爱代码爱编程

题目大意: 题目链接 注释代码: 无注释代码: #include <iostream> #include <cstdio> #include <queue> #include <vector> #define INF 1000000000 #define MAXN 30000 #define

poj 2387 til the cows come home-爱代码爱编程

题目大意: 题目链接 注释代码: 无注释代码: #include <iostream> #include <cstdio> #include <queue> #define INF 1000000 #define MAXN 1000 #define MAXM 4000 using namespace

poj 2240 arbitrage-爱代码爱编程

题目大意:         n种货币(1 ≤ n ≤ 30),m组兑换方式(单向),对换方式的格式为"str_name1 r str_name2",其中前后两个str为货币的字符串名字(中间不含空格),r为汇率(为浮点数),现有多个测例,每个测例中给出n以及n中货币的名字,接着给出m以及m中对换方式,对于每个测例输出是否可以套汇,如果可以则输出"Yes"

poj 1860 currency exchange-爱代码爱编程

题目大意:         现有n种货币以及m种交换方式(1 ≤ n, m ≤ 100),n中货币编号1 ~ n,现给出每种交换方式的汇率以及手续费,形式为"u v r1 c1 r2 c2",其中u、v为两种货币的编号,r1、c1为u兑换到v的汇率以及手续费,而r2、c2为v兑换到u的汇率以及手续费,如果手上有u货币f元,则可兑换到v货币(f - c1)