Problem oddqueries
User CuriousFox
Submission Time 2025-05-07 15:27:26
Score 0
Max Time N/A
Max Memory N/A

Compile Error

oddqueries.cpp: In function ‘int main()’:
oddqueries.cpp:27:3: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
27 | ans = sums - accumulate(nums[l], nums[r+1], 0) + ((r-l+1)*k);
| ^~~
| abs
oddqueries.cpp:27:16: error: ‘accumulate’ was not declared in this scope
27 | ans = sums - accumulate(nums[l], nums[r+1], 0) + ((r-l+1)*k);
| ^~~~~~~~~~
oddqueries.cpp:29:17: error: expected ‘;’ before ‘}’ token
29 | cout << "YES"
| ^
| ;
30 | }
| ~
oddqueries.cpp:32:16: error: expected ‘;’ before ‘}’ token
32 | cout << "NO"
| ^
| ;
33 | }
| ~