Implement a pathfinding program that reads a grid with obstacles, start, and goal positions from a file and…
Implement a pathfinding program that reads a grid with obstacles, start, and goal positions from a file and…: a task in termgrade-bandcentral-gemma4-31b-bash: TermGrade Band-Central: the 151-task selection and its splits (Harbor dataset). Input file format (plain text, UTF-8 encoding): - First…
The task
Input file format (plain text, UTF-8 encoding): - First line: two integers `rows cols` (1 ≤ rows, cols ≤ 1000) separated by a single space - Next `rows` lines: each line contains exactly `cols` characters - '.' = traversable cell (cost 1) - '#' = obstacle (impassable) - 'S' = start position (exactly one in grid) -…