foo.cc: In function ‘int main()’:
foo.cc:30:31: warning: comparison of integer expressions of different signedness: ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
30 | if(g[i].size()>maxg)
| ~~~~~~~~~~~^~~~~
foo.cc:38:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
38 | for(int i=0;i<g[mx].size();i++)
| ~^~~~~~~~~~~~~
In file included from /nix/gcc-15.2.0/include/c++/15.2.0/vector:68,
from /nix/gcc-15.2.0/include/c++/15.2.0/queue:69,
from stdc++.h:160:
In member function ‘std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>]’,
inlined from ‘int main()’ at foo.cc:38:29:
/nix/gcc-15.2.0/include/c++/15.2.0/bits/stl_vector.h:1119:41: warning: array subscript -1 is outside array bounds of ‘std::vector<int> [1005]’ [-Warray-bounds=]
1119 | ptrdiff_t __dif = this->_M_impl._M_finish - this->_M_impl._M_start;
| ~~~~~~~~~~~~~~^~~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:4:12: note: at offset -24 into object ‘g’ of size 24120
4 | vector<int>g[1005];
| ^
In member function ‘std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>]’,
inlined from ‘int main()’ at foo.cc:38:29:
/nix/gcc-15.2.0/include/c++/15.2.0/bits/stl_vector.h:1119:67: warning: array subscript -1 is outside array bounds of ‘std::vector<int> [1005]’ [-Warray-bounds=]
1119 | ptrdiff_t __dif = this->_M_impl._M_finish - this->_M_impl._M_start;
| ~~~~~~~~~~~~~~^~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:4:12: note: at offset -24 into object ‘g’ of size 24120
4 | vector<int>g[1005];
| ^