Problem Statement
#S###
...|.
#####
.|...
####F
the optimal path will consist of two steps to the right, moving 1 floor down, two steps to the left, moving 1 floor down and finally three steps to the right. The total time spent is 2*2 + 1*1 + 2*2 + 1*1 + 3*2 = 16 seconds.
First element represents the topmost floor.
Definition
- Class:
- BrokenElevator
- Method:
- wayTime
- Parameters:
- String[]
- Returns:
- int
- Method signature:
- int wayTime(String[] plan)
- (be sure your method is public)
Constraints
- plan will contain between 1 and 49 elements, inclusive.
- plan will contain an odd number of elements.
- Each element of plan will contain between 1 and 50 characters, inclusive.
- Each element of plan will contain the same number of characters.
- Elements of plan with even indices (0-based) will contain only the characters '#', 'S', and 'F'.
- Elements of plan with odd indices will contain only the characters '.' and '|'.
- Each element of plan with an odd index will contain exactly one '|'.
- plan will contain exactly one 'S' and exactly one 'F'.
Examples
{"#S###","...|.","#####",".|...","####F"}
Returns: 16
The example from the statement.
{"#F###","...|.","#####",".|...","####S"}
Returns: 20
The optimal path contains 3 steps to the left (6 seconds), moving 1 floor up (3 seconds), two steps to the right (4 seconds), moving another 1 floor up (3 seconds) and 2 steps to the left (4 seconds).
{"SF"}
Returns: 2
Just one step to the right
{"FS"}
Returns: 2
{"F", "|", "S"}
Returns: 3
{"FS","|.","##"}
Returns: 2
{"###",".|.","###","|..","###","..|","S#F",".|.","###","|..","###","|..","###",".|.","###"}
Returns: 4
{"####","...|","####","|...","####",".|..","####","...|","F#S#"}
Returns: 4
{"#####","..|..","#####","|....","#####","..|..","F#S##","|....","#####","|....","#####","|....","#####"}
Returns: 4
{"######","..|...","SF####","....|.","######","...|..","######","..|...","######",".....|","######"}
Returns: 2
{"#######","....|..","#######","...|...","#######","....|..","#######","|......","#S#F###","....|..","#######"}
Returns: 4
{"########","......|.","########","....|...","########","......|.","########",".......|","#FS#####",".....|..","########",".....|..","########","|.......","########","..|.....","########"}
Returns: 2
{"#########","....|....","#########","...|.....","###FS####","........|","#########",".......|.","#########"}
Returns: 2
{"##########","......|...","##########",".|........","##########",".......|..","##########",".........|","##F###S###","..|.......","##########",".|........","##########",".|........","##########"}
Returns: 8
{"###########","......|....","###########",".|.........","#######FS##",".........|.","###########",".........|.","###########","......|....","###########","..........|","###########"}
Returns: 2
{"##################################################",".|................................................","##################################################","........................................|.........","##################################################",".................|................................","############################F###################S#",".................................................|","##################################################"}
Returns: 40
{"#################################################","..................|..............................","#################################################","..........................................|......","#################################################","|................................................","#################################################","............................|....................","####################F##############S#############","......................|..........................","#################################################",".....................................|...........","#################################################"}
Returns: 30
{"################################################","........................................|.......","################################################","...............|................................","######F##############S##########################","...|............................................","################################################"}
Returns: 30
{"###############################################",".......|.......................................","###############################################","...............|...............................","####S#####################F####################","....................|..........................","###############################################"}
Returns: 44
{"################S#F###########################",".....................|........................","##############################################","............|.................................","##############################################"}
Returns: 4
{"#############################################","..........................|..................","F###########S################################","...............................|.............","#############################################","..........................................|..","#############################################","...........................................|.","#############################################"}
Returns: 24
{"############################################","...............................|............","#############F############S#################","..........................................|.","############################################",".....................................|......","############################################",".|..........................................","############################################"}
Returns: 26
{"###########################################","...............................|...........","###########################################","........................|..................","#############F###########S#################"}
Returns: 24
{"##########################################",".....................................|....","##########################################","....|.....................................","##########################################","..|.......................................","#########F#######################S########",".|........................................","##########################################","....|.....................................","##########################################"}
Returns: 48
{"#########################################","...|.....................................","########F########S#######################","........................|................","#########################################",".................................|.......","#########################################","|........................................","#########################################","..............................|..........","#########################################"}
Returns: 18
{"F##############################################","..|............................................","S##############################################","........................|......................","###############################################","...........................................|...","###############################################","|..............................................","###############################################",".............................|.................","###############################################","....|..........................................","###############################################","........................................|......","###############################################","..............................|................","###############################################",".|.............................................","###############################################"}
Returns: 11
{"##############################################F","..|............................................","S##############################################","........................|......................","###############################################","...........................................|...","###############################################","|..............................................","###############################################",".............................|.................","###############################################","....|..........................................","###############################################","........................................|......","###############################################","..............................|................","###############################################",".|.............................................","###############################################"}
Returns: 95
{"##################################S############","..|............................................","###############F###############################","........................|......................","###############################################","...........................................|...","###############################################","|..............................................","###############################################",".............................|.................","###############################################","....|..........................................","###############################################","........................................|......","###############################################","..............................|................","###############################################",".|.............................................","###############################################"}
Returns: 91
{"F##############################################","..|............................................","#######################S#######################","........................|......................","###############################################","...........................................|...","###############################################","|..............................................","###############################################",".............................|.................","###############################################","....|..........................................","###############################################","........................................|......","###############################################","..............................|................","###############################################",".|.............................................","###############################################"}
Returns: 49
{"F#############","...|..........","S#############","............|.","##############"}
Returns: 15
{"#############F","...|..........","S#############","............|.","##############"}
Returns: 29
{"#############S","...|..........","#############F","............|.","##############"}
Returns: 41
{"####F#########","...|..........","###S##########","............|.","##############"}
Returns: 5
{"#############################",".........................|...","#############################",".............|...............","#############################",".................|...........","#############################","............|................","#############################","............|................","#############################","..............|..............","F############################",".................|...........","#############################",".|...........................","#############################","............|................","#############################","...|.........................","#############################","...............|.............","S############################",".................|...........","#############################","..|..........................","#############################"}
Returns: 175
{"#############################",".........................|...","#############################",".............|...............","#############################",".................|...........","#############################","............|................","#############################","............|................","#############################","..............|..............","############################F",".................|...........","#############################",".|...........................","#############################","............|................","#############################","...|.........................","#############################","...............|.............","S############################",".................|...........","#############################","..|..........................","#############################"}
Returns: 163
{"#############################",".........................|...","#############################",".............|...............","#############################",".................|...........","#############################","............|................","#############################","............|................","#############################","..............|..............","###########S#################",".................|...........","#############################",".|...........................","#############################","............|................","#############################","...|.........................","#############################","...............|.............","########################F####",".................|...........","#############################","..|..........................","#############################"}
Returns: 131
{"#############################",".........................|...","#############################",".............|...............","#############################",".................|...........","#############################","............|................","#############################","............|................","#############################","..............|..............","##############F##############",".................|...........","#############################",".|...........................","#############################","............|................","#############################","...|.........................","#############################","...............|.............","######S######################",".................|...........","#############################","..|..........................","#############################"}
Returns: 135
{"S###################","........|...........","####################",".........|..........","####################",".|..................","####################","|...................","####################","..............|.....","F###################","|...................","####################",".......|............","####################","..............|.....","####################","................|...","####################","..........|.........","####################"}
Returns: 97
{"S###################","........|...........","####################",".........|..........","####################",".|..................","####################","|...................","####################","..............|.....","###################F","|...................","####################",".......|............","####################","..............|.....","####################","................|...","####################","..........|.........","####################"}
Returns: 79
{ "###############S####", "........|...........", "####################", ".........|..........", "####################", ".|..................", "####################", "|...................", "####################", "..............|.....", "###############F####", "|...................", "####################", ".......|............", "####################", "..............|.....", "####################", "................|...", "####################", "..........|.........", "####################"}
Returns: 69
{"#########F##########","........|...........","####################",".........|..........","####################",".|..................","####################","|...................","####################","..............|.....","##############S#####","|...................","####################",".......|............","####################","..............|.....","####################","................|...","####################","..........|.........","####################"}
Returns: 65
{"#############################################",".......................................|.....","F############################################",".....|.......................................","#############################################","...........|.................................","#############################################",".......................|.....................","#############################################","........................|....................","#############################################","......................................|......","############################################S","...................................|.........","#############################################"}
Returns: 103
{"#############################################",".......................................|.....","############################################F",".....|.......................................","#############################################","...........|.................................","#############################################",".......................|.....................","#############################################","........................|....................","#############################################","......................................|......","############################################S","...................................|.........","#############################################"}
Returns: 171
{"#############################################",".......................................|.....","#####################S#######################",".....|.......................................","#############################################","...........|.................................","#############################################",".......................|.....................","#############################################","........................|....................","#############################################","......................................|......","###############F#############################","...................................|.........","#############################################"}
Returns: 149
{"#############################################",".......................................|.....","################F############################",".....|.......................................","#############################################","...........|.................................","#############################################",".......................|.....................","#############################################","........................|....................","#############################################","......................................|......","###########################################S#","...................................|.........","#############################################"}
Returns: 113
{"##########################################","........|.................................","##########################################","................................|.........","##########################################","...........................|..............","##########################################",".................................|........","##########################################",".|........................................","##########################################","...........|..............................","##########################################",".........................................|","##########################################","........|.................................","##########################################","................|.........................","F#########################################","...................................|......","##########################################",".........................|................","##########################################","............|.............................","##########################################","...................|......................","##########################################","......|...................................","##########################################",".............................|............","##########################################","..............................|...........","##########################################",".....................................|....","##########################################",".................................|........","##########################################",".........................|................","##########################################",".....................|....................","##########################################","..............|...........................","##########################################","..................|.......................","##########################################","..............|...........................","#########################################S",".......|..................................","##########################################"}
Returns: 376
{"##########################################","........|.................................","##########################################","................................|.........","##########################################","...........................|..............","##########################################",".................................|........","##########################################",".|........................................","##########################################","...........|..............................","##########################################",".........................................|","##########################################","........|.................................","##########################################","................|.........................","#########################################F","...................................|......","##########################################",".........................|................","##########################################","............|.............................","##########################################","...................|......................","##########################################","......|...................................","##########################################",".............................|............","##########################################","..............................|...........","##########################################",".....................................|....","##########################################",".................................|........","##########################################",".........................|................","##########################################",".....................|....................","##########################################","..............|...........................","##########################################","..................|.......................","##########################################","..............|...........................","#########################################S",".......|..................................","##########################################"}
Returns: 318
{"##########################################","........|.................................","##########################################","................................|.........","##########################################","...........................|..............","##########################################",".................................|........","##########################################",".|........................................","##########################################","...........|..............................","##########################################",".........................................|","##########################################","........|.................................","##########################################","................|.........................","###########################S##############","...................................|......","##########################################",".........................|................","##########################################","............|.............................","##########################################","...................|......................","##########################################","......|...................................","##########################################",".............................|............","##########################################","..............................|...........","##########################################",".....................................|....","##########################################",".................................|........","##########################################",".........................|................","##########################################",".....................|....................","##########################################","..............|...........................","##########################################","..................|.......................","##########################################","..............|...........................","#####################################F####",".......|..................................","##########################################"}
Returns: 286
{"##########################################","........|.................................","##########################################","................................|.........","##########################################","...........................|..............","##########################################",".................................|........","##########################################",".|........................................","##########################################","...........|..............................","##########################################",".........................................|","##########################################","........|.................................","##########################################","................|.........................","#F########################################","...................................|......","##########################################",".........................|................","##########################################","............|.............................","##########################################","...................|......................","##########################################","......|...................................","##########################################",".............................|............","##########################################","..............................|...........","##########################################",".....................................|....","##########################################",".................................|........","##########################################",".........................|................","##########################################",".....................|....................","##########################################","..............|...........................","##########################################","..................|.......................","##########################################","..............|...........................","######################S###################",".......|..................................","##########################################"}
Returns: 336
{"##############################################","........................................|.....","##############################################",".....................................|........","##############################################","............|.................................","F#############################################","............|.................................","##############################################",".|............................................","##############################################","....................................|.........","##############################################","............................................|.","##############################################","................................|.............","##############################################",".......|......................................","##############################################","...|..........................................","##############################################","............................................|.","##############################################",".................|............................","##############################################","....................................|.........","##############################################","......................................|.......","##############################################",".......|......................................","##############################################","................................|.............","##############################################",".................................|............","##############################################","...........................|..................","S#############################################",".............................................|","##############################################","...........................................|..","##############################################","............................|.................","##############################################","...................................|..........","##############################################","..............|...............................","##############################################","..................|...........................","##############################################"}
Returns: 617
{"##############################################","........................................|.....","##############################################",".....................................|........","##############################################","............|.................................","#############################################F","............|.................................","##############################################",".|............................................","##############################################","....................................|.........","##############################################","............................................|.","##############################################","................................|.............","##############################################",".......|......................................","##############################################","...|..........................................","##############################################","............................................|.","##############################################",".................|............................","##############################################","....................................|.........","##############################################","......................................|.......","##############################################",".......|......................................","##############################################","................................|.............","##############################################",".................................|............","##############################################","...........................|..................","S#############################################",".............................................|","##############################################","...........................................|..","##############################################","............................|.................","##############################################","...................................|..........","##############################################","..............|...............................","##############################################","..................|...........................","##############################################"}
Returns: 659
{"##############################################","........................................|.....","##############################################",".....................................|........","##############################################","............|.................................","##########################################S###","............|.................................","##############################################",".|............................................","##############################################","....................................|.........","##############################################","............................................|.","##############################################","................................|.............","##############################################",".......|......................................","##############################################","...|..........................................","##############################################","............................................|.","##############################################",".................|............................","##############################################","....................................|.........","##############################################","......................................|.......","##############################################",".......|......................................","##############################################","................................|.............","##############################################",".................................|............","##############################################","...........................|..................","###########################F##################",".............................................|","##############################################","...........................................|..","##############################################","............................|.................","##############################################","...................................|..........","##############################################","..............|...............................","##############################################","..................|...........................","##############################################"}
Returns: 569
{"##############################################","........................................|.....","##############################################",".....................................|........","##############################################","............|.................................","########################F#####################","............|.................................","##############################################",".|............................................","##############################################","....................................|.........","##############################################","............................................|.","##############################################","................................|.............","##############################################",".......|......................................","##############################################","...|..........................................","##############################################","............................................|.","##############################################",".................|............................","##############################################","....................................|.........","##############################################","......................................|.......","##############################################",".......|......................................","##############################################","................................|.............","##############################################",".................................|............","##############################################","...........................|..................","#######S######################################",".............................................|","##############################################","...........................................|..","##############################################","............................|.................","##############################################","...................................|..........","##############################################","..............|...............................","##############################################","..................|...........................","##############################################"}
Returns: 603
{"##################################################","..........................................|.......","##################################################",".................|................................","##################################################",".............|....................................","##################################################",".................................|................","##################################################","...........................|......................","##################################################","............................................|.....","##################################################","...................|..............................","##################################################","............................................|.....","##################################################","....|.............................................","##################################################",".....................................|............","##################################################",".....|............................................","##################################################","...........................|......................","##################################################",".................|................................","##################################################","...........................................|......","##################################################","..............................................|...","F#################################################",".............|....................................","##################################################","..................|...............................","##################################################","............|.....................................","##################################################","....................................|.............","##################################################","......................................|...........","##################################################","..........................|.......................","##################################################",".......|..........................................","#################################################S","........................................|.........","##################################################","..................|...............................","##################################################"}
Returns: 267
{"##################################################","..........................................|.......","##################################################",".................|................................","##################################################",".............|....................................","##################################################",".................................|................","##################################################","...........................|......................","##################################################","............................................|.....","##################################################","...................|..............................","##################################################","............................................|.....","##################################################","....|.............................................","##################################################",".....................................|............","##################################################",".....|............................................","##################################################","...........................|......................","##################################################",".................|................................","##################################################","...........................................|......","##################################################","..............................................|...","#################################################F",".............|....................................","##################################################","..................|...............................","##################################################","............|.....................................","##################################################","....................................|.............","##################################################","......................................|...........","##################################################","..........................|.......................","##################################################",".......|..........................................","#################################################S","........................................|.........","##################################################","..................|...............................","##################################################"}
Returns: 313
{"##################################################","..........................................|.......","##################################################",".................|................................","##################################################",".............|....................................","##################################################",".................................|................","##################################################","...........................|......................","##################################################","............................................|.....","##################################################","...................|..............................","##################################################","............................................|.....","##################################################","....|.............................................","##################################################",".....................................|............","##################################################",".....|............................................","##################################################","...........................|......................","##################################################",".................|................................","##################################################","...........................................|......","##################################################","..............................................|...","###########################S######################",".............|....................................","##################################################","..................|...............................","##################################################","............|.....................................","##################################################","....................................|.............","##################################################","......................................|...........","##################################################","..........................|.......................","##################################################",".......|..........................................","#############################F####################","........................................|.........","##################################################","..................|...............................","##################################################"}
Returns: 215
{"##################################################","..........................................|.......","##################################################",".................|................................","##################################################",".............|....................................","##################################################",".................................|................","##################################################","...........................|......................","##################################################","............................................|.....","##################################################","...................|..............................","##################################################","............................................|.....","##################################################","....|.............................................","##################################################",".....................................|............","##################################################",".....|............................................","##################################################","...........................|......................","##################################################",".................|................................","##################################################","...........................................|......","##################################################","..............................................|...","################################################F#",".............|....................................","##################################################","..................|...............................","##################################################","............|.....................................","##################################################","....................................|.............","##################################################","......................................|...........","##################################################","..........................|.......................","##################################################",".......|..........................................","S#################################################","........................................|.........","##################################################","..................|...............................","##################################################"}
Returns: 241
{"############################################","...........................|................","############################################",".................................|..........","############################################","..............|.............................","############################################","....|.......................................","############################################","..........|.................................","############################################","...|........................................","############################################","......|.....................................","############################################",".|..........................................","############################################",".........|..................................","############################################","..........................|.................","############################################","....................|.......................","F###########################################",".........................|..................","############################################","................................|...........","############################################",".......................|....................","############################################","...................................|........","############################################",".........|..................................","############################################","........................|...................","############################################","....................|.......................","############################################",".................|..........................","############################################","....................................|.......","############################################",".........|..................................","############################################",".......................................|....","############################################","..........|.................................","###########################################S","..........................................|.","############################################"}
Returns: 514
{"############################################","...........................|................","############################################",".................................|..........","############################################","..............|.............................","############################################","....|.......................................","############################################","..........|.................................","############################################","...|........................................","############################################","......|.....................................","############################################",".|..........................................","############################################",".........|..................................","############################################","..........................|.................","############################################","....................|.......................","###########################################F",".........................|..................","############################################","................................|...........","############################################",".......................|....................","############################################","...................................|........","############################################",".........|..................................","############################################","........................|...................","############################################","....................|.......................","############################################",".................|..........................","############################################","....................................|.......","############################################",".........|..................................","############################################",".......................................|....","############################################","..........|.................................","###########################################S","..........................................|.","############################################"}
Returns: 500
{"############################################","...........................|................","############################################",".................................|..........","############################################","..............|.............................","############################################","....|.......................................","############################################","..........|.................................","############################################","...|........................................","############################################","......|.....................................","############################################",".|..........................................","############################################",".........|..................................","############################################","..........................|.................","############################################","....................|.......................","########S###################################",".........................|..................","############################################","................................|...........","############################################",".......................|....................","############################################","...................................|........","############################################",".........|..................................","############################################","........................|...................","############################################","....................|.......................","############################################",".................|..........................","############################################","....................................|.......","############################################",".........|..................................","############################################",".......................................|....","############################################","..........|.................................","#####################################F######","..........................................|.","############################################"}
Returns: 462
{"############################################","...........................|................","############################################",".................................|..........","############################################","..............|.............................","############################################","....|.......................................","############################################","..........|.................................","############################################","...|........................................","############################################","......|.....................................","############################################",".|..........................................","############################################",".........|..................................","############################################","..........................|.................","############################################","....................|.......................","#######################F####################",".........................|..................","############################################","................................|...........","############################################",".......................|....................","############################################","...................................|........","############################################",".........|..................................","############################################","........................|...................","############################################","....................|.......................","############################################",".................|..........................","############################################","....................................|.......","############################################",".........|..................................","############################################",".......................................|....","############################################","..........|.................................","##S#########################################","..........................................|.","############################################"}
Returns: 418
{"#############################################","..................................|..........","#############################################","......|......................................","#############################################",".................................|...........","#############################################",".......................................|.....","#############################################","|............................................","F############################################",".........................|...................","#############################################","...|.........................................","#############################################","...............................|.............","#############################################","...|.........................................","#############################################","......................|......................","#############################################","................|............................","#############################################","............|................................","#############################################","..............................|..............","#############################################",".........................................|...","#############################################","........................................|....","#############################################","...............|.............................","#############################################","............................................|","#############################################","......................|......................","#############################################","................................|............","#############################################",".....................................|.......","#############################################","........................|....................","#############################################","............|................................","#############################################","...............|.............................","#############################################",".......................|.....................","############################################S"}
Returns: 677
{"#############################################","..................................|..........","#############################################","......|......................................","#############################################",".................................|...........","#############################################",".......................................|.....","#############################################","|............................................","############################################F",".........................|...................","#############################################","...|.........................................","#############################################","...............................|.............","#############################################","...|.........................................","#############################################","......................|......................","#############################################","................|............................","#############################################","............|................................","#############################################","..............................|..............","#############################################",".........................................|...","#############################################","........................................|....","#############################################","...............|.............................","#############################################","............................................|","#############################################","......................|......................","#############################################","................................|............","#############################################",".....................................|.......","#############################################","........................|....................","#############################################","............|................................","#############################################","...............|.............................","#############################################",".......................|.....................","############################################S"}
Returns: 665
{"#############################################","..................................|..........","#############################################","......|......................................","#############################################",".................................|...........","#############################################",".......................................|.....","#############################################","|............................................","##########S##################################",".........................|...................","#############################################","...|.........................................","#############################################","...............................|.............","#############################################","...|.........................................","#############################################","......................|......................","#############################################","................|............................","#############################################","............|................................","#############################################","..............................|..............","#############################################",".........................................|...","#############################################","........................................|....","#############################################","...............|.............................","#############################################","............................................|","#############################################","......................|......................","#############################################","................................|............","#############################################",".....................................|.......","#############################################","........................|....................","#############################################","............|................................","#############################################","...............|.............................","#############################################",".......................|.....................","######F######################################"}
Returns: 611
{"#############################################","..................................|..........","#############################################","......|......................................","#############################################",".................................|...........","#############################################",".......................................|.....","#############################################","|............................................","##########################F##################",".........................|...................","#############################################","...|.........................................","#############################################","...............................|.............","#############################################","...|.........................................","#############################################","......................|......................","#############################################","................|............................","#############################################","............|................................","#############################################","..............................|..............","#############################################",".........................................|...","#############################################","........................................|....","#############################################","...............|.............................","#############################################","............................................|","#############################################","......................|......................","#############################################","................................|............","#############################################",".....................................|.......","#############################################","........................|....................","#############################################","............|................................","#############################################","...............|.............................","#############################################",".......................|.....................","######################S######################"}
Returns: 589
{"#################################################F","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","S#################################################"}
Returns: 2522
{"#################################################S","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","##################################################","|.................................................","##################################################",".................................................|","F#################################################"}
Returns: 2474
{"F###################", "........|...........", "####################", ".........|..........", "####################", ".|..................", "####################", "|...................", "####################", "..............|.....", "####################", "|...................", "####################", ".......|............", "####################", "..............|.....", "####################", "................|...", "####################", "........|...........", "###################S" }
Returns: 192
{"##################F#", "........|...........", "####################", ".........|..........", "####################", ".|..................", "####################", "|...................", "####################", "..............|.....", "####################", "|...................", "####################", ".......|............", "####################", "..............|.....", "####################", "................|...", "####################", "..........|.........", "##################S#" }
Returns: 186
{"F", "|", "S" }
Returns: 3
{"##F############S####", "........|...........", "####################", ".........|..........", "####################", ".|..................", "####################", "|...................", "####################", "..............|.....", "####################", "|...................", "####################", ".......|............", "####################", "..............|.....", "####################", "................|...", "####################", "..........|.........", "####################" }
Returns: 26
{"###############S####", "........|...........", "####################", ".........|..........", "####################", ".|..................", "####################", "|...................", "####################", "..............|.....", "###############F####", "|...................", "####################", ".......|............", "####################", "..............|.....", "####################", "................|...", "####################", "..........|.........", "####################" }
Returns: 69