Problem collectmushrooms6
User tomi
Submission Time 2023-03-29 11:00:16
Score 0
Max Time N/A
Max Memory N/A

Compile Error

collectmushrooms6.cpp:2:1: error: ‘vector’ does not name a type
2 | vector<vector<int>> grid;
| ^~~~~~
collectmushrooms6.cpp:5:1: error: ‘vector’ does not name a type
5 | vector<vector<int>> sum;
| ^~~~~~
collectmushrooms6.cpp: In function ‘int dfs(int, int, int)’:
collectmushrooms6.cpp:14:17: error: ‘grid’ was not declared in this scope
14 | int count = grid[i][j];
| ^~~~
collectmushrooms6.cpp: In function ‘void compute_sum()’:
collectmushrooms6.cpp:25:13: error: ‘sum’ was not declared in this scope
25 | sum[i][j] = dfs(i, j, 0);
| ^~~
collectmushrooms6.cpp: In function ‘int count_harvestable_mushrooms()’:
collectmushrooms6.cpp:34:17: error: ‘grid’ was not declared in this scope
34 | if (grid[i][j] == 1) {
| ^~~~
collectmushrooms6.cpp:35:21: error: ‘sum’ was not declared in this scope