QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#214936#5605. A-Mazing PuzzleZhangYiDeCompile Error//C++173.1kb2023-10-15 01:32:402023-10-15 01:32:42

Details

answer.code: In function ‘void bfs()’:
answer.code:39:45: error: could not convert ‘(& hasWall.std::vector<std::vector<std::array<bool, 4> > >::operator[](((std::vector<std::vector<std::array<bool, 4> > >::size_type)(c1 + (c * r1)))))->std::vector<std::array<bool, 4> >::operator[](((std::vector<std::array<bool, 4> >::size_type)d1))’ from ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<bool, 4> >, std::array<bool, 4> >::value_type’ {aka ‘std::array<bool, 4>’} to ‘bool’
   39 |                 if (hasWall[c1 + c * r1][d1]) newBumps += 1;
      |                                             ^
      |                                             |
      |                                             __gnu_cxx::__alloc_traits<std::allocator<std::array<bool, 4> >, std::array<bool, 4> >::value_type {aka std::array<bool, 4>}
answer.code:48:45: error: could not convert ‘(& hasWall.std::vector<std::vector<std::array<bool, 4> > >::operator[](((std::vector<std::vector<std::array<bool, 4> > >::size_type)(c2 + (c * r2)))))->std::vector<std::array<bool, 4> >::operator[](((std::vector<std::array<bool, 4> >::size_type)d2))’ from ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<bool, 4> >, std::array<bool, 4> >::value_type’ {aka ‘std::array<bool, 4>’} to ‘bool’
   48 |                 if (hasWall[c2 + c * r2][d2]) newBumps += 1;
      |                                             ^
      |                                             |
      |                                             __gnu_cxx::__alloc_traits<std::allocator<std::array<bool, 4> >, std::array<bool, 4> >::value_type {aka std::array<bool, 4>}
answer.code: In function ‘int main()’:
answer.code:85:13: error: ‘class std::vector<std::array<bool, 4> >’ has no member named ‘fill’
   85 |         row.fill({false, false, false, false});
      |             ^~~~
answer.code:94:33: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<bool, 4> >, std::array<bool, 4> >::value_type’ {aka ‘std::array<bool, 4>’} and ‘bool’)
   94 |         hasWall[c + c * r][0] = true;
      |                                 ^~~~
In file included from answer.code:5:
/usr/include/c++/11/array:95:12: note: candidate: ‘constexpr std::array<bool, 4>& std::array<bool, 4>::operator=(const std::array<bool, 4>&)’
   95 |     struct array
      |            ^~~~~
/usr/include/c++/11/array:95:12: note:   no known conversion for argument 1 from ‘bool’ to ‘const std::array<bool, 4>&’
/usr/include/c++/11/array:95:12: note: candidate: ‘constexpr std::array<bool, 4>& std::array<bool, 4>::operator=(std::array<bool, 4>&&)’
/usr/include/c++/11/array:95:12: note:   no known conversion for argument 1 from ‘bool’ to ‘std::array<bool, 4>&&’
answer.code:95:39: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<bool, 4> >, std::array<bool, 4> >::value_type’ {aka ‘std::array<bool, 4>’} and ‘bool’)
   95 |         hasWall[c + c * (r + 1)][2] = true;
      |                                       ^~~~
In file included from answer.code:5:
/usr/include/c++/11/array:95:12: note: candidate: ‘constexpr std::array<bool, 4>& std::array<bool, 4>::operator=(const std::array<bool, 4>&)’
   95 |     struct array
      |            ^~~~~
/usr/include/c++/11/array:95:12: note:   no known conversion for argument 1 from ‘bool’ to ‘const std::array<bool, 4>&’
/usr/include/c++/11/array:95:12: note: candidate: ‘constexpr std::array<bool, 4>& std::array<bool, 4>::operator=(std::array<bool, 4>&&)’
/usr/include/c++/11/array:95:12: note:   no known conversion for argument 1 from ‘bool’ to ‘std::array<bool, 4>&&’
answer.code:103:33: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<bool, 4> >, std::array<bool, 4> >::value_type’ {aka ‘std::array<bool, 4>’} and ‘bool’)
  103 |         hasWall[c + c * r][1] = true;
      |                                 ^~~~
In file included from answer.code:5:
/usr/include/c++/11/array:95:12: note: candidate: ‘constexpr std::array<bool, 4>& std::array<bool, 4>::operator=(const std::array<bool, 4>&)’
   95 |     struct array
      |            ^~~~~
/usr/include/c++/11/array:95:12: note:   no known conversion for argument 1 from ‘bool’ to ‘const std::array<bool, 4>&’
/usr/include/c++/11/array:95:12: note: candidate: ‘constexpr std::array<bool, 4>& std::array<bool, 4>::operator=(std::array<bool, 4>&&)’
/usr/include/c++/11/array:95:12: note:   no known conversion for argument 1 from ‘bool’ to ‘std::array<bool, 4>&&’
answer.code:104:37: error: no match for ‘operator=’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<bool, 4> >, std::array<bool, 4> >::value_type’ {aka ‘std::array<bool, 4>’} and ‘bool’)
  104 |         hasWall[c + c * r + 1][3] = true;
      |                                     ^~~~
In file included from answer.code:5:
/usr/include/c++/11/array:95:12: note: candidate: ‘constexpr std::array<bool, 4>& std::array<boo...