与‘DP-线性DP’有关的日志

poj2385

maksyuki 发表于 oj 分类,标签:
0
poj2385

Apple Catching

It is a little known fact that cows love apples. Farmer John has two apple trees (which are conveniently numbered 1 and 2) in his field, each full of apples. Bessie cannot reach the apples when they are on the tree, so she must wait >>继续阅读

poj2479

maksyuki 发表于 oj 分类,标签:
0
poj2479

Maximum sum

Given a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below:

Your task is to calculate d(A).

Input

The input consists of T(<=30) test cases. The number of >>继续阅读

poj1958

maksyuki 发表于 oj 分类,标签:
0
poj1958

Strange Towers of Hanoi

Background

Charlie Darkbrown sits in another one of those boring Computer Science lessons: At the moment the teacher just explains the standard >>继续阅读

poj1887

maksyuki 发表于 oj 分类,标签:
0
poj1887

Testing the CATCHER

A military contractor for the Department of Defense has just completed a series of preliminary tests for a new defensive missile called the CATCHER which is capable of intercepting multiple incoming offensive missiles. The CATCH >>继续阅读

poj1458

maksyuki 发表于 oj 分类,标签:
0
poj1458

Common Subsequence

A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another sequence Z = < z1, z2, ..., zk > is a subsequence of X if there exi >>继续阅读

poj1163

maksyuki 发表于 oj 分类,标签:
0
poj1163

The Triangle

Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top and ends somewhere on the base. Each step can go either >>继续阅读

poj1157

maksyuki 发表于 oj 分类,标签:
0
poj1157

LITTLE SHOP OF FLOWERS

You want to arrange the window of your flower shop in a most pleasant way. You have F bunches of flowers, each being of a different kind, and at least as many vases ordered in a row. The vases are glued onto the shelf and are >>继续阅读

poj1088

maksyuki 发表于 oj 分类,标签:
0
poj1088

滑雪

Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡 >>继续阅读

poj1050

maksyuki 发表于 oj 分类,标签:
0
poj1050

To the Max

Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is the sum of all the elements in that rectangle. >>继续阅读

hdu1950

maksyuki 发表于 oj 分类,标签:
0
hdu1950

Bridging signals

Problem Description

'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the signals on the chip connecting the ports of two fu >>继续阅读

hdu1421

maksyuki 发表于 oj 分类,标签: ,
0
hdu1421

搬寝室

Problem Description

搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会很累,因为2*k也不小是一个不大于n的整数.幸运的是xhd根据多年的搬东西的经验发现每搬一次的疲劳度是和左右手的物品的重量差的平方成正比 >>继续阅读

hdu1160

maksyuki 发表于 oj 分类,标签: ,
0
hdu1160

FatMouse's Speed

Problem Description

FatMouse believes that the fatter a mouse is, the faster it runs. To disprove >>继续阅读

hdu1159

maksyuki 发表于 oj 分类,标签:
0
hdu1159

Common Subsequence

Problem Description

A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another sequence Z = <z1, z2, ..., zk> is a subsequence >>继续阅读

hdu1087

maksyuki 发表于 oj 分类,标签:
0
hdu1087

Super Jumping! Jumping! Jumping!

Problem Description

Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. >>继续阅读

hdu1025

maksyuki 发表于 oj 分类,标签:
0
hdu1025

Constructing Roads In JGShining's Kingdom

Problem Description

JGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines. >>继续阅读

hdu1003

maksyuki 发表于 oj 分类,标签:
0
hdu1003

Max Sum

Problem Description

Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), >>继续阅读