knapsack.cpp: In function 'void solve()':
knapsack.cpp:3:12: error: expected ',' or ';' before 'long'
3 | #define ll long long
| ^~~~
knapsack.cpp:31:13: note: in expansion of macro 'll'
31 | ll value = item.first, count = item.second;
| ^~
knapsack.cpp:35:27: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
35 | if (count == 0) break;
| ~~~~~~^~~~
knapsack.cpp:36:23: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator>'
36 | if (y > count) y = count;
| ~~^~~~~~~
knapsack.cpp:36:36: error: cannot resolve overloaded function 'count' based on conversion to type 'long long int'
36 | if (y > count) y = count;
| ^~~~~
knapsack.cpp:37:33: error: 'value' was not declared in this scope
37 | all_items.pb({y*value, i * y});
| ^~~~~
knapsack.cpp:37:29: error: no matching function for call to 'std::vector<std::pair<long long int, long long int> >::push_back(<brace-enclosed initializer list>)'
37 | all_items.pb({y*value, i * y});
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from knapsack.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<long long int, long long int>]'
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::pair<long long int, long long int>&'}
1187 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<long long int, long long int>]'
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<long long int, long long int> >::value_type&&' {aka 'std::pair<long long int, long long int>&&'}
1203 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
knapsack.cpp:38:26: error: overloaded function with no contextual type information
38 | count -= y;
| ^