添加链接描述
B题直接前缀后缀预处理一下没了
C
首先题目保证有解,那么我们可以确定"("和")"的数量,显然前面全部填(后面的全部填)肯定是合法的,然后交换两个最近的,影响最小,判断一下即可。
D题首先根据%k余数判断是否有解,
然后肯定是直接往下走到最大,然后走过去,rmq预处理即可。
- Educational Codeforces Round Rated 157educational codeforces round rated educational codeforces round 157 round codeforces rated based educational codeforces round 151 construction educational codeforces round educational codeforces round 147 cf-educational educational codeforces round educational codeforces monsters round educational codeforces round 158 educational codeforces contest round