摘要: 春春幼儿园举办了一年一度的“积木大赛”。今年比赛的内容是搭建一座宽度为n的大厦,大厦可以看成由n块宽度为1的积木组成,第i块积木的最终高度需要是hi。 在搭建开始之前,没有任何积木(可以看成n块高度为0的积木)。接下来每次操作,小朋友们可以选择一段连续区间[L, R],然后将第L块到第R块之间(含第 阅读全文
posted @ 2019-05-04 20:39 kongbursi 阅读(207) 评论(0) 推荐(0)
摘要: Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a st 阅读全文
posted @ 2019-05-04 17:35 kongbursi 阅读(250) 评论(0) 推荐(0)
摘要: Given a n*n matrix C ij (1<=i,j<=n),We want to find a n*n matrix X ij (1<=i,j<=n),which is 0 or 1. Besides,X ij meets the following conditions: 1.X 12 阅读全文
posted @ 2019-05-04 16:51 kongbursi 阅读(380) 评论(0) 推荐(0)