摘要: 传送门 题目: There are two binary strings a and b of length nn (a binary string is a string consisting of symbols 0 and 1). In an operation, you select a p 阅读全文
posted @ 2020-07-23 17:55 SummerMingQAQ 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 传送门 题目:给定长度为n的数组,下标从0开始。你可以至多翻转一次连续的子数组,问a0 + a2 + ... + a2k最大是多少。 思路:我们发现一个情况: 20 30 10 ...,我们发现如果30和20反转也可以和后面10的的反转,就分成了两种情况,我们可以通过dp来解决,当前这个数与左边一起 阅读全文
posted @ 2020-07-23 14:51 SummerMingQAQ 阅读(228) 评论(0) 推荐(0) 编辑