Problem generosity
User LimCheeHann
Submission Time 2026-03-15 17:02:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

generosity.cpp: In function ‘int main()’:
generosity.cpp:7:9: error: class template argument deduction failed:
7 | vector V;
| ^
generosity.cpp:7:9: error: no matching function for call to ‘vector()’
In file included from /usr/include/c++/9/vector:67,
from generosity.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:1872:5: note: candidate: ‘template<class _InputIterator, class _ValT, class _Allocator, class, class> std::vector(_InputIterator, _InputIterator, _Allocator)-> std::vector<_ValT, _Allocator>’
1872 | vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
| ^~~~~~
/usr/include/c++/9/bits/stl_vector.h:1872:5: note: template argument deduction/substitution failed:
generosity.cpp:7:9: note: candidate expects 3 arguments, 0 provided
7 | vector V;
| ^
In file included from /usr/include/c++/9/vector:67,
from generosity.cpp:2: