Problem flooding2
User wongyikai
Submission Time 2025-03-25 00:55:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

flooding2.cpp: In function ‘int main()’:
flooding2.cpp:102:10: error: ‘grid’ was not declared in this scope
102 | if (grid[top-1][jj]==0 && added[grp[top-1][jj]]!=count){
| ^~~~
flooding2.cpp:110:10: error: ‘grid’ was not declared in this scope
110 | if (grid[bottom+1][jj]==0 && added[grp[bottom+1][jj]]!=count){
| ^~~~
flooding2.cpp:118:10: error: ‘grid’ was not declared in this scope
118 | if (grid[ii][left-1]==0 && added[grp[ii][left-1]]!=count){
| ^~~~
flooding2.cpp:126:10: error: ‘grid’ was not declared in this scope
126 | if (grid[ii][right+1]==0 && added[grp[ii][right+1]]!=count){
| ^~~~