摘要: \(\text{Solution}\) 明显有 \(DP\) \[ f_i = f_j + 1(j < i,Mx_j \le a_i,a_j \le Mn_i) \] 然后 \(CDQ\) 分治即可 注意分治顺序 \(\text{Code}\) #include <cstdio> #include 阅读全文
posted @ 2021-11-14 21:11 leiyuanze 阅读(22) 评论(0) 推荐(0) 编辑
摘要: \(\text{Solution}\) 一眼 \(ODT\) 为避免每次都数颜色数量,提前记录下来,每次修改更新下 \(\text{Code}\) #include <cstdio> #include <iostream> #include <set> #define re register usi 阅读全文
posted @ 2021-11-14 20:08 leiyuanze 阅读(18) 评论(0) 推荐(0) 编辑
摘要: \(\text{Naive Solition}\) 当然是 \(ODT\) 暴力啦 \(Luogu\) 煞费苦心加强了数据,于是就过不了了。。。 不过 \(LibreOJ\) 上可以过 #include <cstdio> #include <iostream> #include <set> #def 阅读全文
posted @ 2021-11-14 11:37 leiyuanze 阅读(38) 评论(0) 推荐(0) 编辑