| Problem | fractional_knapsack |
|---|---|
| User | peepeepoop |
| Submission Time | 2026-02-17 23:15:00 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
fractional_knapsack.cpp: In function ‘int main()’:
fractional_knapsack.cpp:18:22: error: ‘i’ was not declared in this scope
18 | while (S - density[i].first >= 0 && tabulated <= density[i].second){
| ^
fractional_knapsack.cpp:19:4: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
19 | ans += density[i].first;
| ^~~
| abs
fractional_knapsack.cpp:26:10: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
26 | cout << ans;
| ^~~
| abs