Submission #69312
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:4:5: error: ‘set’ was not declared in this scope
set<int>s;
^~~
./Main.cpp:4:5: note: suggested alternative:
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/set:61,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:87,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stl_set.h:94:11: note: ‘std::set’
class set
^~~
./Main.cpp:4:9: error: expected primary-expression before ‘int’
set<int>s;
^~~
./Main.cpp:6:5: error: ‘string’ was not declared in this scope
string s;
^~~~~~
./Main.cpp:6:5: note: suggested alternative:
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/iosfwd:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/stringfwd.h:74:33: note: ‘std::__cxx11::string’
typedef basic_string<char> string;
^~~~~~
./Main.cpp:7:5: error: ‘cin’ was not declared in this scope
cin >> n >> s;
^~~
./Main.cpp:7:5: note: suggested alternative:
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:75,
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:7:17: error: ‘s’ was not declared in this scope
cin >> n >> s;
^
セット
テストケース