Problem segmenttree2
User zsinfo2010
Submission Time 2024-01-26 14:34:12
Score 0
Max Time N/A
Max Memory N/A

Compile Error

segmenttree2.cpp: In constructor ‘node::node(int, int)’:
segmenttree2.cpp:10:17: error: ‘NULL’ was not declared in this scope
10 | l = r = NULL;
| ^~~~
segmenttree2.cpp:1:1: note: ‘NULL’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
+++ |+#include <cstddef>
1 | struct node{
segmenttree2.cpp: In member function ‘long long int node::value()’:
segmenttree2.cpp:14:18: error: ‘NULL’ was not declared in this scope
14 | if (l == NULL) l = new node(s, m);
| ^~~~
segmenttree2.cpp:14:18: note: ‘NULL’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
segmenttree2.cpp:15:18: error: ‘NULL’ was not declared in this scope
15 | if (r == NULL) r = new node(m+1, e);
| ^~~~
segmenttree2.cpp:15:18: note: ‘NULL’ is defined in header ‘<cstddef>’; did you forget to ‘#inclu