摘要: 题目 source 思路 在队友帮助下,理清了思路。 设每个点为$x_i$,它们的取值为0或1。设前缀和为$S_i$。 题目具有单调性,涂色越多越能符合条件。因此可以考虑二分。假设二分值为mid,那么约束条件如下: \(S_r-S_{l-1} \ge K_i\) \(mid - (S_r-S_{l- 阅读全文
posted @ 2021-05-21 11:13 limil 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 题目 DreamGrid has an interesting permutation of \(1,2,...,n\) denoted by \(a_1,a_2,...a_n\). For each \(1 \le i \le n\), \(f_i = \max\{a_1,a_2...,a_i\} 阅读全文
posted @ 2021-05-21 10:53 limil 阅读(35) 评论(0) 推荐(0) 编辑