tracks.cpp:1:6: error: 'v' does not name a type
1 | v[i][j] = '#';
| ^
tracks.cpp:2:6: error: 'visited' does not name a type
2 | visited[i][j] = true;
| ^~~~~~~
tracks.cpp:3:9: error: expected constructor, destructor, or type conversion before '(' token
3 | dfs(v, i+1, j, k);
| ^
tracks.cpp:4:9: error: expected constructor, destructor, or type conversion before '(' token
4 | dfs(v, i-1, j, k);
| ^
tracks.cpp:5:9: error: expected constructor, destructor, or type conversion before '(' token
5 | dfs(v, i, j+1, k);
| ^
tracks.cpp:6:9: error: expected constructor, destructor, or type conversion before '(' token
6 | dfs(v, i, j-1, k);
| ^
tracks.cpp:7:5: error: expected declaration before '}' token
7 | }
| ^
tracks.cpp:8:5: error: expected declaration before '}' token
8 | }
| ^
tracks.cpp: In function 'int main()':
tracks.cpp:10:5: error: 'ios_base' has not been declared
10 | ios_base::sync_with_stdio(0);
| ^~~~~~~~
tracks.cpp:11:5: error: 'cin' was not declared in this scope
11 | cin.tie(0);
| ^~~
tracks.cpp:12:5: error: 'cout' was not declared in this scope
12 | cout.tie(0);
| ^~~~
tracks.cpp:13:12: error: 'h' was not declared in this scope
13 | cin >> h >> w;
| ^
tracks.cpp:13:17: error: 'w' was not declared in this scope
13 | cin >> h >> w;
| ^
tracks.cpp:14:5: error: 'v' was not declared in this scope
14 | v.resize(h, vector<char> (w));
| ^
tracks.cpp:14:17: error: 'vector' was not declared in this scope
14 | v.resize(h, vector<char> (w));
| ^~~~~~
tracks.cpp:14:24: error: expected primary-expression before 'char'
14 | v.resize(h, vector<char> (w));
| ^~~~
tracks.cpp:20:5: error: 'queue' was not declared in this scope
20 | queue<pair<int, int>> q;
| ^~~~~
tracks.cpp:20:11: error: 'pair' was not declared in this scope
20 | queue<pair<int, int>> q;
| ^~~~
tracks.cpp:20:16: error: expected primary-expression before 'int'
20 | queue<pair<int, int>> q;
| ^~~
tracks.cpp:21:5: error: 'q' was not declared in this scope
21 | q.push({0, 0});
| ^
tracks.cpp:22:19: error: expected primary-expression before 'int'
22 | vector<vector<int>> visi(h, vector<int>(w, 0));
| ^~~
tracks.cpp:27:27: error: 'visi' was not declared in this scope
27 | if(v[x][y]!='.' and !visi[x][y]) {
| ^~~~
tracks.cpp:28:7: error: 'visited' was not declared in this scope
28 | visited.assign(h, vector<bool> (w, 0));
| ^~~~~~~
tracks.cpp:28:32: error: expected primary-expression before 'bool'
28 | visited.assign(h, vector<bool> (w, 0));
| ^~~~
tracks.cpp:36:7: error: 'dfs' was not declared in this scope
36 | dfs(v, x, y, v[x][y]);
| ^~~
tracks.cpp:37:7: error: 'ans' was not declared in this scope
37 | ans++;
| ^~~
tracks.cpp:42:11: error: 'ans' was not declared in this scope
42 | cout<<ans<<endl;
| ^~~
tracks.cpp:42:16: error: 'endl' was not declared in this scope
42 | cout<<ans<<endl;
| ^~~~