随笔分类 - 算法-动态规划
摘要:酱神去杭州赏花。 花展在一条街道上举行,这条街道上有一共有n个节点,自左而右从1到n编号,1号和n号是左右两个端点,两个相邻端点之间的距离为1.本次花展一共要展出m朵花,在第ti时刻,有一朵颜值为bi的花将在第ai个节点展出,如果酱神在ti时刻处于第x个节点,那么他能获得的开心值为bi−|x−ai|
阅读全文
摘要:Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 728 Accepted Submission(s): 209 Problem Descript
阅读全文
摘要:Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 379 Accepted Submission(s): 144 Problem Descri
阅读全文
摘要:Happy Matt Friends Time Limit: 6000/6000 MS (Java/Others) Memory Limit: 510000/510000 K (Java/Others)Total Submission(s): 3700 Accepted Submission(s):
阅读全文
摘要:Dire Wolf Time Limit: 5000/5000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 2221 Accepted Submission(s): 1284 Pro
阅读全文
摘要:给你一个m×n的整数矩阵,在上面找一个x×y的子矩阵,使子矩阵中所有元素的和最大。 Input输入数据的第一行为一个正整数T,表示有T组测试数据。每一组测试数据的第一行为四个正整数m,n,x,y(0<m,n<1000 AND 0<x<=m AND 0<y<=n),表示给定的矩形有m行n列。接下来这个
阅读全文
摘要:hdu 1506 A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have di
阅读全文
摘要:Bob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in whi
阅读全文
摘要:Zipper Zipper Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. T
阅读全文
摘要:QQpet exploratory park QQpet exploratory park Today, more and more people begin to raise a QQpet. You can get a lot of pleasure from it, although it d
阅读全文
摘要:漫步校园 LL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实
阅读全文
摘要:What is possibility of rolling N dice and the sum of the numbers equals to M? Input Two integers N and M. (1 ≤ N ≤ 100, 1 ≤ M ≤ 600) Output Output the
阅读全文
摘要:HDU 1712 Problem Description ACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from diffe
阅读全文
摘要:Bag of mice CodeForces - 148D The dragon and the princess are arguing about what to do on the New Year's Eve. The dragon suggests flying to the mounta
阅读全文
摘要:合唱队形 OpenJ_Bailian - 2711 N位同学站成一排,音乐老师要请其中的(N-K)位同学出列,使得剩下的K位同学不交换位置就能排成合唱队形。 合唱队形是指这样的一种队形:设K位同学从左到右依次编号为1, 2, …, K,他们的身高分别为T1, T2, …, TK,则他们的身高满足T1
阅读全文
摘要:In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all the 108 people in th
阅读全文
摘要:Akemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl). Homura wants to help her friend Madoka save the world. But because of the plot of the Boss
阅读全文
摘要:Hzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws a dice(a dice
阅读全文
摘要:There is a very simple and interesting one-person game. You have 3 dice, namelyDie1, Die2 and Die3. Die1 has K1 faces. Die2 has K2 faces. Die3 has K3
阅读全文
摘要:Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets a ne
阅读全文

浙公网安备 33010602011771号