Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114904 郝王骏程 找错误 C++ Runtime Error 1 MS 276 KB 501 2025-03-24 20:05:36

Tests(2/10):


Code:

#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 n,a[1001],c=0,max=0; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } max=a[1]; for(int i=2;i<=n;i++){ if(max>a[i]) c++; else max=a[i]; } cout<<c; return 0; }


Run Info:

Runtime Error:Segmentation fault