newspapers.cpp: In function 'int main()':
newspapers.cpp:58:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
58 | for(int j=0;j<tree[i].size();j++)
| ~^~~~~~~~~~~~~~~
newspapers.cpp:91:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
91 | for(int i=0;i<tree[curr].size();i++)
| ~^~~~~~~~~~~~~~~~~~
newspapers.cpp:104:19: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
104 | printf("YES\n%d\n",ans.size()*2);
| ~^ ~~~~~~~~~~~~
| | |
| int std::vector<int>::size_type {aka long unsigned int}
| %ld
newspapers.cpp:106:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
106 | for(int i=0;i<ans.size();i++)
| ~^~~~~~~~~~~
newspapers.cpp:17:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
17 | scanf("%d %d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~~
newspapers.cpp:42:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
42 | scanf(" %d %d",&a,&b);
| ~~~~~^~~~~~~~~~~~~~~~