portals.cpp:1:2: error: stray '#' in program
1 | v#include<bits/stdc++.h>
| ^
portals.cpp:1:1: error: 'v' does not name a type
1 | v#include<bits/stdc++.h>
| ^
portals.cpp: In function 'int main()':
portals.cpp:12:5: error: 'ios_base' has not been declared
12 | ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
| ^~~~~~~~
portals.cpp:12:39: error: 'cin' was not declared in this scope
12 | ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
| ^~~
portals.cpp:12:51: error: 'cout' was not declared in this scope
12 | ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
| ^~~~
portals.cpp:15:5: error: 'string' was not declared in this scope
15 | string s[r+5];
| ^~~~~~
portals.cpp:16:5: error: 'vector' was not declared in this scope
16 | vector<pair<int,int>>adj[r+5][c+5];
| ^~~~~~
portals.cpp:16:12: error: 'pair' was not declared in this scope
16 | vector<pair<int,int>>adj[r+5][c+5];
| ^~~~
portals.cpp:16:17: error: expected primary-expression before 'int'
16 | vector<pair<int,int>>adj[r+5][c+5];
| ^~~
portals.cpp:19:14: error: 's' was not declared in this scope
19 | cin>>s[i];
| ^
portals.cpp:20:16: error: expected primary-expression before 'int'
20 | vector<int>v;
| ^~~
portals.cpp:21:9: error: 'v' was not declared in this scope
21 | v.pb(-1);
| ^
portals.cpp:38:17: error: 'adj' was not declared in this scope
38 | adj[i][v[j]+1].pb({i,v[j+1]-1});
| ^~~
portals.cpp:44:16: error: expected primary-expression before 'int'
44 | vector<int>v;
| ^~~
portals.cpp:45:9: error: 'v' was not declared in this scope
45 | v.pb(-1);
| ^
portals.cpp:47:16: error: 's' was not declared in this scope
47 | if(s[i][j]=='#'){
| ^
portals.cpp:54:17: error: 'adj' was not declared in this scope
54 | adj[v[i]+1][j].pb({v[i+1]-1,j});
| ^~~
portals.cpp:59:12: error: expected primary-expression before 'int'
59 | vector<int>dx={1,-1,0,0};
| ^~~
portals.cpp:60:12: error: expected primary-expression before 'int'
60 | vector<int>dy={0,0,1,-1};
| ^~~
portals.cpp:63:16: error: 's' was not declared in this scope
63 | if(s[i][j]=='#') continue;
| ^
portals.cpp:65:25: error: 'dx' was not declared in this scope; did you mean 'x'?
65 | int x=i+dx[k],y=j+dy[k];
| ^~
| x
portals.cpp:66:31: error: 'y' was not declared in this scope
66 | if(x<0||x>=r||y<0||y>=c||s[x][y]=='#') continue;
| ^
portals.cpp:66:42: error: 's' was not declared in this scope
66 | if(x<0||x>=r||y<0||y>=c||s[x][y]=='#') continue;
| ^
portals.cpp:67:17: error: 'adj' was not declared in this scope
67 | adj[i][j].pb({x,y});
| ^~~
portals.cpp:67:33: error: 'y' was not declared in this scope
67 | adj[i][j].pb({x,y});
| ^
portals.cpp:72:5: error: 'memset' was not declared in this scope
72 | memset(dist,-1,sizeof(dist));
| ^~~~~~
portals.cpp:1:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
+++ |+#include <cstring>
1 | v#include<bits/stdc++.h>
portals.cpp:73:5: error: 'queue' was not declared in this scope
73 | queue<pair<int,int>>q;
| ^~~~~
portals.cpp:73:16: error: expected primary-expression before 'int'
73 | queue<pair<int,int>>q;
| ^~~
portals.cpp:74:5: error: 'q' was not declared in this scope
74 | q.push({sx,sy});
| ^
portals.cpp:79:24: error: 'adj' was not declared in this scope
79 | for(auto [i,j]:adj[x][y]){
| ^~~
portals.cpp:79:31: error: 'y' was not declared in this scope
79 | for(auto [i,j]:adj[x][y]){
| ^