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:78:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
78 | for(int i = 0; i < v.size(); i++)
| ~~^~~~~~~~~~
spiderman.cpp:86:6: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
86 | if(v[i] > k)
| ^
spiderman.cpp:93:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
93 | for(int i = 0; i < pas.size(); i++)
| ~~^~~~~~~~~~~~
spiderman.cpp:73:12: warning: iteration 1000000 invokes undefined behavior [-Waggressive-loop-optimizations]
73 | if(used[i] != 0)
| ~~~~~~^
spiderman.cpp:72:19: note: within this loop
72 | for(int i = 1; i <= 1000001; i++)
| ~~^~~~~~~~~~