QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#45834#4564. Digital CircuitZhaoZiLongCompile Error//C++171.0kb2022-08-24 15:40:272022-08-24 15:40:28

Details

answer.code: In function ‘void init(int, int, vi, vi)’:
answer.code:36:9: error: no matching function for call to ‘std::vector<int>::push_back(vi&)’
   36 |     a.pb(A);
      |     ~~~~^~~
In file included from /usr/include/c++/11/vector:67,
                 from circuit.h:1,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_vector.h:1187:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]’
 1187 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1187:35: note:   no known conversion for argument 1 from ‘vi’ {aka ‘std::vector<int>’} to ‘const value_type&’ {aka ‘const int&’}
 1187 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_vector.h:1203:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]’
 1203 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1203:30: note:   no known conversion for argument 1 from ‘vi’ {aka ‘std::vector<int>’} to ‘std::vector<int>::value_type&&’ {aka ‘int&&’}
 1203 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~