Masyvo užklausos

Taškai: 0

Compile: FAIL

segment_tree.cpp:12:13: error: field ‘l’ has incomplete type ‘segment’ 12 | segment l, r; | ^ segment_tree.cpp:9:7: note: definition of ‘class segment’ is not complete until the closing brace 9 | class segment | ^~~~~~~ segment_tree.cpp:12:16: error: field ‘r’ has incomplete type ‘segment’ 12 | segment l, r; | ^ segment_tree.cpp:9:7: note: definition of ‘class segment’ is not complete until the closing brace 9 | class segment | ^~~~~~~ segment_tree.cpp: In constructor ‘segment::segment(std::pair<long long int, long long int>)’: segment_tree.cpp:21:13: error: expected ‘,’ or ‘;’ before ‘l’ 21 | l = | ^ segment_tree.cpp: In function ‘int main()’: segment_tree.cpp:46:5: error: ‘sr’ was not declared in this scope 46 | sr = (N << 1) - 2; | ^~ segment_tree.cpp:48:5: error: ‘populate’ was not declared in this scope 48 | populate(); | ^~~~~~~~ segment_tree.cpp:58:22: error: ‘tree’ was not declared in this scope; did you mean ‘free’? 58 | int nv = tree[mp[l]] + r; | ^~~~ | free segment_tree.cpp:58:27: error: ‘mp’ was not declared in this scope 58 | int nv = tree[mp[l]] + r; | ^~ segment_tree.cpp:59:13: error: ‘update’ was not declared in this scope 59 | update(mp[l], r); | ^~~~~~ segment_tree.cpp:61:14: error: jump to case label 61 | case '?': | ^~~ segment_tree.cpp:58:17: note: crosses initialization of ‘long long int nv’ 58 | int nv = tree[mp[l]] + r; | ^~

nr.resulttimemessage