1471
UVA1471 防线 Defense Lines 题解
传送门 首先可以将题意大概可以简化为:取两端不重复的连续子序列,组成一个最长的连续递增子序列。 我们先 dp 预处理出以 \(i\) 为结尾的连续递增子序列长度 \(dpr_{i}\)。 同样预处理出以 \(i\) 为开头的连续递增子序列长度 \(dpl_{i}\)。 考虑对于每个 \(dpr_{i ......
1471: Wall
1471: Wall 描述 Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greed ......