自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Poj 1742—Coins 多重背包

DescriptionPeople in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice w

2014-07-31 09:57:27 431

原创 HDU 1059 Dividing 多重背包

Problem DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the m

2014-07-30 10:33:12 353

原创 Uva 562— Dividing coins

It's commonly known that the Dutch have invented copper-wire. Two Dutch men were fighting over a nickel, which was made of copper. They were both so eager to get it and the fighting was so fierce, the

2014-07-30 08:06:37 436

原创 HDU 2191—悼念512汶川大地震遇难同胞——珍惜现在,感恩生活 动态规划入门

Problem Description急!灾区的食物依然短缺!为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?后记:人生是一个充满了变数的生命过程,天灾、人祸、病痛是我们生命历程中不可预知的威胁。月有阴晴圆缺

2014-07-29 08:46:24 462

原创 HDU 2546—饭卡 动态规划入门

Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。 In

2014-07-29 08:44:27 598

原创 HDU Bone Collector

Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave … The bone collecto

2014-07-28 16:47:41 590

原创 Uva 10400 —Game Show Math(深搜+剪枝)

Input: standard inputOutput: standard outputTime Limit: 15 secondsA game show in Britain has a segment where it gives its contestants a sequence of positive numbers and a target number. The

2014-07-26 17:19:38 404

原创 Uva 714 - Copying Books

Before the invention of book-printing, it was very hard to make a copy of a book. All the contents had to be re-written by hand by so calledscribers. The scriber had been given a book and after severa

2014-07-26 14:26:12 395

原创 Uva 10132 — File Fragmentation

The ProblemYour friend, a biochemistry major, tripped while carrying a tray of computer files through the lab. All of the files fell to the ground and broke. Your friend picked up all the file fragm

2014-07-25 14:36:11 431

原创 UVa 10056 — What is the Probability?

Probability has always been an integrated part of computer algorithms. Where the deterministic algorithms have failed to solve a problem in short time, probabilistic algorithms have come to the rescue

2014-07-24 18:27:13 495

原创 UVa 270 — Lining Up

``How am I ever going to solve this problem?" said the pilot.Indeed, the pilot was not facing an easy task. She had to drop packages at specific points scattered in a dangerous area. Furthermo

2014-07-24 15:05:38 469

原创 UVA 10020 — Minimal coverage

The ProblemGiven several segments of line (int the X axis) with coordinates [Li,Ri]. You are to choose the minimal amount of them, such they would completely cover the segment [0,M].The In

2014-07-24 10:51:33 558

原创 Uva 10341 — Solve It

Solve the equation:        p*e-x+ q*sin(x) + r*cos(x) + s*tan(x) + t*x2 + u = 0        where 0 x .InputInput consists of multiple test cases and terminated by an EOF. Each test case cons

2014-07-22 17:17:50 466

原创 Uva 10487 — Closest Sums

Given is a set of integers and then a sequence of queries. A query gives you a number and asks to find a sum of two distinct numbers from the set, which is closest to the query number.InputInput c

2014-07-22 15:57:10 418

原创 HDU 1316 —How many Fibs?

Recall the definition of the Fibonacci numbers:f1 := 1 f2 := 2 fn := fn-1 + fn-2     (n>=3)Given two numbers a and b, calculate how many Fibonacci numbers are in the range [ a, b].In

2014-07-22 10:12:28 464

原创 Uva 10905 — Children's Game

There are lots of number games for children. These games are pretty easy to play but not so easy to make. We will discuss about an interesting game here. Each player will be given N positive integer.

2014-07-21 17:29:24 426

原创 Hdu 1058 — Humble Numbers

Many of you heard about ugly number. Now we are introducing a new number that is called bubble number.A number whose only prime factors are 2,3,5 or 7 is called a bubble number. The sequence 1, 2, 3

2014-07-21 15:51:44 434

原创 Uva 639—Don't Get Rooked

In chess, the rook is a piece that can move any number of squares vertically or horizontally. In this problem we will consider small chess boards (at most 44) that can also contain walls through whi

2014-07-21 08:32:45 451

原创 UVa 11218—KTV

Problem KKTVOne song is extremely popular recently, so you and your friends decided to sing it in KTV. The song has 3 characters, so exactly 3 people should sing together each time (yes, there

2014-07-19 11:22:54 876

原创 Poj 2245—LOTTO

Lotto In the German Lotto you have to select 6 numbers from the set {1,2,...,49}.A popular strategy to play Lotto - although it doesn't increase your chance of winning - is to select a sub

2014-07-19 08:53:18 467

原创 UVa 1146—ID Codes

#include #include #include using namespace std;int main() {     string str;     while(cin>>str)     {         if(str[0]=='#')            break;        bool flag=true;        if

2014-07-18 18:58:18 464

空空如也

空空如也

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

TA关注的人

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