P8799 [蓝桥杯 2022 国 B] 齿轮 题目链接 思路 预处理,复杂度 O ( n l o g n ) O(nlogn) O(nlogn) 代码 #include<bits/stdc++.h> using namespace std; const