| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 101296 | 汤奕硕 | 18陶陶摘苹果 | C++ | Compile Error | 0 MS | 0 KB | 310 | 2024-12-14 18:58:20 |
#include <iostream> #include <vector> int main() { int h; for (int i=0; i<10; ++i) { cin>>h[i]; } int n; cin>>n; int m=30+n; int f=0; for (int j=0; j<10; ++j) { if (h[j]<=m) { ++f; } } cout<<f; return 0; }
Main.cc: In function 'int main()':
Main.cc:8:9: error: 'cin' was not declared in this scope
cin>>h[i];
^
Main.cc:8:9: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^
Main.cc:8:17: error: invalid types 'int[int]' for array subscript
cin>>h[i];
^
Main.cc:11:5: error: 'cin' was not declared in this scope
cin>>n;
^
Main.cc:11:5: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:60:18: note: 'std::cin'
extern istream cin; /// Linked to standard input
^
Main.cc:15:16: error: invalid types 'int[int]' for array subscript
if (h[j]<=m) {
^
Main.cc:19:5: error: 'cout' was not declared in this scope
cout<