nyoj
brav0
练习算法两年半的ACM选手
展开
-
nyoj 541-最强DE 战斗力 (大数)
题目描述: 春秋战国时期,赵国地大物博,资源非常丰富,人民安居乐业。但许多国家对它虎视眈眈,准备联合起来对赵国发起一场战争。 显然,面对多个国家的部队去作战,赵国的兵力明显处于劣势。战斗力是决定战争成败的关键因素,一般来说,一支部队的战斗力与部队的兵力成正比。但当把一支部队分成若干个作战队伍时,这个部队的战斗力就会大大的增强。 一支部队的战斗力是可以通过以下两个规则计算出来的: 1.若一支...原创 2019-05-02 19:56:19 · 360 阅读 · 0 评论 -
nyoj 542-试 制 品(模拟)
题目描述: ZZ大学的Dr.Kong最近发现实验室的很多试制品都已经用完。由于项目经费有限,为了节省,Dr.Kong决定利用实验室现有的试制品来生成所缺的试制品。为此,Dr.Kong连续几天通宵达旦整理出一份研究资料并让研究生Bill去实验并统计能产生多少种所缺的试制品。 Bill从头到尾翻完所有的资料,发现资料上写满了一大堆的化学方程式,上面除了大小写英文字母、数字、加号、等号外,再也没有其...原创 2019-05-02 19:58:44 · 133 阅读 · 0 评论 -
nyoj 545- Metric Matrice(模拟)
题目描述: Given as input a square distance matrix, where a[i][j] is the distance between point i and point j, determine if the distance matrix is "a metric" or not. A distance matrix a[i][j] is a me...原创 2019-05-02 20:02:27 · 150 阅读 · 0 评论 -
nyoj 547- Interesting Punch-Bowl(优先队列模拟)
题目描述: Dr.Konghas taken a side job designing interesting punch-bowl designs. The designs are created as follows: * A flat board of size W cm * H cm is procured (3 <= W <= 300,...原创 2019-05-02 20:11:09 · 297 阅读 · 0 评论 -
nyoj 546-Divideing Jewels(多重背包优化)
题目描述: Mary and Rose own a collection of jewells. They want to split the collection among themselves so that both receive an equal share of the jewels. This would be easy if all the jewels had the ...原创 2019-05-02 20:19:29 · 265 阅读 · 0 评论 -
nyoj 543-遥 控 器(bfs)
题目描述: Dr.Kong有一台高级电视机,这台电视机可以接受100个频道(从0到99编号)。电视的配套遥控器有13个按钮: 1 2 3 ↑ 4 5 6 ↓ 7 8 9 — 0 当按"↑"键时,当前频道编号会增加1(如果当前为99频道,则会切换到0频道)。如果按"↓"键,当前频道编号会减小1(如果当前为0频道,则会切换到99频道)。当要切换到0~9频道...原创 2019-05-02 20:36:30 · 146 阅读 · 0 评论 -
nyoj 10-skiing (记忆化搜索)
题目描述: Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 1...原创 2019-05-05 09:24:16 · 186 阅读 · 0 评论 -
HDU-1078 FatMouse and Cheese (dp,记忆化搜索)
FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each grid lo...原创 2019-05-05 09:32:08 · 146 阅读 · 0 评论