Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113838 罗子童 找错误 C++ Runtime Error 1 MS 272 KB 543 2025-03-16 18:15:56

Tests(0/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 max=0,s=0,n; cin>>n; int a[101]; 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; }


Run Info:

Runtime Error:Segmentation fault