Problem | fractional_knapsack |
---|---|
User | user123 |
Submission Time | 2023-09-09 16:43:54 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
fractional_knapsack.cpp: In function ‘bool rule(item, item)’:
fractional_knapsack.cpp:18:51: error: expected ‘;’ before ‘{’ token
18 | if ((1.0*a.v)/(1.0*a.w)!=((1.0*b.v/(1.0*b.w)))
| ^
| ;
19 | {
| ~
fractional_knapsack.cpp:22:5: error: expected primary-expression before ‘else’
22 | else return a.w<b.w;
| ^~~~
fractional_knapsack.cpp:21:6: error: expected ‘)’ before ‘else’
21 | }
| ^
| )
22 | else return a.w<b.w;
| ~~~~
fractional_knapsack.cpp:18:8: note: to match this ‘(’
18 | if ((1.0*a.v)/(1.0*a.w)!=((1.0*b.v/(1.0*b.w)))
| ^