toy.cpp: In function 'void bfs(std::vector<int>&)':
toy.cpp:14:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | for(int i=0;i<v.size();i++){
| ~^~~~~~~~~
toy.cpp:15:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
15 | for(int j=i+1;j<v.size();j++){
| ~^~~~~~~~~
toy.cpp: In function 'int main()':
toy.cpp:37:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::set<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
37 | printf("%d\n",ans.size());
| ~^ ~~~~~~~~~~
| | |
| int std::set<int>::size_type {aka long unsigned int}
| %ld
toy.cpp:28:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
28 | scanf("%d",&n);
| ~~~~~^~~~~~~~~