QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#863644#3434. Restaurant OrdersGuanYunchangCompile Error//C++982.3kb2025-01-19 20:39:212025-01-19 20:39:22

詳細信息

In file included from /usr/include/c++/14/unordered_map:37,
                 from answer.code:3:
/usr/include/c++/14/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:10:18: error: ‘>>’ should be ‘> >’ within a nested template argument list
   10 | vector<vector<int>> solve(int remaining, unordered_map<pair<int, int>, vector<vector<int>>>& memo, const vector<int>& menu_prices, vector<int> current_items = {}, int start = 0) {
      |                  ^~
      |                  > >
answer.code:10:42: error: ‘unordered_map’ has not been declared
   10 | vector<vector<int>> solve(int remaining, unordered_map<pair<int, int>, vector<vector<int>>>& memo, const vector<int>& menu_prices, vector<int> current_items = {}, int start = 0) {
      |                                          ^~~~~~~~~~~~~
answer.code:10:55: error: expected ‘,’ or ‘...’ before ‘<’ token
   10 | vector<vector<int>> solve(int remaining, unordered_map<pair<int, int>, vector<vector<int>>>& memo, const vector<int>& menu_prices, vector<int> current_items = {}, int start = 0) {
      |                                                       ^
answer.code: In function ‘std::vector<std::vector<int> > solve(int, int)’:
answer.code:11:9: error: ‘current_items’ was not declared in this scope
   11 |     if (current_items.empty()) {
      |         ^~~~~~~~~~~~~
answer.code:12:26: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   12 |         current_items = {};
      |                          ^
answer.code:16:16: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   16 |         return {current_items};
      |                ^
answer.code:16:17: error: ‘current_items’ was not declared in this scope
   16 |         return {current_items};
      |                 ^~~~~~~~~~~~~
answer.code:16:30: error: could not convert ‘{<expression error>}’ from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::vector<int> >’
   16 |         return {current_items};
      |                              ^
      |                              |
      |                              <brace-enclosed initializer list>
answer.code:18:26: error: ‘start’ was not declared in this scope
   18 |     if (remaining < 0 || start >= menu_prices.size()) {
      |                          ^~~~~
answer.code:18:35: error: ‘menu_prices’ was not declared in this scope
   18 |     if (remaining < 0 || start >= menu_prices.size()) {
      |                                   ^~~~~~~~~~~
answer.code:19:16: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   19 |         return {};
      |                ^
answer.code:22:38: error: ‘start’ was not declared in this scope
   22 |     pair<int, int> key = {remaining, start};
      |                                      ^~~~~
answer.code:22:20: error: in C++98 ‘key’ must be initialized by constructor, not by ‘{...}’
   22 |     pair<int, int> key = {remaining, start};
      |                    ^~~
answer.code:22:43: error: could not convert ‘{remaining, <expression error>}’ from ‘<brace-enclosed initializer list>’ to ‘std::pair<int, int>’
   22 |     pair<int, int> key = {remaining, start};
      |                                           ^
      |                                           |
      |                                           <brace-enclosed initializer list>
answer.code:23:9: error: ‘memo’ was not declared in this scope
   23 |     if (memo.find(key) != memo.end()) {
      |         ^~~~
answer.code:27:22: error: ‘>>’ should be ‘> >’ within a nested template argument list
   27 |     vector<vector<int>> solutions;
      |                      ^~
      |                      > >
answer.code:29:10: error: ‘without_current’ does not name a type
   29 |     auto without_current = solve(remaining, memo, menu_prices, current_items, start + 1);
      |          ^~~~~~~~~~~~~~~
answer.code:30:39: error: ‘without_current’ was not declared in this scope
   30 |     solutions.insert(solutions.end(), without_current.begin(), without_current.end());
      |                                       ^~~~~~~~~~~~~~~
answer.code:33:22: error: ‘menu_prices’ was not declared in this scope
   33 |     if (remaining >= menu_prices[start]) {
      |                      ^~~~~~~~~~~
answer.code:34:9: error: ‘current_items’ was not declared in this scope
   34 |         current_items.push_back(start + 1);
      |         ^~~~~~~~~~~~~
answer.code:35:14: error: ‘with_current’ does not name a type
   35 |         auto with_current = solve(remaining - menu_prices[start], memo, menu_prices, current_items, start);
      |              ^~~~~~~~~...