D1.Remove the Substring (easy version) time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output The only difference between easy and hard versions is the length of the string. You are given a string…
CF1239B The World Is Just a Programming Task 题目描述 定义一个括号序列s是优秀的,当且仅当它是以下几种情况的一种: 1.|s|=0 2.s='('+t+')',其中t是优秀的 3.s=t1+t2,其中t1.t2都是优秀的 一个括号序列的价值为将它看成一个循环串,从多少个位置切开,能切出循环串. 给出一个长度为\(n\)的括号序列,你可以交换其中两个位置的括号(这两个位置可以相等),问最大价值及方案. 输出任意一种方案均正确.\(n\leq 3\tim…