Problem prefixsums
User Blender
Submission Time 2024-03-04 14:45:45
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 ‘int’)
35 | cout << sums[upper-1] - lower-1 < 0 ? 0 : sums[lower-1] << '\n';
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
| | |
| | int
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
prefixsums.cpp:35:35: note: candidate: ‘operator<(int, int)’ <built-in>
35 | cout << sums[upper-1] - lower-1 < 0 ? 0 : 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’
In file included from /usr/include/c+