自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 hdu 1710 Binary Tree Traversals

Problem DescriptionA binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the left and right subtrees. There are three most impor

2016-12-27 21:33:27 188

原创 hdu 1016Prime Ring Problem

A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.Note: the number o

2016-12-26 21:50:57 180

原创 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

2016-12-25 16:53:02 176

原创 hdu 2191悼念512汶川大地震遇难同胞——珍惜现在,感恩生活

Input输入数据首先包含一个正整数C,表示有C组测试用例,每组测试用例的第一行是两个整数n和m(1 Output对于每组测试数据,请输出能够购买大米的最多重量,你可以假设经费买不光所有的大米,并且经费你可以不用完。每个实例的输出占一行。 Sample Input18 22 100 44 100 2 Sample Output4

2016-12-25 15:30:24 249

原创 hdu Coins (递推)

Problem DescriptionWhuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch in a

2016-12-23 21:17:59 232

原创 hdu 2844(多重背包)

CoinsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13139    Accepted Submission(s): 5261Problem DescriptionWhuacmers use coins.The

2016-12-23 18:11:54 247

原创 hdu 1864 最大报销额

Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。 Input测试输入包含若干测试用例。每个测试用例的第1行包含两个正数 Q

2016-12-20 17:56:15 260

原创 Kblack loves flag

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述kblack喜欢旗帜(flag),他的口袋里有无穷无尽的旗帜。某天,kblack得到了一个n∗mn*mn∗m的方格棋盘,他决定把kkk面旗帜插到棋盘上。每面旗帜的位置都由一个整数对(x,y)\le

2016-12-17 21:23:24 349

原创 哈理工oj618 Mod(二分查找)

Kim刚刚学会C语言中的取模运算(mod)。他想要研究一下一个数字A模上一系列数后的结果是多少。帮他写个程序验证一下。 Input第一行一个整数T代表数据组数。 接下来T组数据,第一行一个整数n,接下来n个数字ai 接下来一行一个整数m,接下来m个数字bi。 Output对于每个bi,输出bi%a1%a2%...%an 。

2016-12-15 21:01:05 411

原创 哈理工oj 2317 Game

DescriptionKim is a college student who love computer games, but unfortunately his school just published a rule that Games should disappear in the campus , that means nobody can play computer

2016-12-13 15:17:39 437

原创 ID 在很多数中间出现次数为奇数的数

It is very cold in Harbin in the winter, but it is pretty warm in the Zhengxin Building. Today is Saturday, Teacher ABG want to play a trick on the only one student called NWL because he didn’t finish

2016-12-11 10:15:59 304

原创 hdu 1284 钱币兑换问题(完全背包)

Problem Description在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。 Input每行只有一个正整数N,N小于32768。 Output对应每个输入,输出兑换方法数。 Sample Input293412553 Sample Output718831

2016-12-09 11:11:47 287

原创 hdu 1203 I NEED A OFFER!(01背包)

Problem DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得

2016-12-08 21:28:40 267

原创 hdu 2159 FATE(完全背包)

Problem Description最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或者0以下时,xhd就不会玩这游戏。xhd还说了他最多只杀s

2016-12-06 16:09:14 221

原创 广搜之倒叙输出最短路径

地图是自己输入的,S为起始点,E为终点,*为不能走的路。输出则是走过的路。#include#include#include#includeusing namespace std;struct note{  int x,y; }Dian,dian;queueq;char Map[105][105];int book[105][105];int sx

2016-12-04 21:31:24 836

原创 hdu 1248 寒冰王座(完全背包)

不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前.死亡骑士:"我要买道具!"地精商人:"我们这里有三种道具,血瓶150块一个,魔法药200块一个,无敌药水350块一个."死亡骑士:"好的,给我一个血瓶."说完他掏出那张N元的大钞递给地精商人.地精商人:"我

2016-12-04 21:11:15 269

原创 hdu 1114Piggy-Bank(完全背包)

Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The

2016-12-02 13:56:28 279

空空如也

空空如也

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

TA关注的人

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