Problem adjmatrix
User PlayVoltz
Submission Time 2023-03-16 11:18:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

adjmatrix.cpp: In function ‘int main()’:
adjmatrix.cpp:13:40: error: expected ‘;’ before ‘vectpair’
13 | vectpair.push_back(make_pair(a1, a2))
| ^
| ;
14 | vectpair.push_back(make_pair(a2, a1))
| ~~~~~~~~
adjmatrix.cpp:18:18: error: request for member ‘first’ in ‘vect.std::vector<int>::operator[](((std::vector<int>::size_type)x))’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’}
18 | if (i=vect[x].first){
| ^~~~~
adjmatrix.cpp:19:18: error: request for member ‘second’ in ‘vect.std::vector<int>::operator[](((std::vector<int>::size_type)x))’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’}
19 | vect[vect[x].second] = 1;