| Problem | adjlist |
|---|---|
| User | R9q5P8 |
| Submission Time | 2025-10-24 22:29:10 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
adjlist.cpp: In function ‘int main()’:
adjlist.cpp:15:9: error: temporary of non-literal type ‘std::vector<int>’ in a constant expression
15 | vector<vector<int>(0)> adj(n);
| ^~~~~~~~~~~~~~
In file included from /usr/include/c++/9/vector:67,
from adjlist.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:386:11: note: ‘std::vector<int>’ is not literal because:
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
/usr/include/c++/9/bits/stl_vector.h:386:11: note: ‘std::vector<int>’ has a non-trivial destructor
adjlist.cpp:15:23: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
15 | vector<vector<int>(0)> adj(n);
| ^
adjlist.cpp:15:23: note: expected a type, got ‘std::vector<int>(0, std::allocator<int>())’
a