spiderman.cpp: In function 'int check(int, int)':
spiderman.cpp:16:4: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
16 | if(b == 1)
| ^
spiderman.cpp: In function 'void answer()':
spiderman.cpp:80:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
80 | for(int i = 0; i < v.size(); i++)
| ~~^~~~~~~~~~
spiderman.cpp:88:6: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
88 | if(v[i] > k)
| ^
spiderman.cpp:95:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
95 | for(int i = 0; i < pas.size(); i++)
| ~~^~~~~~~~~~~~
spiderman.cpp:75:12: warning: iteration 1000000 invokes undefined behavior [-Waggressive-loop-optimizations]
75 | if(used[i] != 0)
| ~~~~~~^
spiderman.cpp:74:19: note: within this loop
74 | for(int i = 1; i <= 1000001; i++)
| ~~^~~~~~~~~~