Problem ssq
User R9q5P8
Submission Time 2026-11-11 14:46:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ssq.cpp: In member function ‘std::vector<int> node::qry(int, int, int)’:
ssq.cpp:32:30: error: could not convert ‘0’ from ‘int’ to ‘std::vector<int>’
32 | if (l>e||r<s) return 0;
| ^
| |
| int
ssq.cpp:38:20: error: could not convert ‘total’ from ‘int’ to ‘std::vector<int>’
38 | return total;
| ^~~~~
| |
| int
ssq.cpp:44:16: error: could not convert ‘sum’ from ‘int’ to ‘std::vector<int>’
44 | return sum;
| ^~~
| |
| int
ssq.cpp: In function ‘int main()’:
ssq.cpp:67:13: error: expected ‘,’ or ‘;’ before ‘cout’
67 | cout << accumulate(v.begin(), v.end()) << '\n';
| ^~~~