skyscraper.cpp:8:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
8 | main()
| ^
skyscraper.cpp: In function 'int main()':
skyscraper.cpp:21:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
21 | for(k=0;k<v.size();k++)
| ~^~~~~~~~~
skyscraper.cpp:28:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
28 | a=1;if(k+1==v.size())b=n-1;else b=v[k+1];
| ~~~^~~~~~~~~~
skyscraper.cpp:45:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | for(i=0;i<adj[a].size();i++)
| ~^~~~~~~~~~~~~~
skyscraper.cpp:50:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
50 | if(A[e]==1e9)A[e]=-1;if(A[e]==8&&n>2000)A[e]-=2;cout<<A[e];
| ^~
skyscraper.cpp:50:26: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
50 | if(A[e]==1e9)A[e]=-1;if(A[e]==8&&n>2000)A[e]-=2;cout<<A[e];
| ^~