Problem segmenttree
User ryoshu
Submission Time 2026-11-10 10:53:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

segmenttree.cpp: In member function ‘void node::qry(long long int, long long int)’:
segmenttree.cpp:31:30: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
31 | if (S>r||E<l) return LLONG_MAX;
| ^~~~~~~~~
segmenttree.cpp:32:32: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
32 | if (S>=l&&E<=r) return val;
| ^~~
segmenttree.cpp:33:50: error: invalid use of void expression
33 | return min(left->qry(l,r),right->qry(l,r));
| ^
segmenttree.cpp:33:50: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
segmenttree.cpp: In function ‘int main()’:
segmenttree.cpp:54:18: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘vo