Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
105819 | 张永良 | 找错误 | C++ | Accepted | 17 MS | 468 KB | 305 | 2025-01-14 14:38:46 |
# include<iostream> 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; }