foo.cc: In function 'void build(int, int, int)':
foo.cc:32:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = l + r >> 1;
~~^~~
foo.cc: In function 'void modify(int, int, int)':
foo.cc:49:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = tr[u].l + tr[u].r >> 1;
~~~~~~~~^~~~~~~~~
foo.cc: In function 'll query(int, int, int)':
foo.cc:61:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid = tr[u].r + tr[u].l >> 1;
~~~~~~~~^~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:75:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
foo.cc:80:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &w[i]);
~~~~~^~~~~~~~~~~~~~~
foo.cc:82:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &m);
~~~~~^~~~~~~~~~
foo.cc:85:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &t, &a, &b);
~~~~~^~~~~~~~~~~~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。