Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131010 刘益梵 18高度为k的树 C++ Compile Error 0 MS 0 KB 258 2025-09-20 16:46:41

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int a[100000000000000000000000000000000000]; int main(){ int n,m,sum=0; cin>>n; for(int i=1;i<=n;i++) cin>>a[i]; cin>>m; for(int i=1;i<=n;i++){ if(a[i]==m) sum+=1; } cout<<sum; return 0; }


Run Info:

Main.cc:3:7: warning: integer constant is too large for its type
 int a[100000000000000000000000000000000000];
       ^
Main.cc:3:43: error: size of array 'a' is too large
 int a[100000000000000000000000000000000000];
                                           ^
Main.cc: In function 'int main()':
Main.cc:7:29: error: 'a' was not declared in this scope
  for(int i=1;i<=n;i++) cin>>a[i];
                             ^
Main.cc:10:6: error: 'a' was not declared in this scope
   if(a[i]==m) sum+=1;
      ^