QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#502339#9156. 百万富翁gg_gong#Compile Error//C++142.3kb2024-08-03 04:02:162024-08-03 04:02:16

详细

answer.code: In function ‘int solve_real(int)’:
answer.code:47:47: error: ‘num’ was not declared in this scope; did you mean ‘enum’?
   47 |                                 rec[bel]=vecc[num][(int)vecc[bel].size()-1];
      |                                               ^~~
      |                                               enum
answer.code:61:30: error: no matching function for call to ‘std::vector<int>::push_back(std::vector<int>&)’
   61 |                 vec.push_back(vecc[i]);
      |                 ~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/c++/13/queue:63,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:157,
                 from answer.code:6:
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]’
 1278 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:35: note:   no known conversion for argument 1 from ‘std::vector<int>’ to ‘const std::vector<int>::value_type&’ {aka ‘const int&’}
 1278 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]’
 1295 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1295:30: note:   no known conversion for argument 1 from ‘std::vector<int>’ to ‘std::vector<int>::value_type&&’ {aka ‘int&&’}
 1295 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
answer.code: In function ‘int solve_small(int)’:
answer.code:27:1: warning: control reaches end of non-void function [-Wreturn-type]
   27 | }
      | ^