Submission #85270
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:5:3: error: ‘cin’ was not declared in this scope
cin>>n;
^~~
./Main.cpp:5:3: 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:6:3: error: ‘map’ was not declared in this scope
map<int,int>m;
^~~
./Main.cpp:6:3: note: suggested alternative:
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/map:61,
from ./Main.cpp:2:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_map.h:100:11: note: ‘std::map’
class map
^~~
./Main.cpp:6:7: error: expected primary-expression before ‘int’
map<int,int>m;
^~~
./Main.cpp:10:5: error: ‘m’ was not declared in this scope
m[a]++;
^
./Main.cpp:17:5: error: ‘cout’ was not declared in this scope
cout<<m[b]<<"\n";
^~~~
./Main.cpp:17:5: 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
^~~~
./Main.cpp:17:11: error: ‘m’ was not declared in this scope
cout<<m[b]<<"\n";
^
セット
テストケース