Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96069 | 王思颜 | 找错误 | C++ | Accepted | 17 MS | 464 KB | 289 | 2024-11-02 19:44:23 |
#include<bits/stdc++.h> using namespace std; int a[50001]; int main(){ int n,x = 0,y = 0; cin>>n; for (int i = 0;i <= n - 1;i++){ cin>>a[i]; } for (int j = 0;j <= n - 1;j++){ if (a[j] >= x){ x = a[j]; } else{ y += 1; } } cout<<y; return 0; }