portals.cpp: In function 'int32_t main()':
portals.cpp:41:47: warning: narrowing conversion of '(((int)i) + ((int)dx[((int)k)]))' from 'int' to 'short int' [-Wnarrowing]
41 | adj[i][j].push_back({i+dx[k],j+dy[k],1});
| ~^~~~~~
portals.cpp:41:47: warning: narrowing conversion of '(((int)i) + ((int)dx[((int)k)]))' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:41:55: warning: narrowing conversion of '(((int)j) + ((int)dy[((int)k)]))' from 'int' to 'short int' [-Wnarrowing]
41 | adj[i][j].push_back({i+dx[k],j+dy[k],1});
| ~^~~~~~
portals.cpp:41:55: warning: narrowing conversion of '(((int)j) + ((int)dy[((int)k)]))' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:63:26: warning: narrowing conversion of '(((int)x) + ((int)dx[((int)i)]))' from 'int' to 'short int' [-Wnarrowing]
63 | q.push({x+dx[i],y+dy[i],d+1});
| ~^~~~~~
portals.cpp:63:26: warning: narrowing conversion of '(((int)x) + ((int)dx[((int)i)]))' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:63:34: warning: narrowing conversion of '(((int)y) + ((int)dy[((int)i)]))' from 'int' to 'short int' [-Wnarrowing]
63 | q.push({x+dx[i],y+dy[i],d+1});
| ~^~~~~~
portals.cpp:63:34: warning: narrowing conversion of '(((int)y) + ((int)dy[((int)i)]))' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:63:42: warning: narrowing conversion of '(((int)d) + 1)' from 'int' to 'short int' [-Wnarrowing]
63 | q.push({x+dx[i],y+dy[i],d+1});
| ~^~
portals.cpp:63:42: warning: narrowing conversion of '(((int)d) + 1)' from 'int' to 'short int' [-Wnarrowing]
portals.cpp:74: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]
74 | adj[x][y].push_back({x, *it + 1, nearest_wall[x][y]});
| ~~~~^~~
portals.cpp:74: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:79: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]
79 | adj[x][y].push_back({x, *it - 1, nearest_wall[x][y]});
| ~~~~^~~
portals.cpp:79: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:85: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]
85 | adj[x][y].push_back({*it + 1, y, nearest_wall[x][y]});
| ~~~~^~~
portals.cpp:85: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:90: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]
90 | adj[x][y].push_back({*it - 1, y, nearest_wall[x][y]});
| ~~~~^~~
portals.cpp:90: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:96:24: warning: 'stx' may be used uninitialized in this function [-Wmaybe-uninitialized]
96 | pq.push({0,stx,sty});
| ^
portals.cpp:114:22: warning: 'endy' may be used uninitialized in this function [-Wmaybe-uninitialized]
114 | cout<<dist[endx][endy];
| ^~~~
portals.cpp:114:16: warning: 'endx' may be used uninitialized in this function [-Wmaybe-uninitialized]
114 | cout<<dist[endx][endy];
| ^~~~
portals.cpp:96:24: warning: 'sty' may be used uninitialized in this function [-Wmaybe-uninitialized]
96 | pq.push({0,stx,sty});
| ^