Problem 01knapsack
User undefinedcritter
Submission Time 2026-07-08 17:44:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

01knapsack.cpp: In function ‘int main()’:
01knapsack.cpp:8:25: error: wrong number of template arguments (1, should be 2)
8 | vector<pair<float,pair<int>>> items(N,{0f,{0,0}});
| ^~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from 01knapsack.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:208:12: note: provided for ‘template<class _T1, class _T2> struct std::pair’
208 | struct pair
| ^~~~
01knapsack.cpp:8:28: error: template argument 2 is invalid
8 | vector<pair<float,pair<int>>> items(N,{0f,{0,0}});
| ^~
01knapsack.cpp:8:30: error: template argument 1 is invalid
8 | vector<pai