QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#712521#9537. Chinese Chessucup-team3935#Compile Error//C++204.7kb2024-11-05 15:59:512024-11-05 15:59:51

Details

answer.code: In function ‘std::vector<std::pair<long long int, long long int> > moveJ(long long int, long long int)’:
answer.code:20:26: error: no matching function for call to ‘std::vector<long long int>::push_back(<brace-enclosed initializer list>)’
   20 |             ans.push_back({r + dx[k], c + dy[k]});
      |             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/c++/13/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; value_type = long long 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 ‘<brace-enclosed initializer list>’ to ‘const std::vector<long long int>::value_type&’ {aka ‘const long long int&’}
 1278 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; value_type = long long 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 ‘<brace-enclosed initializer list>’ to ‘std::vector<long long int>::value_type&&’ {aka ‘long long int&&’}
 1295 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
answer.code:23:12: error: could not convert ‘ans’ from ‘vector<long long int>’ to ‘vector<std::pair<long long int, long long int>>’
   23 |     return ans;
      |            ^~~
      |            |
      |            vector<long long int>
answer.code: In function ‘std::vector<std::pair<long long int, long long int> > moveS(long long int, long long int)’:
answer.code:32:26: error: no matching function for call to ‘std::vector<long long int>::push_back(<brace-enclosed initializer list>)’
   32 |             ans.push_back({r + dx[k], c + dy[k]});
      |             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; value_type = long long 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 ‘<brace-enclosed initializer list>’ to ‘const std::vector<long long int>::value_type&’ {aka ‘const long long int&’}
 1278 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; value_type = long long 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 ‘<brace-enclosed initializer list>’ to ‘std::vector<long long int>::value_type&&’ {aka ‘long long int&&’}
 1295 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
answer.code:35:12: error: could not convert ‘ans’ from ‘vector<long long int>’ to ‘vector<std::pair<long long int, long long int>>’
   35 |     return ans;
      |            ^~~
      |            |
      |            vector<long long int>
answer.code: In function ‘std::vector<std::pair<long long int, long long int> > moveC(long long int, long long int)’:
answer.code:41:34: error: no matching function for call to ‘std::vector<long long int>::push_back(<brace-enclosed initializer list>)’
   41 |         if (R != r) ans.push_back({R, c});
      |                     ~~~~~~~~~~~~~^~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; value_type = long long 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 ‘<brace-enclosed initializer list>’ to ‘const std::vector<long long int>::value_type&’ {aka ‘const long long int&’}
 1278 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; value_type = long long int]’
 1295 |      ...