Run ID:113842

提交时间:2025-03-16 18:19:24

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int max=0,s=0,n; cin>>n; int a[50001]; for(int j=0;j<n;j++){ cin>>a[j]; } for(int j=0;j<n;j++){ if(a[j]>=max){ max=a[j]; } else{ s++; } } cout<<s; return 0; }