typedb专题

Codeforces TypeDB Forces 2023 C. Remove the Bracket【上下界DP】

C. Remove the Bracket 题意 给定一个长度为 n n n 的整数数组 a a a 和一个非负整数 s s s 要求 ∀ i ∈ [ 2 , n − 1 ] , 选定两个整数 x i , y i ,满足 x i + y i = s 且 ( x i − s ) ( y i − s ) ≥ 0 \forall i \in [2,n - 1],选定两个整数 x_i,