子串 前言 没想到这道题存在奇巧淫技 分析 假设区间 [ L , R ] 符合条件,满足的是 但是为了保证最大值和最小值等于区间左右端点,故换一种方式,设那么 代码 #pragma GCC optimize(3,"inline","Ofast","fast-math","no-stack-protector","unroll-loops") #pragma GCC target("sse","sse2","sse3","sse4","avx","avx2","popcnt") #include<bits/stdc++.h> #define ll long long #...