上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 67 下一页
摘要: 题意: 就是找出来一个字典序最小的硬币集合,且这个硬币集合里面所有硬币的值的和等于题目中的M 题解: 01背包加一下记录路径,如果1硬币不止一个,那我们也不采用多重背包的方式,把每一个1硬币当成一个独立的单位来进行01背包dp 但是我们知道背包dp的路径可能不止一条,而我们要从中得到字典序最小的序列 阅读全文
posted @ 2020-03-27 14:34 kongbursi 阅读(764) 评论(0) 推荐(1) 编辑
摘要: H题 描述 xxxxxxxxx在疫情期间迷上了一款游戏,这个游戏一共有nnn个地点(编号为1——n1——n1——n),他每次从一个地点移动到另外一个地点需要消耗 一定的能量,每一个地点都有一些珠宝,输入中会把每一个地方的珠宝价值估算成一个值。 xxxxxxxxx想请聪明的你帮他找出来从编号为sss的 阅读全文
posted @ 2020-03-19 11:28 kongbursi 阅读(428) 评论(0) 推荐(0) 编辑
摘要: The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000. This numbers are not nece 阅读全文
posted @ 2020-02-21 18:47 kongbursi 阅读(123) 评论(0) 推荐(0) 编辑
摘要: The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is getting ill. Being worri 阅读全文
posted @ 2020-02-18 16:09 kongbursi 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate 阅读全文
posted @ 2020-02-18 15:55 kongbursi 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Given a string, we need to find the total number of its distinct substrings. Input T- number of test cases. T<=20; Each test case consists of one stri 阅读全文
posted @ 2020-02-17 16:39 kongbursi 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he discovered that although he ca 阅读全文
posted @ 2020-02-17 16:14 kongbursi 阅读(109) 评论(0) 推荐(0) 编辑
摘要: A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the piano. It i 阅读全文
posted @ 2020-02-17 16:05 kongbursi 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 后缀数组Da模板: 1 /* 2 后缀数组倍增法Da板子 3 */ 4 #include <cstdlib> 5 #include <cstring> 6 #include <cstdio> 7 #include <algorithm> 8 using namespace std; 9 const 阅读全文
posted @ 2020-02-17 15:30 kongbursi 阅读(287) 评论(0) 推荐(0) 编辑
摘要: OIER公司是一家大型专业化软件公司,有着数以万计的员工。作为一名出纳员,我的任务之一便是统计每位员工的 工资。这本来是一份不错的工作,但是令人郁闷的是,我们的老板反复无常,经常调整员工的工资。如果他心情好 ,就可能把每位员工的工资加上一个相同的量。反之,如果心情不好,就可能把他们的工资扣除一个相同 阅读全文
posted @ 2020-01-20 16:20 kongbursi 阅读(182) 评论(0) 推荐(0) 编辑
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 67 下一页