摘要: Description 同一时刻有N位车主带着他们的爱车来到了汽车维修中心。维修中心共有M位技术人员,不同的技术人员对不同 的车进行维修所用的时间是不同的。现在需要安排这M位技术人员所维修的车及顺序,使得顾客平均等待的时间最 小。 说明:顾客的等待时间是指从他把车送至维修中心到维修完毕所用的时间。 阅读全文
posted @ 2017-11-01 17:40 Hxymmm 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Description 追逐影子的人,自己就是影子。 ——荷马 Allison 最近迷上了文学。她喜欢在一个慵懒的午后,细细地品上一杯卡布奇诺,静静地阅读她爱不释手的《荷马史诗》。但是由《奥德赛》和《伊利亚特》组成的鸿篇巨制《荷马史诗》实在是太长了,Allison 想通过一种编码方式使得它变得短一些 阅读全文
posted @ 2017-11-01 17:32 Hxymmm 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Description In some country there are exactly n cities and m bidirectional roads connecting the cities. Cities are numbered with integers from 1 to n. 阅读全文
posted @ 2017-10-30 22:39 Hxymmm 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Description 现在我们有一个长度为n的整数序列A。但是它太不好看了,于是我们希望把它变成一个单调严格上升的序列。 但是不希望改变过多的数,也不希望改变的幅度太大。 solution 正解:DP 这题相当诡异. 首先是一个套路,转化严格递增为不降,我们只需要把序列中的每一个元素都变为 $a[ 阅读全文
posted @ 2017-10-29 22:13 Hxymmm 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Description A supermarket in Tehran is open 24 hours a day every day and needs a number of cashiers to fit its need. The supermarket manager has hired 阅读全文
posted @ 2017-10-29 16:24 Hxymmm 阅读(343) 评论(0) 推荐(0) 编辑
摘要: Description The galaxy war between the Empire Draco and the Commonwealth of Zibu broke out 3 years ago. Draco established a line of defense called Gro 阅读全文
posted @ 2017-10-29 14:46 Hxymmm 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Description You have been given a matrix CN M, each element E of CN M is positive and no more than 1000, The problem is that if there exist N numbers 阅读全文
posted @ 2017-10-29 11:56 Hxymmm 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Description 给一个数字串s和正整数d, 统计s有多少种不同的排列能被d整除(可以有前导0)。例如123434有90种排列能 被2整除,其中末位为2的有30种,末位为4的有60种。 solutio 这题复杂负很诡,爆搜可以过去 我写的状压DP,复杂度和搜索一样,$O(10! 10 d T) 阅读全文
posted @ 2017-10-25 12:23 Hxymmm 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Description 给定一个长度为n的数列ai,求ai的子序列bi的最长长度,满足bi&bi 1!=0(2 include include include include include define RG register define il inline define iter iterat 阅读全文
posted @ 2017-10-25 12:12 Hxymmm 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Description solution 正解:贪心+DP 首先对于K=1的情况我们可以发现答案是 $(n 1) 2$ 树的直径+1 K=2同理,我们也要再找出一条不相交的树的直径,然后怎么保证不相交呢? 其实只需要把第一次求得的直径上的点赋值为 1即可 如果一条边再两次都出现,就相互抵消了,去掉抵 阅读全文
posted @ 2017-10-23 00:03 Hxymmm 阅读(112) 评论(0) 推荐(0) 编辑