answer.code: In function ‘int main()’:
answer.code:51:57: error: invalid use of incomplete type ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘struct std::array<int, 3>’}
51 | if(M[s] == 0) A[i] = {M[s], x, 0};
| ^
In file included from /usr/include/c++/13/bits/memory_resource.h:47,
from /usr/include/c++/13/string:58,
from /usr/include/c++/13/bits/locale_classes.h:40,
from /usr/include/c++/13/bits/ios_base.h:41,
from /usr/include/c++/13/ios:44,
from /usr/include/c++/13/ostream:40,
from /usr/include/c++/13/iostream:41,
from answer.code:1:
/usr/include/c++/13/tuple:2005:45: note: declaration of ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘struct std::array<int, 3>’}
2005 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
answer.code:55:51: error: invalid use of incomplete type ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘struct std::array<int, 3>’}
55 | A[i] = {M[s], x, y};
| ^
/usr/include/c++/13/tuple:2005:45: note: declaration of ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘struct std::array<int, 3>’}
2005 | template<typename _Tp, size_t _Nm> struct array;
| ^~~~~
answer.code:68:32: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘std::array<int, 3>’} and ‘int’)
68 | if(A[i][0] == 0) x += A[i][1], ++i;
| ^
answer.code:68:51: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘std::array<int, 3>’} and ‘int’)
68 | if(A[i][0] == 0) x += A[i][1], ++i;
| ^
answer.code:69:37: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘std::array<int, 3>’} and ‘int’)
69 | else if(A[i][0] == 1) i = (x == A[i][1] ? A[i][2] : i + 1);
| ^
answer.code:69:61: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘std::array<int, 3>’} and ‘int’)
69 | else if(A[i][0] == 1) i = (x == A[i][1] ? A[i][2] : i + 1);
| ^
answer.code:69:71: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘std::array<int, 3>’} and ‘int’)
69 | else if(A[i][0] == 1) i = (x == A[i][1] ? A[i][2] : i + 1);
| ^
answer.code:70:37: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘std::array<int, 3>’} and ‘int’)
70 | else if(A[i][0] == 2) i = (x != A[i][1] ? A[i][2] : i + 1);
| ^
answer.code:70:61: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘std::array<int, 3>’} and ‘int’)
70 | else if(A[i][0] == 2) i = (x != A[i][1] ? A[i][2] : i + 1);
| ^
answer.code:70:71: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘std::array<int, 3>’} and ‘int’)
70 | else if(A[i][0] == 2) i = (x != A[i][1] ? A[i][2] : i + 1);
| ^
answer.code:71:37: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 3> >, std::array<int, 3> >::value_type’ {aka ‘std::array<int, 3>’} and ‘int’)
71 | else if(A[i][0] == 3) i = (x < A[i][1] ? A[i][2] : i + 1);
| ^
answer.code:71:60: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc...