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