Problem prefixsums
User Blender
Submission Time 2024-03-04 14:46:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

prefixsums.cpp: In function ‘int main()’:
prefixsums.cpp:35:35: error: no match for ‘operator<’ (operand types are ‘std::basic_ostream<char>::__ostream_type’ {aka ‘std::basic_ostream<char>’} and ‘long long int’)
35 | cout << sums[upper-1] - lower-1 < 0LL ? 0LL : sums[lower-1] << '\n';
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
| | |
| | long long int
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
prefixsums.cpp:35:35: note: candidate: ‘operator<(int, long long int)’ <built-in>
35 | cout << sums[upper-1] - lower-1 < 0LL ? 0LL : sums[lower-1] << '\n';
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
prefixsums.cpp:35:35: note: no known conversion for argument 1 from ‘std::basic_ostream<char>::__ostream_type’ {aka ‘std::basic_ostream<char>’} to ‘int