Problem adjmatrix
User Ast8ine
Submission Time 2026-02-20 11:11:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

adjmatrix.cpp:6:37: error: no matching function for call to ‘std::vector<int>::vector(int&, std::vector<int>)’
6 | vector<int> adj(n, vector<int>(n, 0));
| ^
In file included from /usr/include/c++/9/vector:67,
from adjmatrix.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:650:2: note: candidate: ‘template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&)’
650 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
/usr/include/c++/9/bits/stl_vector.h:650:2: note: template argument deduction/substitution failed:
adjmatrix.cpp:6:37: note: deduced conflicting types for parameter ‘_InputIterator’ (‘int’ and ‘std::vector<int>’)
6 | vector<int> adj(n, vector<int>(n, 0));
| ^
In file included from /usr/include/c+