bosses.cpp: In function 'long long int solve(long long int)':
bosses.cpp:41:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
41 | for (int i=0;i<mp[emp].size();i++)
| ~^~~~~~~~~~~~~~~
bosses.cpp:57:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
57 | for (int i=0;i<mp[emp].size();i++)
| ~^~~~~~~~~~~~~~~
bosses.cpp: In function 'int32_t main()':
bosses.cpp:110:23: warning: iteration 5001 invokes undefined behavior [-Waggressive-loop-optimizations]
110 | visited[i]=0;
| ~~~~~~~~~~^~
bosses.cpp:108:23: note: within this loop
108 | for (int i=0;i<5002;i++)
| ~^~~~~
cc1plus: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset 5002 is out of the bounds [0, 5001] of object 'visited' with type 'bool [5001]' [-Warray-bounds]
bosses.cpp:17:6: note: 'visited' declared here
17 | bool visited[5001] = {0}, touched[5001]={0};
| ^~~~~~~
cc1plus: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset 5002 is out of the bounds [0, 5001] of object 'touched' with type 'bool [5001]' [-Warray-bounds]
bosses.cpp:17:27: note: 'touched' declared here
17 | bool visited[5001] = {0}, touched[5001]={0};
| ^~~~~~~
cc1plus: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset 5002 is out of the bounds [0, 5001] of object 'visited' with type 'bool [5001]' [-Warray-bounds]
bosses.cpp:17:6: note: 'visited' declared here
17 | bool visited[5001] = {0}, touched[5001]={0};
| ^~~~~~~
cc1plus: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset 5002 is out of the bounds [0, 5001] of object 'touched' with type 'bool [5001]' [-Warray-bounds]
bosses.cpp:17:27: note: 'touched' declared here
17 | bool visited[5001] = {0}, touched[5001]={0};
| ^~~~~~~