Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
31311 | lnx | 正常血压 | C++ | Accepted | 0 MS | 252 KB | 318 | 2023-11-18 13:07:57 |
#include<iostream> #include<cmath> using namespace std; int main() { int n; cin>>n; int a[n],b[n]; int h=0; int hmax=0; for(int i=0;i<n;i++) { cin>>a[i]>>b[i]; if(a[i]>=90&&a[i]<=140&&b[i]>=60&&b[i]<=90) { h++; hmax=max(h,hmax); } else h=0; } cout<<hmax; return 0; }