Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
95444 | 罗子童 | 18高度为k的树 | C++ | Compile Error | 0 MS | 0 KB | 556 | 2024-10-27 18:19:18 |
#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 s=0; int n; cout<<n long long K,a[n]; for(int i=1;i<=n;i++){ cin>>a[i]; } cin>>k; for(int i=0;i<=101;i++){ if(a[i]>k) s=+1; } cout<<s return 0; }
Main.cc: In function 'int main()': Main.cc:10:5: error: expected ';' before 'long' long long K,a[n]; ^ Main.cc:12:14: error: 'a' was not declared in this scope cin>>a[i]; ^ Main.cc:14:10: error: 'k' was not declared in this scope cin>>k; ^ Main.cc:18:12: error: 'a' was not declared in this scope if(a[i]>k) ^ Main.cc:22:5: error: expected ';' before 'return' return 0; ^