Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
118246 | 秦浩然 | 找错误 | C++ | Accepted | 18 MS | 472 KB | 307 | 2025-04-26 12:05:48 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,sum=0,b=0; cin>>n; int a[n]; for(int i=0;i<n;i++) cin>>a[i]; for(int i=0;i<n-1;i++){ if(sum<a[i]) sum=a[i]; if(sum>a[i+1]) b++; } cout<<b; return 0; }