自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(19)
  • 收藏
  • 关注

原创 MPI Maelstrom (dijkstra)

 MPI Maelstrom 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'...

2018-04-30 10:21:22 204

原创 龟兔赛跑 HDU - 2059(DP)

龟兔赛跑 HDU - 2059据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭州下沙某农业园卧薪尝胆潜心修炼,终于练成了绝技,能够毫不休息得以恒定的速度(VR m/s)一直跑。兔子一直想找机会好好得教训一下乌龟,以雪前耻。 最近正值HDU举办50周年校庆,社会各大名流齐聚下沙,兔子也趁此机会向乌龟发起挑战。虽然乌龟深知获胜希望不大,不过...

2018-04-20 15:25:54 323

原创 CodeForces - 546D Soldier and Number Game

Soldier and Number GameTwo soldiers are playing a game. At the beginning first of them chooses a positive integer n and gives it to the second soldier. Then the second one tries to make maximum possib...

2018-04-19 19:34:01 265

原创 Wormholes (Bellman_Ford)

WormholesWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a ti...

2018-04-18 14:47:30 312

原创 Currency Exchange (Bellman-Ford)

Currency Exchange Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these cur...

2018-04-17 10:46:52 169

原创 POJ - 3268 Silver Cow Party (dijkstra)

Silver Cow PartyOne cow from each ofNfarms (1 ≤N≤ 1000) conveniently numbered 1..Nis going to attend the big cow party to be held at farm #X(1 ≤X≤N). A total ofM(1 ≤M≤ 100,000) uni...

2018-04-17 09:41:55 124

原创 POJ - 1797 Heavy Transportation (变形Dijkstra)

Heavy TransportationBackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a w...

2018-04-17 09:35:38 107

原创 Frogger (最短路)

FroggerFreddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of touris...

2018-04-16 20:58:47 395

原创 水陆距离 HihoCoder - 1478

 水陆距离 HihoCoder - 1478给定一个N x M的01矩阵,其中1表示陆地,0表示水域。对于每一个位置,求出它距离最近的水域的距离是多少。  矩阵中每个位置与它上下左右相邻的格子距离为1。Input第一行包含两个整数,N和M。以下N行每行M个0或者1,代表地图。数据保证至少有1块水域。对于30%的数据,1 <= N, M <= 100  对于100%的数据,1 <=...

2018-04-11 19:51:58 182

原创 小数数字 HihoCoder - 1720

小数数字 HihoCoder - 1720 给定一个真分数P/Q(P < Q),请你求出它的小数部分都包括0~9中的哪些数字。  例如1/2=0.5,只包含数字5;1/3=0.33333……,只包含数字3,1/7=0.142857142857……,包含数字124578。Input两个整数P和Q,1 ≤ P < Q ≤ 1000000Output从小到大输出小数部分出现的所有数字Samp...

2018-04-11 19:17:58 391

原创 Constructing Roads

Constructing RoadsThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are conn...

2018-04-06 15:50:56 108

原创 Building a Space Station

Building a Space Station You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to com...

2018-04-06 15:36:27 125

原创 Jungle Roads(最小生成树 Kruskal)

Jungle Roads The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes ro...

2018-04-06 15:12:20 525

原创 数数字 51Nod - 1770

 数数字 51Nod - 1770 统计一下 个aaa ⋯ aaa⏟n个a × b 的结果里面有多少个数字d,a,b,d均为一位数。样例解释:3333333333*3=9999999999,里面有10个9。Input多组测试数据。 第一行有一个整数T,表示测试数据的数目。(1≤T≤5000) 接下来有T行,每一行表示一组测试数据,有4个整数a,b,d,n。 (1≤a,b≤9,0≤d≤9,1≤n≤1...

2018-04-05 18:43:00 251

原创 HDU - 1978 How many ways

How many ways这是一个简单的生存游戏,你控制一个机器人从一个棋盘的起始点(1,1)走到棋盘的终点(n,m)。游戏的规则描述如下: 1.机器人一开始在棋盘的起始点并有起始点所标有的能量。 2.机器人只能向右或者向下走,并且每走一步消耗一单位能量。 3.机器人不能在原地停留。 4.当机器人选择了一条可行路径后,当他走到这条路径的终点时,他将只有终点所标记的能量。 如上图,机器人一开始在(1...

2018-04-04 20:00:08 161

原创 HRBUST - 2322 team

teamKim 正在玩一款手游,在这款游戏中,Kim可以选择若干个角色编成一队作战。为了挑战不同的关卡,Kim需要不断的调整编队阵容。然而随着游戏不断更新,队伍成员变得越来越多,Kim已经记不清哪些角色在队伍中,哪些角色不在队伍中了。请你写一个程序来帮助他。具体来说,Kim有三种可以执行的操作。1 x  :把 x 号角色加入队伍。如果x号角色已经在队伍中,什么都不会发生。2 x  :把 x 号角色...

2018-04-04 00:02:38 214

原创 畅通工程续

畅通工程续某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。 现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。Input本题目包含多组数据,请处理到文件结束。 每组数据第一行包含两个正整数N和M(0<N<200,0<...

2018-04-03 22:32:42 108

原创 UVA - 624 (01背包)

You have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is onCDs. You need to have it on tapes so the problem to solve is: you have a tape N minutes long. How...

2018-04-02 21:29:28 137

原创 HihoCoder - 1700

在CSS中我们可以用井号(#)加6位十六进制数表示一种颜色,例如#000000是黑色,#ff0000是红色,#ffd700是金色。  同时也可以将六位颜色#RRGGBB简写为#RGB三位颜色。例如#000与#000000是相同的,#f00与#ff0000是相同的,#639与#663399是相同的。  对于两个颜色#abcdef和#ghijkl,我们定义其距离是(ab - gh)2 + (cd - ...

2018-04-02 19:27:49 103

空空如也

空空如也

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

TA关注的人

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