QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#600864 | #9425. Generated String | 3un_larryfunc | Compile Error | / | / | C++20 | 12.9kb | 2024-09-29 19:42:48 | 2024-09-29 19:42:52 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code:7:59: error: ‘vector’ does not name a type 7 | template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; } | ^~~~~~ answer.code:7:65: error: expected ‘,’ or ‘...’ before ‘<’ token 7 | template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; } | ^ answer.code: In function ‘std::ostream& operator<<(std::ostream&, int)’: answer.code:7:91: error: ‘as’ was not declared in this scope; did you mean ‘os’? 7 | template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; } | ^~ | os answer.code: At global scope: answer.code:17:8: error: ‘vector’ was not declared in this scope 17 | vector<vector<pair<int, int>>> parallelSort(int n) { | ^~~~~~ answer.code:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? 1 | #include<iostream> +++ |+#include <vector> 2 | using namespace std; answer.code:17:8: error: ‘vector’ was not declared in this scope 17 | vector<vector<pair<int, int>>> parallelSort(int n) { | ^~~~~~ answer.code:17:8: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:17:8: error: ‘vector’ was not declared in this scope answer.code:17:8: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:17:8: error: ‘vector’ was not declared in this scope answer.code:17:8: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:17:8: error: ‘vector’ was not declared in this scope answer.code:17:8: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:17:8: error: ‘vector’ was not declared in this scope answer.code:17:8: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:17:8: error: ‘vector’ was not declared in this scope answer.code:17:8: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:17:8: error: ‘vector’ was not declared in this scope answer.code:17:8: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:17:8: error: ‘vector’ was not declared in this scope answer.code:17:8: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:17:1: error: ‘vector’ does not name a type 17 | vector<vector<pair<int, int>>> parallelSort(int n) { | ^~~~~~ answer.code:40:3: error: ‘vector’ does not name a type 40 | vector<X> xs; | ^~~~~~ answer.code:41:3: error: ‘vector’ does not name a type 41 | vector<pair<Y, X>> yxs; | ^~~~~~ answer.code:42:10: error: ‘vector’ was not declared in this scope 42 | vector<vector<Y>> yss; | ^~~~~~ answer.code:42:10: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:42:10: error: ‘vector’ was not declared in this scope answer.code:42:10: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:42:10: error: ‘vector’ was not declared in this scope answer.code:42:10: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:42:10: error: ‘vector’ was not declared in this scope answer.code:42:10: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:42:10: error: ‘vector’ was not declared in this scope answer.code:42:10: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:42:10: error: ‘vector’ was not declared in this scope answer.code:42:10: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:42:10: error: ‘vector’ was not declared in this scope answer.code:42:10: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’? answer.code:42:10: error: ‘vector’ was not declared in this scope answer.code:42:10: note: ‘std::vector’ is defined in header ‘<vector>’; ...