自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU 3696 SPFA算法

Description“Farm Game” is one of the most popular games in online community. In the community each player has a virtual farm. The farmer can decide to plant some kinds of crops like wheat or paddy

2016-07-31 11:12:20 365

原创 HDU 5222 Exploration 混合图判断是否成环

DescriptionMiceren likes exploration and he found a huge labyrinth underground! This labyrinth has  caves and some tunnels connecting some pairs of caves. There are two types of tunnel,

2016-07-30 20:23:07 291

原创 FZU 2039 二分图

DescriptionAre you interested in pets? There is a very famous pets shop in the center of the ACM city. There are totally m pets in the shop, numbered from 1 to m. One day, there are n customers in

2016-07-28 20:18:00 338

原创 POJ 3974 求回文串

DescriptionAndy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, "Can you propose an efficient algorithm to find the le

2016-07-28 20:10:55 275

原创 hdu 4786 Fibonacci Tree 思路

Description  Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pang decides to solve the following problem:   Consider a bid

2016-07-27 20:45:24 278

原创 HDU 1421 搬寝室 动态规划

Description胡老师马上要搬新家了,可是搬家真的是一个很累的活,看着家里的n件物品, 胡老师已经凌乱了,因为物品实在太多。于是胡老师想了又想,决定先随便搬2* p件过去就行了。现在,胡老师发现每搬一次的疲劳度是和左右手的物品的重量差的平方成正比,( 每次左手一件右手一件) ,如果胡老师左手拿重量为3的物品, 右手拿重量为6的物品, 则他搬完这次的疲劳度为(6-3)^2 = 9.

2016-07-25 16:34:11 1366 1

原创 HDU 2059 动态规划

题意:额,中文题不翻译。解题思路:看别人的博客才理解的,由于每个加油站都可以选择加油和不加油,为了把所有情况考虑进去,不妨令dp[i]为从起点到第i个加油站所需要的最短时间,那么dp[i]就应该是从0到i-1这些节点充满电然后直接跑到i的最短时间。为什么这样做不会丢失最优解?不妨考虑第4个节点,计算过程中你求出了dp[2]+t2和dp[3]+t3,这就等于说你已经考虑了第3个节点充电或

2016-07-25 09:19:25 311

转载 HDU 3095 哈希+双向搜索

DescriptionPartychen invents a new game named “Eleven Puzzle” .Just like the classic game “Eight Puzzle”,but there some difference between them:The shape of the board is different and there are

2016-07-22 16:22:39 341

原创 POJ 2923 Relocation (状态压缩+背包)

DescriptionEmma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocate. To move the furniture, they o

2016-07-20 16:32:00 310

原创 hdu 5067 Harry And Dig Machine (状态压缩dp)

Description  As we all know, Harry Porter learns magic at Hogwarts School. However, learning magical knowledge alone is insufficient to become a great magician. Sometimes, Harry also has to gain k

2016-07-20 15:13:44 257

原创 POJ 2677 双调欧几里得旅行商问题

John Doe, a skilled pilot, enjoys traveling. While on vacation, he rents a small plane and starts visiting beautiful places. To save money, John must determine the shortest closed tour that connects h

2016-07-20 14:57:55 763

原创 HDU-1072-nightmare

Ignatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius should get out of the labyrinth before the bomb explodes. The initial

2016-07-09 13:54:28 233

原创 HDU-2437-Jerboas

Jerboas are small desert-living animals, which resemble mice with a long tufted tail and very long hind legs. Jerboas shelter in well-hidden burrows. They create two types of burrow: temporary and p

2016-07-09 13:38:20 401

空空如也

空空如也

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

TA关注的人

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