QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#863996#3434. Restaurant OrdersZhaoZiLongCompile Error//C++981.8kb2025-01-20 06:44:522025-01-20 06:44:53

詳細信息

answer.code: In function ‘int main()’:
answer.code:16:29: error: ‘>>’ should be ‘> >’ within a nested template argument list
   16 |     vector<vector<vector<int>>> dp(max_cost + 1);
      |                             ^~
      |                             > >
answer.code:17:21: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   17 |     dp[0].push_back({});
      |                     ^
answer.code:17:20: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   17 |     dp[0].push_back({});
      |     ~~~~~~~~~~~~~~~^~~~
answer.code:18:21: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   18 |     for (int cost : costs) {
      |                     ^~~~~
answer.code:18:21: error: forming reference to reference type ‘std::vector<int>&’
answer.code:20:30: error: ISO C++ forbids declaration of ‘comb’ with no type [-fpermissive]
   20 |             for (const auto& comb : dp[total - cost]) {
      |                              ^~~~
answer.code:20:37: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   20 |             for (const auto& comb : dp[total - cost]) {
      |                                     ^~
answer.code:20:52: error: forming reference to reference type ‘std::vector<std::vector<int> >&’
   20 |             for (const auto& comb : dp[total - cost]) {
      |                                                    ^
answer.code:21:40: error: conversion from ‘const int’ to non-scalar type ‘std::vector<int>’ requested
   21 |                 vector<int> new_comb = comb;
      |                                        ^~~~
answer.code:27:22: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   27 |     for (int order : orders) {
      |                      ^~~~~~
answer.code:27:22: error: forming reference to reference type ‘std::vector<int>&’
answer.code:31:27: error: ‘>>’ should be ‘> >’ within a nested template argument list
   31 |             set<vector<int>> unique_combinations;
      |                           ^~
      |                           > >
answer.code:32:30: error: ISO C++ forbids declaration of ‘comb’ with no type [-fpermissive]
   32 |             for (const auto& comb : dp[order]) {
      |                              ^~~~
answer.code:32:37: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   32 |             for (const auto& comb : dp[order]) {
      |                                     ^~
answer.code:32:45: error: forming reference to reference type ‘std::vector<std::vector<int> >&’
   32 |             for (const auto& comb : dp[order]) {
      |                                             ^
answer.code:33:43: error: conversion from ‘const int’ to non-scalar type ‘std::vector<int>’ requested
   33 |                 vector<int> sorted_comb = comb;
      |                                           ^~~~
answer.code:42:33: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Wc++11-extensions]
   42 |                 for (int item : result_combination) {
      |                                 ^~~~~~~~~~~~~~~~~~
answer.code:42:33: error: forming reference to reference type ‘std::vector<int>&’