fish2.cpp: In function 'item operator+(item, item)':
fish2.cpp:31:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
31 | for (i = 0; i < b.pref.size(); ++i) {
| ~~^~~~~~~~~~~~~~~
fish2.cpp:36:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | if (i + 1 == b.pref.size()) res.pref.back().cnt = 0;
| ~~~~~~^~~~~~~~~~~~~~~~
fish2.cpp:41:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
41 | for (i = 0; i < a.suf.size(); ++i) {
| ~~^~~~~~~~~~~~~~
fish2.cpp:46:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
46 | if (i + 1 == a.suf.size()) res.suf.back().cnt = 0;
| ~~~~~~^~~~~~~~~~~~~~~
fish2.cpp:54:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | if (i == a.suf.size()) break;
| ~~^~~~~~~~~~~~~~~
fish2.cpp:60:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
60 | if (i == b.pref.size()) break;
| ~~^~~~~~~~~~~~~~~~
fish2.cpp:67:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
67 | if (j < a.suf.size() && s >= a.suf[j].need) {
| ~~^~~~~~~~~~~~~~
fish2.cpp:70:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
70 | } else if (k < b.pref.size() && s >= b.pref[k].need) {
| ~~^~~~~~~~~~~~~~~
fish2.cpp:75:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
75 | if (j == a.suf.size()) {
| ~~^~~~~~~~~~~~~~~
fish2.cpp:76:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | if (k == b.pref.size()) {
| ~~^~~~~~~~~~~~~~~~
fish2.cpp:84:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
84 | } else if (k == b.pref.size()) {
| ~~^~~~~~~~~~~~~~~~
fish2.cpp: In function 'void build(int, int, int)':
fish2.cpp:97:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
97 | int m = tl + tr >> 1;
| ~~~^~~~
fish2.cpp:99:17: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
99 | build(v + (tr - tl & ~1), m, tr);
| ~~~^~~~
fish2.cpp:100:31: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
100 | t[v] = t[v + 1] + t[v + (tr - tl & ~1)];
| ~~~^~~~
fish2.cpp: In function 'void update(int, int, int, int, int)':
fish2.cpp:107:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
107 | int m = tl + tr >> 1;
| ~~~^~~~
fish2.cpp:109:29: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
109 | else update(i, x, v + (tr - tl & ~1), m, tr);
| ~~~^~~~
fish2.cpp:110:31: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
110 | t[v] = t[v + 1] + t[v + (tr - tl & ~1)];
| ~~~^~~~
fish2.cpp: In function 'item query(int, int, int, int, int)':
fish2.cpp:117:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
117 | int m = tl + tr >> 1;
| ~~~^~~~
fish2.cpp:118:57: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
118 | return query(l, r, v + 1, tl, m) + query(l, r, v + (tr - tl & ~1), m, tr);
| ~~~^~~~
fish2.cpp: In function 'int main()':
fish2.cpp:122:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
122 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
fish2.cpp:123:35: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
123 | for (int i = 0; i < n; ++i) scanf("%d", a + i);
| ~~~~~^~~~~~~~~~~~~
fish2.cpp:125:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
125 | scanf("%d", &q);
| ~~~~~^~~~~~~~~~
fish2.cpp:128:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
128 | scanf("%d", &type);
| ~~~~~^~~~~~~~~~~~~
fish2.cpp:131:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
131 | scanf("%d%d", &i, &x);
| ~~~~~^~~~~~~~~~~~~~~~
fish2.cpp:135:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
135 | scanf("%d%d", &l, &r);
| ~~~~~^~~~~~~~~~~~~~~~