自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 石子合并(一) 区间dp

石子合并(一)题目描述:    有N堆石子排成一排,每堆石子有一定的数量。现要将N堆石子并成为一堆。合并的过程只能每次将相邻的两堆石子堆成一堆,每次合并花费的代价为这两堆石子的和,经过N-1次合并后成为一堆。求出总的代价最小值。输入描述:有多组测试数据,输入到文件结束。每组测试数据第一行有一个整数n,表示有n堆石子。接下来的一行有n(0< n <200)个数,分别...

2018-07-31 10:14:32 240 1

原创 第几是谁? NYOJ

第几是谁?题目描述:现在有"abcdefghijkl”12个字符,将其按字典序排列,如果给出任意一种排列,我们能说出这个排列在所有的排列中是第几小的。但是现在我们给出它是第几小,需要你求出它所代表的序列.输入描述:第一行有一个整数n(0<n<=10000);随后有n行,每行是一个整数m,它代表着序列的第几小;输出描述:输出一个序列,占一行,代表着第m小的序...

2018-07-26 15:33:08 159

原创 我排第几个 NYOJ (康托展开)

我排第几个题目描述:现在有"abcdefghijkl”12个字符,将其所有的排列中按字典序排列,给出任意一种排列,说出这个排列在所有的排列中是第几小的?输入描述:第一行有一个整数n(0<n<=10000);随后有n行,每行是一个排列;输出描述:输出一个整数m,占一行,m表示排列是第几位;样例输入:复制3abcdefghijklhgebkf...

2018-07-26 15:31:18 107

原创 求逆序数 NYOJ (归并排序)

   求逆序数题目描述:在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个排列的逆序数。现在,给你一个N个元素的序列,请你判断出它的逆序数是多少。比如 1 3 2 的逆序数就是1。输入描述:第一行输入一个整数T表示测试数据的组数(1<=T<=5)每组测试数据的每一行是一个整数N表示...

2018-07-26 15:28:15 306 1

原创 Slim Span

Slim SpanGiven an undirected weighted graph G, you should find one of spanning trees specified as follows.The graph G is an ordered pair (V, E), where V is a set of vertices {v1, v2, …, vn} and E ...

2018-07-17 17:05:59 118

原创 find the longest of the shortest

find the longest of the shortestMarica is very angry with Mirko because he found a new girlfriend and she seeks revenge.Since she doesn't live in the same city, she started preparing for the long jo...

2018-07-17 15:27:08 150

原创 find the safest road

find the safest roadXX星球有很多城市,每个城市之间有一条或多条飞行通道,但是并不是所有的路都是很安全的,每一条路有一个安全系数s,s是在 0 和 1 间的实数(包括0,1),一条从u 到 v 的通道P 的安全度为Safe(P) = s(e1)*s(e2)…*s(ek) e1,e2,ek是P 上的边 ,现在8600 想出去旅游,面对这这么多的路,他想找一条最安全的路。但是8...

2018-07-17 10:27:15 146

原创 英语考试

                                英语考试在过三个礼拜,YellowStar有一场专业英语考试,因此它必须着手开始复习。这天,YellowStar准备了n个需要背的单词,每个单词的长度均为m。YellowSatr准备采用联想记忆法来背诵这n个单词:1、如果YellowStar凭空背下一个新词T,需要消耗单词长度m的精力2、如果YellowSatr之...

2018-07-17 10:04:52 202

原创 迷瘴

迷瘴 通过悬崖的yifenfei,又面临着幽谷的考验—— 幽谷周围瘴气弥漫,静的可怕,隐约可见地上堆满了骷髅。由于此处长年不见天日,导致空气中布满了毒素,一旦吸入体内,便会全身溃烂而死。 幸好yifenfei早有防备,提前备好了解药材料(各种浓度的万能药水)。现在只需按照配置成不同比例的浓度。 现已知yifenfei随身携带有n种浓度的万能药水,体积V都相同,浓度则分别为Pi%。并且知道,针对当时...

2018-07-14 14:34:42 129

原创 Filthy Rich

Filthy Rich They say that in Phrygia, the streets are paved with gold. You’re currently on vacation in Phrygia, and to your astonishment you discover that this is to be taken literally: small heaps of...

2018-07-14 11:59:16 184

原创 Repair the Wall

Repair the Wall Long time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that troubled her is the typhoon. When the typhoon came, every...

2018-07-14 11:48:47 129

原创 Flying to the Mars

Flying to the Mars In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF decides to attack Kscinow who rulin...

2018-07-14 11:33:45 111

原创 Tian Ji -- The Horse Racing

Tian Ji -- The Horse Racing Here is a famous story in Chinese history. "That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the kin...

2018-07-14 11:16:12 1202

原创 Wooden Sticks

Wooden SticksThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some ...

2018-07-14 11:02:35 1573

原创 Moving Tables

Moving TablesThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north side and south side alo...

2018-07-14 10:34:43 127

原创 FatMouse' Trade (贪心)

FatMouse' TradeFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean. The warehouse has N rooms. The i-th room contains J[i...

2018-07-14 10:15:46 205

空空如也

空空如也

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

TA关注的人

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