Problem pushups
User supercel980
Submission Time 2025-02-10 17:55:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

pushups.cpp: In function ‘int main()’:
pushups.cpp:15:13: error: no match for ‘operator+=’ (operand types are ‘std::vector<int>’ and ‘int’)
15 | ans[j] += k;
| ~~~~~~~^~~~
pushups.cpp:19:31: error: request for member ‘begin’ in ‘ans’, which is of non-class type ‘std::vector<int> [(n + 1)]’
19 | cout << *max_element(ans.begin(), ans.end());
| ^~~~~
pushups.cpp:19:44: error: request for member ‘end’ in ‘ans’, which is of non-class type ‘std::vector<int> [(n + 1)]’
19 | cout << *max_element(ans.begin(), ans.end());
| ^~~