portals.cpp: In function 'int32_t main()':
portals.cpp:40:47: warning: narrowing conversion of '(((int)i) + ((int)dx[((int)k)]))' from 'int' to 'short int' [-Wnarrowing]
40 | adj[i][j].push_back({i+dx[k],j+dy[k],1});
| ~^~~~~~
portals.cpp:40:47: warning: narrowing conversion of '(((int)i) + ((int)dx[((int)k)]))' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:40:55: warning: narrowing conversion of '(((int)j) + ((int)dy[((int)k)]))' from 'int' to 'short int' [-Wnarrowing]
40 | adj[i][j].push_back({i+dx[k],j+dy[k],1});
| ~^~~~~~
portals.cpp:40:55: warning: narrowing conversion of '(((int)j) + ((int)dy[((int)k)]))' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:62:26: warning: narrowing conversion of '(((int)x) + ((int)dx[((int)i)]))' from 'int' to 'short int' [-Wnarrowing]
62 | q.push({x+dx[i],y+dy[i],d+1});
| ~^~~~~~
portals.cpp:62:26: warning: narrowing conversion of '(((int)x) + ((int)dx[((int)i)]))' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:62:34: warning: narrowing conversion of '(((int)y) + ((int)dy[((int)i)]))' from 'int' to 'short int' [-Wnarrowing]
62 | q.push({x+dx[i],y+dy[i],d+1});
| ~^~~~~~
portals.cpp:62:34: warning: narrowing conversion of '(((int)y) + ((int)dy[((int)i)]))' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:62:42: warning: narrowing conversion of '(((int)d) + 1)' from 'int' to 'short int' [-Wnarrowing]
62 | q.push({x+dx[i],y+dy[i],d+1});
| ~^~
portals.cpp:62:42: warning: narrowing conversion of '(((int)d) + 1)' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:73:45: warning: narrowing conversion of '(((int)it.__gnu_cxx::__normal_iterator<short int*, std::vector<short int> >::operator*()) + 1)' from 'int' to 'short int' [-Wnarrowing]
73 | adj[x][y].push_back({x, *it + 1, nearest_wall[x][y]});
| ~~~~^~~
portals.cpp:73:45: warning: narrowing conversion of '(((int)it.__gnu_cxx::__normal_iterator<short int*, std::vector<short int> >::operator*()) + 1)' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:78:45: warning: narrowing conversion of '(((int)it.__gnu_cxx::__normal_iterator<short int*, std::vector<short int> >::operator*()) - 1)' from 'int' to 'short int' [-Wnarrowing]
78 | adj[x][y].push_back({x, *it - 1, nearest_wall[x][y]});
| ~~~~^~~
portals.cpp:78:45: warning: narrowing conversion of '(((int)it.__gnu_cxx::__normal_iterator<short int*, std::vector<short int> >::operator*()) - 1)' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:84:42: warning: narrowing conversion of '(((int)it.__gnu_cxx::__normal_iterator<short int*, std::vector<short int> >::operator*()) + 1)' from 'int' to 'short int' [-Wnarrowing]
84 | adj[x][y].push_back({*it + 1, y, nearest_wall[x][y]});
| ~~~~^~~
portals.cpp:84:42: warning: narrowing conversion of '(((int)it.__gnu_cxx::__normal_iterator<short int*, std::vector<short int> >::operator*()) + 1)' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:89:42: warning: narrowing conversion of '(((int)it.__gnu_cxx::__normal_iterator<short int*, std::vector<short int> >::operator*()) - 1)' from 'int' to 'short int' [-Wnarrowing]
89 | adj[x][y].push_back({*it - 1, y, nearest_wall[x][y]});
| ~~~~^~~
portals.cpp:89:42: warning: narrowing conversion of '(((int)it.__gnu_cxx::__normal_iterator<short int*, std::vector<short int> >::operator*()) - 1)' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:95:24: warning: 'stx' may be used uninitialized in this function [-Wmaybe-uninitialized]
95 | pq.push({0,stx,sty});
| ^
portals.cpp:113:22: warning: 'endy' may be used uninitialized in this function [-Wmaybe-uninitialized]
113 | cout<<dist[endx][endy];
| ^~~~
portals.cpp:113:16: warning: 'endx' may be used uninitialized in this function [-Wmaybe-uninitialized]
113 | cout<<dist[endx][endy];
| ^~~~
portals.cpp:95:24: warning: 'sty' may be used uninitialized in this function [-Wmaybe-uninitialized]
95 | pq.push({0,stx,sty});
| ^