| Problem | knapsack |
|---|---|
| User | shadowblade2718 |
| Submission Time | 2026-10-21 17:53:30 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
knapsack.cpp: In function ‘int main()’:
knapsack.cpp:16:18: error: expected ‘;’ before ‘{’ token
16 | if(c>2000{c=2000;}
| ^
| ;
knapsack.cpp:17:48: error: expected ‘)’ before ‘;’ token
17 | long long int maxpow = floor(log2(c+1));
| ^
| )
knapsack.cpp:16:11: note: to match this ‘(’
16 | if(c>2000{c=2000;}
| ^
knapsack.cpp:19:38: error: ‘maxpow’ was not declared in this scope
19 | for(long long int j = 0; j < maxpow; j++){
| ^~~~~~
knapsack.cpp:23:40: error: ‘maxpow’ was not declared in this scope
23 | long long int conj = c - pow(2,maxpow) + 1;
| ^~~~~~