跳过正文
  1. Tags/

DP

2017

poj 1949 Chores (拓扑排序+dp)

·500 字·1 分钟
http://poj.org/problem?id=1949 # 题意: # 有n个任务,第i个任务需要时间xi来完成,并且第i个任务必须在它 “前面的” 某些任务完成之后才能开始。

leetocde 63. Unique Paths II

·337 字·1 分钟
Follow up for “Unique Paths”: Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1 and 0 respectively in the grid.

leetcode 64. Minimum Path Sum (二维dp)

·371 字·1 分钟
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time.

2016

(dp专题004)hdu 2955Robberies(01背包变形)

·552 字·2 分钟
题目链接 题意: 给出n个银行 ,以及抢劫每个银行可以得到的价值和被抓的概率,不同银行之间被抓的概率是相互独立的,现在给出安全概率p,只有当概率从小于安全概率时才是安全的,问最多能抢劫多少价值。

(dp专题003)hdu 4055 Number String(dp)

·799 字·2 分钟
题目链接 题意:给出n(n<=1E3)个字符,字符可能为’D’,‘I’,’?’,第i位对应的字符分别表示,第i位大于第i+1位,第i位小于第i+1位,或者不确定。

codeforces 605 A. Sorting Railway Cars (dp)

·419 字·1 分钟
题目链接 题意:给出一个n个数的排列,每次可以把一个数放到最前面或者最后面的位置,问至少要进行多少次操作才能使得数列升序。

hdu 5904 LCIS (dp)

·340 字·1 分钟
题目链接 题意: 给定两个序列,求它们的最长公共递增子序列的长度, 并且这个子序列的值是连续的 思路:以值为连续做入手点。

斜率优化学习笔记

·211 字·1 分钟
参考博客 这个东西英文好像叫做:convex hull trick Convex_hull_trick_wiki codeforces convex hull trick 简单说说我的理解:斜率优化是一种数形结合的思想。。。