Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
114407 | 陈骏睿 | 18高度为k的树 | C++ | Runtime Error | 0 MS | 268 KB | 474 | 2025-03-22 12:07:41 |
#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 a[1000],n,k,m=0; cin>>n; for(int i=0;i<n;i++){ cin>>a[n]; } cin>>k; for(int i=0;i<n;i++){ if(a[i]==k){ m++; } } cout<<m; return 0; }
Runtime Error:Segmentation fault