Problem | fractional_knapsack |
---|---|
User | Tyx2019 |
Submission Time | 2023-02-08 14:09:55 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
fractional_knapsack.cpp: In function ‘int main()’:
fractional_knapsack.cpp:19:12: error: invalid types ‘std::pair<long double, long double> [N][long double]’ for array subscript
19 | if(W<=A[i].second){
| ^
fractional_knapsack.cpp:20:13: error: invalid types ‘std::pair<long double, long double> [N][long double]’ for array subscript
20 | maks+=A[i].first*W;
| ^
fractional_knapsack.cpp:23:9: error: invalid types ‘std::pair<long double, long double> [N][long double]’ for array subscript
23 | W-=A[i].second;
| ^
fractional_knapsack.cpp:24:12: error: invalid types ‘std::pair<long double, long double> [N][long double]’ for array subscript
24 | maks+=A[i].first*A[i].second;
| ^
fractional_knapsack.cpp:24:23: error: invalid types ‘std::pair<long double, long double> [N][long double]’ for array subscript
24 | maks+=A[i].first*A[i]