Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96192 | 揭伟琦 | 找错误 | C++ | Accepted | 15 MS | 468 KB | 300 | 2024-11-03 10:50:38 |
#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; }