HF RL Explorer

Write a command-line tool /app/pathfinder in Python that reads a grid from stdin, computes the shortest path…

Write a command-line tool /app/pathfinder in Python that reads a grid from stdin, computes the shortest path…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format : - First line: two integers H W (height and width, 1 ≤ H,W ≤ 1000) - Next H lines: W…

The task

**Input format**: - First line: two integers `H W` (height and width, 1 ≤ H,W ≤ 1000) - Next H lines: W integers each, space-separated, representing movement cost (non-negative integers, 0 ≤ cost ≤ 10^6) - Start at (0,0) with initial cost = grid[0][0] - End at (H-1, W-1)

Part of ai-and/termgrade-environments.