election.cpp: In function 'void Build(int, int, int)':
election.cpp:31:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
Build(v + v, tl, tl + tr >> 1);
~~~^~~~
election.cpp:32:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
Build(v + v + 1, tl + tr >> 1, tr);
~~~^~~~
election.cpp: In function 'void update(int, int, int, int, int)':
election.cpp:46:24: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
update(v + v, tl, tl + tr >> 1, l, val);
~~~^~~~
election.cpp:47:24: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
update(v + v + 1, tl + tr >> 1, tr, l, val);
~~~^~~~
election.cpp: In function 'int get(int, int, int, int, int)':
election.cpp:59:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
x = get(v + v, tl, tl + tr >> 1, l, r);
~~~^~~~
election.cpp:60:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
y = get(v + v + 1, tl + tr >> 1, tr, l, r);
~~~^~~~
election.cpp: In function 'int main()':
election.cpp:67:18: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[500020]' [-Wformat=]
scanf("%s", &ch);
~~~^
election.cpp:106:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < q[l].size(); ++ i)
~~^~~~~~~~~~~~~
election.cpp:66:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d\n", &n);
~~~~~^~~~~~~~~~~~
election.cpp:67:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", &ch);
~~~~~^~~~~~~~~~~
election.cpp:79:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &m);
~~~~~^~~~~~~~~~
election.cpp:83:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &x, &y);
~~~~~^~~~~~~~~~~~~~~~~