摘要: 问题转化 很容易就能把原问题转化成: 求满足 Max-Min = r-l的区间个数 暴力解法 根据上面得到的性质,我们可以暴力枚举区间,来判断当前区间是否满足性质 #include <iostream> #include <stdio.h> #include <algorithm> #include 阅读全文
posted @ 2024-04-07 17:32 Gold_stein 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 这道题是 P8600 [蓝桥杯 2013 省 B] 连号区间数 的前置知识 #include <iostream> #include <stdio.h> #include <algorithm> #include <string> #include <cmath> #define R(x) x = 阅读全文
posted @ 2024-04-07 16:54 Gold_stein 阅读(2) 评论(0) 推荐(0) 编辑