railway.cpp: In function 'int makeBiggestChildDFS(int)':
railway.cpp:54:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < T[pos].size(); ++i) {
~~^~~~~~~~~~~~~~~
railway.cpp: In function 'void DFS(int, int, std::unordered_map<int, int>&)':
railway.cpp:78:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(bigChildPos = 0; bigChildPos < T[pos].size(); ++bigChildPos) {if(T[pos][bigChildPos] == biggestChild[pos]) break;}
~~~~~~~~~~~~^~~~~~~~~~~~~~~
railway.cpp:86:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < T[pos].size(); ++i) {
~~^~~~~~~~~~~~~~~
railway.cpp:106:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < ministersInCity[pos].size(); ++i) {
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
railway.cpp:113:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(ministers.size() - passiveMinisters[pos] >= k) importantTracks.push_back(edgeID);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
railway.cpp: In function 'int main()':
railway.cpp:125:42: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("%d\n", importantTracks.size());
~~~~~~~~~~~~~~~~~~~~~~^
railway.cpp:127:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i + 1 < importantTracks.size(); ++i) {printf("%d ", importantTracks[i]);}
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
railway.cpp: In function 'void initialize()':
railway.cpp:15:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &n, &m, &k);
~~~~~^~~~~~~~~~~~~~~~~~~~~~
railway.cpp:29:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~
railway.cpp:39:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &si);
~~~~~^~~~~~~~~~~
railway.cpp:44:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &city);
~~~~~^~~~~~~~~~~~~