bitaro.cpp: In function 'void light(int, std::vector<int>&)':
bitaro.cpp:76:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | while(i < v.size() && i < str[sz] && f[str][i].se == v[i]) i++;
| ~~^~~~~~~~~~
bitaro.cpp: In function 'int main()':
bitaro.cpp:84:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
84 | freopen(TEXT".inp","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
bitaro.cpp:85:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
85 | freopen(TEXT".out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
bitaro.cpp: In function 'void light(int, std::vector<int>&)':
bitaro.cpp:76:50: warning: array subscript i is outside array bounds of 'std::pair<int, int> [0]' [-Warray-bounds]
76 | while(i < v.size() && i < str[sz] && f[str][i].se == v[i]) i++;
| ~~~~~~~~^
bitaro.cpp:77:37: warning: array subscript i is outside array bounds of 'std::pair<int, int> [0]' [-Warray-bounds]
77 | int res = i < str[sz] ? f[str][i].fi : -1;
| ~~~~~~~~^
bitaro.cpp: In function 'void precompute()':
bitaro.cpp:60:25: warning: array subscript <unknown> is outside array bounds of 'std::pair<int, int> [0]' [-Warray-bounds]
60 | f[u][sz[u]++] = t;
| ~~~~~~~~~~~~^
bitaro.cpp:60:25: warning: array subscript <unknown> is outside array bounds of 'std::pair<int, int> [0]' [-Warray-bounds]
bitaro.cpp:62:40: warning: array subscript <unknown> is outside array bounds of 'std::pair<int, int> [0]' [-Warray-bounds]
62 | if (sz[u] < BLOCK) f[u][sz[u]++] = pii(0,u);
| ~~~~~~~~~~~~^
bitaro.cpp:62:40: warning: array subscript <unknown> is outside array bounds of 'std::pair<int, int> [0]' [-Warray-bounds]
bitaro.cpp:47:59: warning: array subscript i is outside array bounds of 'std::pair<int, int> [0]' [-Warray-bounds]
47 | for (int i = 0; i < sz[v]; i++) pq.push(f[v][i]);
| ~~~~~~^