Submission #00572
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp:4:7: error: expected nested-name-specifier before ‘namespece’
using namespece std;
^~~~~~~~~
./Main.cpp: In function ‘int main()’:
./Main.cpp:7:9: error: ‘vector’ was not declared in this scope
vector<int> g(5,0);
^~~~~~
./Main.cpp:7:9: note: suggested alternative:
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/vector:64,
from ./Main.cpp:2:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_vector.h:339:11: note: ‘std::vector’
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
./Main.cpp:7:16: error: expected primary-expression before ‘int’
vector<int> g(5,0);
^~~
./Main.cpp:9:17: error: ‘cin’ was not declared in this scope
cin>>g[i];
^~~
./Main.cpp:9:17: note: suggested alternative:
In file included from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:60:18: note: ‘std::cin’
extern istream cin; /// Linked to standard input
^~~
./Main.cpp:9:22: error: ‘g’ was not declared in this scope
cin>>g[i];
^
./Main.cpp:12:20: error: ‘g’ was not declared in this scope
if(g[i]<40){
^
./Main.cpp:15:21: error: ‘g’ was not declared in this scope
j=j+g[i];
^
./Main.cpp:17:9: error: ‘cout’ was not declared in this scope
cout<<j/5<<"\n";
^~~~
./Main.cpp:17:9: note: suggested alternative:
In file included from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/iostream:61:18: note: ‘std::cout’
extern ostream cout; /// Linked to standard output
^~~~
セット
テストケース