自定义博客皮肤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)
  • 收藏
  • 关注

原创 AOJ 2200 Mr. Rito Post Office——floyd+动态dp

这道题做了一天,踩了不少坑。。呜呜呜题目大意快递到了:你是某个岛国(ACM-ICPC Japan)上的一个苦逼程序员,你有一个当邮递员的好基友利腾桑遇到麻烦了:全岛有一些镇子通过水路和旱路相连,走水路必须要用船,在X处下船了船就停在X处。而且岛上只有一条船,下次想走水路还是得回到X处才行;两个镇子之间可能有两条以上的水路或旱路;邮递员必须按照清单上的镇子顺序送快递(镇子可能重复,并且对于重复的镇子不允许一次性处理,比如ABCB的话B一定要按顺序走两次才行)。测试数据有多组:N Mx1 y1 t1

2020-05-28 18:32:49 433 1

原创 POJ 3268 Silver Cow Party——两次Dijkstra求解单源往返的最短路径问题

DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1…N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-way roads connects pairs of farms; road i requires

2020-05-28 09:39:30 234

原创 poj 3259 Wormholes——弗洛伊德判断是否存在负环

DescriptionWhile 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 time that is BEFORE you entered the wormhole! Each of F

2020-05-27 22:16:37 1020

原创 poj 1703 Find them, Catch them——种类并查集的最简单例题

DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify which gang a criminal belongs to. The present quest

2020-05-27 11:29:57 231

转载 并查集之种类并查集——详解

知乎上看到的一篇文章,解释得非常到位了,有图有文字有题目种类并查集详解

2020-05-27 10:53:10 933

原创 poj 2010 Moo University - Financial Aid——优先队列+贪心(详细注释)

DescriptionBessie noted that although humans have many universities they can attend, cows have none. To remedy this problem, she and her fellow cows formed a new university called The University of Wisconsin-Farmside,“Moo U” for short.Not wishing to admi

2020-05-26 18:47:16 210

原创 POJ 3614 Sunscreen——贪心与优先队列的完美结合

DescriptionTo avoid unsightly burns while tanning, each of the C (1 ≤ C ≤ 2500) cows must cover her hide with sunscreen when they’re at the beach. Cow i has a minimum and maximum SPF rating (1 ≤ minSPFi ≤ 1,000; minSPFi ≤ maxSPFi ≤ 1,000) that will work.

2020-05-25 11:22:16 222

原创 POJ 2148 Cow Exhibition——01背包方法遇到负状态的处理方法

首先简单说一下dfs的方法,然后重点介绍dp处理这道题的方法

2020-05-09 22:27:45 198

原创 POJ 3666 Making the Grade——有难度的动态规划

这道题目是运用动态规划解决的,我看很多博客都没有解释透彻,在这里我将详细地解释这道题的原理及做法

2020-05-09 09:51:51 250

原创 POJ 1631——LIS最长上升子序列的三种解法

这道题说白了就是考察怎么实现最长上升子序列快速实现,这里介绍三种方法

2020-05-08 11:46:09 202

原创 POJ 3181 Dollar Dayz——两种方法实现划分数问题

这道题是划分数的裸题,可以实现分别使用一维数组和二维数组来实现划分数的问题

2020-05-08 09:16:20 355

原创 POJ 3046 Ant Counting——多重集组合数+滚动数组

这道题是多重集组合数的裸体,但必须使用滚动数组才可以通过,否则内存超出限制

2020-05-07 15:58:21 217

原创 POJ Coins——多重部分和问题(两种解法)

多重部分和问题的裸体,一般都有两种解决思路

2020-05-07 10:45:40 386

原创 POJ 3280 Cheapest Palindrome——动态规划

基础的动态规划

2020-05-06 16:36:22 132

原创 POJ 2385 Apple Catching——记忆搜索或者动态规划

本题目将采用三种方法来解决动态规划类问题

2020-05-06 10:06:23 168

原创 POJ 2229 Sumsets——动态规划

此题目采用两种方式解决,一种是完全背包解法,另一种是数学方法

2020-05-05 22:17:44 164

原创 POJ 3040 Allowance——经典贪心算法题目

本题是一道经典的纯运用贪心算法思想的题目

2020-05-04 12:15:56 984

原创 POJ1017 Packets——理解贪心的经典题目

通过这道题理解贪心的思想

2020-05-03 23:51:22 195

原创 POJ Stall Reservations——贪心区间+优先队列

利用优先队列来完成贪心算法,极大的减小了时间复杂度和代码实现难度

2020-05-01 09:59:59 140

空空如也

空空如也

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

TA关注的人

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