Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

{Index in position 1 exceeds array bounds (must not exceed 6).

Error in ex3>dfs (line 28)
if(map(locX,locY) == 't')

Error in ex3 (line 21)
[~,treasure_count] = dfs(map,startX,startY,rows,columns,0,fout);
} 

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.

Please double check your code to solve this problem and try again.

Your Answer

MATLAB is selecting SOFTWARE OPENGL rendering.

                            < M A T L A B (R) >
                  Copyright 1984-2021 The MathWorks, Inc.
                  R2021a (9.10.0.1602886) 64-bit (glnxa64)
                             February 17, 2021

 
For online documentation, see https://www.mathworks.com/support
For product information, visit www.mathworks.com.
 
>> >> [Warning: Unable to create preferences folder in /.matlab/R2021a. A system error
has occurred. Using a temporary preferences folder for this MATLAB session. See
the <a href="matlab: helpview([docroot
'/matlab/helptargets.map'],'matlabenvironment_prefdir_location')">preferences
documentation</a> for more details.] 
Your output.txt:
Start at location row: 7, column: 4

JOJ Answer

MATLAB is selecting SOFTWARE OPENGL rendering.

                            < M A T L A B (R) >
                  Copyright 1984-2021 The MathWorks, Inc.
                  R2021a (9.10.0.1602886) 64-bit (glnxa64)
                             February 17, 2021

 
For online documentation, see https://www.mathworks.com/support
For product information, visit www.mathworks.com.

Your output.txt:
Start at location row: 7, column: 4
Treasure at location row: 5, column: 4
Treasure at location row: 4, column: 4
Treasure at location row: 2, column: 5
Treasure at location row: 1, column: 6
Treasure at location row: 1, column: 4
5 Treasure(s) found in all.