easy.
#include <bits/stdc++.h>
using namespace std;
set<pair<int, int>> st;
int maxv = 0;
int main() {
for(int i=1;i<=4;i++){
int t;
cin >> t;
st.insert({ t,i });
maxv = max(maxv, t);
}
int cmp,subv;
cin >> cmp >> subv;
int flag = 0;
for (auto x : st) {
if (maxv - x.first > subv || x.first < cmp) {
if (flag == 0) flag = x.second;
else {
printf("Warning: please check all the tires!");
return 0;
}
}
}
if (flag) {
printf("Warning: please check #%d!", flag);
}
else {
printf("Normal");
}
return 0;
}
标签:subv,胎压,069,printf,maxv,st,int,flag,L1
From: https://www.cnblogs.com/chengyiyuki/p/18104495