自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(10)
  • 收藏
  • 关注

原创 POJ 1511 Invitation Cards

题意:有T组测试数据,每组测试数据有N个点,M个路线。接下来的M行有三个数字,分别代表每条路线的起点,终点,权值,从点1到其他点的和为A,其他点到点1的和为B,问A+B的最小值。SPFA#include #include #include #include using namespace std;const int N=1000005;bool vis[N];int next

2012-01-27 23:58:16 722

原创 POJ 2240 Arbitrage

题意:有N种货币,M种兑换关系,问最后是否有可能取得套利(通过兑换让原来的钱增加)floyd。#include #include #include #include #include using namespace std;const int N=35;double rate[N][N];void floyd(int);int main(){ int n,m,t

2012-01-27 22:51:50 509

原创 POJ 3660 Cow Contest

题意:有N只牛,M场比赛的结果,问有多少只牛的排名可以确定。排名可以确定的牛说明它与任何一只牛比较,都是可以知道胜负的,通过题目给出的比赛或者通过前面的比赛结果推出。用floyd。#include #include #include using namespace std;const int N=105;bool map[N][N];void floyd(int n);int

2012-01-27 22:33:32 970

原创 POJ 1860 Currency Exchange

题意:给出N种货币,M种兑换方式,现在手上有X的货币总价值为VAL。接下来有M行,每行开始两个数字表示两种可以相互兑换的货币A,B,然后是A兑换成B的比率,手续费,B兑换成A的比率,手续费。问是否可以兑换增加手中的VAL。Bellman_ford。#include #include #include using namespace std;const int N=105;doub

2012-01-27 22:24:23 732

原创 POJ 3259 Wormholes

题意:有T组测试数据,N个点,M条双向边,W条负权单向边。问是否存在负权回路。bellman_ford。#include #include #include using namespace std;const int N=3005;int dis[N];struct node{ int x,y,w; void fun(int a,int b,int c){x=

2012-01-27 21:59:54 518

原创 POJ 3268 Silver Cow Party

题意:有n个点,m条有方向的边,中心在x。问从其他点到x,然后再从x到其他点的最小距离的最大值是多少?正向建跑一次最短路,反向建图再跑一次最短路。#include #include #include using namespace std;const int N=1005;bool vis[N];int map[N][N],dis1[N],dis2[N];int main()

2012-01-27 21:43:36 611

原创 POJ 1797 Heavy Transportation

题意:给你n个城市,m条道路,问从城市1到城市n的最小的边的权值的最大值是多少?#include #include #include using namespace std;const int N=1005;bool vis[N];int map[N][N],dis[N];int main(){ int t,t_cnt=0; scanf("%d",&t);

2012-01-27 21:22:27 554

原创 POJ 2253 Frogger

题意:给出n个点,问从点1到点2的一条路径中,每两点之间的距离的最大值的最小值。dijkstra的变形。#include #include #include #include using namespace std;const int N=205;bool vis[N];int dis[N];struct node{ int x,y;}po[N];int ca

2012-01-27 20:55:46 646

原创 POJ 2387 Til the Cows Come Home

题意:有T条路径,N个点,问从点N到点1的最短路径有重边。。。dijkstra算法#include #include #include using namespace std;#define INF 1<<30const int N=1005;bool vis[N];int map[N][N],dis[N];int main(){ int n,t;

2012-01-27 17:49:47 700

转载 转:vim的复制粘贴小结

正在学习使用vim,前一阵想学linux,然后突然发现vim是个好东西,学习使用,今天发现,无法使用ctrl+c/ctrl+v来跟系统其它应用之间做复制粘贴,非常不爽,搜了一下,发现很多人有写这个问题,试了几个,觉得这个最好,转帖过来收藏。原文地址:http://lsong17.spaces.live.com/blog/cns!556C21919D77FB59!603.entry内

2012-01-18 16:42:50 625

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除