创建一个max[100005][2]数组,max[i][0]存储温度不超过i的最大学分,max[i][1]存储次大学分(可能与max[i][0]的值相同,也可能为0,即无次大值) //2025/11/21 #include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' int maxv[100005][2], h[1000005], v[100005]; int main() { cin.tie(0) -> sync_with_stdio(0); int n, T; ci...