foo.cc: In function ‘int main()’:
foo.cc:19:31: warning: comparison of integer expressions of different signedness: ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
19 | if(c[i].size()>=maxn)
| ~~~~~~~~~~~^~~~~~
foo.cc:26:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
26 | for(i=0;i<c[ans2].size();i++)
| ~^~~~~~~~~~~~~~~
foo.cc:25:15: warning: ‘ans1’ may be used uninitialized [-Wmaybe-uninitialized]
25 | cout<<ans1<<endl<<ans2<<endl;
| ^~~~
foo.cc:7:23: note: ‘ans1’ was declared here
7 | int i,n,m,x,y,ans1,ans2,maxn=0;
| ^~~~
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:26:24:
/nix/gcc-15.2.0/include/c++/15.2.0/bits/stl_vector.h:1119:67: warning: ‘ans2’ may be used uninitialized [-Wmaybe-uninitialized]
1119 | ptrdiff_t __dif = this->_M_impl._M_finish - this->_M_impl._M_start;
| ~~~~~~~~~~~~~~^~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:7:28: note: ‘ans2’ was declared here
7 | int i,n,m,x,y,ans1,ans2,maxn=0;
| ^~~~