foo.cc: In member function 'void Segment_tree::build(int, int, int)':
foo.cc:31:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = l + r >> 1;
~~^~~
foo.cc: In member function 'void Segment_tree::update(int, int, int)':
foo.cc:42:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = t[p].l + t[p].r >> 1;
~~~~~~~^~~~~~~~
foo.cc: In member function 'Segment_tree::node Segment_tree::query(int, int, int)':
foo.cc:53:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = t[p].l + t[p].r >> 1;
~~~~~~~^~~~~~~~
foo.cc: In function 'int main()':
foo.cc:65:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~~
foo.cc:67:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
foo.cc:71:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &opt, &a, &b);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。