QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#350355 | #7933. Build Permutation | MaMengQi | Compile Error | / | / | C++98 | 1.6kb | 2024-03-10 17:39:43 | 2024-03-10 17:39:43 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
In file included from /usr/include/c++/13/unordered_map:37, from answer.code:3: /usr/include/c++/13/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. 32 | #error This file requires compiler and library support \ | ^~~~~ answer.code: In function ‘int main()’: answer.code:15:10: error: ‘sort’ is not a member of ‘std’ 15 | std::sort(b.begin(), b.end()); | ^~~~ answer.code:20:35: error: ‘>>’ should be ‘> >’ within a nested template argument list 20 | std::vector<std::pair<int, int>> result; | ^~ | > > answer.code:29:13: error: ‘exit’ was not declared in this scope 29 | exit(0); | ^~~~ answer.code:4:1: note: ‘exit’ is defined in header ‘<cstdlib>’; did you forget to ‘#include <cstdlib>’? 3 | #include <unordered_map> +++ |+#include <cstdlib> 4 | answer.code:35:10: error: ‘unordered_map’ is not a member of ‘std’ 35 | std::unordered_map<int, int> index; | ^~~~~~~~~~~~~ answer.code:35:10: note: ‘std::unordered_map’ is only available from C++11 onwards answer.code:35:24: error: expected primary-expression before ‘int’ 35 | std::unordered_map<int, int> index; | ^~~ answer.code:38:19: error: ‘index’ was not declared in this scope; did you mean ‘idx’? 38 | int idx = index[j]; | ^~~~~ | idx answer.code:46:22: error: ISO C++ forbids declaration of ‘tup’ with no type [-fpermissive] 46 | for (const auto& tup : result) { | ^~~ answer.code:46:28: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions] 46 | for (const auto& tup : result) { | ^~~~~~ answer.code:46:28: error: forming reference to reference type ‘std::vector<std::pair<int, int> >&’ answer.code:47:21: error: request for member ‘first’ in ‘tup’, which is of non-class type ‘const int’ 47 | int i = tup.first; | ^~~~~ answer.code:48:21: error: request for member ‘second’ in ‘tup’, which is of non-class type ‘const int’ 48 | int j = tup.second; | ^~~~~~ answer.code:49:22: error: no matching function for call to ‘find(std::vector<int>::iterator, std::vector<int>::iterator, int&)’ 49 | if (std::find(ret_.begin(), ret_.end(), i) == ret_.end() && std::find(ret_.begin(), ret_.end(), j) == ret_.end()) { | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/13/bits/locale_facets.h:48, from /usr/include/c++/13/bits/basic_ios.h:37, from /usr/include/c++/13/ios:46, from /usr/include/c++/13/ostream:40, from /usr/include/c++/13/iostream:41, from answer.code:1: /usr/include/c++/13/bits/streambuf_iterator.h:435:5: note: candidate: ‘template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)’ 435 | find(istreambuf_iterator<_CharT> __first, | ^~~~ /usr/include/c++/13/bits/streambuf_iterator.h:435:5: note: template argument deduction/substitution failed: answer.code:49:22: note: ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ is not derived from ‘std::istreambuf_iterator<_CharT>’ 49 | if (std::find(ret_.begin(), ret_.end(), i) == ret_.end() && std::find(ret_.begin(), ret_.end(), j) == ret_.end()) { | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ answer.code:49:78: error: no matching function for call to ‘find(std::vector<int>::iterator, std::vector<int>::iterator, int&)’ 49 | if (std::find(ret_.begin(), ret_.end(), i) == ret_.end() && std::find(ret_.begin(), ret_.end(), j) == ret_.end()) { | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/13/bits/streambuf_iterator.h:435:5: note: candidate: ‘template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)’ 435 | find(istreambuf_iterator<_CharT> __first, | ^~~~ /usr/include/c++/13/bits/streambuf_iterator.h:435:5: note: template argument deduction/substitution failed: answer.code:49:78: note: ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ is not derived from ‘std::istreambuf_iterator<_CharT>’ 49 | if (std::find(ret_.begin(), ret_.end(), i) == ret_.end() && std::find(ret_.begin(), ret...