Problem barbecue
User MegaG
Submission Time 2026-01-05 17:16:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

barbecue.cpp: In function ‘int main()’:
barbecue.cpp:23:9: error: request for member ‘begin’ in ‘v’, which is of non-class type ‘long long int [n]’
23 | sort(v.begin(), v.end(), greater<int>());
| ^~~~~
barbecue.cpp:23:20: error: request for member ‘end’ in ‘v’, which is of non-class type ‘long long int [n]’
23 | sort(v.begin(), v.end(), greater<int>());
| ^~~
barbecue.cpp:23:2: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
23 | sort(v.begin(), v.end(), greater<int>());
| ^~~~
| qsort
barbecue.cpp:26:12: error: ‘floor’ was not declared in this scope
26 | total += floor(d/v[i]);
| ^~~~~